tags:

views:

40

answers:

3

hie

i have all my web application contents inside a directory ui/page of WEB folder.

I declared a welcome file pointing to /ui/page/index.html and it works fine.

but all the links on the page still points to root folder instead of /ui/page

so how to fix it?

A: 

base tag

adatapost
Well this will need to change me my page and same way all the pages having this issue.is there any way to modify web.xml and add some sort of stuff to handle?
Vik
+1  A: 

Add an UrlRewriteFilter to pointing all JSP to the ones in the directory.

ZZ Coder
hie not sure if all these complicated solutions are the only option. Isn't there a way to just modify my web.xml and adding some sort of pattern matching where i can say if something comes like *.jsp then search it at ui/page/ location?
Vik
A: 

Either you can use the Tuckey url rewriter or write your own filter class that redirects to the right jsp.

Make entries for the filter class in the web.xml and for each incoming request check if the incoming request path has /ui/page in it - if not update requested url and redirect.

techzen
do u have any code to share for this please?
Vik