Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Security Prob

Status
Not open for further replies.

johno77

Technical User
Nov 1, 2003
40
0
0
GB
Hello i am still a bit new to these technologies so please bear with me. I have a simple jsp page which i have restricted access to in my web-xml file. I am using form based security so when the user tries to access this resource a login page is displayed. If the user has the rights to enter i.e. their details match the tomcat-users file then they are allowed access to the resource. Is there a way to pass these details to my jsp page so i have access to the current user

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>
<HTML>
<HEAD>
<TITLE>Log In</TITLE>
<LINK REL=STYLESHEET
HREF=&quot;../company-styles.css&quot;
TYPE=&quot;text/css&quot;>
</HEAD>

<BODY>

<%@ taglib uri=&quot;project-taglib.tld&quot; prefix=&quot;project&quot; %>
<project:heading bgColor=&quot;BLACK&quot; color=&quot;WHITE&quot;>
NCC Web studios
</project:heading>
<P>
<H3>Sorry, you must log in before accessing this resource.</H3>

<FORM ACTION=&quot;j_security_check&quot; METHOD=&quot;POST&quot;>
<TABLE>
<TR><TD>User name: <INPUT TYPE=&quot;TEXT&quot; NAME=&quot;j_username&quot;>
<TR><TD>Password: <INPUT TYPE=&quot;PASSWORD&quot; NAME=&quot;j_password&quot;>
<TR><TH><INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;Log In&quot;>
</TABLE>
<br><br><br><br><br><br><br><br><br><br><br>
<project:date />
</FORM>

</BODY>
</HTML>

many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top