I have solved this problem using JBoss Portal -  my solution is sketched out 
here.  The basis of the solution is you will need to do 3 things.

1.  Develop your main portal page including login portlet.  Create appropriate 
security constraints in web.xml (require FORM based authentication, etc.) - our 
'main' portal page (and portlets) will be
packaged in .war file and we access it under the context:

http://myserver:myport/portal/myportal/index.html

a.)  in your web.xml (I modified JBoss's 
jboss-portal.sar/portal-server.war/WEB-INF/web.xml as I wanted to replace the 
entire look-and-feel of the portal and apply my security constraints - you can 
make similar modifications to your own portal web.xml. ), add security 
constraints for your page:


  | <?xml version="1.0"?>
  | <!DOCTYPE web-app PUBLIC
  |    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  |    "http://java.sun.com/dtd/web-app_2_3.dtd";>
  | <web-app>
  | 
  |   ....
  | 
  |   <security-constraint>
  |      <web-resource-collection>
  |         <web-resource-name>Authenticated</web-resource-name>
  |         <description></description>
  |         <url-pattern>/myportal/*</url-pattern>
  |      </web-resource-collection>
  |      <auth-constraint>
  |         <role-name>Authenticated</role-name>
  |      </auth-constraint>
  |   </security-constraint>
  | 
  |   ...
  | 
  |   <login-config>
  |     <auth-method>FORM</auth-method>
  |       <realm-name>Odyssey SMF Portal</realm-name>
  |       <form-login-config>
  |         <form-login-page>/login.jsp</form-login-page>
  |         <form-error-page>/login.jsp</form-error-page>
  |       </form-login-config>
  |    </login-config>
  | 
  |    <security-role>
  |       <role-name>Authenticated</role-name>
  |    </security-role>
  | 
  | </webapp>
  | 
  | 

b. Sample view.jsp for your login portlet (which use in both your main portal 
and your login portal)  SEE NEXT POST - OUT OF SPACE HERE 

2.  Develop a second portal, let's call it /login/*, packaged in its own war - 
this second portal needs a copy of the page you designed in step 1. and it 
needs to be created as the default page (in login-portal.xml) for /login/*.  We 
will access (indirectly - described below) using this URL:

http://myserver:myport/portal/login/


3.  Modify your JBoss Portal installation:
    
     a.)  In */jboss-portal.sar/portal-server.war/login.jsp change it to 
redirect to your login portal (here is my login.jsp)

<% response.sendRedirect("/portal/login/"); %>

     b.)  Create */jboss-portal.sar/portal-server.war/logout.jsp and put this 
code in it:

<% session.invalidate();
  |    response.sendRedirect("/portal/myportal/");
  | %>
  | 

NOTE:  

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

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


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to