[jboss-user] [JBoss Portal] - Re: User Identity modules in a Portlet?

Antoine_h do-not-reply at jboss.com
Fri Oct 5 08:31:36 EDT 2007


For the first question, yes, the "transactionManager" is initialized by the Portlet  Container.
It is a kind of Injection, like oftenly used in AOP (Aspect Oriented Programming), in EJB3 (for the persistenceManager), in Seam, etc...

Second question : 
you are doing a Login Portlet : a portlet to do the login ?

if so : there are a few post on that.
it is not recommended : that's why the portal does not provide one !
the login is done by Tomcat (usual tomcat feature, with jsp page), and trying to have it in a portlet is not easy.

there is a Wiki on that :
http://wiki.jboss.org/wiki/Wiki.jsp?page=PortletLogin
and this post (among others) : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114467

using a jsp page is much more simple.
you can modify this page : login.jsp, in the portal-server.war
to make it look the way you want, and add a few features if necessary (cookie, and so...).

making a Login Portlet should be something to avoid, unless absolutely requiered (by the marketing ? ... try to explain it is very costly... and a simple jsp page is not a so bad alternative for the user experience of the portal).

for your question of going to the login.jsp page :
yes, that is the only way it can work as it is : 
The portal container rely on Tomcat for the login process.
when a authenticated URL is called, the portal container redirect the request to tomcat authentification process, that call the login.jsp page.

Look at the web.xml in portal-server.war.
By the way, I have noticed it is no use to change the name of this page (myLogin.jsp).
It does not work... don't know why... something about Tomcat... 

The best is to avoid to modify all this : let Tomcat do it the way it is... more  reliable for security... and entering into modification inside Tomcat is a lot of work...
This Tomcat authentification process is also used by JBoss (outside the portal). Also by the SSO of JBoss. And it works in cluster... 
That's many reason not to modify this...

About the way of writting your url :
String form_path="/auth/"; 

use the jsp tag for creating a portal url... much more reliable...
look at some example in the UserPortlet jsp pages...

hope I have understand well your question, and that this helps...



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091965#4091965

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091965



More information about the jboss-user mailing list