Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Request scope for two jsps  RSS feed

 
Prabir Nandi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've arraylist in request scope, which came from action class(have some size).

My jsp going to generate report. When i click my jsp Generate Report button its actually going to previous page(reports home page), thats ok.
And opening the popup with the corrsponding report.

My question is that array list available for reports home page, but not available for pop up. Its giving null pointer exception.

is the request scope is not available for two jsp's ???

How to provide that arraylist to pop up jsp

plz help me

thankx in advance
 
Aditya Prasann
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Object do not persist across requests. Only String persist. If you want them to persist across requests, you'll need to either pass them along as hidden parameters in the page, or store them in the session (be sure to explicitly remove them when no longer needed).
 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how are u generating the popup? what action have you specified for the submit button? you say the page goes back to the report home page when you click button, so the target page of your request becomes the home page.
request scope is definitely sufficient for passing data between two jsps, in your case make sure the right jsps are participating in the information exchange.
 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops! oh yes!! missed that out totally!! i was completely off the mark then!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!