Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Getting the include-prelude to work in jsp editor(Getting the include-prelude to work in jsp editor)
Getting the include-prelude to work in jsp editor [message #488935] Wed, 30 September 2009 18:39 Go to next message
JonTurgeon  is currently offline JonTurgeon
Messages: 3
Registered: September 2009
Junior Member
Hello, I am trying to use include-prelude in my web.xml to include a jsp file that has the includes for the taglibs in it. Problem is all of my jsp's have errors that say "Unknown tag". I am using a Dynamic Web project, the top level jsp with the include finds the tags ok.
Re: Getting the include-prelude to work in jsp editor [message #488976 is a reply to message #488935] Thu, 01 October 2009 01:55 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2308
Registered: July 2009
Senior Member
JonTurgeon wrote:
> Hello, I am trying to use include-prelude in my web.xml to include a jsp
> file that has the includes for the taglibs in it. Problem is all of my
> jsp's have errors that say "Unknown tag". I am using a Dynamic Web
> project, the top level jsp with the include finds the tags ok.

Can you post the parts of the jsp-config section setting up the
preludes, the workspace paths to the JSP and prelude fragment files,
as well as which version of WTP you're using? One of the earlier
releases limited you to a single prelude fragment per JSP file. Are
you trying to match preludes with fragments that are included by a
JSP that themselves wouldn't match the url-pattern for that group?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Getting the include-prelude to work in jsp editor [message #489101 is a reply to message #488976] Thu, 01 October 2009 13:59 Go to previous messageGo to next message
JonTurgeon  is currently offline JonTurgeon
Messages: 3
Registered: September 2009
Junior Member
Ok here it goes, I created a sample app to isolate things. I am using the latest version of Eclipse/Webtools, I just pulled it down yesterday to make sure I had the latest.

Here is the web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>test</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<page-encoding>UTF-8</page-encoding>
<scripting-invalid>true</scripting-invalid>
<include-prelude>/includes/prelude.jspf</include-prelude>
</jsp-property-group>
</jsp-config>
</web-app>

now one level above the WEB-INF I have a folder called includes with 3 files in it:
taglibs.jspf

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


prelude.jspf

<%@ include file="/includes/taglibs.jspf" %>
<c:set var="testTrue" value="${true}" scope="request"/>

and now
header.jsp
<c:set var="testTrue" value="${true}" scope="request"/>

the jsp editor is fine with the prelude.jspf, no warnings. With header.jsp it is reporting "Unknown tag (c:set)"
Re: Getting the include-prelude to work in jsp editor [message #489131 is a reply to message #489101] Thu, 01 October 2009 15:15 Go to previous messageGo to next message
JonTurgeon  is currently offline JonTurgeon
Messages: 3
Registered: September 2009
Junior Member
If I put the code from the taglib.jspf into the prelude.jspf then all is fine. Thanks for the help.
Re: Getting the include-prelude to work in jsp editor [message #489212 is a reply to message #489101] Thu, 01 October 2009 20:25 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2308
Registered: July 2009
Senior Member
Jon,
The use case of an include directive in a fragment included as a
prelude is explicitly disallowed in WTP, but as I see that Tomcat
allows it, can you open a bug report for us to hopefully fix it in
WTP 3.2?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:How to avoid EAR project creation in the Web Service Wizard?
Next Topic:Web triggered installation
Goto Forum:
  


Current Time: Wed Oct 22 09:57:26 GMT 2014

Powered by FUDForum. Page generated in 0.02684 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software