- This topic has 9 replies, 2 voices, and was last updated 19 years, 11 months ago by Eric Rizzo.
-
AuthorPosts
-
Eric RizzoMemberIs it possible to change the web-root folder setting of a ME Web project? I took an existing project and made it a Web project (only because I want to use the ME struts editor on my struts-config files – that is another issue, why can’t I use the struts editor without committing the entire project over to ME’s control?)
Anyway, I set the web-root folder to a bad place (somewhere in my source tree) and now ME is insisting on building stuff into there. I tried editing the .mymesadata file to change the web-root and that change show up when I look at the MyEclipse-Web tab of project properties. But it won’t let me delete the classes directory under the original web-root folder and it keeps building classes into there.
I’ve restarted Eclipse and closed/re-opened the Project, to no avail.Is there anything to do besides deleting the project and starting over from scratch?
ME v3.8.2 with SP2
Eclipse 3.0.0Thanks,
Eric
Riyad KallaMemberIs it possible to change the web-root folder setting of a ME Web project?
When you added web caps to the project you set the webroot folder, if you missed that you can open the .mymetadata file and change it there (sorry its not gui-driven right now). And be sure to close/reopen the project.
why can’t I use the struts editor without committing the entire project over to ME’s control?
Its not really under our control, we just need you to tell us few tidbits of information so we can do proper resolution, autocomplete and generation… those are all the fields you fill out when you add “Capabilities”. The only thing we add to your project is a .mystrutsdata file IIRC, and that’s just to store that info so we can figure out where everything is and provide you with fancy editing tools.
But it won’t let me delete the classes directory under the original web-root folder and it keeps building classes into there.
You gotta make sure to go back to your Java Build Path > Source project properties and reset your Output path to <new webroot dir>\WEB-INF\classes, or else Eclipse will keep creating the old output location, which is your old webroot location which makes it seem ‘undeletable’
Eric RizzoMember@support-rkalla wrote:
You gotta make sure to go back to your Java Build Path > Source project properties and reset your Output path to <new webroot dir>\WEB-INF\classes, or else Eclipse will keep creating the old output location, which is your old webroot location which makes it seem ‘undeletable’
Yes, I had done that already. But what I didn’t notice until later was that it has also changed the output folder for my source location (not using the default output folder). Once I removed the source-spsecific output folder it was back to normal.
@support-rkalla wrote:
why can’t I use the struts editor without committing the entire project over to ME’s control?
Its not really under our control, we just need you to tell us few tidbits of information so we can do proper resolution, autocomplete and generation… those are all the fields you fill out when you add “Capabilities”. The only thing we add to your project is a .mystrutsdata file IIRC, and that’s just to store that info so we can figure out where everything is and provide you with fancy editing tools.
It seems that ME is doing more than just adding the .myXXX file(s). For instance, it does change the output folder for the project. That wasn’t too bad once I realized how to restore it, but even now things are not exactly right because I don’t let ME decide where everything should go. For example, the JSP editor can’t find my TLDs (yes, they are mapped correctly in web.xml) – they are stored in another project and only copied over at Ant build-time. So I can’t figure out where they need to be for ME JSP editor to be able to use them. Is there a way (manual file editing, perhaps) to tell ME where it can find the TLDs?
Riyad KallaMemberthey are stored in another project and only copied over at Ant build-time.
Your TLDs need to be where your web.xml file says they are. If you have them mapped in your web.xml file to “/WEB-INF/blarg.tld”, then MyEclipse will look in your WebRoot/WEB-INF folder for a “blarg.tld” file, if its not there until build/deployment time then autocomplete won’t work. There is work going on in this area to offer more extensible resolution, but for now that is how it works.
Eric RizzoMember@support-rkalla wrote:
Your TLDs need to be where your web.xml file says they are. If you have them mapped in your web.xml file to “/WEB-INF/blarg.tld”, then MyEclipse will look in your WebRoot/WEB-INF folder for a “blarg.tld” file, if its not there until build/deployment time then autocomplete won’t work. There is work going on in this area to offer more extensible resolution, but for now that is how it works.
OK, that’s what I thought. But I must have something wrong. Here’s what I’ve got right now:
Web-root folder is set to /build/EclipseWebRootUnder /build I have the following structure:
build/ EclipseWebRoot/ WEB-INF/ .struts-config.mex struts-config.xml lib/ taglibs/ struts-html-el.tld
My web.xml (in my source directory) has the following entry:
<taglib> <taglib-uri>struts-html</taglib-uri> <taglib-location>/WEB-INF/lib/taglibs/struts-html-el.tld</taglib-location> </taglib>
My JSP has the following line:
<%@ taglib uri=”struts-html” prefix=”html” %>The JSP editor is complaining with the following error:
“File ‘/WEB-INF/lib/taglibs/struts-html-el.tld’ not found.”The struts-el.jar is on my project’s build path.
So what am I doing wrong?
Riyad KallaMemberThe web spec is pretty particular about the /classes and /lib directories… I wonder if this is causing a problem.
Try copying your tld to /WEB-INF, and changing your web.xml file and rebuilding the project just for sanity sake (close and reopen any JSP editors you had open)… does autocomplete work then? If so, try sticking the tlds under a /tld directory instead of under the /lib dir… I personally just use the default URIs defined by most taglibs and don’t have TLDs anywhere in my project (they are contained in the JAR’s META-INF directory, which is a valid location for resolution).
Eric RizzoMemberWeird. I moved the TLD into WebRoot/WEB-INF and changed my web.xml <taglib-location> element to point to /WEB-INF/struts-el.html
I closed and re-opened the JSP editor. But it is still complaining with the same error, that it cant find the file /WEB-INF/lib/taglibs/struts-html-el.tld
It still thinks that is where TLDs are configured to live, even though I’ve changed web.xml! I did a text search throughout my entire project for the string “lib/taglibs” and it does not exist in any files.
Is there caching of web.xml config data going on in ME? Now I’m really stumped.I will try the suggestion of using the taglib-defined URIs and getting rid of TLD files, and report the results.
Eric RizzoMemberOops, I meant to say I changed my web.xml <taglib-location> element to this: /WEB-INF/struts-html-el.tld
Riyad KallaMemberJust for sanity sake, try closing your project and restarting Eclipse and reopening the project after making those changes… then make sure to rebuild… is it still complaining?
Eric RizzoMemberI was able to get it to work correctly by using the taglib-provided URIs and eliminating the TLD files altogether.
I guess this problem might crop up again when I go to implement my own custom taglib, at which point I will try the steps again to get the JSP editor to recognize the TLD. -
AuthorPosts