• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Authentication in a web application

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
Marshal
Posts: 5955
409
IntelliJ IDE Python TypeScript Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic