This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hey here i am developing one webapplicaion like student registration create ,delete modify,search ... and i am using MVC2 architecture ... so my doubt is while sending the values from servlet to jsp i am using sessions.. am i right? or what shouyld i need to use.. i think there are 4 types request,application,session,
please will give me real time implementation for this
please answer me...soooon
thanx in advance cinux
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
No, you shouldn't be using the session to pass data from the Servlet to the JSP for display. You can keep the data in the 'request scope' by using request.setAttribute(...) and then use request.getAttribute(...) in the JSP, since they share the same request.
Though you can use sessions but in case the the values are not being used through out the session don't use them. In your case it seems that you only require them to be passed amongst the requests. So I would recommend you to use the request scope for your application.
Joined: Apr 16, 2005
but what happens if i use session.. will there be any performance edgradation?? thanx a lot cinux
Originally posted by saikrishna cinux: but what happens if i use session.. will there be any performance edgradation?? thanx a lot cinux
Do not use session if you do not required. It will degrade the performance. You can share data between servlets and jsps using request object get and set parameter methods and store your data in JavaBeans.