• 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

RequestDispatcher 's forward method take you to a page but no IMG.!

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
a.html -> b.jsp -> validate.java
when I enter b.jsp from a.html by clicking a link i can see a IMG that I included.
but when I click on a button that calls validate.java it will validate some info. and depending on the validation it may call b.jsp again to prompt the user to corrent things..
but when it does that the IMG is not seen !!
I don't know why...
also is there a better approach to achive the above functionality? some kind of methos that has the same effect as a user pushing BACK button so that all the form data will still be there automatically...
Thanks heaps
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am betting that your image tag was not an absolute URL but a relative one. When the server serves a servlet, it looks to the browser like it is coming from a /servlet directory so thats where the browser requests the image from.
The solution: Use a <base> tag in the <head> area of the page to point the browser to the directory for images and other resources (as applet classes.)
Bill

------------------
author of:
 
sean cee
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mr.Brogden,
You are legend!!
Thanks again!!

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic