I want to change the landing page of the built-in ROLE_USER to listreports.html (the list of completed reports).
I edited WEB-INF/jasperserver-servlet.xml. It has a loginController bean with properties "homePageByRole" and "defaultHomePage". I changed it to look like the following:
I edited WEB-INF/jasperserver-servlet.xml. It has a loginController bean with properties "homePageByRole" and "defaultHomePage". I changed it to look like the following:
Code: |
<br /> <property name="homePageByRole"><br /> <list><br /> <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=repoAdminFlow</value><br /> <value>ROLE_USER|redirect:/listreports.html</value><br /> </list><br /> </property><br /> <property name="defaultHomePage"><br /> <value>redirect:/home.html</value><br /> </property><br /> </td></tr></tbody></table><br /> <br /> I also changed applicationContext-security.xml to give ROLE_USER access to listreports.html.<br /> <br /> Trouble is, my users that have only the ROLE_USER role are still landing on flow.html?_flowId=repositoryFlow. Even if I change the defaultHomePage property to listreports.html, they land on the same wrong page.<br /> <br /> I also tried using flow.html?_flowId=listReportsFlow, instead of listreports.html, but I got the same results.<br /> <br /> Do you see a step I'm missing here? <br /> <br /> Thanks! |
11 Answers:
Posted on October 29, 2007 at 7:14am
Hi,
I am also facing same problem when I tried to Change the home page to home.jsp.
I have changed in jasperserver-servlet.xml as follows
<property name="homePageByRole">
<list> <value>ROLE_ADMINISTRATOR|home</value>
<value>ROLE_USER|home</value>
</list>
</property>
<property name="defaultHomePage">
<value>redirect:/home.html</value>
</property>
But first time it goes to /flow.html?_flowId=repositoryFlow default.
after from second login it works perfectly from the same browser session.
Any solution to resolve this problem.
Thanks.
Note:
If I give "redirect:/home.html" its not working. Have to specify simply "home", it works from second time.
I am also facing same problem when I tried to Change the home page to home.jsp.
I have changed in jasperserver-servlet.xml as follows
<property name="homePageByRole">
<list> <value>ROLE_ADMINISTRATOR|home</value>
<value>ROLE_USER|home</value>
</list>
</property>
<property name="defaultHomePage">
<value>redirect:/home.html</value>
</property>
But first time it goes to /flow.html?_flowId=repositoryFlow default.
after from second login it works perfectly from the same browser session.
Any solution to resolve this problem.
Thanks.
Note:
If I give "redirect:/home.html" its not working. Have to specify simply "home", it works from second time.
Posted on October 29, 2007 at 9:23am
The user is presented flow.html?_flowId=repositoryFlow on the first login because of index.htm which redirects to this location. Change index.htm to redirect to home.html to fix the issue.
home.html is mapped to a controller that redirects or forwards the requests to the configured home page for the user/role. Hence using home.html as role home page results in an infite loop of redirections. Using "home" results in forwarding the request to home.jsp, which is the desired behaviour.
HTH,
Lucian
home.html is mapped to a controller that redirects or forwards the requests to the configured home page for the user/role. Hence using home.html as role home page results in an infite loop of redirections. Using "home" results in forwarding the request to home.jsp, which is the desired behaviour.
HTH,
Lucian
Posted on May 14, 2008 at 9:26am
I changed the configurations as you told.
I now have the following configurations:
jasperserver-servlet.xml
I now have the following configurations:
jasperserver-servlet.xml
Code: |
<property name="homePageByRole"><br /> <list><br /> <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=repoAdminFlow</value><br /> <value>ROLE_USER|redirect:/flow.html?_flowId=listReportsFlow</value><br /> </list><br /> </property><br /> <property name="defaultHomePage"><br /> <value>redirect:/home.html</value><br /> </property></td></tr></tbody></table><br /> <br /> <b>index.html</b><br /> <br /> <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre><title></title><br /> <meta http-equiv="refresh" content="0;url=home.html"><br /> <script language="javascript" type="text/javascript"><br /> window.location="flow.html?_flowId=repositoryFlow";<br /> </script><br /> <br /> </head><br /> <body><br /> If your browser doesn't automatically go there,<br /> you may want to go to <a href="home.html">the destination</a><br /> manually.<br /> <br /> </body></td></tr></tbody></table><br /> <br /> But i am still getting the redirection to repository.<br /> Am i doing something wrong? |
Posted on May 14, 2008 at 9:30am
Could you try to change
Code: |
<br /> window.location="flow.html?_flowId=repositoryFlow";<br /> </td></tr></tbody></table><br /> to<br /> <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre><br /> window.location="home.html";<br /> </td></tr></tbody></table><br /> in index.html, and clear your browser's cache?<br /> <br /> Regards,<br /> Lucian |
Posted on May 4, 2009 at 10:38pm
lucianc
Wrote:
Could you try to change
to
in index.html, and clear your browser's cache? Regards, Lucian |
HI ,
I am doing the same thing but getting AccessDeniedException Any suggestion on this Lucian.
Vishal