- This topic has 6 replies, 2 voices, and was last updated 19 years ago by dwisp.
-
AuthorPosts
-
dwispMemberHello,
As part of my work I’m trying to modify the JSPWiki project using MyEclipse (I have to say that I’m new to the J2EE/MyEclipse world). After I imported the project I get errors like these
File “/WEB-INF/jspwiki.tld” not found. NOTE: No JSP line number was avaliable so line 1 was used for the marker. […] JSPWiki/src/webdocs
I know that I should modify the web.xml to include some tags (I also read the often cited FAQ-entry), but I haven’t got it to work. Also, the directory-structure is very … “special”.
There is no WEB-INF directory, all the files for that are scattered across the project. The web.xml and the .tld are placed in a /etc dir, the .jsp files are placed within /src/webdocs. Only after an ant-build, using the war-extracted-target a /build/JSPWiki gets created with the “normal” structure.
If I copy all the files from there into the project root, the errors disappear, but then the project looks trashed. So, what can I do to get this fixed ? I’d like too keep modifications to the project as little as possible. I also tried to set the /build/JSPWiki as the webroot when adding the WebProject-Nature, but this didn’t change anything.
Thanks
-Ralf
Riyad KallaMemberThere is no WEB-INF directory
This will be a big problem.
If I copy all the files from there into the project root, the errors disappear, but then the project looks trashed. So, what can I do to get this fixed ? I’d like too keep modifications to the project as little as possible. I also tried to set the /build/JSPWiki as the webroot when adding the WebProject-Nature, but this didn’t change anything.
Unfortunately I”m going to say that unless you plan on converting the artifacts (parts) of this project into a more compliant format, you are going to have minimal help from MyEclipse. MyEclipse does need to have a project in a predictable format to a certain extent so it can resolve references of all different kinds, having parts scattered around is going to create a problem.
Depending on how complex the project is, converting it to a more standard layout could be anywhere from easy to nightmare, although I imagine it shouldn’t be too hard, as long as you can extract what it is doing from the Ant script.
dwispMemberIs it possible to make MyEclipse parse the JSPs correctly, even if they are several layers “above” the WEB-INF directory. What I mean is: is it possible to fake a WEB-INF by manually (or ant-ually) copying the files to this dir and using it to satisfy MyEclipse ?
Riyad KallaMemberYes this would be fine, if you could just create an artifical WEB-INF dir for MyEclipse that had a /lib and /classes dir that contained your JARs and compiled classes respectively it should be able to resolve everything from there withou t aproblem.
dwispMemberwhere exactly would i setup (or change) a ME-setup ? I’ve tried that some hours ago, but it seemed that ME didn’t accepted the files within /build/JSPWiki as a webroot
Riyad KallaMemberWhat I would suggest doing is creating a new project and slowly copying portions if your existing project into the new web project.
But I realize you probably want to keep JSPWiki the way it is, in which case target your project root at the root of the JSPWiki dir and set your WebRoot to src/webdocs like you had originall. Now find your real Java source folder and set that up under Project Properties > Java Build Path.
Keep in mind that your webroot cannot be in a source folder, so make sure your source is in another dir like /src/java. This should get compiled to WEbRoot/WEB-INF/classes. Then just be sure to create your WEB-INF/lib dir and drop your JARs in there and everything under /etc should go into WEB-INF
dwispMemberThanks, I’ll try that
-
AuthorPosts