|
Re: Adding taglibs to a project [message #156700 is a reply to message #156656] |
Mon, 16 January 2006 11:18 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: wknauf_NO_._INSIDE_hg-online.de
Hi Arash,
I will try to summarize the needed steps (using the JSTL1.1 implementation as a
sample here):
a) add the taglib jar file to WEB-INF\lib
b) (maybe not needed) extract the tld file from the jar and add it also to
WEB-INF (or a subdir, e.g. WEB-INF\tags)
c) add this to web.xml:
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tags/c.tld</taglib-location>
</taglib>
</jsp-config>
d) include the taglib on your jsp page:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
If web.xml is generated with XDoclet you have to put the web.xml part in a
XDoclet merge file named "taglibs.xml".
Hope this helps
Wolfgang
Arash Bijanzadeh wrote:
> How can I add a taglib to a java project?
> Thanks
>
|
|
|
Re: Adding taglibs to a project [message #156714 is a reply to message #156700] |
Mon, 16 January 2006 13:17 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arashbi.gmail.com
Thanks, I knew this :)
My problem is that eclipse could not recognize the taglibs and coul not
give my code insight help for custom taglibs. Also usually I do not set
this taglibs in web.xml and relaying on the container to automativally
detect them.
DO I have to explicitly declae taglibs in order to eclipse recognize them?
Thanks
Arash
|
|
|
Re: Adding taglibs to a project [message #156760 is a reply to message #156714] |
Mon, 16 January 2006 19:02 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Arash Bijanzadeh wrote:
> Thanks, I knew this :) My problem is that eclipse could not recognize
> the taglibs and coul not give my code insight help for custom taglibs.
> Also usually I do not set this taglibs in web.xml and relaying on the
> container to automativally detect them.
> DO I have to explicitly declae taglibs in order to eclipse recognize them?
If the server is detecting them using URIs declared by the tag
library itself, then no, there's nothing extra that you should have
to do. Properly validating and editing JSPs, however, does still
require that the appropriate classes be on the Java Build Path. And
making use of your tag libraries does still require that the
directives be in your .jsp or a JSP fragment you're including.
Are you running into a case where this does not work?
--
- Nitin
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Re: Adding taglibs to a project [message #156877 is a reply to message #156760] |
Tue, 17 January 2006 07:32 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arashbi.gmail.com
Yes, all the jar files in the build path ( At least eclipse recognize them
az libraries for the project)
I have the code completion enabled in the project and can use it. Actually
I am trying to use JSF tags and need code completion/code insight feature.
But couldn't enable it. All I get is "Content Assist not available at the
current location".
And I created a java project not a j2ee project cauz I prefer eclipse do
not touch my file structure and I fully dpend on ant.
|
|
|
Re: Adding taglibs to a Java project [message #156970 is a reply to message #156877] |
Tue, 17 January 2006 19:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
|
Arash Bijanzadeh wrote:
> Yes, all the jar files in the build path ( At least eclipse recognize
> them az libraries for the project) I have the code completion enabled in
> the project and can use it. Actually I am trying to use JSF tags and
> need code completion/code insight feature. But couldn't enable it. All I
> get is "Content Assist not available at the current location".
> And I created a java project not a j2ee project cauz I prefer eclipse do
> not touch my file structure and I fully dpend on ant.
Please also describe what kind of Content Assist is failing. If
it's within a JSP scriptlet where you've got Java source code, be
sure that you have the necessary servlet JARs on the Build Path. If
you're having problems getting assistance with the JSF tags
themselves and the correct taglib directives are in place, please
open a bug against the JSP component. Supporting plain Java
projects isn't one of our requirements, but it should already be
working in 1.0.
taglib directives:
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
To open a bug against the JSP component:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Web%20To ols&component=jst.jsp
--
- Nitin
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.03579 seconds