我有两个网络应用程序。
应用 1 -
struts.xml
<result name="store" type="redirectAction">
<param name="actionName">storeslist</param>
<param name="namespace"></param>
<param name="tok">${token}</param>
</result>
应用2
struts.xml
<action class="com.aa.store" name="storeslist" >
<result>/WEB-INF/jsp/store.jsp</result>
</action>
现在我需要实现这个
应用程序 1 包含一个“商店”链接,单击此链接必须转到应用程序 2 的商店页面
如何做到这一点?
我试过了 <Valve className="org.apache.catalina.authenticator.SingleSignOn"/>
在 tomcat 中 server.xml
但没有用。
emptySessionPath="true"
在<connector...>
tomcat server.xml
还是不行。
最佳答案
据我所知,目前 没有绝对链接 这不起作用,因为 Struts2 总是将 http://server.domain.tld/appname
添加到所有链接之前。如果您有解决方案,请发布答案,因为我自己对此非常感兴趣。我的解决方法可以在这里找到:Deploying Struts2 Application without ContextPath
关于tomcat - 合并两个网络模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8686447/