• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using RequestDispatcher.forward()

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sarthi
then I think you should change the path of images.
As paths are resolved by browsers.
 
reply
    Bookmark Topic Watch Topic
  • New Topic