- This topic has 35 replies, 6 voices, and was last updated 20 years, 10 months ago by kivus.
-
AuthorPosts
-
kivusMemberYeah, I saw that post earlier…I still think I’ll have the problem of the web root not being able to be the project root though.
Since if I set the project root 1 as super (from the earlier post) then it includes all the files in sub1, sub2, sub3 (which are their own webroots). I will still not be able to create multiple projects in the same domain since they’d have overlapping files.
kivusMemberSince my reply got moved to another page, he’s the file system example I was referencing:
super (root)
___+- subDir1 (<= for the webroot)
___+- subrDir2 (<= for the webroot)
___+- subrDir3 (<= for the webroot)
No OperationMember… some thoughts:
regard the deployment of a web application:
the web root is the root directory of the deployed web application.
thus resources outside of the web root are not deployed.
the eclipse web project reflects a web appication.
so I regard it as a great hint to get resources marked with an error if those are outside of the web root and thus would not get deployed.
EOThoughts 🙂
NOP
kivusMemberI absoluetly agree on all of your points nop…
My problem is that I want to convince my company to buy licenses for MyEclipse since its JSP sytanx highlight and debugging are uber slick, but it seems like there is no way to set-up a project with the current structure of our application:
domainRoot
____+applications
________+app1
________+app2
________+app3Each app directory is structured the following way:
+app
____jsp files (not a directory, the JSP files are stored in the app root)
____+WEB-INF
_______+classes
_________java code (java source code and its resultant classes files)So, my initial thought was that each application (app1, app2, etc..) would have their own project. I cannot configure this structure, however, because I cannot make the project root be the same directory as the web root. Is it the desired behavoir to subsitute “/Web Root” in the project creation when a “/” is entered for the web root folder? I am new to ME, so I might also be missing a concept in project creation.
No OperationMember+app
____jsp files (not a directory, the JSP files are stored in the app root)
____+WEB-INF
_______+classes
_________java code (java source code and its resultant classes files)should be changed into:
+app __webroot ____jsp files (not a directory, the JSP files are stored in the app root) ____+WEB-INF _______+classes _________java code (java source code and its resultant classes files)
So your problem is inventing that additional directory. Some arguments for this additional directory:
– additional files can be stored in the project (outside of webroot) without getting deployed
e.g. build files, documentation, …
– you might introduce a Java src folder to separate Java code from Java classesbig goal:
the folder webroot with all its subfolders and contents must be identical to the deployed application.NOP
Scott AndersonParticipantThis has been a great interaction here and it’s really fantastic to see users helping each other with configurations. I’ve read through the thread and just want to weigh in on a few things. There are currently two things you’ve got to keep in mind with our current web root project structure if you want it to work properly at deployment: 1) the web root can’t be the project root and 2) the web root directory needs to be laid out as an exploded war file. So, in short, the analysis and advice provided by NOP appears to be precisely correct.
–Scott
MyEclipse Support
kivusMemberFollowing Scott’s lead, I want to take time to also thank people in helping with this isue.
Maybe I am understanding something incorrectly about how I’m suposed to set-up my project…
My environment is:
domainRoot
____+applications
________+app1
________+app2
________+app3Now Scott mentioned that each “web root” should be set-up like an exploded WAR file. That is exactly what each app directory (app1, app2, app3) is. The problem comes with trying to set up the project root as the application directory and the web root as an individual app1, app2 or app3 directory, since (1) it will try to compile all JSPs inside of the applications directory, throwing errors for those not in the web root and (2) it will not allow the creation of multiple projects all with the root at the applications directory.
I also agree with NOP that the application structure could be modified to work with how ME requires its project defitions, but I will not be able to convince management to license the project if it’s going to require all developers to change their environments.
So, summing everything up, is ME not compatible with the existing application structure I’ve laid out?
Riyad KallaMemberKivus, let me clarify (if I understand correctly) your dir structure, because as I read it, your project is already setup in the correct fashion, I just think it was presented strangely:
domainRoot + /applications + /app1 <-- this is effectively "webroot" + index.jsp + logon.jsp + /WEB-INF + web.xml + /classes + /lib + /app2 + /app3
So as I understand it, Kivus’s team has setup a parent directory tree called “applications” that contains a bunch of webroot’s for all sorts of different web projects. What Kivus wants to do, is create a project for each one of these webroots where either “domainRoot” or “applications” is the project root and the webroot for each project is the respective “appX” “appY” or “appZ” directory. Now this sounds perfectly sane to me… the problem Kivus ran into is that ME seems to complain about the JSPs from the OTHER webroot directories (appX, appY, etc.) as not being in the correct location. So what we need here, is for ME ot effectively ignore web resources that are outside of a /webroot directory.
Scott can you clarify that ME does/doesn’t do this? If ME does not ignore the resources and still considers them part of the webapp, can you file a bug to have ME ignore web resources that are outside of the scope of the webroot directory for a project? This would provide more freedom for people to setup projects.
Kivus please correct me if I was wrong, I’d hate to ask Scott for the wrong feature 😉
kivusMemberThanks rkalla. You’ve got the situation correct. Sorry it took so long for me to get that across.
I do want to to make one clarification: (using rkalla’s file structure)
I would not mind either one of the following screnarios:
(1) The project root is the domainRoot or applications directory and webroot is app1.
(2) The project root and the webroot are app1The current road blocks for each method are as follows:
(1) (a) you cannot create multiple projects with the same project root and (b) it will still try to compile JSP files which are not within the webroot
(2) ME doesn’t allow thisHopefully, now that rkalla finally conveyed the problem correctly, my clarification didn’t bugger up anyone’s understanding.
Riyad KallaMemberKivus w.r.t. to the “2 projects cannot have the same project root” problem, is this an Eclipse error message when you try and actually create the new project via the Wizard? That would be a shame if that is true, because I think your directory structure is pretty reasonable, especially at a company that is trying to keep things all in one location and one format.
I bet Michael or Scott can give us some technical insight here and help determine if this is an 1) eclipse issue or 2) ME issue.
Thanks for hanging in there so long, if nothing else this has been educational.
kivusMemberIt’s an error message when I try to create the project using the wizard. I’m not sure if they want the full posting of all my configuration information, so I’ll just post the scenario and the error for now:
Here’s the process which gets the error
[Referencing rkalla post for the file structure:]
————
I create one project as:project root: domain/applications
web root: app1
java root: app1/WEB-INF/classesThat works fine (other than the JSPs outside the web root throwing errors as we discussed before)
————
I then repeat the processproject root: domain/applications
web root: app2
java root: app2/WEB-INF/classesI immediately get the following error when I click “OK”
!NewProjectCreationWizard.ip_error.message!See error log for more details.
—————-
The error log outputs:!SESSION Dec 18, 2003 10:20:19.704 ———————————————
java.version=1.4.2
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -Xms128M -Xmx512M -install file:C:/backups/eclipse2.1/
!ENTRY org.eclipse.jdt.ui 4 10001 Dec 18, 2003 10:20:19.704
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:313)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish(NewElementWizard.java:96)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:608)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:321)
at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
at org.eclipse.jface.window.Window.open(Window.java:563)
at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:107)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Caused by: java.lang.NullPointerException
at org.eclipse.jface.dialogs.ErrorDialog.<init>(ErrorDialog.java:117)
at org.eclipse.jface.dialogs.ErrorDialog.openError(ErrorDialog.java:353)
at org.eclipse.jface.dialogs.ErrorDialog.openError(ErrorDialog.java:317)
at com.genuitec.eclipse.j2eedt.ui.wizard.NewWebProjectWizard.finishPage(Unknown Source)
at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:89)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:34)
at org.eclipse.jdt.internal.core.JavaModelOperation.execute(JavaModelOperation.java:365)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:684)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1595)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2711)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:42)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:302)
… 34 more
——–
Riyad KallaMemberThank you for the detail, I’m sure this will help Scott/Michael get to the bottom of this!
kivusMemberNo problem. And I definately agree that this has been educational. Thanks for all your help.
Riyad KallaMemberno problem
Scott AndersonParticipantNow, to get to the bottom of this, I hope. 😉
First, it is an Eclipse limitation that projects cannot overlap, not a MyEclipse one. As a result you won’t be able to specify a web project for each of your web roots within the same hierarchy. The stack trace is a badly handled error to that effect, for which I’ve entered a bug report.
Currently, the JSP editor will compile all JSP’s in a project. There is already an open enhancement request to allow the user to specify a policy on handling JSP’s outside the web root (ignore, warning, error).
I’m afraid the best I can offer right now is to turn JSP compilation off to avoid the errors until we can get to the enhancement, if you can’t restructure the source into three projects.
–Scott
MyEclipse Support -
AuthorPosts