Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Unknown tag warning in JSPs
Unknown tag warning in JSPs [message #140308] Thu, 22 September 2005 22:53 Go to next message
Eclipse UserFriend
Originally posted by: kevin.ilsen.mckesson.com

I've been struggling to understand how Eclipse (3.1 + WTP 0.7) deals with
web applications. I'm getting an "Unknown tag" warning in my JSPs, but I've
checked my settings over and over and over again. In fact, I have one
project that works, and even when I copy all of the ".*" files to the new
project, I still can't get it to work.

My project has the following structure:

/src - contains Java sources
/portal
...(subdirectories)/jsp -- contains JSPS
/WEB-INF
/taglib/modules.tld
web.xml

The project is being deployed (manually) to an old Weblogic 6.1 environment.

I'm referencing the taglib from my JSPs as follows:
< % @taglib uri="module-tags" prefix="mod" % >

(spaces added above to prevent my newsreader from creating hyperlinks)

Then, the following line is giving me the warning:

<mod:view class="my class">

("my class" is actually the package path to my class, which has its source
in my /src directory)

I wish I understood better how Eclipse/WTP is determining / controlling the
source and object locations. For example, when I define my source folder as
{project}/src, Eclipse automatically overrides the target folder to be
{project}/.deployables/portal/WEB-INF/classes.

Here's the content of my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<taglib>
<taglib-uri>module-tags</taglib-uri>
<taglib-location>/WEB-INF/taglib/modules.tld</taglib-location >
</taglib>
<taglib>
<taglib-uri>chart-tags</taglib-uri>
<taglib-location>/WEB-INF/taglib/kavachart-taglib.tld</taglib-location >
</taglib>
</web-app>
Re: Unknown tag warning in JSPs [message #140331 is a reply to message #140308] Fri, 23 September 2005 10:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

Hi,

the taglib should work without compile errors. I'm using one myself and
it works with WTP.
Do you use a "Dynamic Web Project" to host your web content ? This type
of project has "JavaSource" as source folder and "WebContent" for jsps
and WEB-INF dir. Maybe you could try to change your project structure to
this:

/JavaSource
/WebContent
/portal
(subdirectories)/jsp -- contains JSPS
WEB-INF
taglib/modules.tld
web.xml

Best would be to create a completely new project and then import the
necessary files one by one.

Hope this helps a bit

Wolfgang

Eclipse wrote:
> I've been struggling to understand how Eclipse (3.1 + WTP 0.7) deals with
> web applications. I'm getting an "Unknown tag" warning in my JSPs, but I've
> checked my settings over and over and over again. In fact, I have one
> project that works, and even when I copy all of the ".*" files to the new
> project, I still can't get it to work.
>
> My project has the following structure:
>
> /src - contains Java sources
> /portal
> ...(subdirectories)/jsp -- contains JSPS
> /WEB-INF
> /taglib/modules.tld
> web.xml
>
> ...
Re: Unknown tag warning in JSPs [message #140337 is a reply to message #140331] Fri, 23 September 2005 12:15 Go to previous message
Eclipse UserFriend
Originally posted by: kevin.ilsen.mckesson.com

"Wolfgang Knauf" <wknauf_NO_@_INSIDE_hg-online.de> wrote in message
news:dh0jn2$thu$1@news.eclipse.org...
> Hi,
>
> the taglib should work without compile errors. I'm using one myself and
> it works with WTP.
> Do you use a "Dynamic Web Project" to host your web content ? This type
> of project has "JavaSource" as source folder and "WebContent" for jsps
> and WEB-INF dir. Maybe you could try to change your project structure to
> this:
>
> /JavaSource
> /WebContent
> /portal
> (subdirectories)/jsp -- contains JSPS
> WEB-INF
> taglib/modules.tld
> web.xml
>
> Best would be to create a completely new project and then import the
> necessary files one by one.
>
> Hope this helps a bit
>
> Wolfgang

Thanks, Wolfgang. I am using a Dyhnamic Web Project. What has me confused
is: I have one project where the taglib is working, and I cannot duplicate
it -- even copying all files from that project into a new project. But it
has exactly the same structure; i.e., my Java sources are in /src and my web
content is in /portal. So I don't understand why one project works and the
other does not; they have the same structure, and I even copied the
..project, .classpath, .wtpmodules, and .runtime files from one to the other.
I'd really like to be able to use the /src and /portal directories in all of
my projects (I have many different projects that are all similar), because
that's how the files are organized in my source control system. So I'm
trying to understand what's going on behind the scenes.

Prior to Eclipse 3.1, I had used Lomboz with Eclipse 2 and later with
Eclipse 3. The Lomboz bundle with Eclipse 3.1 and WTP would just not work;
it seemed more "picky" about the directory structure. Since I was only
using Lomboz for JSP syntax editing, I figured I'd try WTP without Lomboz,
but it seems to be the WTP requirements/assumptions that are causing me
grief. (My projects are not full web applications; they're individual
modules that are ultimately installed into a web portal.)

I also tried NitroX with Eclipse 3.1. This worked well -- the first time I
open a JSP for editing, NitroX gives me a message indicating that the
project is not a web application, but it can TREAT it like a web application
(without modifying the project files). Apparently, it does a directory
search form the JSP location, to find the WEB-INF directory, because it was
able to resolve the taglibs without ANY manual configuration! Pity that WTP
can't do that. (The 15-day free NitroX trial includes all functionality;
after that, it no longer reports specific errors; the commercial version is
required for that.)

But . . . I do have one project where it's working with WTP, in my directory
structure. So I'm not giving up hope.
Previous Topic:JSP: double quotes
Next Topic:murderous net access during XML validation
Goto Forum:
  


Current Time: Mon Sep 23 14:11:01 GMT 2024

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

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

Back to the top