留言板

Reading jsp name in doView method

Mr Jimmy,修改在9 年前。

Reading jsp name in doView method

New Member 帖子: 24 加入日期: 14-4-7 最近的帖子
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,修改在9 年前。

RE: Reading jsp name in doView method

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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.