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.
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.