掲示板

How to open one portlet jsp page inside the tab of other portlet

thumbnail
9年前 に Chandan Sharma によって更新されました。

How to open one portlet jsp page inside the tab of other portlet

Junior Member 投稿: 54 参加年月日: 14/03/04 最新の投稿
Hi All;

I have two portlet i.e.
  • Student-portlet
  • Course-portlet

I want to display "Course-portlet" jsp page inside tab of "Student-portlet" jsp page. But when I am including Course-portlet jsp page inside tab, it is showing "page not found".

I will appreciate all your help...

Thanks,
~Chandan
thumbnail
9年前 に Jan Geißler によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Liferay Master 投稿: 735 参加年月日: 11/07/05 最新の投稿
Without some code and logs, it will be really tricky to help you there. Are those portlets in the same project? How do you include them? Please be a little bit more specific. Right now you are telling us:
"My car wont start. Please tell me how to fix it."
thumbnail
9年前 に Chandan Sharma によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Junior Member 投稿: 54 参加年月日: 14/03/04 最新の投稿
Jan Geißler:
Without some code and logs, it will be really tricky to help you there. Are those portlets in the same project? How do you include them? Please be a little bit more specific. Right now you are telling us:
"My car wont start. Please tell me how to fix it."

emoticon yeah..
No both the portlets are in two different projects i.e.
  • Project-1 (Student-portlet)
  • Project-1 (Course-portlet)

Note: Please observe attachment to get structure of portlets
Now tab_1.jsp of (student-portlet) and tab_2.jsp of (course-portlet) I want to display as a tab inside Student-portlet. but when I am including tab_2.jsp, than it is showing resource undefined... as I am not getting how to locate the tab_2.jsp page.

Here is my sample code:

<c:if test="<%= tabs1.equals(&quot;Course&quot;) %>">
	<liferay-util:include page="/html/course/tab_2.jsp" servletcontext="<%=application %>"></liferay-util:include>
</c:if>

添付ファイル:

thumbnail
9年前 に Jan Geißler によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Liferay Master 投稿: 735 参加年月日: 11/07/05 最新の投稿
The include tag will try to include the jsp from the student project. That is because
<liferay-util:include page="/html/course/tab_2.jsp" servletContext="<%=application %>">
will look at the docroot of the current project. Which value is in <%=application %>? It should be something like "Course-portlet"
thumbnail
9年前 に Chandan Sharma によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Junior Member 投稿: 54 参加年月日: 14/03/04 最新の投稿
Jan Geißler:
That is because
<liferay-util:include page="/html/course/tab_2.jsp" servletContext="<%=application %>">
will look at the docroot of the current project. Which value is in <%=application %>? It should be something like "Course-portlet"


yeah... I am looking for solution of that only. This thread question is targeted to find what way I can point JSP of other project portlet question ?
thumbnail
9年前 に Jan Geißler によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Liferay Master 投稿: 735 参加年月日: 11/07/05 最新の投稿
Could you please answer this question?

Which value is in <%=application %>?
It should be something like "Course-portlet"

If it is not, try this:
<liferay-util:include page="/html/course/tab_2.jsp" servletContext="Course-portlet">

If its still throwing a FileNotFoundException please take a look at the path the file is not found, and show it to us.
thumbnail
9年前 に Olaf Kock によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
My vote: Don't do this - don't make two plugins secretly dependent on each other by relying on specific JSPs being there. You'll just create a maintenance mess. If you *really* want to do it, package both in the same plugin - only then there is an argument to share JSPs.
thumbnail
9年前 に Jan Geißler によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Liferay Master 投稿: 735 参加年月日: 11/07/05 最新の投稿
Olaf is right, I also would advise against it, BUT:
If you really wanna do it, there is a solution, even though you should not ;)
thumbnail
9年前 に Olaf Kock によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
ssshhhhh - don't tell...
thumbnail
7年前 に delang j によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Expert 投稿: 252 参加年月日: 08/07/14 最新の投稿
Olaf Kock:
ssshhhhh - don't tell...


hi olaf,

is it possible to include another jsp file from other portlet in the same project/war file.?
if yes, then how.

tq
thumbnail
7年前 に delang j によって更新されました。

RE: How to open one portlet jsp page inside the tab of other portlet

Expert 投稿: 252 参加年月日: 08/07/14 最新の投稿
nevermind, manage to solved it myself.

tq