• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

generate pdf and display on browser when clicked on link

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI

Iam using struts 1.1 to generate a pdf report.
I have written the following code in my action class




And now when the user clicks on the link, pdf report should be generated in a new window.
which is what Iam not able to get.Iam getting errorr here.
Can someone help me what should be written in struts-config.xml file and what should be the url which on clicking should be giving the pdf.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Iam getting errorr here.


It'd be handy to state *what* error you're getting.

Window creation is handled by the browser, not the server. Are you opening the link in a new window? What's happening when you click the link?
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
farheen please Use Code Tags when you post a source code. You can edit your message using button and then add code tags to it...
 
farheen rabiya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

@David
Iam getting "writer already obtained" errorr.
Iam using velocity template (front end) where my link is present.And on click of that link a pdf report should be generated in a new window.

@Ankit
Iam new to this site and so I dont know how this has to be done.

My problem is I cannot use execute method,even then,when Iam using execute method and returning null,its not working.
I dont understand what should the url be like?
Please help.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic