servlets & jsp

48 views
Skip to first unread message

shiva.ar...@gmail.com

unread,
Sep 2, 2013, 2:30:50 AM9/2/13
to java-bra...@googlegroups.com

 Hi,
Your tutorials are very clear & informative. In servlets MVC tutorials, in LoginServlet, you store userID & password in member variables & call methods in logins service(business service methods). I follow your approach. But when i saw struts2 tutorials, i got a doubt. You mentioned in struts 2 tutorials that we should not store user data in member variables, (the necessity of valuestack etc...) of servlet since it is not thread safe. But in MVC tutorials you are doing exactly the same thing.

when 2 or more users access loginservlet, chances are that it could lead to errors. Am i right in saying so??? IF YES, THEN WHAT IS THE WAY TO USE MVC PATTERN USING  JSP&SERVLETS ONLY.

Please clarify.. whether the approach followed by you in MVC tutorials is THREAD SAFE OR NOT...

Reply all
Reply to author
Forward
0 new messages