Debugging Servlet Code

Hi There
Is there any IDE that supports single steeping through tthe servlet and jsp code at runtime so as to debug the web appln in a better way
Thanks
Mum

The short answer is most of them.
Visual Age
JBuilder
Forte....

Similar Messages

  • Debug servlet failed after Enable Enterprise Application Profiler

    1. run IDE
    2. Enable Enterprise Application Profiler of AS in Runtime tab
    3. restart the AS server in debug model
    4. create web module includes jsp & servlet
    5. new a breakpoint in servlet codes
    6. debug it by click Debug-> Star Session-> Run in Debugger
    result:
    1. debug failed
    2. if you Disable Enterprise Application Profiler and restart the AS, debug successfully
    Did you meet the same issue before?
    thanks,

    Hi
    Are you checking with latest updates. IF not, please connect to update center and update the IDE. The update has fixes for Profiler.
    Thanks
    Srinivas

  • Debugging source code in Web-Inf

    Dear All Java Expert,
    I'm using Forte 3.0 and debugging source code for different web application folder. example ..\webapps\APPS1 and ..\webapps\APP2.
    Ok, my problem is i was unable to 'share and debug' same servlet file over 2 web application.
    Example, a.java located at ..\webapps\APPS1\Web-INF\Classes\a.java and shared by APP2. The problem is when APP2 having problem i need to copy the java file frm APPS1 to APPS2 web-inf folder for debugging.
    I'm still new using the IDE debugging features, any eXperience people pls don't be hesitate to reply.

    What exactly is the problem?
    You want APPS1 and APPS2 to share the same Servlet code?
    If so, you need to think through what you are doing. Consider this scenario; I point my web browser to www.wikey.com/APPS1 and the servlet in \webapps\APPS1 returns a response. I point my web browser to www.wikey.com/APPS2 and APPS2 returns a response.
    That's what we pretty much expect to happen.
    Now let's say you put the code in a file called BOTH. If I point my web browser to www.wikey.com/BOTH, then it launches the servlet named BOTH. That's reasonable. However, if BOTH consists of code from APPS1 and APPS2 in the same class, then the web server has absolutely no idea which block of code to call.
    However, you can make it www.wikey.com/BOTH?doRoutine=APPS1 where it will launch the APPS1 specific code. But why bother? Why not just launch APPS1 directly?
    So to answer your question, there's no real advantage to having two different URLs point to the same Servlet. Consequently, there's no real advantage to having a debug URL point to to a production URL's Servlet, i.e., no point in sharing code for debugging purposes.
    So the question you want to ask is, "Is there a macro in Forte 3.0 that will allow people to make copies of all the source files in one folder, place those copies in another folder AND set up the URL and environments correctly?"
    The answer is - not that I'm aware of. If you want such a capability, you should code it yourself. But even in Microsoft Windows, it only takes a few seconds to select the folder and do a cut-and-paste copy, then rename the files.
    Incidently, this is totally different than putting common class files in a common directory, modifying the class path, and allowing two separate servlets to import those classes.

  • MSI Big Bang Xpower II did not post - Debug LED Code #67

        
    I need HELP...!
    I have a problem my board did not post , did not start and i have the DEBUG LED CODE # 67 displayed.
    There is my build
    MSI Big Bang Xpower II X79 LGA2011
    Intel Core i7 3820 LGA2011 Processor
    Corsair Cooling Hydro Series H100 CPU Cooler System LGA2011
    G.SKILL Ripjaws Z Series memory (F3-12800CL-32GBZL) DDR3 1600 PC3-12800 - CL10-10-10-30 (8192MB X 4) - 32GIG located in DIMM 1-3-5-7
    Gigabyte GTX570 OC Edition video card in slot PCI-E2
    Western Digital Velociraptor 300GB 2.5" SATA 3.0Gb/s 10,000 RPM
    LG BH12LS35 Blu-Ray Writer 12X BD-R 16X
    Ultra LSP-750 Power Supply
    Cooler Master HAF X EATX Tower Case
    When I put the power on, the power supply activated fans and drives spin, all the LEDs on the motherboard light up but nothing appears on the screen.
    No video signal at all and the computer stop and restrart every 15 seconds. When these reset occurs there is no beep on the speaker , nothing at all, no flashing screen either, nothing.
    The DEBUG LED display a sequence of flashing numbers 19 - 60 - 19- 60 - 67 and stop showing still the number # 67 for about ten seconds and then he reset again.
    I carefully followed the instruction manual for the installation, I installed the memory modules in slots 1 3 5 7, i put my video card in slot PCI-E2. all the power wire are connected correctly 1 x 24 pins ATX, 2 x 8 pins ATX, 1 X 6 pins , all the wire from the front panel are correctly connected to the m-connector in JFP1 & 2.
    Did i forget something, I don’t know what the debug led code # 67 exactly mean and what i have to do to fix-it
    Someone has an idea what is wrong or have any suggestion to solve this issue.
     Thank's all for your help.

     
    I followed some advice to remove the memory modules and this is actually caused by the use of memory but you will see I still have a curious bug.
    I referred to the instructions manual to the letter for the choice of DIMM SLOT to put the memory module in single, double, triple and quad channels.
    If I install 1 memory module in the DIMM SLOT  1 to operate in single channel, everything is normal and the motherboard  POST normally and show  the SETUP SCREEN.
    If I install 2 memory modules in  DIMM SLOT  1 & 3 to run in dual channel, everything is normal and the motherboard  POST normally and show  the SETUP SCREEN.
    If I install three memory modules in DIMM SLOT 1 - 3 - 5 to run in triple channel, everything is normal and the motherboard POST normally and show  the SETUP SCREEN.
    As soon as I install four DIMMs modules mémoiredans SLOT 1 - 3 - 5 - 7 to run in quad channel, the motherboard  freezes and does NOT POST and show  code 67 on the debug led and has reset itself every 20 seconds.
    I tried all my RAM modules alternately in both single channel and everything works normally.
    I did the same thing in rotation for both dual and triple channel and everything is still normal with all fourth memory modules individually.
     As soon as I put a fourth memory module it freezes and displays the code 67 or L9 dependent side as you look. 
    So my bug is my motherboard MSI Big Bang Xpower II do  not want  to work in quad channel.
    Do you have any idea where I should look for, is a setting in the BIOS  , I have flashed the bios to the latest version V1.5
    I included the screenshot of the BIOS to see if you can  notice something wrong. 
    Thank you

  • Can I debug c++ code

    I have some bug in my C++ code. I useing MS Visual studio .net to compile it. How I can enable "Step into" that I can see what happening in my c++ object space when I call that native method from Java?

    The easiest way to debug this code USED TO BE to open the Dll project in Visual Studio, then go to the project options and make some some settings. The specific settings involved were the invoking program (Make that java.exe.), and the parameters to the program (Make those the parameters that will make jvm.exe execute your java program.).
    This is the way I did it using VC 6.0. It probably still works in the new version.

  • Flush parameter of jsp:include has no effect on servlet code

    I am running 9.0.3 and my jsp code looks like:
    <jsp:include page =".." flush="false"/>
    but the resulting servlet code is:
    pageContext.include( __url);
    Which defaults to flushing the buffer!
    Does anyone know a work around or if Oracle is going to fix this?
    Thanks,
    Mike

    Try:
    public class ...  extends ...
        private static final boolean antialias = Boolean.getBoolean ("swing.aatext");
        private static Map hintsMap = null;
        @SuppressWarnings("unchecked")
        static final Map getHints() {
           if (hintsMap == null) {
                hintsMap = (Map)(Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints")); //NOI18N
                 if (hintsMap == null) {
                    hintsMap = new HashMap();
                     if (antialias) {
                          hintsMap.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
           return hintsMap;
    ... later in class ...
        @Override
        protected void paintComponent(Graphics g) {
            Graphics2D g2d = (Graphics2D) g;
            g2d.addRenderingHints(getHints());
            super.paintComponent(g);
            ...needed this so custom paint would use AA. In my app I wrote text in my component and it was not AA, this turned it on.
    I don't think I had the same problem you, as my jlabels were always aa.
    Edited by: 805835 on Oct 27, 2010 5:06 PM
    Edited by: 805835 on Oct 27, 2010 5:07 PM

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

  • Debugging ABAP Code From Within WebDynpro

    Hi experts,
    I would like to check whether i can debug ABAP code from within webdynpro if i m using a remote J2EE server.
    So netweaver development studio is on my machine
    J2ee server is on a remote machine
    R/3 is also on another remote machine
    Thanks.
    Rgds,
    Daniel

    Hi Daniel,
    One thing note here is
    "You have debugging authorization in the ABAP Workbench in the relevant system.
    Since debugging in the ABAP system via load balancing is not supported, you must reconfigure your JCO destinations so that the calls take place on a dedicated ABAP application server. For Web Dynpro, this is done in the Web Dynpro Content Administrator. In the destination maintenance, specify Single Server Connection as the Destination Type ".
    Other than that ideally it works with j2ee and abap on diff systems.
    Regards
    Ayyapparaj

  • LSMW VD51 , Validations in Begin of Transaction; how to Debug the code?

    Hi All,
    I have written code for validations i Begin of Transaction in the field mapping 5th step of LSMW for VD51.
    Now this code not getting triggered at the time of Conversion of Data. How to debug the code. I have put a static break point 'BREAK-POINT' still not getting triggered.
    Any suggestion / solution for this issue.
    Thanks and Regards,
    Narsimha Kulkarni

    Hi Narshimha,
    Make any mapping error during mapping and check the syntax of mapping it will drag you to the lsmw report there you can put your break point. You can check the report name from transaction code as well.
    Remember this mapping block will execute when you execute the step Convert Data in LSMW.
    Regards
    Dhirendra

  • Picking problem.Can anyone help me debug my code?

    Can someone help me debug my code?
    I try to pick a ColorCube,
    but when I pick a ColorCube in my scene,
    I get the following error message:
    Exception occurred during Behavior execution:
    javax.media.j3d.CapabilityNotSetException: GeometryArray: no capability to get v
    ertex count
    at javax.media.j3d.GeometryArray.getVertexCount(GeometryArray.java:581)
    at com.sun.j3d.utils.picking.PickResult.intersect(PickResult.java:654)
    at com.sun.j3d.utils.picking.PickResult.generateIntersections(PickResult
    .java:635)
    at com.sun.j3d.utils.picking.PickResult.numIntersections(PickResult.java
    :422)
    at com.sun.j3d.utils.picking.PickTool.pickGeomAllSortedIntersect(PickToo
    l.java:854)
    at com.sun.j3d.utils.picking.PickTool.pickGeomClosestIntersect(PickTool.
    java:915)
    at com.sun.j3d.utils.picking.PickTool.pickClosest(PickTool.java:566)
    at SimpleBehaviorApp$SimpleBehavior.processStimulus(SimpleBehaviorApp.ja
    va:119)
    at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
    at javax.media.j3d.J3dThread.run(J3dThread.java:250)
    when i try to run the following code:
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.geometry.ColorCube;
    import com.sun.j3d.utils.picking.*;
    import com.sun.j3d.utils.universe.SimpleUniverse;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import javax.swing.JOptionPane;
    import java.awt.event.*;
    import java.util.Enumeration;
    // SimpleBehaviorApp renders a single ColorCube
    // that rotates when any key is pressed.
    public class SimpleBehaviorApp extends Applet
    BranchGroup objRoot;
    Canvas3D canvas3D;
    public SimpleBehaviorApp()
    setLayout(new BorderLayout());
    GraphicsConfiguration config =
    SimpleUniverse.getPreferredConfiguration();
    canvas3D = new Canvas3D(config);
    add("Center", canvas3D);
    BranchGroup scene = createSceneGraph();
    // SimpleUniverse is a Convenience Utility class
    SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
    simpleU.getViewingPlatform().setNominalViewingTransform();
    simpleU.addBranchGraph(scene);
    } // end of SimpleBehaviorApp (constructor)
    public BranchGroup createSceneGraph()
    // Create the root of the branch graph
    objRoot = new BranchGroup();
    objRoot.setCapability(BranchGroup.ALLOW_PICKABLE_READ);
    objRoot.setCapability(BranchGroup.ALLOW_PICKABLE_WRITE);
    objRoot.setCapability(BranchGroup.ENABLE_PICK_REPORTING);
    objRoot.setCapability(BranchGroup.ALLOW_AUTO_COMPUTE_BOUNDS_READ);
    objRoot.setCapability(BranchGroup.ALLOW_AUTO_COMPUTE_BOUNDS_WRITE);
    ColorCube ca=new ColorCube(0.4);
    ca.setCapability(ColorCube.ALLOW_PICKABLE_READ);
    ca.setCapability(ColorCube.ALLOW_PICKABLE_WRITE);
    ca.setCapability(ColorCube.ALLOW_GEOMETRY_READ);
    ca.setCapability(ColorCube.ALLOW_GEOMETRY_WRITE);
    ca.setCapability(ColorCube.ENABLE_PICK_REPORTING);
    ca.setCapability(ColorCube.ALLOW_BOUNDS_READ);
    ca.setCapability(ColorCube.ALLOW_AUTO_COMPUTE_BOUNDS_READ);
    ca.setPickable(true);
    objRoot.addChild(ca);
    SimpleBehavior myRotationBehavior = new SimpleBehavior(objRoot,canvas3D);
    myRotationBehavior.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myRotationBehavior);
    // Let Java 3D perform optimizations on this scene graph.
    objRoot.compile();
    return objRoot;
    } // end of CreateSceneGraph method of SimpleBehaviorApp
    //�������OSimpleBehavior�����@���������������u��
    public class SimpleBehavior extends Behavior
    private TransformGroup targetTG;
    private Transform3D rotation = new Transform3D();
    private WakeupCondition wCond;
    private PickCanvas pickCanvas;
    // create SimpleBehavior
    public SimpleBehavior(BranchGroup targetBG,Canvas3D canvas3D)
    wCond=new WakeupOnAWTEvent(MouseEvent.MOUSE_PRESSED);
    pickCanvas=new PickCanvas(canvas3D,targetBG);
    pickCanvas.setTolerance(5.0f);
    pickCanvas.setMode(PickCanvas.GEOMETRY_INTERSECT_INFO);
    public void initialize()
    // set initial wakeup condition
    this.setSchedulingBounds(new BoundingSphere(new Point3d(),300));
    this.wakeupOn(wCond);
    public void processStimulus(Enumeration criteria)
    PickResult pickResult;
    MouseEvent event=(MouseEvent)((WakeupOnAWTEvent) criteria.nextElement()).getAWTEvent()[0];
    pickCanvas.setShapeLocation(event);
    Point3d eyePos=pickCanvas.getStartPosition();
    if(pickCanvas.pickClosest()!=null)
    pickResult=pickCanvas.pickClosest();
    Node node=pickResult.getObject();
    PickTool.setCapabilities(node,PickTool.INTERSECT_FULL);
    else
    JOptionPane.showMessageDialog(null,"pickCanvas.pickClosest()������");
    this.wakeupOn(wCond);
    } // end of class SimpleBehavior
    public static void main(String[] args)
    Frame frame = new MainFrame(new SimpleBehaviorApp(), 256, 256);
    } // end of main (method of SimpleBehaviorApp)
    } // end of class SimpleBehaviorApp

    Hi Tinyuh,
    ColorCube?? I learnt thru mistakes. YEPThe following code creates a pickable colorcube.. it works for me!
         public BranchGroup addObject(Vector3d vector)
              BranchGroup branch = new BranchGroup();
              branch.setCapability(BranchGroup.ENABLE_PICK_REPORTING);
              branch.setCapability(BranchGroup.ALLOW_DETACH);
              TransformGroup trans = new TransformGroup();
              trans.setBounds(new BoundingSphere());
              Transform3D t3d = new Transform3D();
              t3d.setTranslation(vector);
              trans.setTransform(t3d);
              branch.addChild(trans);
              ColorCube cube = new ColorCube(0.5d);
              cube.setCollidable(true);
              cube.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
              cube.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
                    cube.setCapability(Shape3D.ALLOW_COLLIDABLE_READ);
              cube.setPickable(true);
              trans.addChild(cube);
              return branch;

  • 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 retrieve "env-entry" in servlet code

    i have a pretty straight-forward web app, which contains a servlet, among other things. the web app is packaged in .war, and it in turn is part of a .ear file. i am using WAS 640 sneak preview on windows xp.
    in the web.xml file, i added the following lines:
    <env-entry>
      <description>some texts</description>
      <env-entry-name>myapp.home</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>c:/myapp</env-entry-value>
    </env-entry>
    in my servlet code, i try to retrieve the value for "myapp.home" like this:
    try
    Context ctx = new InitialContext();
    home = (String) ctx.lookup("java:comp/env/myapp.home");
    } catch (Exception ex) {
    ex.printStackTrace();
    after .ear is deployed, i can see in the JDNI Registry (using Visual Admin Tool), myapp.home is added to the tree:
    webContainer
      -applications
        --myCompany.com
          ---myEarFileName
    myWebAppRoot
    java:comp
    env
    myapp.home
    the entry has the correct class name and object value.
    when the servlet code that performs the jndi lookup is called, i get an exception:
    com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at : java:comp
    ??? QUESTIONS:
    #1 what am i doing wrong?
    #2 if the lookup name must contain the entire jndi tree as listed above, then how can this code be portable to other app servers?
    thoughts are greatly appreciated.

    thanks for the hints, but unfortunately they didn't work.
    1. after switching the order of value and type in env-entry, rebuild/redeplpoy, same exception. the ordering  probably didn't matter since even with the reversed order, the name and value showed up correctly under the jndi tree.
    2. well, i tried giving it the full path, starting with 'webContainer', then 'applications' etc, separated by forward slash. now the exception says path to webContainer is not found.
    so what gives? are there no standards?

  • How to translate this statement to java servlet code

    INSERT INTO table_name (column1, column2,...)
    VALUES (value1, value2,....)

    You wouldn't translate that statement to servlet code. The idea doesn't make any sense. However you might include it in a servlet; read the tutorial that zadok linked to.

  • Compiling servlet code

    I m new to servlets.
    I just copied a servlet code from servlet Help.Then tried to compile with it JDK1.3.But it showing error.It is not compiling package Javax .What may be the possible error.

    Right, the javax.servlet packages are not part of J2SE.
    You'll need a servlet engine to run your servlets/JSPs. It'll have the servlet.jar containing the javax.servlet packages. You'll have to add that to your CLASSPATH when you compile.
    I'd recommend Tomcat as your servlet engine. It's capable and free:
    http://jakrata.apache.org/tomcat
    %

  • Help translating a servlet code to bean

    hi all
    i'd like to translate a servlet code to bean code
    the servlet, called from the <img src""> tag in my web page retrieves an images from a database and, setting the response content-type to "image" returns the image.
    i'd like to do it through the common getXxx/setXxx methods of a bean
    how to do it?
    that's the servlet's code:
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, java.io.IOException {
            response.setContentType("text/html");
            ServletOutputStream out = response.getOutputStream();
            try
                Connection connection=(Connection)getServletContext().getAttribute("connection");
                Statement s=connection.createStatement();
                response.setContentType("image/jpeg");           
                ResultSet rs=s.executeQuery("select "+request.getParameter("col")+" from products where id="+request.getParameter("id"));           
                while(rs.next())
                    out.write(rs.getBytes(request.getParameter("col")));
            catch(SQLException s)
                response.setContentType("text/html");           
            catch(NullPointerException n)
            out.close();
        } thanx in advance
    sandro

    try this:
    <%
    response.setContentType("text/html");
    try {
    Connection connection=(Connection)application.getAttribute"connection");
       Statement s=connection.createStatement();
       response.setContentType("image/jpeg");
       ResultSet rs=s.executeQuery("select "+
                  request.getParameter("col")+
                 " from products where id="+
                  request.getParameter("id"));
       while(rs.next()) {
    %>
          <%= rs.getBytes(request.getParameter"col"))) %>
    <%
    } catch(SQLException s) {
       response.setContentType("text/html");
    } catch(NullPointerException n) {
    %>

Maybe you are looking for

  • Error saving in stock  posting????Can Anyone?

    HI ,        am using 4.7 version, trying to post the stock for material using MB1c.while saving systems  prompts error message stating that:, " No RFC destination for Global Trade Services",      am not using any GTS's and our comp code is related to

  • Add new columns under schedulines tab in SO

    Hi Gurus, Can we add new columns in SO schedulines tab?Example between Delivery Date and Order qty. I know that changes in standard programs are not advisable, but I'm not sure if it is actually applicable using user exists or others. Thank you.

  • Cannot reinstall PSE 10

    PSE 10 would not load with message to reinstall.  My download install program would only show uninstall.  I tried to uninstall, but kept gettting an error message. Revo unistaller also would not work.  Followed recommendation to uninstall manually- d

  • My emails are not coming automatically.

    Whats the deal with that? Does any1 deals with the same problem?

  • Work Item forwarding BADI

    Is there a BADI that can be implemented to get the list users that a work item is being forwarded to?