Debug JSP/JDeveloper 3.1
I am trying to use JDeveloper 3.0 to debug JSP pages. The pages call each other through standard link tags ( <a href=myjsp.jsp...)
I can debug a single jsp page but not the linked to pages. Can this be done in 3.0?
If not.. when is JDeveloper 3.1 expected??
Thanks,
Dave
null
This is possible in JDeveloper 3.0
For example create
A.jsp which has a link to B.jsp as
<P><% out.println("Hello World"); %></P>
Call second JSP
Place a break point on out.println
B.jsp has
<P><% out.println("Hello World"); %></P>
place a breakpoint on this line
Run A.jsp in the debug mode and when you see the html page rendered in browser click on the link which calls B.jsp and this will stop at the breakpoint place in B.jsp
raghu
null
Similar Messages
-
I cannot debug in JDeveloper. When I try to debug I get an error that some class is not found. Has someone got an idea regarding this?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Liz Looney ([email protected]):
Hi.
Can you give more details about the problem?
-Problem is that when I debug the program I get some error that rcsa class is not found.
Can you build the project without any errors?
-Yes I can build the project without errors
Can you run the project?
-Yes I can run the project
What kind of project is it? Is it a Java application or an applet or a servlet or a JSP or what?
-This is servlet
Liz<HR></BLOCKQUOTE>
null -
Thanks,
I havenot used Oracle before I know that
you could debug JSP in Visual Age for Java,
but where could we debug jsp code,
thanks,
nullYou can debug JSPs and Servlets in JDeveloper locally in the IDE itself, or remotely.
To debug locally within JDeveloper, simply place breakpoints anywhere in the source code and choose Run | Debug from the main menu. The JSP is run using Oracle's Web-to-Go server.
Remote debugging requires a little more setup. See the online help for more information. -
Debugging JSPs using Visual Cafe
I am using WL 5.1 and trying to figure out how to debug JSPs using Visual Cafe 4.0.(Enterprise Edition). The JSP file is running fine if I use plain "javac" for compilation. If I change the compiler to include -g option (for debug), I get the following error.
Thu Aug 31 15:46:37 CDT 2000:<E> <ServletContext-General> Servlet failed with Exception
java.lang.NumberFormatException: error=2
at java.lang.Integer.parseInt(Integer.java:409)
at java.lang.Integer.parseInt(Integer.java:458)
at weblogic.servlet.jsp.JspStub.compilePage JspStub.java:303)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:174)
at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:92)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:168)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:99)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:742)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
textImpl.java:686)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
ContextManager.java:247)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
a:361)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
weblogic.properties
weblogic.httpd.initArgs.*.jsp=\
pageCheckSeconds=1,\
compileCommand=C:/VisualCafeEE/java2/bin/javac.exe -g,\
workingDir=C:/weblogic/myserver/classfiles,\
verbose=true
If I don't use -g option, the page gets displayed correctly. Any help would be appreciated.
Thanks
Sree Pillai
assuming you are running on Windows, you can use a .cmd file with the
following command in it
javac -g %*
if you name it c:/java/bin/javac.cmd, then replace the line with
compileCommand=C:/java/bin/javac.cmd,\
Barry
Sree <[email protected]> wrote in message
news:[email protected]...
>
> I am using WL 5.1 and trying to figure out how to debug JSPs using Visual
Cafe 4.0.(Enterprise Edition). The JSP file is running fine if I use plain
"javac" for compilation. If I change the compiler to include -g option (for
debug), I get the following error.
>
> Thu Aug 31 15:46:37 CDT 2000:<E> <ServletContext-General> Servlet failed
with Exception
> java.lang.NumberFormatException: error=2
> at java.lang.Integer.parseInt(Integer.java:409)
> at java.lang.Integer.parseInt(Integer.java:458)
> at weblogic.servlet.jsp.JspStub.compilePage JspStub.java:303)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:174)
> at weblogic.servlet.jsp.JspStub.checkForReload(JspStub.java:92)
> at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
> java:168)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:99)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
> textImpl.java:742)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
> textImpl.java:686)
> at
weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
> ContextManager.java:247)
> at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
> a:361)
> at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
>
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>
> weblogic.properties
> -------
> weblogic.httpd.initArgs.*.jsp=\
> pageCheckSeconds=1,\
> compileCommand=C:/VisualCafeEE/java2/bin/javac.exe -g,\
> workingDir=C:/weblogic/myserver/classfiles,\
> verbose=true
> --------------
>
>
> If I don't use -g option, the page gets displayed correctly. Any help
would be appreciated.
>
> Thanks
> Sree Pillai
-
Remote debugging in JDeveloper
Hi,
Can you please provide the steps to do remote Debugging of source from JDeveloper
Thanksare you looking for this?
http://aboutsoa.wordpress.com/2009/03/10/remote-debugging-in-jdeveloper/
http://jdeveloperfaq.blogspot.com/2009/12/faq-4-how-to-remote-debug-adf.html
http://xmlandmore.blogspot.com/2010/12/using-remote-debugging-in-jdeveloper.html -
Can I debug jsp in eclipse ?
I am using wtp eclipse and I want to debug jsp please guide me how to ?
Yes, just the same way as you do with normal Java classes. Run the server in debug modus and put breakpoints in the source file.
But do you have business logic (scriptlets?) in your JSP then? I'd to put them in separate Java classes (Servlet, Bean, DAO, Utility, etc). It will greatly ease unit testing and debugging (and also maintenance!). -
IDE for debugging JSPs?...
Please help, anyone know of a good IDE for debugging JSPs? are there any
that may be freeware?
Try converting the .jsp files to Java files then compiling to .class files
and deploying as Servlets. Then you can easily debug with any debugger
supporting WL.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Manoj" <[email protected]> wrote in message
news:3b02fe33$[email protected]..
> Please help, anyone know of a good IDE for debugging JSPs? are there
any
> that may be freeware?
>
>
-
Debugging jsp in eclipse 3.2
--i have eclipse 3.2 ,i want to debug jsp page .
--how will i do it.Design your application so that there is little that needs to be tested or debugged from within the JSP?
-
Hi,
Is there any tool to debug the JSP files? I want to debug my JSP how to do it? Please clarify.
Thanks.gimbal2 wrote:
ramp wrote:
But then there are millions of already written jsps out there already and to debug those, I use MyEclipse. It needs a paid license though.A license that needs to be renewed yearly, right?
Yes, 30$ or thereabouts. I do not have to pay for it though ;)
I wouldn't pay for a tool just to be able to debug JSPs though ;) I'll just work with System.out or a logger to trace where stuff goes wrong.We used to do that before we convinced the management that we work for that it really saves huge time (money and productivity)
Its a life saver for us :). The jsps are sometimes 500 lines long (no dont kill me, I did not write those. Just have to maintain them :( ) and I shudder to think of those dark days where we kept adding incremental sysouts, then do a build and watch the stack trace. Sometimes the server did not pick up the jsp changes and a restart was needed ( more shudder :) )
ram.
Edit: Just wanted to add that it needs some setup and is not for the faint hearted -
How to debug JSP in JDeveloper
I want to debug a JSP page in JDeveloper. I have put break point in jsp page, but when called from browser, control does not stop at break point in JSP. Please suggest, how to debug a JSP page in JDeveloper
You might use logging, log4j or standard jdk , <c:out> or even good old scriptlets <% ..%>and out.println(); to display the values of the variables that interest you.
Consult for instance chapter 14 of Beginning JSP, by Wrox, or any other equivalent.
NA
[http://nickaiva.blogspot.com/] -
Debugging JSP with standalone OC4J
Hi All,
I am trying to debug a JSP using JDeveloper 10.1.3.2 on standalone OC4J 10.1.3.2 . I find that it is not stopping at the breakpoints I have set. My settings in the global-web-application.xml are as follows
<servlet>
<servlet-name>JDevOJSP</servlet-name>
<servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
<init-param>
<param-name>check_page_scope</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>debug_mode</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>developer_mode</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>encode_to_java</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>emit_debuginfo</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>jspjavacompiler</param-name>
<param-value>oracle.jdevimpl.jsp.JspOjcCompiler</param-value>
</init-param>
<init-param>
<param-name>jspcompiler</param-name>
<param-value>oracle.jdevimpl.jsp.JspOjcCompiler</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
However when I try accessing the JSP(test.jsp) from the browser, I get an error saying _test.class is not found.
I verified this by checking under the application-deployments folder and I found that the .java & .class files are not created under the persistence\_pages folder.
So I changed the entry in global-web-application.xml as follows to get the .java & .class files generated
<servlet>
<servlet-name>JDevOJSP</servlet-name>
<servlet-class>oracle.jsp.runtimev2.JspServlet</servlet-class>
</servlet>
Once they are generated, I reverted the setting back to as it was before and tried to debug the JSP. But still it does not find the break points
I have jdev-rt.jar,xmlparserv2.jar,ojc.jar & jdev-remote.jar in <OC4J_HOME>/lib folder.
I am starting OC4J with OJVM option debug mode listening to port 4000 and I have configured my project in JDeveloper for remote debugging.Please let me know where I am going wrong.
Thanks in advance,
Prasannahttp://blogs.oracle.com/shay/2005/10/24#a55
-
Jdveloper, Debugging JSP doesnt work
Hi,
i am using jdeveloper 9.0.4.2.0 , jdk 1.4.2_03
Until yesterday it was possible to set breakpoints in a JSP-Site (let us call it myJSP.jsp). The debugger stopped erverytime at a breakpoint when archiving it.
But now it doesnt work any more, that means, the debugger even doenst jumps into the JSP-Site-Sourcecode, instead it jumps to the stub-file belonging to the JSP-Site ( _myJSP.JAVA).
What have i to do to get the former behavior of the debugger?
please help
byeIs the debug param set to true?
-
Debugging JSPs and inspecting variables
I've got the debugger running in a jsp, the breakpoints trigger but I can't inspect/watch/view any variables - it just prints up a question mark. This makes the debugger a bit pointless.
I used to be able to see them, and I've looked all through the project properties - run debug settings but nothing stands out. I'm putting the breakpoint in the .jsp file - I've tried it in the _java file and it doesn't trigger.
I'm on jdeveloper 10.1.3.1.0.3984 /windows xp sp2/jdk 1.5
Anyone know how to get this back working? It works fine in normal java filesSame problem I've been hoping for an answer to in my thread at http://technet.oracle.com:89/ubb/Forum2/HTML/006620.html -- I'd really like to see someone from Oracle comment on this as these problems developing jsps in JDeveloper are a huge problem. That's what's keeping me using JBuilder right now.
-
We need to debug a deployed jsp that uses java beans. It works fine in jdeveloper but we get null pointer exceptions when deployed and accessed via internet explorer. Strangely, it seems not to happen when we use netscape.
The jsp/java beans app is in jdevleoper 9.0.3.1 (windows 2000).
I have deployed the application to Oracle 9ias java edition (9.0.3) on Red Hat Linux.
I know how to modify the project settings in jdeveloper for remote debugging.
I have set the oc4j_home oc4j container properties to "debug mode" and "emit debug info" on 9ias server through the enterprise manager web site.
when I start debug mode in jdeveloper I am prompted for the host name and port number for the remote debug session. What port do I use ? Do I need to do something to start 9ias at a certain port ?
JgaltTry this JavaOne presentation:
http://servlet.java.sun.com/javaone/javaone2000/event.jsp?eventId=1569&trackId=7&eventType=TS&ts=1025021896743
Starting at slide 12, there are technical details on configuring Apache/JServ for remote debugging of JSPs. If you want to use JDev9i for debugging Apache/JServ, you'll need to substitute updated jars for the jars that are shown in the slides. -
How to remote debug JSPs on Tomcat 5.0 from JDev 10.1.2
I can remote debug Java applications and servlets. But I can not make it stop within any JSP pages while doing remote debug. I have no problem if I debug locally within the built-in OC4J server.
I set my project properties with remote debugging -> Attaching to JPDA. I start my tomcat using catalina jpda start after setting environment variables JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket.
Please help,
TIAAshraf, thanks for sharing your experience. I would like to comment on your precedure.
Jdeveloper 10.1.2
Tomcat 4.1.31 ( version 5.x.x won't work as it needs jdk 1.5 at least, and jdev is configured to run with 1.4 )I was able to use Jdeveloper 9.0.5 to debug a servlet running in Tomcat 5.5.9 with jdk 1.5.0. I would belive there is no fundamental obstacle for Jdeveloper 10.1.2 to debug Tomcat 5.x.x, thanks to the nature of JPDA.
a- backup $TOMCAT$\bin\catalina.bat.
b- edit $TOMCAT$\bin\catalina.bat to include the following:
set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000Another way is to set your environment variable JAVA_OPTS. There is then no need to modify catalina.bat.
Maybe you are looking for
-
Fixed and Variable Breakup of Actual Cost
We have implemented Material ledger and also activated actual cost component split. We are getting the actual product cost at month end. In the costing cockpit we get the Peiodic unit price(Actual cost) as well as std price of the material. But In co
-
I Originally setup Aperture years ago to "Manage" my huge amount of photos to save space and be more convenient. I have bought a new external HD and want to export my entire original files from all the different projects and sub projects from the one
-
PIN CODE LOCKED!!!! help!
I upgraded my phone to the new ios7 and WISH sincerely, that I had not bothered. I was prompted to input a 4 digit pin which I did. The number is a very memorable number for me personally, and of course I was required to enter the number twice (the
-
Tips on how to handle situation where client won't pay invoice?
Hello, We usually request that clients fill out a Direct debit form before going live with their site. However on a one off occasion, our client was desperate and promised to provide us with the DD before next billing period. It turns out they have
-
Sso with third party java application.
hi all, I want to have single signon for third party java application deployed on websphere 5.0 advanced server . I am using SAP EP6.0 SP13 . Can anybody help me out. thanx in advance..... Sarang