jsp taglib [message #128884] |
Tue, 02 August 2005 13:55 |
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 14:26 |
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 14:40 |
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 16:33 |
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 #129169 is a reply to message #128936] |
Tue, 02 August 2005 20:21 |
|
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 |
|
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 |
|
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 #129315 is a reply to message #129280] |
Wed, 03 August 2005 01:36 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.04010 seconds