留言板

Getting Error in Liferay IDE xxx.jsp is not a valid include

Amit Sachdeva,修改在8 年前。

Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 帖子: 5 加入日期: 16-3-1 最近的帖子
Created 2 pages with the following below code.

At runtime, the view.jsp comes fine. On click of the button it is suppose to show edit.jsp but nothing shows up but I do see an error in the ide "edit.jsp is not a valid include". Please let me know how to fix it.

View.jsp
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<portlet:defineObjects />

<aui:button-row cssClass="guestbook-buttons">

<portlet:renderURL var="addEntryURL">
<portlet:param name="mvcPath" value="/html/guestbook/edit_entry.jsp"></portlet:param>
</portlet:renderURL>

<aui:button onClick="<%= addEntryURL.toString() %>" value="Add Entry"></aui:button>

</aui:button-row>



edit.jsp
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<portlet:defineObjects />

<portlet:renderURL var="viewURL">
<portlet:param name="mvcPath" value="/html/guestbook/view.jsp"></portlet:param>
</portlet:renderURL>

<portlet:actionURL name="addEntry" var="addEntryURL"></portlet:actionURL>

<aui:form action="<%= addEntryURL %>" name="<portlet:namespace />fm">

<aui:fieldset>

<aui:input name="name"></aui:input>
<aui:input name="message"></aui:input>

</aui:fieldset>

<aui:button-row>

<aui:button type="submit"></aui:button>
<aui:button type="cancel" onClick="<%= viewURL.toString() %>"></aui:button>

</aui:button-row>
</aui:form>
thumbnail
David H Nebinger,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
Amit Sachdeva:
<portlet:renderURL var="addEntryURL">
<portlet:param name="mvcPath" value="/html/guestbook/edit_entry.jsp"></portlet:param>
</portlet:renderURL>

<snip>

edit.jsp


Are those seriously the values you used?
Amit Sachdeva,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 帖子: 5 加入日期: 16-3-1 最近的帖子
I have 2 jsps

View.jsp and edit_entry.jsp

View.jsp code is

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<portlet:defineObjects />

<aui:button-row cssClass="guestbook-buttons">

<portlet:renderURL var="addEntryURL">
<portlet:param name="mvcPath" value="/html/guestbook/edit_entry.jsp"></portlet:param>
</portlet:renderURL>

<aui:button onClick="<%= addEntryURL.toString() %>" value="Add Entry"></aui:button>

</aui:button-row>

Edit_entry.jsp code is
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://alloy.liferay.com/tld/aui" prefix="aui" %>
<portlet:defineObjects />

<portlet:renderURL var="viewURL">
<portlet:param name="mvcPath" value="/html/guestbook/view.jsp"></portlet:param>
</portlet:renderURL>

<portlet:actionURL name="addEntry" var="addEntryURL"></portlet:actionURL>

<aui:form action="<%= addEntryURL %>" name="<portlet:namespace />fm">

<aui:fieldset>

<aui:input name="name"></aui:input>
<aui:input name="message"></aui:input>

</aui:fieldset>

<aui:button-row>

<aui:button type="submit"></aui:button>
<aui:button type="cancel" onClick="<%= viewURL.toString() %>"></aui:button>

</aui:button-row>
</aui:form>
Amit Sachdeva,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 帖子: 5 加入日期: 16-3-1 最近的帖子
Error is

edit_entry.jsp is not a valid include
Amit Sachdeva,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 帖子: 5 加入日期: 16-3-1 最近的帖子
I am following the liferay documentation

https://dev.liferay.com/develop/learning-paths/mvc/-/knowledge_base/6-2/writing-your-first-liferay-application
thumbnail
Olaf Kock,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
First you stated (as David mentioned) that you have edit_entry.jsp and edit.jsp.
Now you state edit_entry.jsp and Edit_entry.jsp.

Note that they still don't match. If you're on windows: Last time I looked Windows had problems renaming just the capitalization part of names (and at least tomcat cared - even on windows). You might need to do a rename from Edit_entry.jsp -> something.jsp -> edit_entry.jsp, so that windows actually lets you to change a files capitalization.

Also make sure that the files are in /html/guestbook, make extra extra extra sure that you don't have a typo in the names. Because in this post you still have
Amit Sachdeva,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 帖子: 5 加入日期: 16-3-1 最近的帖子
Yes, all the names are in lower case and both the jsps are in /html/guestbook folder.

Please let me know what could be other reason.
thumbnail
Olaf Kock,修改在8 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Ok, we'll need a few more steps to reproduce, because so far (if there really really really is no typo involved) it looks good. You say you get an error "edit_entry.jsp is not a valid include". Do you get this from Eclipse's JSP editor or at runtime in Liferay's Log? Try hunding it down by renaming edit_entry.jsp to whatever.jsp and include that. If it's Eclipse's JSP editor: Sometimes Ctrl-A Ctrl-X, Ctrl-V has helped me. The editor sometimes caches error messages unreasonably.
Francesco Sessa,修改在7 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 发布: 1 加入日期: 16-7-4 最近的帖子
Hi!
I've the same problem.

<portlet:renderurl var="addEntryURL">
    <portlet:param name="mvcPath" value="editEntry.jsp"></portlet:param>
    </portlet:renderurl>


and editEntry.jsp in docroot

16:07:52,524 ERROR [http-bio-8080-exec-25][MVCPortlet:357] html/guestbook/editEntry.jsp is not a valid include

<portlet:renderurl var="addEntryURL">
    <portlet:param name="mvcPath" value="html/guestbook/editEntry.jsp"></portlet:param>
    </portlet:renderurl>


and editEntry.jsp in docroot/html/guestbook

16:07:52,524 ERROR [http-bio-8080-exec-25][MVCPortlet:357] editEntry.jsp is not a valid include

If I try with:
<portlet:renderurl var="addEntryURL">
    <portlet:param name="mvcPath" value="/html/guestbook/editEntry.jsp"></portlet:param>
    </portlet:renderurl>



in console I've:
15:58:54,227 ERROR [http-bio-8080-exec-25][PortletServlet:116] javax.portlet.PortletException: Path /html/guestbook/editEntry.jsp is not accessible by this portlet

Any idea?

tnx
Julian Dax,修改在7 年前。

RE: Getting Error in Liferay IDE xxx.jsp is not a valid include

New Member 发布: 1 加入日期: 16-4-14 最近的帖子
Same problem here. It only happens with "com.liferay.gradle.plugins.workspace", version: "1.0.35". If you downgrade to 1.0.29 it works.