Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

passing object from one jsp to another.  RSS feed

 
Pravin Venkatesh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm totally new to jsp and i would like to know how to pass an object from one jsp to another..
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You generally don't. If you are new to JSP, then it's important to get good practices down at the outset.

Generally, JSPs are the end of the line for objects created during a request. They use the objects to render the HTML view to be sent to the browser, and then everything stops. The objects get reclaimed, and your app waits for the next request.

You should probably read this article to make sure that you understand how JSP operates, and then this article to understand how they fit into the overall scheme of a web application.

If, after reading those articles, you still think that you need to pass an object from on JSP to another (unlikely), post back with the specific scenario where you think that it's necessary,
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S. JSP rule #1: No Java code in a JSP. Ever. If you are learning JSP by putting Java code into JSPs, you are doing things as they were being done over 8 years ago! Modern JSP uses no Java code in the pages.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!