Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » jsp taglib
jsp taglib [message #128884] Tue, 02 August 2005 09:55 Go to next message
Eclipse User
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 10:26 Go to previous messageGo to next message
Eclipse User
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 10:40 Go to previous messageGo to next message
Eclipse User
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 12:33 Go to previous messageGo to next message
Eclipse User
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 14:50 Go to previous messageGo to next message
David Goodenough is currently offline David Goodenough
Messages: 155
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 16:21 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
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 WTP, IBM
Re: jsp taglib [message #129181 is a reply to message #129117] Tue, 02 August 2005 16:27 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
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 WTP, IBM
Re: jsp taglib [message #129194 is a reply to message #129015] Tue, 02 August 2005 16:35 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
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 WTP, IBM
Re: jsp taglib [message #129280 is a reply to message #129181] Tue, 02 August 2005 17:57 Go to previous messageGo to next message
David Goodenough is currently offline David Goodenough
Messages: 155
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] Tue, 02 August 2005 21:36 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2251
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 WTP, IBM
Re: jsp taglib [message #129445 is a reply to message #129315] Wed, 03 August 2005 05:06 Go to previous message
David Goodenough is currently offline David Goodenough
Messages: 155
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: Wed Aug 27 23:21:32 EDT 2014

Powered by FUDForum. Page generated in 0.03544 seconds