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/]

Similar Messages

  • How to debug jsp program

    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,
    null

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

  • How to Debug JSP in Websphere 3.5 ?? Urgent

    Hi,
    can somebody help me debuuging JSP in Websphere Application server 3.5 .Remember I dont have
    Websphere Studio or any other tool.any help in this regard is appreciated.
    Thanks
    Jack

    In most cases, you can debug an application by using the old standby of printing status lines after each significant chunk of code. For example, you can always output the page's parameters to make sure you've received what you think you've received.
    In the cases that Java throws an exception, you can make a rough guess as to what the problem is, based on the exception. A NumberFormatException usually occurs when you try to convert a letter into a number. The original intent would be to take a string "10" and convert that into the integer 10. SQL Exceptions are a little more vague, but again, you can at least narrow down the problem.
    Specific debuggers, while nice to have, are not really necessary. Through experience, and trial and error, you will eventually discover (and remember) the most common kinds of errors and how to avoid them.
    As a general rule, until you become proficient, always code a little chunk of the application at a time, and test that chunk to make sure it's working properly. It's far easier to track down a bug if you know it's somewhere in a dozen lines of code that you wrote that morning.
    If you are using Internet Explorer, you may want to confirm that Explorer is not giving you "friendly error messages". You can check this in the tools->internet options->advanced dialog box. By default, IE hides specific error messages, including JSP errors, because Microsoft rightly feels that your grandmother would just get confused.

  • How to debug JSP?

    I'm a starter at JSP. I have JBuilder, websphere (both are trial edition), and J2EE installed on my computer.
    How can I debug a JSP page?
    Thanks

    Well well, i say, i have not heard of any program you can use to debug your jsp. The only method i used is, placing numerous "System.out.println" before/in/after every loops, conditions and those statements that yields a result.

  • 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
              

  • HOW TO: Debug a remote JSP

    <h1>HOW TO: Debug a remote JSP</h1>
    <strong>Note: </strong>The process of debugging a remote JSP on an Apache/Jserv
    installation involves a couple extra steps that were not covered in the JDeveloper
    3.2 documentation. </p>
    <strong>Introduction</strong></p>
    You use JDeveloper to debug JavaServer Pages (JSP) deployed and running on
    a server that includes a JSP container, such as Apache Jserv. Your JSP container
    will need to be configured to enable remote JSP debugging using JDeveloper.</p>
    JDeveloper allows you to use one of two protocols for JSP debugging - the
    Oracle Java Virtual Machine (OJVM) debugging protocol or the Sun Java Platform
    Debugging Architecture (JPDA). Before you start your remote debugging session,
    you will have to choose which method to use. If you use the OJVM protocol, your
    debugging session will run more quickly and you will have some additional features
    to assist you. You can only use OJVM on a Windows NT system. If your server
    is running UNIX or another operating system, you <strong>must</strong> use the
    &quot;classic&quot; JVM.</p>
    <strong>Setting up your project for remote JSP debugging</strong></p>
    Once you have created a JSP project, you need to set your project options
    so that remote debugging is enabled: </p>
    <ol>
    From the <strong><u>P</u>roject</strong> menu, select <strong><u>P</u>roject
    Properties</strong>. </p>
    </li>
    Click the <strong>Run/Debug</strong> tab.</p>
    </li>
    From <strong><u>D</u>ebug Files As:</strong> dropdown list, select <strong>Remote
    Debugging</strong>. </p>
    </li>
    Click <strong>OK</strong>. </p>
    </li>
    </ol>
    <strong>Configuring the Remote Server</strong></p>
    The following options must be changed on the host running the Apache/Jserv
    server. These instructions assume the server is running Windows NT: </p>
    <strong>Changes to jserv.properties</strong></p>
    These options control which Java Virtual Machine is used and how it is loaded.
    </p>
    <ol>
    For <em>The Java Virtual Machine interpreter</em> parameter <tt>wrapper.bin</tt>:
    </p>
    </li>
    <ul>
    [*]Comment out any existing entries by putting a <tt>#</tt> at the beginning
    of the line.
    <blockquote>
    <pre>#wrapper.bin=C:\java1.1.8\bin\java.exe</pre>
    </blockquote>
    </li>
    [*]Add a new entry with the full path of the <tt>java.exe</tt> that you want
    to use. To use the JDeveloper 1.3 OJVM, put
    <blockquote>
    <pre>wrapper.bin=C:\Program Files\Oracle\JDeveloper 3.2\java1.2\bin\java.exe</pre>
    </blockquote>
    </li>
    </ul>
    For the <em>Arguments passed to Java interpreter</em> parameter <tt>wrapper.bin.parameters</tt>:
    The value you put for this parameter depends on which Debugging Protocol
    you will choose in the <strong>Remote Debugging Dialog</strong> in JDeveloper
    when you start debugging.</p>
    </li>
    <ul>
    [*] If you want to use the JDeveloper 3.2 OJVM, put </li>
    <blockquote>
    <pre>wrapper.bin.parameters=-ferrari -XXdebugondemandquietport4000</pre>
    </blockquote>
    [*]If you want to use Java Platform Debugging Architecture, put
    <blockquote>
    <pre>wrapper.bin.parameters=-classic -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -Xdebug -Xnoagent -Djava.compiler=NONE</pre>
    </blockquote>
    The <tt>4000</tt> parameter defines the port number which the JDeveloper
    debugger will use to communicate with the server. You can specify a different
    port number, but it must match the port which you will enter in the <strong>Remote
    Debugging Dialog</strong> in JDeveloper when you start debugging. </p>
    </li>
    </ul>
    [*] For the <em>PATH environment value passed to the JVM</em> parameter <tt>wrapper.path</tt>
    enter the location of <tt>jdwp.dll</tt>, which is part of the <em>Java Platform
    Debugging Architecture</em>.
    This parameter is only necessary if you will choose the <em>Java Platform
    Debugging Architecture</em> debugging protocol:</p>
    <blockquote>
    <pre>wrapper.path=C:\jpda\bin</pre>
    </blockquote>
    </li>
    For the <em>CLASSPATH environment value passed to the JVM</em> parameter
    <tt>wrapper.classpath</tt>: </p>
    <ul>
    Keep the location of <tt>ApacheJServ.jar</tt>. If it is not already
    there, add it. </p>
    <blockquote>
    <pre>wrapper.classpath=C:\Program Files\Apache\JServ\ApacheJServ.jar</pre>
    </blockquote>
    </li>
    Comment out the location of <tt>jsdk.jar</tt>. </p>
    <blockquote>
    <pre>#wrapper.classpath=C:\jsdk2.0\lib\jsdk.jar</pre>
    </blockquote>
    </li>
    [*]Add the location of <tt>servlet.jar</tt> from JDeveloper 3.2.
    <blockquote>
    <pre>wrapper.classpath=C:\Program Files\Oracle\JDeveloper 3.2\lib\servlet.jar</pre>
    </blockquote>
    </li>
    [*] Add the locations of <code>jdeveloper.zip</code> and <code>ojsp.jar</code>
    from JDeveloper.
    <blockquote>
    <pre>
    wrapper.classpath=C:\Program Files\Oracle\JDeveloper 3.2\lib\jdeveloper.zip
    wrapper.classpath=C:\Program Files\Oracle\JDeveloper 3.2\lib\ojsp.jar
    </pre>
    </blockquote>
    </ul>
    </ol>
    <strong>Changes to jserv.conf</strong></p>
    <ol>
    For the <em>ApJServAction</em> parameter: </p>
    <ul>
    [*] Comment out any existing <tt>ApJServAction .jsp</tt> entries by putting
    a <tt>#</tt> at the beginning of the line. </li>
    <blockquote>
    <pre>
    #ApJServAction .jsp /servlets/org.gjt.jsp.JSPServlet
    </pre>
    </blockquote>
    [*]Add a new <tt>ApJServAction .jsp</tt> entry like this.
    <blockquote>
    <pre>
    ApJServAction .jsp /servlets/oracle.jsp.JspServlet
    </pre>
    </blockquote>
    </li>
    </ul>
    </li>
    </ol>
    <strong>Changes to zone.properties</strong></p>
    <ol>
    In the <em>Servlet Init Parameters</em> section: </p>
    </li>
    <ul>
    Add the following lines. </p>
    <pre>
    servlet.oracle.jsp.JspServlet.initArgs=emit_debuginfo=true
    servlet.oracle.jsp.JspServlet.initArgs=jspcompiler=oracle.jdeveloper.jsp.JspOjcCompiler
    servlet.oracle.jsp.JspServlet.initArgs=classpath=C:\Program Files\Oracle\JDeveloper 3.2\java1.3\jre\lib\rt.jar
    </pre>
    </li>
    </ul>
    </ol>
    <strong>Copying the JSP to the Apache/Jserv Server</strong></p>
    Once you have restarted the server with the modified parameters, you need to
    copy your JSP to the server's HTML root directory. For most Apache installations
    this is <tt>C:\Program Files\Apache\htdocs</tt>. </p>
    You also need to make sure the JSP is in your HTML directory in the JDeveloper
    tree, typically <tt>C:\Program Files\Oracle\JDeveloper 3.2\myHTML</tt>. The
    reason for this is JDeveloper uses the folder name as its package name.</p>
    <strong>Debugging a JSP</strong></p>
    Debugging a JSP is very similar to debugging any other Java program.</p>
    <ol>
    From the <strong><u>R</u>un</strong> menu, select <strong><u>D</u>ebug
    "<em>filename</em>.jsp"</strong>. </p>
    Start the JSP running (for example, start your web browser and open a
    connection to the JSP). </p>
    Debug as normal. </p>
    </ol>
    If you are using the JDeveloper OJVM debugging protocol, you will be able
    to disconnect from the JSP container. This allows you to stop debugging, but
    leave the JSP container running. In addition, you will be able to use two extra
    debugging functions that are not available using the JDPA protocol - <strong>Run
    to End of Method</strong> and <strong>Set Next Statement</strong>.</p>
    If you using JPDA, you must use <strong>Stop</strong> to end your debugging.
    Using this method will also stop the JSP container.</p>
    <blockquote>
    <strong></strong></p>
    </blockquote>
    null

    Hi,
    It again same as you do in your local server...You can monitor the BPEL process flow in the em console and debug..if its not sufficient....u can also monitor the logs located at
    <SOA_Home>\user_projects\domains\domain1\servers\soa_server1\logs to debug.

  • How to upload a file in BPEL Console Using JSP in JDeveloper, pleae........

    I am very new to this JDeveloper & BPEl Process , please could some one help in ersolving my problem that is , how to upload a file in BPEL Console Using JSP in JDeveloper.

    Hi,
    ADF Faces provides you with the file upload component
    http://download-uk.oracle.com/docs/html/B25947_01/web_complex006.htm#CEGCEDHF
    http://download-uk.oracle.com/docs/html/B25947_01/appendixa007.htm#CHDEDCFA
    This gives you a handle to the file content. However, uploading files through a service is different and I suggest to consult teh BPEL forum for this BPEL
    Frank

  • How to upload a file in BPEL Console Using JSP in JDeveloper, please help..

    Please I am new to Jdeveloper and to BPEL Process of OASuite,I want to know , how to upload a file in BPEL process using JSP in Jdeveloper IDE.
    The main aim is first we need to upload a file in JSP , it has to go to BPEL Process & it has to read the file & write the respective file in return to JSP through BPEL Process. Please I am in Urgent need of the Query , please help me ASAP.
    Send to me response Please.....................................

    Hi,
    I thin that you asked the same question before and I premember that I ointed you to the ADF BC developer guide and the SRDemo if your application uses JSF. For plain JSP - if you Google for: JSP and file upload then you find plenty of sources for JSP and Struts.
    The remaining part is how to stiff the file into a BPEL service on the middle tier. For this I recommended to ask your question on the BPEL forum
    BPEL
    Note that the BPEL integration would be easier if it was done on the middle tier and not onthe client
    Frank

  • How to display the data in XML files into JSP using Jdeveloper.

    Hi All,
    I have two XML files one XML file has the view names and the other has the table names of a particular views, how to display the data in JSP using JDeveloper where when i click a particular view the list of tables of that particular view from XML file two should be displayed in JSP Page.
    Are there any reference documents, regarding the above process please can anyone guide through how to do it.

    Let the servlet ask your business tier to provide the data, then stuff it into beans, and pack those into the Session instance. Then forward the request to the JSP, let the JSP get those beans and display them.

  • How to debug a bean in JSP page with JBX???

    How to debug a bean in JSP page with JBX???
    i have a bean within a JSP page. i wanna find out how do they varibles work and changes of them values.
    are there some ways or tools to get the situations of them in visual way? just like when i debug VB program,i can get the situations in immediately window.

    help me !!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • How to precompile jsp file in jdeveloper before deployment....

    Hi
    thank you for reading my post
    how i compile jsp file in my web application , is it doable in jdeveloper 10.1.3.0.4?
    even if i could precompile the application before deployment is OK for me.
    thanks

    1. Highlight your web project or the individual file
    2. Right click
    3. Select Rebuild to build all jsp files or Make to rebuilt only changed files

  • 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

  • How to add Jsp pages into existing portal (JDeveloper 9.0.4)

    I am a jsp developer. I have to add a jsp page into existing portal. I am new to portal. Could anyone help me how to develop jsp using portal classes like PortletRenderRequest,ProviderSession and others.

    Rigoberto, there should be no space between "-Xbootclasspath/p:" and the path "C:\oracle\infra\jdbc-10.1.0.4\ojdbc14.jar;C:\oracle\infra\jdbc-10.1.0.4\orai18n.jar"
    By the way, one can always take a look at the logs at
      $ORACLE_HOME/opmn/logs
    especially those files whose names start with OC4J~ if there is some wrong with oc4j processes. Those files are the default oc4j stout and sterr. If oc4j can not init, there should be some kind of error message in them.
    By the way, the following line may be deleted since no property file is specified.
      <data id="oc4j-options" value="-properties"/>
    Hope this helps.

  • How to debug BPEL in Oracle 10G / Oracle 11G

    Hi All,
    How can we debug BPEL in Oracle 10G / Oracle 11G .
    We are working on RosettaNet conversion in BPEL. We would like to debug BPEL
    Appreciate your help.
    Regards
    Vijay

    Hi
    I need to debug BPEL code in same manner how we debug Java Code ( Line by Line ) .
    We are working with Java CAPS and Glassfish ESB for last 5 yrs. In NetBeans we debug BPEL in the same manner how debug Plain Java CODE.
    Have a look at below link
    http://wiki.open-esb.java.net/Wiki.jsp?page=TestingAndDebuggingBPELProcesses
    I am looking for same sort of options to debug BPEL using Jdeveloper.
    Regards
    Vijay

  • 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 files

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

Maybe you are looking for