A
Antti Nummiaho
I am using struts with tiles for my web application and I am wondering
how should I configure those to get the page url displayed on the
browser instead of the action path.
For example, in struts-config.xml I have:
<action path="/do_something"
type="foo.SomeAction">
<forward name="success"
path="somePage.page"/>
</action>
And in tiles-defs.xml:
<definition name="somePage.page" extends=".mainLayout">
<put name="pageTitle" value="someTitle" />
<put name="content"
value="/WEB-INF/tiles/contents/someContent.jsp"/>
</definition>
When the action do_something is invoked and the page is loaded, the url
that is shown in the browser is .../do_something.do while I would like
it to be something like .../someContent.jsp or .../somePage.page. Is
this possible? I tried putting redirect="true" attribute to the forward
tag, but it had no effect.
how should I configure those to get the page url displayed on the
browser instead of the action path.
For example, in struts-config.xml I have:
<action path="/do_something"
type="foo.SomeAction">
<forward name="success"
path="somePage.page"/>
</action>
And in tiles-defs.xml:
<definition name="somePage.page" extends=".mainLayout">
<put name="pageTitle" value="someTitle" />
<put name="content"
value="/WEB-INF/tiles/contents/someContent.jsp"/>
</definition>
When the action do_something is invoked and the page is loaded, the url
that is shown in the browser is .../do_something.do while I would like
it to be something like .../someContent.jsp or .../somePage.page. Is
this possible? I tried putting redirect="true" attribute to the forward
tag, but it had no effect.