Debugging servlets using jdb

Hello friends, can anyone please help me in debugging servlets using jdb. I am using tomcat as the web server. Thanks

http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/servlet.html

Similar Messages

  • Servlet debugging using jdb

    hello friends, could anyone help me in debugging servlets using jdb. I am using tomcat as the web server. any suggestions or tip would be greatly appreciated. Thanks a lot.

    suggestion:
    If it is possible, move the processing of data out of the servlet and into a black box.
    This way..you can test the black box and use an IDE tool for debugging.
    you can make your servlet parse the parameter and pass it along

  • {Q} Debuging Servlets with VCafe 4.0 using WebLogic as WEB server

    Hi,
              I am trying to set up VCafe 4.0 to debug servlets deployed on WebLogic 5.1.
              I don't have any problem with default servlet debugging, but I don't know
              how to tell VCafe that my WEB Server isWebLogic. Any ideas?
              Greg Mirsky
              

    What edition of VCafe is required?
              Enterprise, Professional or standard. I am now using JBuilder and anyone has
              experience comparing it with VCafe.
              Jonathan
              Don Reamey wrote:
              > Start the EJB Server from within Cafe ( you must have an EJB project open),
              > also have your servlet project open.
              >
              > Once the EJB server has been started from with in Cafe, select attach to
              > process from the file menu.
              >
              > Attach to your server and set a break point in your sevlet.
              >
              > Go to the browser of your choice and run your application as normal.
              >
              > The break point should get hit and you can start stepping.
              >
              > The same procedure works for JSP's as long as you have the
              > keepgenerated=true.
              >
              > Don Reamey
              > www.ibexone.com
              >
              > "Greg Mirsky" <[email protected]> wrote in message
              > news:[email protected]..
              > > Hi,
              > > I am trying to set up VCafe 4.0 to debug servlets deployed on WebLogic
              > 5.1.
              > > I don't have any problem with default servlet debugging, but I don't know
              > > how to tell VCafe that my WEB Server isWebLogic. Any ideas?
              > > Greg Mirsky
              > >
              > >
              > >
              

  • Does WLS support Debugging Servlets with JBuilder 3 ?

    I have read all the news groups and it appears that WLS 4.5.1 does not
    support debugging Servlets with Jbuilder 3.0.
    I am using the trial version, does this matter ?
    Or should I just buy another web server ?
    Joe

    I think below documents will be helpful to you.
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e13952/taskhelp/webservices/webservicesecurity/CreateDefaultWSSConfig.html
    This document tell you that you can attach a weblogic webservice configuration using weblogic admin console.
    After creating this configuration you need to updated this configuration as per the steps given under :
    Use X.509 certificates to establish identity
    Thanks,
    sandeep

  • How to see full conent when using jdb

    I am using jdb to debug some corruptted char array. When I dump one buffer object that contains char array, I can not view full content since it is too long. Is there a way I can save to this content to a file? Or is there another way to look at full message?
    Thanks a lot.

    Thanks for your response.  All of my pages are php pages in which I use the php require command to display a header and footer.  In CS4, when I open any page from my site in Design or Split view, all I can see is the header.htm file.  I cannot see any of the content from that particular page.  I have to go into code view and delete the <?php require("header.htm"); ?> from the code.  The I can view and edit that page's content after which I have to paste the <?php require("header.htm"); ?> command back in and load the saved file to the server.  A royal pain in the butt.

  • 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
              

  • Debugging Servlet with JBuilder 6

    Does anyone know how to debug a servlet with JBuilder version 6?
    I have created the servlet without the wizard.
    Thanks.
    -Amar

    You can use ServletExecDebugger from NewAtlanta.
    You can download ServletExecDebugger at
    http://www.newatlanta.com/products/servletexec/download.jsp
    1. Extract ServletExecDebugger files to your local folder
    2. Import ServletExecDebugger.jar file into you JBuilder
    workspace
    3. There will be ServletExecDebuggerMain.java file
    Import that also.
    4. Set ClassPath, Project Path , etc and off you go.
    ServletExecDebugger comes with good documentation
    for a free debugger.
    I have been using it for sometime now (in both JBuilder and Visual Age) and find it relatively simple to setup and good for debugging servlets.
    You cannot debug JSPs that much easier though !
    Hope this helps..
    KD

  • Debuging  servlet on weblogic

    I am trying to learn to debug servlet on weblogic . In one of the site it is written as
    Locate startWSL.cmd and add the following variable DEBUG_OPTS:
    set DEBUG_OPTS = -Xdebug -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n
    I am confused with this .Please tell me why is this necessary for debugging.
    Thank you

    Java uses the Java Platform Debugger Architecture to define how a Java debugger connects to a running Java application for the purpose of debugging that application. To enable an application for debugging, you have to add some parameters to the command line to specify a few things, like what transport will be used to transfer data, and if a socket-based transport, what port number should be used. Once you define those parameters on the command line and the application is running, you can specify the port number in the debug configuration of your debugger to make a connection to that running application.
    You can read more about the various debugging-related command line options on the following page, which is just part of the larger JPDA documentation:
    [http://java.sun.com/javase/6/docs/technotes/guides/jpda/conninv.html]
    If you peruse the documentation for your favorite debugger, you can find information about connecting to remote Java applications, and it should give you similar information.

  • Using JDB in a multithreaded gui environment

    Hi there all I am currently working in a multithreaded gui environment, I would like to use jdb, I manged to launch my project using the jdb in place of the java command ( I did the javac -g thing), I then type run it all launches fine and I am prompted with main[]
    then I type cont abd then it starts I get prompted with > and I am stuck here no code list works I resume try everything but stuck in the treads is there a way of igmoring this and seleting the classes I want to debug I also tried setting breakpoints but htese nere get hit when I type clear I can seee the break point but dont hit thwem even thow those breakpointed sections of code is executed the break point dose not halt the code can anyone help regards Michael

    Hi there all I am currently working in a multithreaded
    gui environment, I would like to use jdb, I manged to
    launch my project using the jdb in place of the java
    command ( I did the javac -g thing), I then type run
    it all launches fine and I am prompted with main[]
    then I type cont abd then it starts I get prompted
    with >At this point your application is running. The ">"
    prompt means jdb has no current thread setting.
    Enter threads to see a list of the threads in
    your application.
    Enter classes to see the classes that are loaded.
    Enter fields className to see the fields of a class.
    Enter suspend to stop the debugee, and then enter where all
    to see the thread stacks, or use the thread command to set
    the current thread, then use the where command.
    A thread must be suspended (or at a breakpoint) and jdb must be set
    to the thread you want to examine (via the thread command,
    or automatically when you hit a breakpoint) before you can display
    the stack, do a list to see the source at that point, or
    use locals to see the local variables for that stack frame.
    Enter resume so the debugee threads will continue.
    and I am stuck here no code list works I resume
    try everything but stuck in the treads is there a way
    of igmoring this and seleting the classes I want to
    debug I also tried setting breakpoints but htese nere
    get hit when I type clear I can seee the break point
    but dont hit thwem even thow those breakpointed
    sections of code is executed the break point dose not
    halt the code can anyone help regards MichaelAre you using the full name of the class (including any
    package names) when setting breakpoints?

  • Debugging servlets in JDeveloper

    Folks !
    I just noticed that at least JDeveloper 3.2.3 doesn't let you debug a servlet that is not directly derived from HttpServlet. That is if I have a servlet class A derived from a Class B which then derives from HttpServlet, I only get to debug Class B and not Class A. This is a very stupid restriction (confirms my perception of these IDEs being toys). I am hoping JDeveloper 9i can handle debugging servlet derived from another class which in turn is derived from HttpServlet. can 9i users pl. confirm that ?
    Also, given current restriction of JDeveloper 3.2.3 what option do I have other than upgrading to 9i (which I hope doen't have this problem) ? Remore debugging using JDPA ?
    thanks for your help.
    regards,
    -Sanjay Kumar

    Folks !
    I just noticed that at least JDeveloper 3.2.3 doesn't let you debug a servlet that is not directly derived from HttpServlet. That is if I have a servlet class A derived from a Class B which then derives from HttpServlet, I only get to debug Class B and not Class A. This is a very stupid restriction (confirms my perception of these IDEs being toys). I am hoping JDeveloper 9i can handle debugging servlet derived from another class which in turn is derived from HttpServlet. can 9i users pl. confirm that ?
    Also, given current restriction of JDeveloper 3.2.3 what option do I have other than upgrading to 9i (which I hope doen't have this problem) ? Remore debugging using JDPA ?
    thanks for your help.
    regards,
    -Sanjay Kumar

  • Debugging servlet/JSPs ??

    What IDE would you use to debug Servlet/JSPs ? I think that JBuilder can
    only debug Servlets. What about VisualCafe, VisualAge ?
    Olivier
    [olivier.vcf]

    Currently it is a bug in JDeveloper 3.1.x. We will be fixing it.
    raghu

  • Unable to deploy a simple servlet using WAR file on Oracle9iAS v9.0.3

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modifying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi All,
    I am facing problem while deploying a simple servlet
    using WAR file on Oracle 9i App Server.
    I have installed Oracle9iAS J2EE and Web Cache v9.0.3
    on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2
    (9.0.3)      
    I referred following link to Deploy Applications
    Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed
    following steps to deploy WAR file:
    1] I have created a war file by name
    SimpleServlet.war. In SimpleServlet.war, there is a
    servlet by name Simple which prints time at which
    servlet was accessed.
    2] I have modified
    <ora9ias_home>\j2ee\home\config\application.xml and
    added following web module entry:
    <web-module id="SimpleServlet"
    path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web,
    I have modified file
    <ora9ias_home>\j2ee\home\config\default-web-site.xml
    and added following entry:
    <web-app application="SimpleServlet"
    name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP
    Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to
    user. I have verified that SimpleServlet.war is
    extracted to SimpleServlet folder under
    <ora9ias_home>\j2ee\home\applications folder. I found
    that Simple.class is stored under WEB-INF/classes
    folder and web.xml contains correct entry for url
    pattern for servlet Simple.
    What else could be the problem? Am I placing the war
    file in wrong place or modifying application.xml or
    default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your
    valuable comments on this.
    Thanks in advance.
    Regards,
    SandeshHave you restarted you http server and then tried to load it again? Are you using the right port; maybe you have to use port 7778? Check you server settings in the http server instance. Also check your url binding of you application at Farm > Application Server: infrastructurehost > OC4J_instance > Application: appname > Web Module: modulename
    Good luck!
    rgds Thomas

  • Unable to deploy a simple servlet using WAR file

    Hi All,
    I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server.
    I have installed Oracle 9i App Server. I referred following link to Deploy Applications Using WAR file:
         http://otn.oracle.com/products/ias/daily/sept12.html
    As mentioned in this documentation I have followed following steps to deploy WAR file:
    1] I have created a war file by name SimpleServlet.war. In SimpleServlet.war, there is a servlet by name Simple which prints time at which servlet was accessed.
    2] I have modified <ora9ias_home>\j2ee\home\config\application.xml and added following web module entry:
         <web-module id="SimpleServlet" path="../../home/applications/SimpleServlet.war" />
    3] To make this module accessible from over the web, I have modified file
         <ora9ias_home>\j2ee\home\config\default-web-site.xml and added following entry:
         <web-app application="SimpleServlet" name="SimpleServlet" root="/SimpleServlet"/>
    4] I saved both the files and started Oracle HTTP Server and accessed page as below:
              http://<server>:7777/SimpleServlet/Simple
    where Simple is servlet in SimpleServlet.war file.          
    In the browser, The page cannot be found is shown to user. I have verified that SimpleServlet.war is extracted to SimpleServlet folder under <ora9ias_home>\j2ee\home\applications folder. I found that Simple.class is stored under WEB-INF/classes folder and web.xml contains correct entry for url pattern for servlet Simple.
    What else could be the problem? Am I placing the war file in wrong place or modfiying application.xml or default-web-site.xml in a wrong directory?
    This is very urgent. Please help me with your valuable comments on this.
    Thanks in advance.
    Regards,
    Sandesh

    Hi Juliana,
    Thanks a lot for your suggestion.
    I am sorry if I have posted this message to a wrong forum. This is first time I am posting a message to OTN. I will resend message to J2EE forum as per you suggestion.
    Meanwhile, please note information you asked for is as below:
    I installed Oracle9iAS J2EE and Web Cache v9.0.3 on Windows 2000 server.
    It includes:
         - Oracle HTTP Server
         - Oracle9iAS Containers for J2EE
         - Oracle9iAS Web Cache
         - Oracle Enterprise Manager
    The release of installed Oracle9iAS is Release 2 (9.0.3)      
    Please do reply at the earliest.
    Once again thanks and look forward to hear from you.
    Regards,
    Sandesh

  • How to test servlet using Junit test????

    Hello everybody
    Does anybody know how to test an servlet class using Junit without using Cactus test . Is it possible to test a servlet using Junit without cactus test.Plz tell me the process how to test a servlet using Junit test .
    Regards
    srikant

    1) Do yoiu mean how to "run" your servlet code with sample parameter? This call manual testing with a sample run of you code. You need a web server(eg Tomcat), create a webapp with your servlet then deploy it there in order to run it.
    2) httpunit and junit are framework to write test case code that can be automated and repeatable. Plz read their doc.
    3) Your sample code me a very wrong way to retrieve and convert servlet parameters.
    Get a java toturial and servlet tutorial book and read it over the weekend. You need to get at least the basic.

  • Connecting a servlet using a midlet

    Hi,
    I am trying to connect to a servlet using a Midlet. The servlet is running fine on Apache Tomcat and I m able to build the MIDlet using J2MEWTK . But when I execute the Midlet on an emulator it shows me some code of html page of which the important line which might give u some hint is :
    the requested resource (/hitservlet) is not available.
    I wrote the code of HitServlet and Hitmidlet using a pdf on net....Do I need to install something else for executing this? I dont understand where is the problem. Should I post the codes? Is it something related to aliases...as indicated by some some tutorial...if so plss elaborate on it..
    If anybdy has any idea ...plss help me get out of this problem...
    Thanx
    Smeeta

    Have you added the URL of the Servlet into the J2ME application?
    Settings -> UserDefined Tab
    Thinks its
    HitMIDlet.URL and its value should be the URL of the Servlet

