• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help me using bean in JSP

 
Soundar Sweet
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using two jsp files. im setting the values to a bean in the first jsp file and i need to use the values saved in the bean in the second jsp file. Please tell me how can i do it.

Thanks in advance.
Soundar
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the bean to survive the transition across requests you need to store it in one of session or application scope. Use session scope if the bean is specific to one particular user, and be sure to remove the bean when you are done with it. Use application scope if the bean is applicable to everyone using the application.
 
Soundar Sweet
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks....


Please tell me how to get a bean using request.


Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you moving from one JSP to the other? Chances are, you cannot use request scope to store the bean.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!