wood burning stoves 2.0*
The moose likes JSP and the fly likes redirecting to a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "redirecting to a jsp page" Watch "redirecting to a jsp page" New topic
Author

redirecting to a jsp page

Priya Lavti
Ranch Hand

Joined: Oct 11, 2004
Posts: 41
Hi all,

I want to redirect to MyPage.jsp when user enters the url www.mywebsite.com/mypage in the browser. Can it be done by editing web.xml? Or something else have to be done for this?

Thanks in advance
~pinks


-Priya
SCJP 5.0
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Is "mypage" a valid webapp (context)?
If so, you only need to add MyPage.jsp to your welcome-file-list in web.xml.
If not, you can create a servlet entry for the MyPage.jsp page and create a mapping with a url-pattern of "mypage".


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: redirecting to a jsp page