我在Jboss conf文件夹中有一个config.properties。
config.properties :
server.url=http://localhost:8085/
我想在我的 struts.xml 中使用此属性:
...
<action name="logoutAction" class="app.LogoutAction">
<result name="ok" type="httpheader">
<param name="status">301</param>
<param name="headers.location">server.url</param>
</result>
</action>
...
有可能吗?
或者还有其他方法吗?
答案 0 :(得分:0)
不是开箱即用的。
最好的选择是使用dynamic result。您需要在启动时或运行时以某种方式获取该值,然后从操作中将其填写。虽然您可能不需要从配置中检索值,但它可能在请求中可用-别回想。