[jboss-user] [JBoss Portal] - Re: Is there any way to force a user login when portal is ac

saigon_man do-not-reply at jboss.com
Wed Aug 22 10:17:36 EDT 2007


Hello,
I am using jboss portal 2.6.1 
I followed the instruction mentioned below to force a login page but some thing doesn't quite work well. 
anonymous wrote : 
  | By default JBoss Portal will display whatever welcome page is configured even if a user is not logged in. This page details what needs to be done in order to force the display of the login page if a user is not logged in if this behavior is desired. These instructions refer to JBoss Portal 2.0.
  | 
  | The steps are the following:
  | 
  |     * Edit web.xml in jboss-portal.sar/portal-server.war/WEB-INF
  |           o Change the first security constraint from <url-pattern>/auth/*</url-pattern> to <url-pattern>/*</url-pattern>. This will force the display of the login page mentioned in the <login-config> section of the web.xml (FORM authentication is assumed).
  |           o Change the <form-error-page> in the <login-config> section of web.xml to point to an error page that is going to be displayed when authentication fails. Let's say that page is called badlogin.jsp. You would have then <form-error-page>/badlogin.jsp</form-error-page>.
  |           o Add a new servlet mapping to web.xml. This should look like:
  |             <servlet-mapping>
  |             <servlet-name>jsp</servlet-name>
  |             <url-pattern>/badlogin.jsp</url-pattern>
  |             </servlet-mapping>
  | 
  |     * Edit jboss-portal.sar/portal-server.war/login.jsp and submit the login form to /portal/j_security_check instead of j_security_check. This is not compliant with the servlet specification but it works. You would also have to change this if the root context of the portal is changed (replace portal in the string above with whatever root context you are running your portal under).
  | 

I created few pages and followed the steps mentioned above. When I log in, I can see all of the pages that I created with the default page as the active page in that portal. When I click on the next page, the portal does not display the content of that page. Instead, it displayed the content of the default page, even though I can see the url is pointing to the page that I just clicked on in the url location of IE 6
Do I miss something here or do I need to modify something else in that web.xml?

Thanks,

TL

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

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



More information about the jboss-user mailing list