•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 423,575 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,476 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 728 | Replies: 1 | Solved
![]() |
•
•
Join Date: Mar 2008
Posts: 117
Reputation:
Rep Power: 1
Solved Threads: 13
I have looked around this site but have not found anything to help me.
I have a jsp page which takes user input, the page is then posted to a servlet using ajax, the servlet then sets a bean value.
My problem is that when i go back to the main page, the bean value is not displaying in the jsp page.
I created a Bean class which has my setter and getter methods, and a servlet which sets the bean value.
in the servlet i used the following to set the value of the bean
In my jsp i use the jsp usebean tag which imports my bean class to get the value, and i set the scope to session. Is that correct?
I have read that i should set the httpsession to set the attribute, i have tried that as well, but still no results in my jsp page.
code used for setting the session attribute.
I have no clue what i m doing wrong please help
Thanx
I have a jsp page which takes user input, the page is then posted to a servlet using ajax, the servlet then sets a bean value.
My problem is that when i go back to the main page, the bean value is not displaying in the jsp page.
I created a Bean class which has my setter and getter methods, and a servlet which sets the bean value.
in the servlet i used the following to set the value of the bean
SubscriberBean subscriberBeanRef = new SubscriberBean();
subscriberNameVar = request.getParameter("subscriberName");
subscriberBeanRef.setsubscriberName(subscriberNameVar);In my jsp i use the jsp usebean tag which imports my bean class to get the value, and i set the scope to session. Is that correct?
I have read that i should set the httpsession to set the attribute, i have tried that as well, but still no results in my jsp page.
code used for setting the session attribute.
String subscriberNameVar;
HttpSession session = request.getSession(true);
subscriberNameVar = request.getParameter("subscriberName");
session.setAttribute("subscriberName", subscriberNameVar);I have no clue what i m doing wrong please help
Thanx
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Problem with JDBC driver config (JSP)
- struts help.. (Web Developers' Lounge)
- what are JSP, Servlet , Bean in MVC ??..how does it work? (JSP)
- HI problem in JSTL tags (JSP)
- Bean File location (JSP)
Other Threads in the JSP Forum
- Previous Thread: User Verify ,Code Help
- Next Thread: how t ouse calendar with spring tags in jsp??


Linear Mode