- This topic has 7 replies, 3 voices, and was last updated 21 years, 6 months ago by support-michael.
-
AuthorPosts
-
hvid001MemberHi
I have just downloaded My Eclipse but I have some problems getting it to work with an existing project. My project has the document root as ‘/’, as I understand that is what in the ‘Web Project Conversion’ dialog is called ‘Web Root Directory’. But in the dialog I can’t set it to ‘/’, is this a bug, or is there some reason that ‘/’ can’t be used as document root with My Eclipse?
Thanks in advance for any help.
Jan
support-michaelKeymasterI believe you have the terms reversed. The MyEclipse Web Conversion Wizard uses the term “web context root” for the URL under which web project will be deployed, e.g. ‘/’. The Web Root Directory is a project folder under which lies an exploded WAR directory structure. For reasons specific to Eclipse this directory can not be the top-level project folder but must be in a subfolder of the project, e.g., mywebproject/webroot or mywebproject/subfolder1/webroot.
Michael
MyEclipse Support
scullz78MemberI experience something similar. I am using Weblogic 8.1 and when I have a project that uses a context root of ‘/’ when deployed. When I setup a web project it asks me what the context root is going to be for my project (defaults to the project name). If I put ‘/’, it accepts that entry, but when the project starts it shows that it ignored what I entered and used the default application name for the context root.
Assume my application name is “AppName”, and I have JSP files located off my Web Root folder in “SomeDir”. It seems that MyEclipse does not allow you to specify a root context for AppName of “/”.
If I have a file structure of:
MyApp/
/src/…
/Web Root/SomeDir/MyJsp.jsp
/Web Root/images/myimage.gifThis is what I want to do when I deploy:
http://localhost/SomeDir/MyJsp.jspThis is what MyEclipse does:
http://localhost/AppName/SomeDir/MyJsp.jspI can’t find a way to specify a root context of “/”
If I force the configuration in the .mymetadata file of my project, it wil fail to deploy. Here’s what I have:
<project-module context-root="/MyAppWeb" name="MyAppWeb" ... >
If I change it to:
<project-module context-root="/" name="MyAppWeb" ... >
it will not deploy.
I don’t know if this is the problem Jan is having, but if so, maybe this will help explain.
Does/will MyEclipse support a root context of “/” for Web Apps?
thanks,
–matt
support-michaelKeymasterMatt and Jan,
Can you confirm that you are working with version 2.5.1 of MyEclipse? The behavior you report is indicative of a 2.5.0 bug that was addressed by 2.5.1. For example I just created a simple Web App with ‘/’ context-root and successfully deployed it to Tomcat4 and Weblogic8 as the default webapp for those servers.
To access the MyEclipse version info do the following. From the menubar choose Help > About Eclipse Platform. Select the MyEclipse icon and inspect the version numbers of the Genuitec features.
Michael
MyEclipse Support
hvid001MemberI am working with version 2.5.1. I also believe that the problem I have is not the same as Matt’s problem.
I am trying to use MyEclipse on an existing project, I have not yet come to consider deployment with MyEclipse. In the my application I have index.jsp in the root of the project. I’m still a little confuse regarding the terms, you are saying that ‘Web Root Directory’ contains an exploded WAR. I understood it to be the place where JSPs etc will be addressed from in a URL. If I’m wrong I don’t the see purpose of ‘Web Root Diretory’. If I am correct, then it seems I will have a problem using MyEclipse with an index.jsp in the root of the Eclipse project.
If I set the ‘Web Root Directory’ to a folder then all JSPs not in that folder gives me an compile error. I have the impression that there is nothing I can do except restructure my file structure (which won’t be easy for a number of more or less sensible reasons out of my control).
Jan
support-michaelKeymasterI’m still a little confuse regarding the terms, you are saying that ‘Web Root Directory’ contains an exploded WAR. I understood it to be the place where JSPs etc will be addressed from in a URL.
The Web Root Directory is the physical location (not a URL) of your web application’s contents. All JSPs are expected to reside under this folder. The MyEclipse web project structure is derived from the J2EE web application standard. Here’s an example MyEclipse web project structure.
MyProject/ src/ MyWebRoot/ <-- web root directory index.html index.jsp .... <other content here> META-INF/ WEB-INF/ web.xml classes/ lib/
If I set the ‘Web Root Directory’ to a folder then all JSPs not in that folder gives me an compile error. I have the impression that there is nothing I can do except restructure my file structure (which won’t be easy for a number of more or less sensible reasons out of my control).
Correct, JSPs must reside under the Web Root folder as well as libraries required by those JSPs. We understand your pain regarding project restructuring. The challenge with MyEclipse supporting arbitrary project structures introduces other complexities that become unweildy very quickly for MyEclipse during deployment and debugging which is the other half of development once you have your JSPs coded.
Question: This is a streach but if your JSPs sit at the project level is there any way that you can move your project root folder up 1 level to allow the current project root to then become the effective Web Root Folder?
Michael
MyEclipse Support
hvid001MemberMichael, thanks for your explanation.
Question: This is a streach but if your JSPs sit at the project level is there any way that you can move your project root folder up 1 level to allow the current project root to then become the effective Web Root Folder?
The project is under CVS control (and the structure in the CVS respository can not be changed). So to use your idea single folder in the Eclipse project should be under CVS control. I believe this is not possible 🙁
So it seems (for now) I will not be able to convert my project to MyEclipse. But as far as I can see I can still use the JSP editor of MyEclipse, I hope this won’t give me any unpleasant suprises. Particular the completion of my own custom tags are very nice.
Jan
support-michaelKeymasterI understand the delimma. We are discussing ways to support more flexible structure but the tradeoff introduces additional complexity. We will keep you posted on advancements in this area.
Regards,
Michael
MyEclipse Support -
AuthorPosts