• 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

jsp:forward

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
is this one allowed in jsp
<jsp:forward page="somepic.gif" />
I am required to use this in my code to redirect to an html page in this way
The same is allowed in asp programming ie
response.redirect ("somepic.gif")
thanks
mohan
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


<jsp:forward page="somepic.gif" />


somepic.gif ain't no HTML page. But that's not a problem, it should work. Doesn't it work for you?
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
forward is not the same as redirect.
forward retains the same request and response, in effect the client is asking for content A and you are deciding to return content B. I imagine forwarding an image should work as long as you have set the correct content-type.
redirect (or sendRedirect) returns a reply to the client telling them to ask for a differnt piece of content. ie, the client asks for content A, you send them a message telling them to look at content B instead and the browser automatically loads the new content.
Hope this clears it up,
Dave.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic