facebook

Setup project in MyEclipse

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #301187 Reply

    vkandi
    Member

    Our 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 pages

    Custom Module 1
    — Java code modification for this custom module 1
    — JSP and struts changes for the current module 1

    Custom Module 2
    — Java code modification for this custom module 2
    — JSP and struts changes for the current module 2

    All 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

    #301199 Reply

    support-joy
    Member

    vkandi,
    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 application

    The 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.

    #301225 Reply

    vkandi
    Member

    May 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.jsp

    Module 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.jsp

    Module C (All other WAR resources)
    /webapp/WEB-INF/web.xml

    In 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.

    #301236 Reply

    J.C. Hamlin
    Participant

    This 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.

    #301245 Reply

    jchamlin,
    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/

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Setup project in MyEclipse

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