This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one 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.