0

I have been trying to debug JSP files (with awful lots of Java code) using the following configuration:

  <wls:jsp-descriptor>
        <wls:keepgenerated>true</wls:keepgenerated>
        <wls:precompile>false</wls:precompile>
        <wls:debug>true</wls:debug>
        <wls:verbose>true</wls:verbose>
        <wls:print-nulls>false</wls:print-nulls>        
    </wls:jsp-descriptor>

But every time I set a breakpoint in the file I am unable to see the source of the JSP.

I am using Spring Toolsuite and Weblogic 11gR1 (10.3.6). Other than the same configuration for other applications, this is a brand new installation of both.

How can I configure Eclipse to search for the JSP files to debug?

ElderMael
  • 7,000
  • 5
  • 34
  • 53
  • Weblogic has a jasper compiler that converts jsps to java files. If your wls:precompile is false, the pages only get compiled when you first access it from the browser. If you want to see the compiled java code, set wls:precompile to true and then run a build and you will the java classes. – horatius Jan 23 '16 at 20:13
  • If you want to debug weblogic jsps, I would recommend that you download OEPE plugin which stands for Oracle Enterprise Pack for Eclipse. It'll make your life a lot easier. – horatius Jan 23 '16 at 20:14
  • @horatius I tried installing OEPE Plugin but I still cannot see the source of the JSP files when I set the break point on any of them (it works for normal Java classes though) – ElderMael Jan 23 '16 at 20:47
  • You can use jspc-maven-plugin to compile your jspc and then assoicate them as sources in your eclipse. I understand it's a hack, and not a very elegant solution, but you can do this until your figure out how to install OEPE correctly in eclipse (I know OEPE installation is a pain). Refer to this link. http://stackoverflow.com/questions/23211906/compile-jsp-using-maven – horatius Jan 23 '16 at 20:59

1 Answers1

-1

You can precompile the complete war file with: weblogic.appc

or only JSPs with: weblogic.jspc

more details at: http://devwebcl.blogspot.cl/2014/09/wls-precompile-earwar-ejbjsp.html

java weblogic.jspc -forceGeneration -keepgenerated -verboseJspc -d d:\tmp\export\ -classpath .;D:\proj\webapp-wl-v4\web\WEB-INF\classes;D:\proj\webapp-wl-v4\foo.jar;D:\proj\webapp-wl-v4\lib\bar.jar index.jsp
devwebcl
  • 2,866
  • 3
  • 27
  • 46