Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » jsp taglib
jsp taglib [message #128884] Tue, 02 August 2005 13:55 Go to next message
Eclipse UserFriend
Originally posted by: aurphir.aurphir.com

Hi all
Eclipse webtools support jsp taglib or not? because whle editing it says
unknown tag

Thanks
Re: jsp taglib [message #128923 is a reply to message #128884] Tue, 02 August 2005 14:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pavery.us.ibm.com

Vishal Rana wrote:
> Hi all
> Eclipse webtools support jsp taglib or not? because whle editing it says
> unknown tag
>
> Thanks
>
>

There is support for JSP taglib.

If you're seeing "unknown tag" errors, there might be a couple of reasons...

What type of project are you in? Are you in a web project?
How are you referencing your taglibs in your JSPs?

some examples:
<%// specified in web.xml file%>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>

<%// relative to WebContent folder %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%// relative to your JSP file %>
<%@ taglib uri="./struts-bean.tld" prefix="bean" %>

-phil
Re: jsp taglib [message #128936 is a reply to message #128923] Tue, 02 August 2005 14:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aurphir.aurphir.com

Well I am simply putting a test.tld in WEB-INF folder
and calling it in test.jsp like <%@ taglib prefix="test"
uri="WEB-INF/test.tld" %>

but I don't know what to write in web.xml

"phil avery" <pavery@us.ibm.com> wrote in message
news:dcnvqe$pse$1@news.eclipse.org...
> Vishal Rana wrote:
> > Hi all
> > Eclipse webtools support jsp taglib or not? because whle editing it says
> > unknown tag
> >
> > Thanks
> >
> >
>
> There is support for JSP taglib.
>
> If you're seeing "unknown tag" errors, there might be a couple of
reasons...
>
> What type of project are you in? Are you in a web project?
> How are you referencing your taglibs in your JSPs?
>
> some examples:
> <%// specified in web.xml file%>
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>
> <%// relative to WebContent folder %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>
> <%// relative to your JSP file %>
> <%@ taglib uri="./struts-bean.tld" prefix="bean" %>
>
> -phil
Re: jsp taglib [message #129015 is a reply to message #128936] Tue, 02 August 2005 16:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pavery.us.ibm.com

Vishal Rana wrote:
> Well I am simply putting a test.tld in WEB-INF folder
> and calling it in test.jsp like <%@ taglib prefix="test"
> uri="WEB-INF/test.tld" %>
>
> but I don't know what to write in web.xml
>


Actually, you don't "have" to change the web.xml file.

<%@ taglib prefix="test" uri="/WEB-INF/test.tld" %>

should work in your case (assuming you're in a web project)
note the leading "/" in the uri, this "should" resolve to the WebContent
folder.

Hopefully this solves your problem.



> "phil avery" <pavery@us.ibm.com> wrote in message
> news:dcnvqe$pse$1@news.eclipse.org...
>
>>Vishal Rana wrote:
>>
>>>Hi all
>>>Eclipse webtools support jsp taglib or not? because whle editing it says
>>>unknown tag
>>>
>>>Thanks
>>>
>>>
>>
>>There is support for JSP taglib.
>>
>>If you're seeing "unknown tag" errors, there might be a couple of
>
> reasons...
>
>>What type of project are you in? Are you in a web project?
>>How are you referencing your taglibs in your JSPs?
>>
>>some examples:
>><%// specified in web.xml file%>
>><%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>>
>><%// relative to WebContent folder %>
>><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>>
>><%// relative to your JSP file %>
>><%@ taglib uri="./struts-bean.tld" prefix="bean" %>
>>
>>-phil
>
>
>
Re: jsp taglib [message #129117 is a reply to message #129015] Tue, 02 August 2005 18:50 Go to previous messageGo to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
phil avery wrote:

> Vishal Rana wrote:
>> Well I am simply putting a test.tld in WEB-INF folder
>> and calling it in test.jsp like <%@ taglib prefix="test"
>> uri="WEB-INF/test.tld" %>
>>
>> but I don't know what to write in web.xml
>>
>
>
> Actually, you don't "have" to change the web.xml file.
>
> <%@ taglib prefix="test" uri="/WEB-INF/test.tld" %>
>
> should work in your case (assuming you're in a web project)
> note the leading "/" in the uri, this "should" resolve to the WebContent
> folder.
>
> Hopefully this solves your problem.
>
>
>
>> "phil avery" <pavery@us.ibm.com> wrote in message
>> news:dcnvqe$pse$1@news.eclipse.org...
>>
>>>Vishal Rana wrote:
>>>
>>>>Hi all
>>>>Eclipse webtools support jsp taglib or not? because whle editing it says
>>>>unknown tag
>>>>
>>>>Thanks
>>>>
>>>>
>>>
>>>There is support for JSP taglib.
>>>
>>>If you're seeing "unknown tag" errors, there might be a couple of
>>
>> reasons...
>>
>>>What type of project are you in? Are you in a web project?
>>>How are you referencing your taglibs in your JSPs?
>>>
>>>some examples:
>>><%// specified in web.xml file%>
>>><%@ taglib uri="/tags/struts-bean" prefix="bean" %>
>>>
>>><%// relative to WebContent folder %>
>>><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>>>
>>><%// relative to your JSP file %>
>>><%@ taglib uri="./struts-bean.tld" prefix="bean" %>
>>>
>>>-phil
>>
>>
>>
Well that is interesting, as I am having a real problem with WTP and JSP
taglibs. I have my taglib tags in an included JSP file, and while WTP
does things like content assist in the file that is included (the one with
the taglibs) it does not work and I get lots of yellow underlines about the
<c: tags in the including file. The one difference with what you have
written above is that I use TLDs included in the JAR files from the
WEB-INF/lib directory. So my taglib tag looks like:-

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

This works quite happily under Tomcat 5.5 (which is the server for this
project) and used to work with Lomboz under Eclipse 3.0 but does not work
with WTP 0.7 under Eclipse 3.1 (both GA).

Any thoughts?

David
Re: jsp taglib [message #129169 is a reply to message #128936] Tue, 02 August 2005 20:21 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Vishal Rana wrote:
> Well I am simply putting a test.tld in WEB-INF folder
> and calling it in test.jsp like <%@ taglib prefix="test"
> uri="WEB-INF/test.tld" %>
>
> but I don't know what to write in web.xml

Ignoring the web.xml for now, where is the test.jsp file located?
If it's not in the parent folder of WEB-INF, the uri value as-is
probably won't work.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: jsp taglib [message #129181 is a reply to message #129117] Tue, 02 August 2005 20:27 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

David Goodenough wrote:
> Well that is interesting, as I am having a real problem with WTP and JSP
> taglibs. I have my taglib tags in an included JSP file, and while WTP
> does things like content assist in the file that is included (the one with
> the taglibs) it does not work and I get lots of yellow underlines about the
> <c: tags in the including file. The one difference with what you have
> written above is that I use TLDs included in the JAR files from the
> WEB-INF/lib directory. So my taglib tag looks like:-
>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>
> This works quite happily under Tomcat 5.5 (which is the server for this
> project) and used to work with Lomboz under Eclipse 3.0 but does not work
> with WTP 0.7 under Eclipse 3.1 (both GA).
>
> Any thoughts?

Nothing strange going on like using the "c" prefix more than once?
Is the JSP located somewhere under the parent of your WEB-INF folder
that has the jar files?

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: jsp taglib [message #129194 is a reply to message #129015] Tue, 02 August 2005 20:35 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

phil avery wrote:
> Vishal Rana wrote:
>
>> Well I am simply putting a test.tld in WEB-INF folder
>> and calling it in test.jsp like <%@ taglib prefix="test"
>> uri="WEB-INF/test.tld" %>
>>
>> but I don't know what to write in web.xml
>>
>
>
> Actually, you don't "have" to change the web.xml file.
>
> <%@ taglib prefix="test" uri="/WEB-INF/test.tld" %>
>
> should work in your case (assuming you're in a web project)
> note the leading "/" in the uri, this "should" resolve to the WebContent
> folder.
>
> Hopefully this solves your problem.

Actually, bug 82333 has one lingering case where we fail to find the
TLD: uris beginning with '/'. Regrettably it wasn't fixed for 0.7.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: jsp taglib [message #129280 is a reply to message #129181] Tue, 02 August 2005 21:57 Go to previous messageGo to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
Nitin Dahyabhai wrote:

> David Goodenough wrote:
>> Well that is interesting, as I am having a real problem with WTP and JSP
>> taglibs. I have my taglib tags in an included JSP file, and while WTP
>> does things like content assist in the file that is included (the one
>> with the taglibs) it does not work and I get lots of yellow underlines
>> about the
>> <c: tags in the including file. The one difference with what you have
>> written above is that I use TLDs included in the JAR files from the
>> WEB-INF/lib directory. So my taglib tag looks like:-
>>
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
>>
>> This works quite happily under Tomcat 5.5 (which is the server for this
>> project) and used to work with Lomboz under Eclipse 3.0 but does not work
>> with WTP 0.7 under Eclipse 3.1 (both GA).
>>
>> Any thoughts?
>
> Nothing strange going on like using the "c" prefix more than once?
> Is the JSP located somewhere under the parent of your WEB-INF folder
> that has the jar files?
>
Yes, c: is only used once (for the core JSTL tags) and the JSP is in
WebContent.

David
Re: jsp taglib [message #129315 is a reply to message #129280] Wed, 03 August 2005 01:36 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

David Goodenough wrote:
> Nitin Dahyabhai wrote:
>>David Goodenough wrote:
>>>Well that is interesting, as I am having a real problem with WTP and JSP
>>>taglibs. I have my taglib tags in an included JSP file, and while WTP
>>>does things like content assist in the file that is included (the one
>>>with the taglibs) it does not work and I get lots of yellow underlines
>>>about the
>>><c: tags in the including file.
>>>
>>>Any thoughts?

It works fine for me, so my only other guess is that there's
something related to how you're including the other file. Does the
file attribute of the include directive begin with a '/'?

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: jsp taglib [message #129445 is a reply to message #129315] Wed, 03 August 2005 09:06 Go to previous message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
Nitin Dahyabhai wrote:

> David Goodenough wrote:
>> Nitin Dahyabhai wrote:
>>>David Goodenough wrote:
>>>>Well that is interesting, as I am having a real problem with WTP and JSP
>>>>taglibs. I have my taglib tags in an included JSP file, and while WTP
>>>>does things like content assist in the file that is included (the one
>>>>with the taglibs) it does not work and I get lots of yellow underlines
>>>>about the
>>>><c: tags in the including file.
>>>>
>>>>Any thoughts?
>
> It works fine for me, so my only other guess is that there's
> something related to how you're including the other file. Does the
> file attribute of the include directive begin with a '/'?
>
I have tried both with and without, no change.

David
Previous Topic:WTP 0.7 final: trouble with other plugins
Next Topic:Problem configuring tomcat server on Mac OS X
Goto Forum:
  


Current Time: Thu Apr 18 09:41:16 GMT 2024

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

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

Back to the top