Access Restriction to a url/folder deployed on Tomcat server

S

Sameer

Dear All,
My jsp application gives access to a url after authentication and
generates a report using that url.
I am using Tomcat 5.5. as application server to authorize webpages.
But i noted that if i copy that generated url and paste it on IE
address bar, i can still acces it without any authentication which is
not supposed to happen.
What i have to do to avaoid this?
Can i do this at application level or server level?
Please help.
-Sameer
 
C

ck

This means that you need to redesign the webapp and apply some sort of
security check for the protected pages.
There are several ways

Controlling Client Access
1) You could block access to entire resource or just a portion of the
resource
If Client must log on to access a view then add a custom tag on top of
each of the page for access check

Eg: - <%@ taglib uri="/WEB-INF/yourtaglibrary.tld" prefix="yourtaglib"
%>
<yourtaglib:guard/>
<HTML>
.
.
.
</HTML>
2) Guarding by Configuration
The pages that has to be protected can be placed in a folder inside
WEB-INF so no one can access the pages directly by typing the url in
the bar
You need to write a servlet that would check for valid session, if
found the user would be forwarded to the relevant page

There are many more ways of doing this, you can look up for J2EE
patterns for more information

Hope this helps

Cheers,
Ck
http://www.gfour.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,325
Latest member
31Rolly51

Latest Threads

Top