• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems with form-based authentication

 
Zhang Jones
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Zhang Jones
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly what happens when you hit /resourceServlet.do

Try changing this part


To



Try changing http-method to GET as well.

 
Pragya Patnaik
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic