sarahmei Posted September 23, 2006 Share Posted September 23, 2006 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: Code: <property name="homePageByRole"> <list> <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=repoAdminFlow</value> <value>ROLE_USER|redirect:/listreports.html</value> </list></property><property name="defaultHomePage"> <value>redirect:/home.html</value></property> I also changed applicationContext-security.xml to give ROLE_USER access to listreports.html. 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. I also tried using flow.html?_flowId=listReportsFlow, instead of listreports.html, but I got the same results. Do you see a step I'm missing here? Thanks! Link to comment Share on other sites More sharing options...
lucianc Posted September 26, 2006 Share Posted September 26, 2006 There is, indeed, something strange with this. Have you managed to get it working? I've also tried it and it didn't work at the first login, but it worked from the second login onwards. Regards,Lucian Link to comment Share on other sites More sharing options...
karthikcnetric Posted October 29, 2007 Share Posted October 29, 2007 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. Link to comment Share on other sites More sharing options...
lucianc Posted October 29, 2007 Share Posted October 29, 2007 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 Link to comment Share on other sites More sharing options...
umair Posted May 14, 2008 Share Posted May 14, 2008 I changed the configurations as you told.I now have the following configurations: jasperserver-servlet.xmlCode:<property name="homePageByRole"> <list> <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=repoAdminFlow</value> <value>ROLE_USER|redirect:/flow.html?_flowId=listReportsFlow</value> </list> </property> <property name="defaultHomePage"> <value>redirect:/home.html</value> </property> index.html Code:[code]<title></title> <meta http-equiv="refresh" content="0;url=home.html"> <script language="javascript" type="text/javascript"> window.location="flow.html?_flowId=repositoryFlow"; </script> </head> <body> If your browser doesn't automatically go there,you may want to go to <a href="home.html">the destination</a>manually. </body> But i am still getting the redirection to repository.Am i doing something wrong? Link to comment Share on other sites More sharing options...
lucianc Posted May 14, 2008 Share Posted May 14, 2008 Could you try to changeCode:window.location="flow.html?_flowId=repositoryFlow";toCode:[code]window.location="home.html";in index.html, and clear your browser's cache? Regards,Lucian Link to comment Share on other sites More sharing options...
umair Posted May 14, 2008 Share Posted May 14, 2008 I appreciate your help :)Works like a charm Link to comment Share on other sites More sharing options...
report_slo Posted May 22, 2008 Share Posted May 22, 2008 Is this valid solution also for JS3 ?:unsure: I have some problem to locate "window.location"as specified above. Regards. Borut Link to comment Share on other sites More sharing options...
lucianc Posted May 22, 2008 Share Posted May 22, 2008 The file is $TOMCAT/webapps/jasperserver/index.htm. JS 3.0 usesCode:window.location="flow.html?_flowId=repositoryExplorerFlow"; Regards,Lucian Link to comment Share on other sites More sharing options...
report_slo Posted May 22, 2008 Share Posted May 22, 2008 Thank you for quick replay :) It works nice.B) Regards. Borut Link to comment Share on other sites More sharing options...
vishal29bhp Posted May 5, 2009 Share Posted May 5, 2009 luciancWrote: Could you try to change Code: to Code: 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 Link to comment Share on other sites More sharing options...
lucianc Posted May 20, 2009 Share Posted May 20, 2009 vishal29bhpWrote: HI , I am doing the same thing but getting AccessDeniedException Any suggestion on this Lucian. Vishal In which scenario does this happen? Is a user logged in?Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now