Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restrict the URL Access in Servlets 2.2

 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In our Application We are having an individual Servlet for each of the Functionality.
All these servlets were initially designed with out considering the aspect of Authorization.

Now we have a requirement to perform the Authorization for each of these servlets before the request for them is processed at server side.
To achive this I need to change all of my existing servlets to implement the authorization logic in them.
We are using the servlet engine 2.2 .. so we are not able to use the Filters Concept.

Is there any alternate way to do this with out changing all of the servlets?

Many Thanks,
K.Chandra.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Update to the latest j2ee version. Filters are the smoothest way to encapsulate common functionality ...
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use form authentication and protect a URL by configuring the same in web.xml
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sebastian Janisch,

Currently We don't have the option to upgrade our server to a new version.
So I need to look for an alternate solution in the Servlet 2.2 version itself.

Hi Deepak Bala,

Could you please explain me about the form authentication mechanism and the web.xml configuration to protect a URL?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a nice article that explains that

http://onjava.com/lpt/a/2411

Its a little old but the core concepts should still hold good
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepak,

Thank you very much for the link provided.

But in our application we are already having an custom authentication mechanism using the TAM (Tivoli Access Manager).
So i can't write one more Authentication mechanism using this form based authentication.

Is there any way to Write Filter Kind of Functionality in Servlet 2.2 version?
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the support for filters started with the 2.3 version of the servlet spec. As posted, using a filter is one of the easiest ways to achieve the functionality that you need.

chandra kambham wrote:Hi Deepak,

Is there any way to Write Filter Kind of Functionality in Servlet 2.2 version?
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I know that spring security is very pluggable and works well even in applications that do not use Spring.
It also allows you to define access to certain URLs based on roles that you can define.

Sean
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sean,

Could you please provide me with the information on Spring security?
 
Sean Clark
Rancher
Posts: 377
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

The website is spring security website. If you have any specific questions, then please post them. I'm sure someone will be able to help.

Sean
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there any Plug-in kind of thing available for Filters in servlet 2.2 version?
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there a way that I can implement the Filter kind Functionality on my Own in servlet 2.2 version?
 
chandra kambham
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Through google i found that there is some plugin available for filters in servlet 2.2 version for WebSphere Server.

Is there any such plugin available for SUN ONE Portal Server 6.0
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic