• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Enable/Disable Hyperlink (Multiple Submits)

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a hyperlink on a jsp page which generates a report in PDF format. When user selects large amount of data and clicks on this link it takes lot of time for the
report generation (this is fine). Issue is: If user selects large amount of data and clicks multiple times on this hyperlink, multiple threads started on the application server (WAS 6) and the site performance goes down.

The flow is --> User clicks on a hyperlink on a JSP , Request goes to a servlet which generates the PDF report and provides the PDf back to the user.

Now one way to control multiple submit could be that I disable the hyperlink on the click but I do not know how to enable it back as the response would be already
commited through the PDF report that was given back to the user(OutputStream).Can somebody please help me on this by giving some suggestions/best
practices/examples? any help would be appreciated.

Thanks,
Deepak
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you enable the hyperlink on load of the page. The moderators might move this to the HTML/Javascrpt forum.
 
deepak kukreja
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I dont think this is javascript question.

my jsp has a hyperlink to generate a pdf report .Response is commited through outputstream from the servlet. Once the Outputstream is commited from servlet, I want to refresh the jsp page which had the hyperlink to generate a PDF. i want control back on jsp even though response was commited through outputstream. any workaround would be appreciated.

thanks,
Deepak
 
Greenhorn
Posts: 3
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you could use filters to intercept response after commit to gain back the control

Please follow the link for more info on how to intercept the response using custom response http://docs.oracle.com/javaee/5/tutorial/doc/bnagb.html
 
Bosun Bello
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you aware that you responded to a question that was asked 8 years ago?

ramya srei wrote:you could use filters to intercept response after commit to gain back the control

Please follow the link for more info on how to intercept the response using custom response http://docs.oracle.com/javaee/5/tutorial/doc/bnagb.html

 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic