facebook

Debugging JSPs from Java Persp. and Packaging EARs [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #197243 Reply

    scullz78
    Member

    I recently downloaded MyEclipse to give it a try and have been having a problem getting my enterprise application set up using the “Enterprise Application” project. My application is packaged in an .ear file consisting of a .war file and an ejb-jars.jar file. The problem is that both my web application and my EJBs access many of the same java classes. For this reason, our .ear file is packaged such that most of the classes which would normally be in WEB-INF/classes are put into jar files that are placed in the .ear file. I then reference these .jar files in the manifest file of both the .war and ejb.jar files.

    Since so much of the code is used by both the ejb and web layer, I can’t find an easy way to set up a Web Module and EJB Module without duplicating the code.

    What I have been able to do successfully is set up a basic Java Project with all my files, plugin my Ant build.xml file that packages the .ear and deploys it to Weblogic, and then debug classes from there. My goal, however, would be to debug the JSPs as well. Is this feature only available using the J2EE projects? when I attempt to debug a JSP now, I recieve an error when the application is run saying that it can’t find the line I am trying to debug in my source; it’s using the line number from the .java file resulting from the .jsp, and can’t find that line number in my .jsp source.

    If there is any information I can provide or ways to clarify, please let me know. To summarize, there are two basic issues:

    1) How to represent interdependent .ear file with Web and EJB Modules.
    2) Can I debug a JSP using a custom built .ear file generated from a simple Java Project?

    Thanks for your help. I’ve really been pleased with MyEclipse so far and appreciate all your hard work!

    –matt

    #197282 Reply

    Scott Anderson
    Participant

    Matt,

    Since so much of the code is used by both the ejb and web layer, I can’t find an easy way to set up a Web Module and EJB Module without duplicating the code.

    Create one or more jars for the shared classes and place them in your EAR project, just like you have been doing. Then, modify your web and ejb manifests as before to reference the jars in the ear. This will allow everything to run during deployment. To allow everything to compile in MyEclipse, you’ll also have to add each of these shared jars to the build paths of the EJB and Web projects.

    2) Can I debug a JSP using a custom built .ear file generated from a simple Java Project?

    You won’t need to do this if you do the above. Your model is easily supported by our project structure and deployers.

    My goal, however, would be to debug the JSPs as well. Is this feature only available using the J2EE projects?

    Actually, it should work as long as you use our application server connectors to launch the server and our JSP editor to set the breakpoint. However, you really should move over to our J2EE project structure since you now know how to. 🙂

    By the way, source level JSP debugging is only supported on Tomcat 5, Bejy Tiger, WebLogic 7 & 8. To enable debugging for WebLogic, see the announcement in the Documentation forum.

    If you have any more questions, please let us know.

    –Scott
    MyEclipse Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Debugging JSPs from Java Persp. and Packaging EARs [Closed]

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