Redirecting from the doView method in the portlet

I am using the Websphere 6.0 portal, and I am wondering if there is a way in which I can tell the server which page will be displayed from the doView method. I know that I can do this from the processAction method, but, unfortunately, the semantics of the problem do not allow this.

thanks for the help

+3
source share
2 answers

As I understand it, you want to decide which JSP / HTML page you show the user.

In this case, this is what you need to do.

public void doView(RenderRequest req, RenderResponse res) throws IOException,
PortletException {

    PortletRequestDispatcher prd =
        getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
    prd.include(req, res);
}

You can decide every time jsp you want to get a query manager for.

+3
source

, doView(). :

  • doView() , HTTP- , .
  • "", - doView() . , .

, , doView, . , .

+3

Source: https://habr.com/ru/post/1704732/


All Articles