views:

1163

answers:

2

In eclipse, I have a javaproject (not a web project), though it does provide reusable tag files.

layout

+src
+++META-INF
----my.tld
+++++++++++tags
---------------include.jsp

I keep on getting Fragment "/META-INF/tags/include.jsp" was not be found at expected path /Project/META-INF/tags/taginclude.jsp

How can I modify the path eclipse is looking for? I need to tell it to include "src" in the lookup

+2  A: 

Josh, if you're working with .jsp and .tld files, then you really shouldn't be doing this as a "Java Project", but instead a "Dynamic Web Project" in Eclipse. Nonetheless, I'll try to answer your question.

Based on the diagram of your file system, your files are laid out incorrectly. If you're trying to create a web app (a .war file), then you need a WEB-INF directory. Under the WEB-INF directory you'll need a web.xml file (google for web.xml to see what needs to be in there), a tags directory, and a classes and lib directory.

Compiled class files must go in the WEB-INF/classes directory. Jar files that you depend on must go in the WEB-INF/lib directory. Tablibs must go in the WEB-INF/tags directory. Finally, your .jsp files must go in src directory (the parent dir of WEB-INF).

So, your layout should look like this:

myproject/
`-- src
    |-- WEB-INF
    |   |-- classes
    |   |   `-- MyClass.class
    |   |-- lib
    |   |   `-- my.jar
    |   |-- tags
    |   |   `-- my.tld
    |   `-- web.xml
    `-- include.jsp

Hope this helps.

-Bryan

its a common project that will be included by other web projects as a jar. war's can not be bundled together, only jars. the only jsp is a common jsp include that has variables and such. there is no view. everything else is java code and tag files meant for reuse
joshjdevl
A: 

I'm afraid I don't understand the ascii representation in the original post, but the validator can make use of any project with a ModuleCore Nature and its .settings/org.eclipse.wst.common.component file to find out what "/" means. Creating a Dynamic Web Project and inspecting that file and .project might help you piece together the right contents to make this work in your Java project.

nitind