facebook

Problems converting to MyEclipse web project

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #204966 Reply

    mweir
    Member

    I am trying to configure MyEclipse in an existing project (with its own not-going-to-change file layout) so that we can use it for JSP debugging.

    Problems:
    1. Our file structure does not execute all files from inside the WEB-INF directory. The JSPs are held in sibling directories.

    2. Although I have set the Eclipse project properties such that our JSP directory is a source directory with the appropriate output directory, and doing simple edits used to copy files to the right place, after configuring MyEclipse with an output directory of WEB-INF files are now (incorrectly, at least for me) put under WEB-INF.

    3. There does not appear to be a way of changing the MyEclipse’s configuration once it is set.

    4. In spite of the Eclipse project settings pointing to particular source directories containing JSP files, after configuring MyEclipse a massive compile took place that apparently looked at every directory in my Eclipse project. (I don’t have the Eclipse project rooted in the source directory of my project as that would cause a source refresh to delete the project files.) The error messages seem to all be complaining that the source files are not in the ‘base path’ output directory. Surely in MyEclipse there is a way to make sure the files get from some arbitrary source directory to an arbitrary output directory and are compiled, etc. I would also expect there to need to be a way of telling MyEclipse where our Tomcat install is.

    I assume I am missing something incredibly obvious.

    Are these problems caused by our project not conforming to a “J2EE” project layout? If so, is there a way to get the benefits of MyEclipse some other way?

    Would creating a new project from scratch allow me to get around these problems?

    Thanks for any help.

    Platform info:
    – OS: Win2000
    – Eclipse version: Version: 3.0.0 Build id: 200402122000
    – Was Eclipse freshly installed for MyEclipse? Yes, but used an existing workbench file
    – If not, was it upgraded to its current version using the update manager? No
    – Are any other external plugins installed? JADclipse decompiler
    – How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.* 7
    – What MyEclipse version are you using? Latest for M7
    – Are there any exceptions in the Eclipse log file? YES

    #205125

    Riyad Kalla
    Member

    1. Our file structure does not execute all files from inside the WEB-INF directory. The JSPs are held in sibling directories.

    Unfortunately for our current release, MyEclipse still expects your project in an exploded WAR format. We are working on loosening this requirement for version 2.8 of MyEclipse. We have loosened the requirement somewhat by allowing projects to make use of linked resources, but as you may find out, Eclipse’s (not MyEclipse) implementation of linked resources is extremely limited, and won’t expand in the forseeable future.

    Also your JSP files are expected to be somewhere under your webroot folder, otherwise they will be marked with an error as being out of place (again, another enhancement for 2.8, we will allow people to place JSP files more freely).

    2. Although I have set the Eclipse project properties such that our JSP directory is a source directory with the appropriate output directory, and doing simple edits used to copy files to the right place, after configuring MyEclipse with an output directory of WEB-INF files are now (incorrectly, at least for me) put under WEB-INF.

    Eclipse’s concept of a source directory is actually intended for Java source files, and your output directory is suppose to be your WEB-INF/classes directory.

    So a typical example of a project might be to have all your servlet and bean code in the source folder (in some packgae hierarchy) and then set your output directory to “/webroot/WEB-INF/classes” and then all your JSP pages are under “/webroot” which you have set as your project’s webroot (hence the name :)).

    3. There does not appear to be a way of changing the MyEclipse’s configuration once it is set.

    For 2.7 and 3.7 GA you are correct. This was defensive on our part because in the RC releases, people were able to really cripple their project setup by changing a few project properties because not all our wizards and dialogs were picking up the changes. We needed a chance to safely rethink and implement this functionality so we locked it down for the GA release.

    We appologize for the inconvenience as we realize it is a PIA. You can modify the values in these properties by opening up the .my<name> files in your project with a text editor.

    4. In spite of the Eclipse project settings pointing to particular source directories containing JSP files, after configuring MyEclipse a massive compile took place that apparently looked at every directory in my Eclipse project. (I don’t have the Eclipse project rooted in the source directory of my project as that would cause a source refresh to delete the project files.) The error messages seem to all be complaining that the source files are not in the ‘base path’ output directory. Surely in MyEclipse there is a way to make sure the files get from some arbitrary source directory to an arbitrary output directory and are compiled, etc. I would also expect there to need to be a way of telling MyEclipse where our Tomcat install is.

    This is a two part question, I’ll answer the second part first: Yes there is, we support running/debugging and deploying to all sorts of application servers, one of which is Tomcat. You can setup tomcat by going to Windows>Preferences>MyEclipse>Application Servers>Tomcat 5

    Here you can setup the base directory of the installed app server. Also click the JDK node under it, and add a JDK (not a JRE) that you want to run the application server.

    Now an answer to your first question, there currently is not a way to ‘compile’ the JSP pages into a final location before deployment. As I mentioned MyEclispe expects your app in an exploded WAR format. This means that the JSP pages are permanantly somewhere under your webroot folder (this COULD mean they are in /webroot/WEB-INF/jsp, but they just need to be under the webroot folder). This explains all the errors you were getting.

    Also note that I mentioned above the Eclipse source directory is indended for Java source files, not JSP files.

    Are these problems caused by our project not conforming to a “J2EE” project layout?

    Yes partially, but I think we can make this work.

    Would creating a new project from scratch allow me to get around these problems?

    This would certainly do the trick if you were very careful to place everything in the right place. MyEclipse is currently MUCH more flexible than other Eclipse plugins, but we still need some structure to key off of. We are have extensive talks about *totally* flexible project structures (where you make whatever directory layout you want, and just tag certain directories are ‘types’) and are looking at showing off the first draft of these implementations in the 2.8 release. Although we will likely make it more user friendly than that.

    Please see this FAQ entry for a good overview of a typical project structure: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#111

    #205140

    mweir
    Member

    Thanks for the reply.

    I am disappointed that MyEclipse is so strict about how it works. I wish that this had been made clearer on the promotional pages of your web site. (Perhaps it is quite clear to those who understand about exploded war files, etc. but I expect that there is a large audience for your product among those such as me whose projects are structured arbitrarily. I don’t see much detailed documentation on the main web site.)

    At any rate, I notice that the JSP editor portion of MyEclipse seems to be named differently from the rest of the product, leading me to believe that it was originally an independently produced JSP editor and compiler that was incorporated into MyEclipse. Is it possible to use the JSP editor separately from MyEclipse? This would at least provide some benefit.

    Thanks again for any help.

    #205142

    Riyad Kalla
    Member

    We hope that our future changes to project infrastructure (starting with 2.8/3.8) will benefit everyone that is currently running into a ‘brick wall’ trying to integrate MyEclipse into their development environment.

    As far as the JSP editor is concerned, it is a custom component written by the MyEclipse team (the “MyEclipse JSP Editor”, editor). However the JSP compiler that is used for validation is the BJE compiler that was donated to the MyEclipse code base and no longer available as a standalone download.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Problems converting to MyEclipse web project

You must be logged in to post in the forum log in