• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is there any funtion in jsp like server.transfer in asp

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any function in jsp by which i can achieve the following functionality ???

Server.Transfer ends execution of the current asp page without clearing the output. The new page has access to same set objects (Application, Request, Response, Server, Session) as the starting file. To the browser it will appear you have the originally requested page not the page to which you are transferred.
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jigar Naik:
without clearing the output.


in the case of forward the output of the source .jsp won't get displaied.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is correct. If you wan tto mix output from multiple sources, you'll beed to use an include.
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but in my case, i have got 2 jsp, (view1.jsp & view2.jsp) from view1.jsp i need to forward request to view2.jsp and i dont have access to modify code of view2.jsp so i can't code include directive in view2.jsp

any alternative ??? without altering view2.jsp ???
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If part of the output is from the first JSP and part from the 2nd, why would there be any difference between a forward and an include?

And if these are both part of the same web app, how can you not be able to modify the second JSP?

Incidentally, it sounds as if this whole thing is a fragile deck of cards that's going to come crashing down sooner rather than later. What's preventing you from structuring this in a reasonable fashion?
 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont know how the application is structured, but what i posted is what my seniour told me.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic