• Post Reply Bookmark Topic Watch Topic
  • New Topic

using RequestDispatcher.forward()

 
Abhijeet Gholkar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys
I have a problem when i use RequestDispatcher.forward(). I have used the following url pattern for the login servlet
<servlet-mapping>
<servlet-name>Logger</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
What i want to do is, after authenticating in the servlet, i want to forward it to some jsp page in the document root. However, when i forward from the servlet it opens the page as [document root]/servlet/pagename.jsp, and due to this the images on the jsp page are not found as they are in the [document root]/img folder.
I am using tomcat 4.1.
Please help me tackle this problem.
Bye
 
Sarthishari Kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Raja,
Try this.
<servlet-mapping>
<servlet-name>Logger</servlet-name>
<url-pattern>/servlet/Logger</url-pattern>
</servlet-mapping>
I changed this and its working in my Computer.
I am also using Tomcat.
Sathish
[ May 05, 2003: Message edited by: Sarthishari Kumar ]
[ May 05, 2003: Message edited by: Sarthishari Kumar ]
[ May 05, 2003: Message edited by: Sarthishari Kumar ]
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sarthishari Kumar:
<url-pattern>/servlet/<B>Logger</B></url-pattern>
I changed this and its working in my Computer.
I am also using Tomcat.

What does <b></b> do in web.xml ??
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you should try to change the paths of images in jsp.
 
Sarthishari Kumar
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ravish
No i just wanted to make it BOLD..
It didn't work it seems.
Have removed it now.
Sathish
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sarthi
then I think you should change the path of images.
As paths are resolved by browsers.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!