Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tomcat URL-Pattern

843838Dec 12 2005 — edited Dec 12 2005
Hi guys,

I was exploring the form-based login on Tomcat using JDBCRealm. There is something I noticed which I want to discuss.

I have a project structure like this:

webapps
|
----images(dir)
----themes(dir)
----scripts(dir)
----protected(dir) - I place all my protected JSPs here
----Login.jsp
----Error.jsp

...

Now I have forced a security constraint on my "protected" directory. So when I request a page from this directory, the Login.jsp is thrown to me.

Funny thing is that the images, js and css are not getting loaded even though their folders are not protected. why is this?

What I tried is to give a url-pattern in the form of "/protected/*.jsp" but this sort of a pattern crashes the application.

Has anyone experienced this. If you have and found a solution, please explain it to me.

Thanks and regards,
Nirav
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2006
Added on Dec 12 2005
2 comments
160 views