Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to display my own .jsp page to a specific ROLE after login


    ghudson_1
    • Version: v5.5 Product: JasperReports® Server

    Issue Question:

    What are the options for showing a customized jsp immediately upon successful login?

    Answer:

    The JasperReports Server v5.5 loginController servlet, upon successful login, will typically route to jasperserver-proWEB-INFjspmoduleshomehome.jsp. This routing is based upon MVC code and spring webflow code. 

    LoginController checks proHomePageByRole defined in WEB-INFjasperserver-servlet-pro.xml, and routes to the page/view defined there. It has something role-specific like: 

    <value>ROLE_USER|redirect:/flow.html?_flowId=homeFlow</value>
    

    The redirect above creates calls into spring webflow and WEB-INFflowshomeFlow.xml defines the route for "homeFlow" as going to moduleshomehome.jsp. 

    Some Solution options:

    1. Follow the JasperReports Server Ultimate Guide » Customizing the User Interface »  Adding a Custom JSP Page in a Spring Web Flow  and use the proHomePageByRole config to "flow" to this new jsp upon login. 

    2. Add conditional statements within home.jsp to "include" your jsp on the initial view. 

    3. Customize jasperreports-server-5.5-srcjasperserverjasperserver-war-jarsrcmainjavacomjaspersoftjasperserverwarcontrolLoginController.java to return a jsp directly without going thru our typical spring webflow setup.


    Ref. Case #00043224


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...