servlets - Google App Engine : user login page -
if want require users logged in view page on web site, how achieve this? check user login status @ beginning of doget() in every servlet class , redirect log-in page? once user logs in, redirect original servlet? achieve same thing simple configuration if such thing exists?
add tag web.xml
file:
<security-constraint> <web-resource-collection> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>*</role-name> </auth-constraint> </security-constraint>
this require user authenticated in whatever role (role-name
) access servlet (url-pattern
)
Comments
Post a Comment