Vik
Vik

Reputation: 9289

jsp pointing in web.xml

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?

Upvotes: 0

Views: 274

Answers (2)

techzen
techzen

Reputation: 2955

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.

Upvotes: 0

ZZ Coder
ZZ Coder

Reputation: 75456

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

Upvotes: 1

Related Questions