hi. ich müsste einen login bereich auf einer website machen. habe einstweilen infos bekommen, dass ich dies am besten mit "Form-based Authentication" in Tomcat umsetze. leider bin ich noch nicht schlauer geworden, könnt ihr mir bitte weiterhelfen!
Announcement
Collapse
No announcement yet.
Form-based Authentication" in Tomcat
Collapse
X
-
<security-constraint>
<web-resource-collection>
<web-resource-name>SecurePages</web-resource-name>
<description>Security constraint /secure</description>
<url-pattern>/secure/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<description>only let the admin users login</description>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<description>The Only Secure Role</description>
<role-name>admin</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/LoginForm.html</form-login-page>
<form-error-page>/LoginError.html</form-error-page>
</form-login-config>
</login-config>
<form method="POST" action="j_security_check">
Username: <input type="text" name="j_username"><br />
Password: <input type="password" name="j_password"><br />
<br />
<input type="submit" value="Login">
<input type="reset" value="Reset">
</form>
Comment
-
<form method="POST" action="j_security_check">
Username: <input type="text" name="j_username"> <br />
Password: <input type="password" name="j_password"> <br />
<br />
<input type="submit" value="Login">
<input type="reset" value="Reset">
</form>
Comment
Comment