How can I change my context root in WebWork?

524 views Asked by At

I am currently working on a huge web application consisting of JSPs. Also I use WebWork framework.

Until now the context root of my application was "/". Now I want to change that to "nstat".

How should I handle the relative and absolute calls from my JSPs?

1

There are 1 answers

1
Kees de Kooter On

For jsps you can use the <c:url/> tag to build proper relative urls. Webwork has a similir custom tag named <ww:url/>.

<c:url val="somepath/some.jsp"/>

Will be translated to "/nstat/somepath/some.jsp". If you set the var attribute you can use the url later on in your jsp using the ${} notation.