Maybe you are looking for

  • Can ADF Faces Dialog Framework be used in a Bounded Task Flow ?

    Jdev. 11.1.1.4 I have read chapter "19 Using Dialogs in Your Application" in the Jdev documentation. There explains that there are mainly two methods to open dialogs in ADF: The first (point 19.2) is calling a bounded task flow from a view activity (

  • Error in MRP Run

    Dear Friends, While i am running MPS for FERT items, system is giving exception message 64 (Production finish after order finish) against planned order created for July requirement & subsequent month requirement. What could be the probable reason. Th

  • Cannot get video calls to work on two 9971 phones.

    we are using two 9971 phones, both have the cameras enabled, and the preview video button works, but we do not get video on any calls. camera has been enabled in the Enterprise Phone parameter. CUCM 7.1.5.1 so, we should be fine for service pack leve

  • Timeout on Mountain Lion update in the App Store

    Has anyone come across this? I upgraded three of my Macs to Mountain Lion successfully and downloaded and installed the HP Printer update from the App Store. When I came to do the same on my brand new MacBook Air yesterday I kept on getting timeouts

  • Converting CS3 files to CS5

    Hi, Just a quick question. We have been using DW CS3 for quite some time and have a fairly basic website using it. We are thinking about going to CS5. Is the converting of the files in the  website project folder (which is offline) going to be a prob