Displaying the rapports list as home page

Hi,

I would like a given user to be directed on the rapports list page when he logs in.

I created a homeForMyRole.jsp file as below but I don't have the wanted behaviour.

If I suppress the "viewAsDashboardFrame=true" part, I have the menu bar and logo twice and If i let it, it is worse.

What do I do wrong ?

How to display a page, that one normally goes to through the menu, when one logs in ?

Thank you very much !

Julien

 

Code:
<% request.setAttribute("homePage","true"); %> <%
request.setAttribute("homePage","true"); %>
 
 
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td valign="top">
            <table valign="top" align="center" cellpadding="0" cellspacing="0" border="0" width="920" height="450">
                <tr>
                    <td valign="top" align="center" width="100%">
<%@ page import="com.jaspersoft.ji.license.LicenseManager" %>
                        <iframe id="outerFrame" name="Dashboard" allowtransparency="true" align="center" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" height="100%" width="100%" scrolling="no"
                            src="${pageContext.request.contextPath}/flow.html?_flowId=listReportsFlow&curlnk=2&viewAsDashboardFrame=true">														
                        </iframe>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table></td></tr></tbody></table>
jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago

11 Answers:

I forgot : I'm using JasperServer 3.5

jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago

I tried the solution given here :

http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=10...

but it doesn't work.

Does someone meet the same problem ?

Thanks,

 

Julien

jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago
I tried this Solution its working . you are trying to make custom page that contains the logic to navigate reports through jsp right. Could you succeed in making frame of reports. Vishal
vishal29bhp's picture
Joined: Mar 6 2009 - 3:23am
Last seen: 14 years 7 months ago

Thank you for your response.

What do you mean by "making frame of reports" ?

 

At this time when my user "jscro", with ROLE_USER as role, logs in, he lands here :

http://localhost:8091/jasperserver-pro/flow.html?_flowId=homeFlow

 

I would like he lands here :

http://localhost:8091/jasperserver-pro/flow.html?_flowId=listReportsFlow

So I modified jasperservlet-servlet.xml as below.

Do you see the problem ?

Thank you in advance,

Julien

 

 

 

Code:
   <property name="homePageByRole">
      <list>
       <!-- <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=repositoryExplorerFlow</value> -->
       <!-- <value>ROLE_USER|redirect:/flow.html?_flowId=repositoryExplorerFlow</value> -->
	   <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=listReportsFlow</value>
	   <value>ROLE_USER|redirect:/flow.html?_flowId=listReportsFlow</value>
		<value>RAPPORTS_VIEWER|redirect:/flow.html?_flowId=listReportsFlow</value>
      </list>
    </property></td></tr></tbody></table>
jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago

See this thread, it might help.

Regards,

Lucian

lucianc's picture
87609
Joined: Jul 17 2006 - 1:10am
Last seen: 3 hours 4 min ago

Hi,

 

I already tried this and it didn't work for me.

It's seems my modifications in the jasperserver-servlet.xml has no effect.

See below my modifications. As a test, I wanted that all my users land on the same home page : listReportsFlow

But no result, each user conserve his own home page ...

Could please someone explain to me the hidden process of login ? What are the involved files names and in which order ?

Thank you in advance,

Regards,

Julien

 

Code:
    <property name="homePageByRole">
      <list>
       <!-- <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=repositoryExplorerFlow</value> -->
       <!-- <value>ROLE_USER|redirect:/flow.html?_flowId=repositoryExplorerFlow</value> -->
	   <value>ROLE_ADMINISTRATOR|redirect:/flow.html?_flowId=listReportsFlow</value>
	   <value>ROLE_USER|redirect:/flow.html?_flowId=listReportsFlow</value>
		<value>RAPPORTS_VIEWER|redirect:/flow.html?_flowId=listReportsFlow</value>
      </list>
    </property>
    <property name="defaultHomePage">
      <value>redirect:/home.html</value>	  
    </property></td></tr></tbody></table>
jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago

What happens when users click the Home menu item?  Are they sent to listReportsFlow?

lucianc's picture
87609
Joined: Jul 17 2006 - 1:10am
Last seen: 3 hours 4 min ago

When users click the Home menu item or when they log in, they land here :

http://localhost:8091/jasperserver-pro/flow.html?_flowId=homeFlow

I guess this page differs by user according to the files located here (homeForXXX.jsp) :

C:\\Program Files\\jasperserver-pro-3.5\\apache-tomcat\\webapps\\jasperserver-pro\\WEB-INF\\jsp\\home

Julien

 

 

 

jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago

If you have JS PRO, you'd need to edit WEB-INF/jasperserver-pro.xml as it overrides the homePageByRole bean.

Regards,

Lucian

lucianc's picture
87609
Joined: Jul 17 2006 - 1:10am
Last seen: 3 hours 4 min ago

Thanks, it works !!

Then, according to my jasperserver-servlet-pro.xml, for a user belongs to the ROLE_USER, it lands to the listReportsFlow page.

But my "jscro" user belonging to my  role "ROLE_REPORTS_VIEWER" has a denied access message when he logs in.

I modify applicationContext-security.xml to give him permissions. Is there other file to modify ?

Julien

 

jsloubet's picture
387
Joined: May 25 2009 - 8:46am
Last seen: 14 years 4 months ago

Is ROLE_USER assigned to jscro?  If not, my suggestion is to assign ROLE_USER to all users, and move RAPPORTS_VIEWER upper in the homePageByRole list so that it takes precedence over ROLE_USER.

Regards,

Lucian

lucianc's picture
87609
Joined: Jul 17 2006 - 1:10am
Last seen: 3 hours 4 min ago
Feedback