facebook

JSP Debug of an un-exploded ear

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

    vlewis
    Member

    Sorry if this is a repost but I have not gotten any straight search results

    I am running eclipse 3.0 M8 , myeclipse 3.7.2 , jdk 1.4.2_02 target for weblogic 7. Can I debug jsp’s embedded within and un-exploded ear files or do I need to explode it somewhere. The ear is created by ant , all debug of pure java source works excellently ! I just can’t get at the jsp’s . I do have the weblogic.xml set for jsp debug.

    BTW The project originally started as a java (not J2EE) project. I have seen some help on converting such a file to a web based “debuggable”, any gfuther guidance on this would be most appreciated

    Thanks in advance

    Vince Lewis

    #208650

    Riyad Kalla
    Member

    Vince,
    Debugging requires two things:
    1) JDK 1.4 or above
    2) JSR 45 compliant application server

    AFAIK WebLogic supports the JSR 45 spec, so you *shouldn’t* be having a problem with the JSP debugging. Also it is OK to run either exploded or packaged deployment with the debugger.

    When you say that you have your weblogic.xml set for JSP debugging, can you paste what you have set here for us to look at?

    I have seen some help on converting such a file to a web based “debuggable”, any gfuther guidance on this would be most appreciated

    Its hard to say what would be helpful here.. all code should be debuggable, but I’m guessing that this project probably isn’t in a web application-friendly format (meaning directories are in different orders and such).

    But if you can deploy and run your app, you should be able to debug it just fine. After we get you fixed up with JSP debugging, let us know any specific debugging problems you are having.

    #208656

    vlewis
    Member

    Here is my weblogic.xml contents

    <!DOCTYPE weblogic-web-app (View Source for full doctype…)>
    – <weblogic-web-app>
    <description>External Data Management Web Application</description>
    – <jsp-descriptor>
    – <jsp-param>
    <param-name>keepgenerated</param-name>
    <param-value>true</param-value>
    </jsp-param>
    – <jsp-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </jsp-param>
    – <jsp-param>
    <param-name>workingDir</param-name>
    <param-value>/www/websites/edm.merck.com/jsp</param-value>
    </jsp-param>
    – <jsp-param>
    <param-name>pageCheckSeconds</param-name>
    <param-value>-1</param-value>
    </jsp-param>
    </jsp-descriptor>
    </weblogic-web-app>

    #208660

    Riyad Kalla
    Member

    Vince, I asked our WebLogic guy to look at this, hang tight.

    #208685

    Scott Anderson
    Participant

    Vince,

    There are a couple of things in your configuration that could be causing the problem, but definately not a ‘smoking gun’. Here’s what comes to mind.

    1) The early releases of JDK 1.4.2 (like your copy of 1.4.2_02) had known problems in their debugger API implementation which have been known to cause problems with Eclipse. I’d suggest either updating to the latest 1.4.2 release or falling back to the final release of 1.4.1 for BOTH the JDK used to start WebLogic and Eclipse itself.

    2) You’re creating your EAR with Ant, manually, and there might be something there. Can you try this experiment? Create a simple EAR project with a single Web project containing a default JSP generated from our wizard. Set up weblogic for debugging this project as you did in your other EAR and then deploy it in exploded format. Navigate to the application with a browser to be sure it’s there. Once you see it’s up and running, set a breakpoint in the JSP page and refresh the page in the browser. Is the JSP breakpoint hit? What happens.

    #208700

    vlewis
    Member

    well this worked after I put a weblogic.xml file with jsp debug into the dir structure. Debugs jsp helloWorld fine.

    However, I tried to get this to deploy unexploded and I could not get it to even run. I am looking at the ear it seems wierd. What do you think I should try next.

    #208703

    Scott Anderson
    Participant

    I am looking at the ear it seems wierd.

    Ok, so exploded works but not packaged. Can you articulate what you think the problem is with the packaged ear?

    #208729

    vlewis
    Member

    well I’m no expert but …
    exploded the dir structure lloks like this (not showing META-INFs)

    DebugTest (enterprise dir)
    DebugTestWeb (web dir)
    helloWorld.jsp
    WEB-INF (dir)
    web.xml
    weblogic.xml
    etc

    However the ear DebugTest.ear contains no META-INF, and a DebugTest.war , this war contains no second directory level (DebugTestWeb) so if I explode it , it is not the same dir a structure

    #208744

    vlewis
    Member

    well I have gone the other way and I am exploding my ear in the applications directory. In parallel with the DebugTest deployment. Removed the ear. All the code works, the java code debugs, the DebugTest helloWorld.jsp debugs BUT the main jsps do not. This leaves very few possibilities, including the idea that the JSPs must be deployed through the MyEclipse deployment tool in order to tie the debugger and the deployment . Is this possible? or please give me any ideas. I feel SO close.

    #208815

    Scott Anderson
    Participant

    DebugTest helloWorld.jsp debugs BUT the main jsps do not.

    Are your main jsp’s top-level JSP’s? I mean, they’re not included in another larger JSP, right? Also, are they all located under the web root of the project? If the JSPs aren’t under a web project’s web root, the source lookup will not find them.

    #208845

    vlewis
    Member

    No they were not under the project root, the were refered to a seperate directory structure throught the config.xml file. I had a feeling this might be the case, and I am restructuring to see if this will help. I will keep you posted and thanks for the help so far.

    #208851

    Scott Anderson
    Participant

    No they were not under the project root, the were refered to a seperate directory structure throught the config.xml file

    This would certainly keep the source lookup for working properly. Please let us know how it goes after you restructure.

    #208858

    Riyad Kalla
    Member

    No they were not under the project root

    I think you meant this anyway, but I just wanted to clarify… Scott meant under the WebRoot (<Project Root>\WebRoot) not under the <Project Root> directory.

    #208909

    vlewis
    Member

    yes this is what I meant. Okay, here is where we are at. I reconfigured things so that the jsp directorieS are under the the web-root. The directory structure has several levels, that I cannot change, (BTW it is a struts implementation). The first directory level is a dir called jsp/ . index.jsp is in here, among several others. All of these now debug fine !

    However when I go after jsp’s that are down two levels from there (there are none down 1) I cannot get the debug to work for these pages.

    Getting close. Any ideas ?

    #208916

    Riyad Kalla
    Member

    However when I go after jsp’s that are down two levels from there (there are none down 1)

    We used to have a bug with debugging if the directories had underscores in the names… I’m curious what the directory names are in this situation, where the debugging works and then where the debugging doesn’t work?

Viewing 15 posts - 1 through 15 (of 19 total)
Reply To: JSP Debug of an un-exploded ear

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