这应该工作:
<s:set id="contextPath" value="#request.get('javax.servlet.forward.context_path')" /><s:a href="%{contextPath}/clickme" theme="simple">Click here.</s:a>但是,您不应该这样做。需要网址时,请使用
<s:url>标记:
<%-- Without specifying an action --%><s:url id="myUrl" value="clickme" /><s:a href="%{myUrl}" theme="simple">Click here.</s:a><%-- With an action --%><s:url id="myUrl" action="clickme" /><s:a href="%{myUrl}" theme="simple">Click here.</s:a>顺便说一句,您不需要表单的action属性的上下文路径:
<s:form method="post" action="submitme" theme="simple"></s:form>



