kirti.adsul's Profile
Reputation: 1
Apprentice
- Group:
- Members
- Active Posts:
- 26 (0.03 per day)
- Joined:
- 02-November 10
- Profile Views:
- 769
- Last Active:
Jan 24 2013 12:38 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Open PDF file using Struts
Posted 9 Feb 2012
Hi,
I have use below code instead of Desktop class code.
response.setContentType( "application/pdf" ); response.setHeader("Content-Disposition", "attachment; filename=PACTHelp.pdf"); String fileURL = "D:\\PACTHelp.pdf"; URL url = new URL ( fileURL ); URLConnection conn = url.openConnection();*/ //Use the username and password you use to /* String authentication = "Basic " + new sun.misc.BASE64Encoder().encode("kirti.adsul:december".getBytes()); System.getProperties().put("proxySet", "true"); System.getProperties().put("proxyHost", "ttilproxy"); // your proxy host System.getProperties().put("proxyPort", "80"); // your proxy port conn.setRequestProperty("Proxy-Authorization", authentication);*/ BufferedInputStream bis = new BufferedInputStream(conn.getInputStream()); BufferedOutputStream bos = new BufferedOutputStream(response.getOutputStream()); byte[] buff = new byte[2048]; int bytesRead; // Simple read/write loop. while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) { bos.write(buff, 0, bytesRead); }
but it unable to open pdf file either file because it
either not supported file type or file has damaged. is here any missing ? -
In Topic: Error code:FAILED_TO_CREATE_INSTANCE
Posted 12 Jul 2011
first "Hi" is printed. But before "Hi1" code gives error that given as above.
Means IReportRunnable design = engine.openReportDesign(rptdesign); line having that error.
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
kirti.adsul has no profile comments yet. Why not say hello?