JSP Editor not seeing taglibs in non-wtp projects [message #149675] |
Tue, 29 November 2005 09:06  |
Eclipse User |
|
|
|
Originally posted by: novell.peteranning.com
Hi,
When using the JSP Editor with non WTP based projects the taglibs are not
recognised. Copying the entire source of my project into a WTP Dynamic Web
Project solves the problem, but is a lot of effort and we have many
developers and projects.
Does anybody know how to get the WTP JSP editor to work with a non WTP
project?
Regards
Peter
|
|
|
|
|
Re: JSP Editor not seeing taglibs in non-wtp projects [message #150888 is a reply to message #150361] |
Tue, 06 December 2005 06:09   |
Eclipse User |
|
|
|
Originally posted by: chabert.fimasys.fr
Hi,
I had the same problem, and here it is the workaround I found (already
posted in July). I am using jsp editor with a project which is not a wtp
project, and it works perfectly :)
* Your project should be in the main eclipse project, and not in an
external directory (knwown bug 87487). This bug may have been corrected,
but I have not tried it.
* At the root of your webapp directory (for example /src/webapp),
create a directory WEB-INF, containing:
o all your tlds. Using a symbolic link is better if you are
with linux OS, especially if the taglib definition change.
o a web.xml file looking like that:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<taglib>
<taglib-uri>mytaglib</taglib-uri>
<taglib-location>/WEB-INF/mytaglib.tld</taglib-location>
</taglib>
</web-app>
* Refresh your project and you have now tag validation and
completion in jsp files. If it does not work, try to restart eclipse
with the -clean option.
Hope it helps :)
Regards
Sylvain
Peter wrote:
> My taglibs are Struts based and referenced in web.xml as:
>
> <taglib>
> <taglib-uri>/tags/struts-bean</taglib-uri>
> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location >
> </taglib>
>
> <taglib>
> <taglib-uri>/tags/struts-html</taglib-uri>
> <taglib-location>/WEB-INF/struts-html.tld</taglib-location >
> </taglib>
>
> In the jsp they are defined as:
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
>
> In the jsp page any actual instance to a tag is underlined in yellow
> (Unknown Tag) so you get no intelitype help with completing tags.
>
> We are using WTP 0.7
>
> As I mentioned before this is only when you are using a non WTP project,
> but tyring to use the jsp editor. We can't make it a WTP project because
> we are heavilly integrated with Maven.
>
> Best Regards
> Peter
>
|
|
|
Re: JSP Editor not seeing taglibs in non-wtp projects [message #150936 is a reply to message #150361] |
Tue, 06 December 2005 12:12  |
Eclipse User |
|
|
|
Peter wrote:
> My taglibs are Struts based and referenced in web.xml as:
>
> <taglib>
> <taglib-uri>/tags/struts-bean</taglib-uri>
> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location >
> </taglib>
>
> <taglib>
> <taglib-uri>/tags/struts-html</taglib-uri>
> <taglib-location>/WEB-INF/struts-html.tld</taglib-location >
> </taglib>
>
> In the jsp they are defined as:
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
Is the JSP located under the folder that is the parent folder of
"WEB-INF"? Have you tried this with a newer build?
--
- Nitin
|
|
|
Powered by
FUDForum. Page generated in 0.04371 seconds