| Author |
problems with form-based authentication
|
Zhang Jones
Greenhorn
Joined: Feb 02, 2011
Posts: 16
|
|
ResourceServlet
web.xml
login.jsp
error.jsp
welcome.jsp
tomcat-users.xml
webpage
I'll very thankfull someone,who can help me to solve the problem!
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
What problem ?
You shouldn't be accessing login.jsp directly. You should be accessing the /ResourceServlet via a POST. Only in this case will the login page be automatically shown.
|
[My Blog]
All roads lead to JavaRanch
|
 |
Zhang Jones
Greenhorn
Joined: Feb 02, 2011
Posts: 16
|
|
Christophe Verré wrote:What problem ?
You shouldn't be accessing login.jsp directly. You should be accessing the /ResourceServlet via a POST. Only in this case will the login page be automatically shown.
It also doesn' work!
webpage
|
 |
sudhir nim
Ranch Hand
Joined: Aug 29, 2007
Posts: 212
|
|
Exactly what happens when you hit /resourceServlet.do
Try changing this part
To
Try changing http-method to GET as well.
|
[Servlet tutorial] [Servlet 3.0 Cook Book]
|
 |
Pragya Patnaik
Greenhorn
Joined: Dec 03, 2009
Posts: 7
|
|
Even by changing the URL PATTERN it does not work...
As per my knowledge, whenever the welcome-file is called, it should redirect to login.jsp.
for e.g : my welcome file is index.jsp, and when called the base path, i get index.jsp without authentication...
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14669
|
|
Zhang Jones wrote:
It also doesn' work!
webpage
If you're typing that in your browser's url address, you'll send a GET request, not a POST.
|
 |
sudhir nim
Ranch Hand
Joined: Aug 29, 2007
Posts: 212
|
|
Try adding index.jsp to web-resource-collection, make sure you use GET method.
You can try constraining all URLS "/**" just to make sure your configuration works.
Once you know it works, you can change it to some thing like /private/* and have all your URLs that need authentication under this path.
And when pasting a link to your local machine, eg http://localhost in forum, don't use the URL bb code, because you don't want to make it clickable.
|
 |
Zhang Jones
Greenhorn
Joined: Feb 02, 2011
Posts: 16
|
|
sudhir nim wrote:Exactly what happens when you hit /resourceServlet.do
Try changing this part
To
Try changing http-method to GET as well.
Thank you, but it doesn't work!
|
 |
 |
|
|
subject: problems with form-based authentication
|
|
|