Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Rep Power

    Default Problem in JSP rendering

    We are using struts framework in our application and we are facing problem in jsp rendering. It is giving tcp/ip problem.
    From the logs we can see that the request is processing twice and due to this the timeout issue is coming. We are unable to trace why the execute method is executing twice.
    Problem Description:

    Our application is to connect active directory and get all the accounts and refresh them with new values from the database. In one of the JSP we have a link for this purpose to hit an action class. We identified that when there are aroung 1000 accounts this is working fine and the result JSP is displaying correctly. When there are more than 1200 accounts the execute method is executing twice and due to this we are getting network error/may be server busy error. From the logs we can see the execution method is executing correctly and the next jsp also initialised fine. But finally we are getting the network error.

    Can anyone help me on this to trace why the request is hitting twice.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Rep Power


    i remember something fun about struts 1.x where you could put your logic in a method in the form bean and that would get invoked twice, at different phases in the load, validate, perform action, and post redirect.

    hmm.. apparently i haven't posted enough here to be allowed to put links into my posts..

    well. I would think the effect of it being ran twice would be independent of it failing with network error.
    is the network error what the webapp returns to the browser, or is this a network error betwen the webapp and the active directory server ?

    would it be possible to create a kind of extrnal component, like maybe a singleton component that has a 'state' (running/not running). where your struts handler does a
    SpecialFunctionHander thing = SpecialFunctionHandler.getInstance()
    if (!thing.isRunning() ) {

    and the SpecialFunctionHandler has the

    boolean running;
    public void run() {
    this.running = true
    // stuff here
    this.running = false

    public synchronized boolean isRunning() {
    return this.running;

    where that just makes a single thing to invoke this operation, but also has basic flag to know if the thing is still running, so without fixing the struts handler, it should make it only actually get ran once.
    Last edited by travishein; 09-27-2009 at 02:02 AM. Reason: fix code sample

Similar Threads

  1. manual BMP rendering colour issues
    By Goseph in forum AWT / Swing
    Replies: 0
    Last Post: 02-24-2009, 08:26 PM
  2. Help with JTable rendering
    By daniel2008 in forum AWT / Swing
    Replies: 8
    Last Post: 01-18-2009, 03:51 AM
  3. JLabel Rendering
    By random4534 in forum New To Java
    Replies: 3
    Last Post: 12-16-2008, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts