Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JSP document tag content assist not working inside included (fragment) files
JSP document tag content assist not working inside included (fragment) files [message #175757] Mon, 31 July 2006 03:06 Go to next message
Eclipse UserFriend
Originally posted by:


I'm using eclipse version 3.2.0 with wtp 1.5.0.

If I create a jsp document (.jspx) with a jsp:root that contains the jstl
core in the namespace then I will see content assist for the <c: tags such
as <c:forEach>.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp=""
<!-- jstl content assist works! -->
<c:forEach begin="" items=""></c:forEach>
<jsp:directive.include file="Header.jspf" />

But when I include the fragment "Header.jspf" that contains a <div> tag,
the content assist for the jstl core is no longer available.

<!-- no jstl content assist here. -->

I also tried this, but it didn't work.

<div xmlns:c="">
<!-- no jstl content assist here. -->

Under the JSP Fragments preferences I checked "Validate JSP fragments" but
I'm not sure if validation is related to content assist.

I also tried adding an empty jsp:root tag to the fragement with the jstl
core namespace and it did work. But adding the jsp:root tag isn't a good
solution because tomcat doesn't permit nested jsp:root tags.

<div xmlns:c="">
<jsp:root xmlns:c="">
<!-- jstl content assist works! -->
<c:forEach begin="" items=""></c:forEach>

Should content assist work in this situation?
If it already works and I'm doing something wrong, can you let me know
what steps I should take to get it working?

Re: JSP document tag content assist not working inside included (fragment) files [message #176120 is a reply to message #175757] Wed, 02 August 2006 14:12 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3177
Registered: July 2009
Senior Member

While editing the fragment, there's no way to tell which (of
possibly many) JSP files are including the fragment and affecting
the list of tags it can use. Unless the taglib directive is in the
same file or one that *it* includes, those tags won't be enabled.
The "xmlns:" support is also limited to the jsp:root element when
seen as top-level tag. I don't know of any plans to change that, so
I'd suggest putting the taglib directive for the JSTL Core into the
header file itself. It should then be usable in both the fragment
and any JSP files including it.

- Nitin

Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:xdoclet and oc4j
Next Topic:Creating multiple web services.
Goto Forum:

Current Time: Thu Jun 21 16:41:32 GMT 2018

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

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

Back to the top