• Post Reply Bookmark Topic Watch Topic
  • New Topic

Authentication in a web application  RSS feed

 
John Paterson
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, posted this in another forum and am posting it here now. I am trying out form based authentication and data source realm. The application starts off with a page(logintest.jsp, outside the admin folder) that asks the user to click on a link to view the admin applications, the login page(login.jsp, located inside the admin folder.) appears after the link is clicked. The problem I have is that after typing in the correct username and password,I am expecting the index.jsp page from the "Admin" folder to be displayed, but instead I am seeing a directory listing for the admin foler. I am not sure what is wrong. The following are the contents from my context.xml and web.xml and also the app directory.

web.xml
-------


conetxt.xml
-----------


WebApp directory
----------------
<pre>
WebContent
- admin(folder)
index.jsp
login_error.jsp
login.jsp
- WEB-INF
web.xml
lgintest.jsp
</pre>

Hope someone can advise, thanks.



 
Tim Cooke
Marshal
Posts: 3840
221
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the code for the link look like?
 
John Paterson
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:What does the code for the link look like?


Hi Tim Cooke,

This is the code for the form, I was expecting to be brought to the index.jsp page after filling and submitting this form, but instead I am getting to see the directory listing.
 
Tim Moores
Saloon Keeper
Posts: 3832
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In that case, index.jsp should be configured as welcome file, not logintest.jsp (assuming that the link goes to the "/" URL - does it?).

Also make sure to configure the server not to show directory listings.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!