Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Extracting a value from the j_security_check servlet into a JSP page  RSS feed

 
Varnam Aayiram
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks...

I have a problem as follows:

I log in into the web app, via my login.jsp page. Below is the code for the form that accepts the login information



Login is sucessful and I am brought to the 'studentstub.jsp' page. I would like the user name to appear on the 'studentstub.jsp' page. I used the following code in the 'studentstub.jsp' page :


but all I am getting is a null. The 'j_security_check' servlet is not exactly part of my package, but the glassfish app server. Is there anything wrong in the way I am extracting the information from 'j_security_check' ? Hope someone can advise, thanks.
 
Devaka Cooray
Marshal
Posts: 5322
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The getRemoteUser() method in HttpServletRequest returns the username of the authenticated user.
 
Varnam Aayiram
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Devaka Cooray..

Thanks for the reply, I appreciate it. I tried doing what you mentioned and it worked. I replaced this:



with this:



Thanks alot...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!