Forums de discussion

Reading jsp name in doView method

Mr Jimmy, modifié il y a 9 années.

Reading jsp name in doView method

New Member Publications: 24 Date d'inscription: 07/04/14 Publications récentes
It's not really a problem with Alloy, but I hope it's okay to post it here, because it's about JSP.

According to this article, I make it possible to render another JSP with this lines of code in a JSP:
<portlet:renderurl var="viewGreetingURL">
    <portlet:param name="jspPage" value="/view.jsp" />
</portlet:renderurl>

<p><a href="<%= viewGreetingURL %>">← Back</a></p>


In my portlet class I've got a doView method. I want to load specific informations for each of my JSPs in the doView method. How can I know, which JSP has been chosen / want to be rendered?
thumbnail
David H Nebinger, modifié il y a 9 années.

RE: Reading jsp name in doView method

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
I think you're overthinking your implementation, and that will just lead to maintenance confusion later on.

Stick with the common MVC patterns that are already supported, be it LiferayMVC or Spring portlet MVC, whatever, but avoid trying to do your own thing.