Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Resolving HTML, JSP, and XML Schema Problems
Resolving HTML, JSP, and XML Schema Problems [message #514059] Fri, 12 February 2010 10:39 Go to next message
NCFriend
Messages: 8
Registered: January 2010
Junior Member
I'm trying to get my existing project loaded into Eclipse. I have a directory structure that looks something like this:
/src     /java
         /test
         /jsp
         /html
         /unit-test-data
         /web                /META-INF
                             /WEB-INF        /tags
                                             /tlds

I'm seeing the following three types of problems:

1. HTML Problems
Eclipse is complaining of bad HTML within my unit-test-data directory. I agree, the HTML is bad. However, it is what my app needs to deal with. How can I tell Eclipse to ignore anything in the unit-test-data directory? It wants to look at everything in the 'src' directory.

2. JSP Problem
In my .jsp files, I have:
<%@ taglib prefix"foo" tagdir="/WEB-INF/tags/foo" %>

Eclipse complains:

Can not find the tag library descriptor for "/WEB-INF/tags/foo

How can I resolve this problem?

3. XML Schema Problems
In my WEB-INF directory I have web-app_2_5.xsd. Eclipse complains:

    schema_reference.4: Failed to read schema document 'jsp_2_1.xsd', because...
    src-resolve: Cannot resolve the name 'javaee:jsp-fileType' to a(n) 'type definition' component.
    src-resolve: Cannot resolve the name 'javaee:jsp-configType' to a(n) 'type definition' component

I tried placing jsp_2_1.xsd in the directory, but that didn't help. How do I resolve these problems?

Thanks.
Re: Resolving HTML, JSP, and XML Schema Problems [message #514710 is a reply to message #514059] Tue, 16 February 2010 12:27 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang KnaufFriend
Messages: 63
Registered: July 2009
Member
Hi,


>> 1. HTML Problems

Project properties, "Validation" => check "Enable project specific settings", in
the table click the "..." button in the row "HTML syntax validator" and add a
new "Exclude Group". Then add add folder exclude rule.

>> 2. JSP Problem
>> <%@ taglib prefix"foo" tagdir="/WEB-INF/tags/foo" %>

It seems you are missing a "=":
<%@ taglib prefix="foo" tagdir="/WEB-INF/tags/foo" %>
Basically, your approach should work.

3. XML Schema Problems

WTP 3.1 includes a list of known xsd/dtd files (can be found in
\plugins\org.eclipse.jst.standard.schemas_1.0.200.v200810071 953.jar), so you
must not include "jsp_2_1.xsd" or any other standard schema definitions in your
project. All unknown files are loaded from the internet location if you have an
active connection. You might check the WTP cache ("Preferences" => "Network
Connections" => "Cache") and clear it to verify that nothing broken from the web
made it's way into the cache.

What is the xml header of your web.xml?

Hope this helps

Wolfgang
Re: Resolving HTML, JSP, and XML Schema Problems [message #515072 is a reply to message #514059] Wed, 17 February 2010 15:56 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2341
Registered: July 2009
Senior Member
On 2/12/2010 5:39 AM, NC wrote:
> I'm trying to get my existing project loaded into Eclipse. I have a
> directory structure that looks something like this:
>
>/src /java
> /test
> /jsp
> /html
> /unit-test-data
> /web /META-INF
> /WEB-INF /tags
> /tlds
>
> I'm seeing the following three types of problems:
>
> 2. JSP Problem
> In my .jsp files, I have:
> <%@ taglib prefix"foo" tagdir="/WEB-INF/tags/foo" %>
>
> Eclipse complains:
>
> Can not find the tag library descriptor for "/WEB-INF/tags/foo
>
> How can I resolve this problem?
>

If you JSP files are not somewhere under the folder that directly
parents the WEB-INF folder, the JSP component looks to the flexible
layout support provided by the Module Core component in order to find
referenced resources. This usually starts with having the
org.eclipse.wst.common.modulecore.ModuleCoreNature nature on the project
and a .settings/org.eclipse.wst.common.component file detailing how the
project's contents would be assembled for deploying on the server.
WTP's web projects start out with this nature, and you may be able to
use one to help you author this file. I think 3.2 will have a user
interface to help with this, but don't hold me to that.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=196177 may also be of
interest, as it sparked the JSP component's support for flexible layouts.

--

Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Ensuring a class or jar takes precedence
Next Topic:Getting default tomcat applications working
Goto Forum:
  


Current Time: Fri Dec 19 01:40:45 GMT 2014

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

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