File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes What's the best way to do authentication in ssh?   Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What Watch "What New topic

What's the best way to do authentication in ssh?

Kurt Xu
Ranch Hand

Joined: Sep 29, 2009
Posts: 32
struts2 +spring 3+hibernate.

Now I wanna do login authentication over some protected resource, page or action. That being said, the page will redirect to login page if you access some protected resource without a login .There are 3 ways I can think of:

1. Use struts interceptor, the weak points are you have to configure for every protected action, and jsp pages can't be applied.

2. Use spring interceptor, the weak points are you still can't get jsp applied and get http session in the interceptor.

3.Use filter coming with Java EE. But the problem is url-pattern only supports wildcards , I just want to assign some certain protected jsp or action specifically, not all.

So who can offer a best practice for that? thanks a lot.
It is sorta covered in the JavaRanch Style Guide.
subject: What's the best way to do authentication in ssh?
Similar Threads
JSF and security
security constraint with jsp forward
Weird Form Auth and javascript behavior
Login into JSP through JAVA
Get Error messages/Exceptions from Active Directory Server(ADS) with Weblogic 9.2