Forums Register Login

Jsp And Servlets Clash

+Pie Number of slices to send: Send
Hello Friends,
For my multiclient chatserver program, I have created a login page in jsp (login.jsp) that stores the users details(as a hashtable) in a SevletContext by the name USERS_TABLE. If I tried to access that users list in a servlet (ChatServer.java) , null value is being returned and corresponding exception is thrown. But if the same thing is implemented in servlets itself (login.java), things are working fine. Can't we set ServletContext's attributes and Session Attritibute's in a JSP page and could retrieve in a SERVLET and viceversa. Eventhough jsp is a wrapper for a servlet, why this is not working. I greatly appreciate your valuable suggestions in advance.
+Pie Number of slices to send: Send
Please see this topic for a message concerning your display name.
If the servlet and JSP are in the same context they will both access the same servlet context.
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 892 times.
Similar Threads
Servlet Error Page
How to navigate from jsp-to servlets-and again to another -jsp
Urgent -RequestDispatcher.include and forward
Can a jsp talk to a servlet?
Optimizing Session tracking code.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:03:58.