| | |
Session variables
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
You will have to cast it to the reference type you are expecting it to return. This is because the specifications say that getAttribute() returns a variable of type Object which of course makes sense since it enables us to store a reference variable of any kind. Maybe something along the lines of:
JSP Syntax (Toggle Plain Text)
session.setAttribute("isLoggedIn", Boolean.TRUE); Boolean b = (Boolean)session.getAttribute("isLoggedIn");
I don't accept change; I don't deserve to live.
If you find a solution to a problem, it is recommended that you mark it as solved by clicking the Mark it as solved link, and if possible, posting the solution which worked for you. That way, someone else facing the problem who stumbles upon this thread might find your answer to be useful. I guess this is the least we all can do, can't we? :-)
I don't accept change; I don't deserve to live.
![]() |
Similar Threads
- Session variables not carrying over to next page (PHP)
- Session variables (ASP.NET)
- PHP Session Variables (PHP)
- Session Variables a threat? (VB.NET)
Other Threads in the JSP Forum
- Previous Thread: Using md5 in JSP
- Next Thread: Displaying language other than English on JSP
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






