- This topic has 4 replies, 4 voices, and was last updated 15 years, 3 months ago by support-shalini.
-
AuthorPosts
-
vkandiMemberOur team is involved in customization of a J2EE application. We currently organize our code in the following format:
Base Application Changes
— Java code modification on the base application
— JSP changes to existing base application pagesCustom Module 1
— Java code modification for this custom module 1
— JSP and struts changes for the current module 1Custom Module 2
— Java code modification for this custom module 2
— JSP and struts changes for the current module 2All the JSPs / struts configuration files in the end will be built into the same war file and hence have the same context path. The directory structure for custom and existing JSPs would be similar (ex: I can have an admin directory in both the custom modules as well as the base module).
We are trying to setup this project in myeclipse and use the hotdeploy/JSP debugging features. The Java code can be setup to pick up the classes from all the modules (projects in myeclipse). But we face issues with JSPs. Can someone let me know how the project needs to be setup so that I can have multiple webprojects that use the same context path and are part of an ear project or is there another way in which we can setup myeclipse project such that JSP debugging is possible while maintaining the above structure of code organization?
Thank you
support-joyMembervkandi,
I would suggest you to design an enterprise application and build your application architecture around it. Please refer http://www.myeclipseide.com/documentation/quickstarts/earprojects/ – this provides educational material on enterprise applicationThe issue at hand seems to be hot deployment and jsp debugging support for Enterprise Applications. Yes, MyEclipse supports jsp debugging and hot deployment.
If your question is related to the architecture design per se, I would suggest you to crosspost to relevant forums.
vkandiMemberMay be I should rephrase my question:
If I divide my WAR file into multiple modules based on functionality. Each modules will have the JSPs and other resources to support a specific functionality. The approach is to basically differentiate code being developed for functionality-x from the code being developed for functionality-y.
ex:
Module A (Employee Management): has the following structure with 4 JSPs
/Java/src/
— Java classes/webapp/admin/employee/create_new_employee.jsp
/webapp/admin/employee/update_employee.jsp
/webapp/admin/employee/delete_employee.jsp
/webapp/admin/employee/view_employee.jspModule B (Admin Management)
/webapp/admin/system/add_new_admin.jsp
/webapp/admin/system/update_admin.jsp
/webapp/admin/system/delete_admin.jsp
/webapp/admin/system/view_admin.jspModule C (All other WAR resources)
/webapp/WEB-INF/web.xmlIn the above example, we used only admin directory to demonstrate what we are doing but essentially there could be a bunch of directories under webapp that could be present in the other module but the JSPs will be different. Now how can I setup all these modules in MyEclipse that it gives me one war for deployment and debug. All modules combined forms a valid WAR file according to J2EE specification.
J.C. HamlinParticipantThis functionality is not currently supported by MyEclipse. MyEclipse has a simple 1-to-1 functionality mapping. One Eclipse WAR project maps to one WAR file.
That WAR project can have several dependent Java projects which will automatically be deployed along with the WAR, but it cannot have depending WAR projects which will be merged with it.
I admit, this would be a very nice feature to have (MyEclipse supporting multiple WAR type projects all merged together during deployment into the same deployment location). Of course, if you were overiding resources you’d have to make sure that the resourse were deployed (i.e. copied) in the correct order so that the ones supposed to be overridden were copied first, and the overriding resources copied after that.
There are lots of initiatives out there that support having a WAR with multiple independent application modules in the same context path. Spring Slices is one such technology. http://blog.springsource.com/2009/06/22/modular-web-applications-with-springsource-slices/
Slices have lots of limitations though. They must be run in Spring dm’s OSGi web container, they must have completely different sub-paths within the application (i.e. /contextroot/slice1 /contextroot/slice2), and cannot override files from each other.
It would be a nice feature for MyEclipse to support though. And probably pretty easy. Just let multiple WAR projects be deployed to the same context path on the same server, and define the order that they are deployed in the dialog.
Maybe this needs to be moved to a feature request?
-J.C.
support-shaliniMemberjchamlin,
Thank you for posting your observations. I would request you to post this feature under feature requests at
https://www.genuitec.com/forums/topics/myeclipse/feature-requests/ -
AuthorPosts