Switch to full style
What's behind JSP & Servlets
Post a reply

Converting Session object into string

Fri Oct 24, 2008 8:22 pm

have one session object named "lastlogin"
i want to convert this session object into string...
i tried like this.....

session.getAttribute("lastlogin").toString();
but it is giving type mismatch error...

i want to convert this object and have to compare to string value...
how can i do that?...
thanx in advance...



Re: Converting Session object into string

Fri Oct 24, 2008 8:23 pm

have one session object named "lastlogin"
i want to convert this session object into string...
i tried like this.....

session.getAttribute("lastlogin").toString();
but it is giving type mismatch error...

i want to convert this object and have to compare to string value...
how can i do that?...
thanx in advance...

Re: Converting Session object into string

Fri Oct 24, 2008 8:34 pm

String str = (String)session.getAttribute("yoursessionname");

I think you can solve your prob with this.

Post a reply
  Related Posts  to : Converting Session object into string
 Read file content to StringBuffer String object     -  
 Converting arab in Roman Numerals     -  
 Benefits of converting PowerPoint presentations to DVD     -  
 check if string ends with specific sub-string in php     -  
 check if string start with a specific sub-string in PHP     -  
 Splitting a String Based on a Found String     -  
 recursive string reversal- reverse string     -  
 String token for string split     -  
 session in jsp     -  
 Session Valid     -