Servlets and PDFs
I am going nuts here. I am trying to develop a servlet that serves PDF files. I do not have any starting HTML pages. Rather I just invoke the servlet that will serve a specific file by calling its URL. In IE v5.5 I get the OPEN/SAVE dialog box. When I click on open It comes up 2 more times before it acctually opens the file. If I choose SAVE it only comes up one time. I have read about the issue of IE making 3 GET requests when dowloading MIME files. However my servlet writes each request it gets to a log file and lists the headers of each request and their values. I only get entries in the log file after the third time the OPEN/SAVE box came up. The first two times it does nothing. As if though the service() method of the servlet never got invoked the first two times, which means the browser DID NOT send a GET requestCan anyone help or point me in direction of a solution.
Thanks
I apologize about the double post. I also wanted to mention that this only occurs in IE whne I include the
setHeader("Content-Disposition","attachement;file"..........) method in my servlet. Without it or if I make the Content-Disposition=inline the problem does not occur.
I would still like to give the option of saving before opening so the attachement;file disposition is desireable but without having to click the OPEN FROM LOCATION 3 times before viewing the file.
Similar Messages
-
Submit a PDF as a PDF to a servlet, and how to get my PDF from servlet
Hi all as the title above,
i have a button typeformat as PDF and sent to a URL( which is my servlet )
after this step how to get the PDF from my servlet.
the PDF has sent to my servlet and stop, so is there any way to get the PDF i sent ?
can someone help me?
thanksYou can use the following code:
byte[] content = getRequestBufferAsBytes(request);
...then do whatever you want
public static byte[] getRequestBufferAsBytes(HttpServletRequest request) throws IOException, ServletException
// get the RequestBuffer
ServletInputStream oInput = request.getInputStream();
long nContentLength = request.getContentLength();
String contentType = request.getContentType();
if (nContentLength <= 0)
return null;
byte[] cContent = new byte[(int)nContentLength];
// read the content in 512 bytes chunks
// a single read does not get all the characters
int nRead = 0;
int nToRead = (int)nContentLength;
int nBlkSize = 512;
byte[] cTemp = new byte[512];
do {
int n = 0;
int i = 0;
if (nToRead - nRead < 512)
nBlkSize = nToRead - nRead;
n = oInput.read( cTemp,0,nBlkSize);
for (i = 0; i < n; i++)
cContent[i+nRead] = cTemp[i];
nRead += i;
} while (nRead < nToRead);
//cContent[nRead] = (byte)'\0';
Long nBytesRead = new Long( nRead );
return cContent;
Jasmin -
I'm developing web application with OAS
4.0.8.1 and JDeveloper 3.0 and I want to call
JSP from servlet using "RequestDispatcher".
I downloaded JSP for OAS from www.olab.com.
In the Release note, there is a description
about RequestDispatcher, but I cannot
understand about details.
In what configuration can I use servlet and
JSP together with RequestDispatcher. Anyone
scceeded about that?
nullwan (guest) wrote:
: Hi everyone,
: I am using OAS 4.0.8 on Solaris 2.6. After viewing servlet
: and JSP samples, I am kind of confuse whether OAS supports the
: following options
: 1. JSP
: 2. servlet chaining
: 3. running JDeveloper DB Servlet wizard
: (oracle.jdeveloper.servlet.*) and Java Business Objects
: (oracle.jbo.rt.cs)
: Thank you for your time.
I found a white paper 408newfead.pdf, that says under "Future
Directions" that it will add jsp support. I read somewhere (I
can't remember where exactly :( ) that said 4.0.8.1 would
support
JSPs. I don't know if this release is out yet.
I wish Oracle would get with the times and put out a product that
is consistent with the technology they are touting as the
future.
Having us download Suns server to run servlets and JSP is
ridiculous for the worlds second largest software company!
null -
Webdynpro laerning docs and pdf required
Hi,
I need to learn WebDynpro and also learn how to develop programs in EJB. I need some useful documents and PDFs and also link to WebDynpro link of help.sap.com.
Regards
Kaushik Banerjeehi.....
You can go thru the following docs and threads....
http://help.sap.com/erp2005_ehp_03/helpdata/EN/9a/368442a07b0e53e10000000a155106/frameset.htm
http://searchsap.techtarget.com/generic/0,295582,sid21_gci1149410,00.html
http://searchsap.techtarget.com/general/0,295582,sid21_gci1108668,00.html
http://www.sapcookbook.com/SAP-CRM-Interview-Questions-SAP-Customer-Relationship-FAQ.htm
/docs/DOC-8061#41
What is Webdynpro?
What is Web Dynpro?
Webdynpro Sample Applications and Tutorials
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
SAP WebAs Samples And tutorials
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7d646a6c-0501-0010-b480-bf47b8673143
Basis Webdynpro tutorials....
http://help.sap.com/saphelp_erp2005/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e9/1fc0bdb1cdd34f9a11d5321eba5ebc/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/d08342a7d30d53e10000000a155106/frameset.htm
Web Dynpro Sample Applications and Tutorials:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
http://searchsap.techtarget.com/searchSAP/downloads/SAPPRESS.pdf
Check the following thread u can get lot of materials,
WeB Dynpro Documents
Refer these linkshttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/web%20dynpro%20tutorial%20and%20sample%20applications.faq
Why WebDynpro ?
Why WebDynpro ?
Why webdynpro and not BSP or JSP?
Why webdynpro and not BSP or JSP?BSP to WEB Dynpro
BSP to WEB Dynpro
Benifits of using Webdynpro Benifits of using
Webdynpro
Java vs. ABAP WEbDynpro Java vs.
WebDynpro ABAP
regarding Java related webdynpro
Regarding Java related Web Dynpro vs. Struts - a few questions
Web Dynpro vs. Struts - a few What kind of applications are being developed with Web Dynpro?
What kind of applications are being developed with Web Dynpro?
http://www.sappro.com/downloads/OptionComparison.pdf
Hop this will helpful for u.. -
Web Clipping portlet and pdf files
Hi,
I have created a web clipping portlet which just includes a set of links to HTML and pdf files. When I try to open a link to a pdf file the web clipping portlet fails, but links to the html content work fine
Is it possible using web clipping to open the links to the pdf files and display them in the web clipping portlet ?
Thanks,Hi,
I have created a web clipping portlet which just includes a set of links to HTML and pdf files. When I try to open a link to a pdf file the web clipping portlet fails, but links to the html content work fine
Is it possible using web clipping to open the links to the pdf files and display them in the web clipping portlet ?
Thanks, -
Help needed on Servlets and JSTL
Hi
I am using tomcat 5.5 and JDK 1.5. What are the softwares I have to download for compiling servlets and creating JSTL ?. Help needed.
Thanks
IndyaRajaI tried compling servlet, but it is raising error
that coul not find package javax.servletWhat I did not mention... you need to add those JARs in the Classpath explicitly. You will find them in %TOMCAT_HOME%\common\lib. You atleast need to add servlet-api.jar to your Classpath. :) -
Difference between servlet and filter
difference between servlet and filter
Its not a secret you know; if you just read a little about what they are used for, you answer your own question plus many more to follow.
Servlet: http://en.wikipedia.org/wiki/Java_Servlet
Filter: http://www.oracle.com/technetwork/java/filters-137243.html -
Difference between servlet and ActionServlet
Difference between servlet and ActionServlet..
Anybody replyjsf_VWP5.5.1 wrote:
Difference between servlet and ActionServlet..
Anybody replyAs their name imply, ActionServlets like outdoor activities, whereas Servlets are rather contemplative types.
The only time Servlets exhibit behavior similar to ActionServlets, in under extremely stressful situations, like when a Servlet is being chased by a pit bull. -
How to add Images and PDFs in MDM iView
Hello!
We use SAP Portal as interfase to access SAP MDM repository tables.We use MDM Record Set and MDM Item Detail iViews to display and operate with main table content.
There is a field in the qualified table, which is the lookup to the Images table. And the other field is the lookup to the PDFs table. Both fields are qualifiers.
In the main table there is a field, which is the lookup to the qualified table. When we try to add values to this field using Item Detail iView, we get a window, where we can fill all values of the qualified table, except Image field and PDF field - they are disabled. So, can we add Images and PDFs to the table using Item Datail iView? Or what is the other way to add them?
Thanks,
Vika
Message was edited by:
Viktoria DeminaOoohh... you mean, like the one mentioned in http://indesignsecrets.com/adding-zoom-and-print-to-indesign-swf-files.php?
But they want to get paid for their hard work, the bastards! -
SUMMARY
Hyperlinks to XLS, DOC, and PDF files that are included in a
.chm file (and the Baggage Files) only work intermittently. The
only solution appears to be deleting the Temporary Internet Files.
PROBLEM
1. I place the XLS, DOC, or PDF file in the Windows
sub-directory that corresponds to the RoboHelp project sub-folder
where the topic in which I’ll place the hyperlink exists.
2. I open the help project in RoboHelp HTML.
3. I right-click on the project’s Baggage Files
sub-folder that corresponds to the Windows sub-directory in which I
placed the XLS, DOC, or PDF file (in step 1).
4. I import the XLS, DOC, or PDF file.
5. I open the topic in which I’m going to place the
hyperlink in the WYSIWYG editor.
6. I “drag and drop” the Baggage File into the
topic (in the WYSIWYG editor) to create a link to it.
7. I save the changes and then generate HTML (.chm) help.
8. I open the .chm file and click the hyperlink. The XLS,
DOC, or PDF file may or may not open.
9. When the hyperlink works correctly, for DOC and XLS files,
a “File Download – Security Warning” dialog box
appears asking, “Do you want to open or save this
file?”. The buttons that are available are
“Open”, “Save”, and “Cancel”.
These buttons work then as one would expect. (When the hyperlink
works correctly for a PDF file, it simply opens the PDF file in a
new window; there’s no prompt to save, open, or cancel.)
10. When a hyperlink does NOT work, for DOC, XLS, and PDF
files, no dialog box or other visual message is displayed. Instead,
the sound that is associated with the “Exclamation”
program event is played (the “Windows XP
Exclamation.wav” file is the WinXP default).
Other Notes:
- The hyperlinks ALWAYS work when I view a topic using the
“View Selected Item” function (Ctrl+W) in the RoboHelp
HTML project.
- Once a hyperlink stops working, it will not start working
again until I delete all the Temporary Internet Files.
- A hyperlink will stop working even if Internet Explorer
(iexplore.exe) is closed the entire time.
WORKAROUND
Through trial and error, I have discovered that if a
hyperlink stops working, I can get it to work again using the
following steps:
1. Leave the .chm file open.
2. Open Internet Explorer.
3. Click Tools>Internet Options….
4. From the “Internet Options” dialog box, select
the “General” tab.
5. Under the “Temporary Internet Files” section,
click the “Delete Files…” button.
6. From the “Delete Files” dialog box, select
“Delete all offline content” and then click
“OK”. The files are deleted and the “Delete
Files” dialog box closes.
7. Click “OK” to close the “Internet
Options” dialog box.
8. Without closing Internet Explorer and without re-starting
the .chm file, all the hyperlinks that didn’t work before
will now work.
GENERAL SYSTEM INFORMATION
- Windows XP Pro, SP2
- Internet Explorer 6.0.2900.2180
- RoboHelp X5, 5.0.2 Build 801
- HTML (.chm) help project files exist on my local machine
- HTML (.chm) help file is run from my local machine
- Project is under RoboSource version control
TEMPORARY INTERNET SETTINGS
- “Check for newer versions of stored pages” is
set to “Automatically”
- “Current location” for the Temporary Internet
files folder is set to “C:\Documents and Settings\My
Username\Local Settings\Temporary Internet Files\”
- “Amount of disk space to use” is set to
“594” MB
“View Files…”
- An XLS or DOC file will be listed here if I click its
hyperlink and then click either “Open” or
“Save” from the “File Download – Security
Warning” dialog box.
- A file will appear here even if I click “Save”
and then click “Cancel” from the subsequent “Save
As” dialog box.
- If I click “Cancel” from the “File
Download – Security Warning” dialog box, the file does
not appear in the Temporary Internet Files folder.
- When a file does appear in the Temporary Internet Files
folder, its Internet Address is displayed similar to the following:
“ms-its:C:\PrimaryProjectFolder\ProjectName.chm::/SubFolderName/FileName.xls”
“View Objects…”
Here’s a list of all the program files that appear:
- “Microsoft Office Template and Media Control”
(Last Accessed 12/13/06) (Version 12,0,6024,0)
- “Shockwave ActiveX Control” (Last Accessed
12/14/06) (Version 10,1,4,20)
- “Shockwave Flash Object” (Last Accessed
12/18/06) (Version 9,0,28,0)
- “Windows Genuine Advantage Validation Tool”
(Last Accessed 12/14/06) (Version 1,5,722,0)
- “WUWebControl Class” (Last Accessed 12/13/06)
(Version 5,8,0,2469)
Today is 12/18/06 so the only program file that is listed as
having been “Last Accessed” today is the
“Shockwave Flash Object”.
REQUEST FOR HELP
I really want to include certain PDF, DOC, and XLS files in
their native format in a .chm file. However, I need a better
solution to my problem than the one I discovered. What I really
want is to avoid the entire problem altogether.
Have anyone seen this before or have any suggestions?You wont be able to do that. The embedded objects would appear as images only.
-
How to get the query values from the url in a servlet and pass them to jsp
ok..this is the situation...
all applications are routed through a login page...
so if we have a url like www.abc.com/appA/login?param1=A¶m2=B , the query string must be passed onto a servlet(which is invoked before the login page is displayed)..the servlet must process the query string and then should pass all those values(as hidden values) to the login jsp..then user enters username and pswd, then there should be another servlet which takes all the hidden values of jsp and also username and pswd, authenticates the user and sends the control back to that particular application along with the hidden values...
so i need help on how to parse the query string from the original url in the servlet, pass it out to jsp, and then pass it back to the servlet and back to the original application...damnn...any help would be greatly appreciated...thanksok..this is the situation...Sounds like you have a bad design on your hands.
You're going to send passwords in a GET request as clear text? Nice security there.
Why not start with basic security and work your way up?
% -
I'm trying to get organized and I just added a bunch of books and pdfs to my itunes library. They were all added immediately to my ipad and iphone even though I did not want this. I added them to itunes using add to library and I have both devices set to sync only selected books.
How do I do this in the future so this doesnt happen? Its a lot of work to now manually erase them from each device and it sent my phone over capacity.
thanksI dont see the difference in the posts. I dont think theres anything inaccurate or misleading about what I wrote. The items were immediately added to my ipad and my iphone, even though I have them both set to sync only select items. As soon as I added new titles to my itunes library, they were immediately added to the devices. Not on the next sync. Immediately. Both devices were plugged into the computer at the time. Sorry if I failed to mention they were plugged in but I dont see the signifigance youre making out of it. The problem persists anyway.
Now that I did a test without the devices plugged in, the new items were still added as soon as I plugged my devices into the computer ( I do not have them set to sync over wifi).
Since I have both devices set to manually select items to sync, of course I want to manually select new items to sync. For instance, I am not going to read any of these magazines or books on my phone, ever, and I dont want to waste valuable space with them.
So I'm trying your advice:
I just tried deselecting sync books. It erased all content from ibooks on my device. I then dragged
one title onto the device, and it just goes back to syncing select books, with the one title selected.
It appears that wont work to solve my issue. The next time I add something to itunes it will be put on my phone. Is this really something most people want? To select to manualy control what content is synced, but then have things automatically added. It seems inconsistent to me. -
Tall report in both HTML and PDF
Hi,
I have a report in 10.1.2.0.2 with three logical parts; a header (logo, column titles), a body (actual data) and footer (column sums, some texts). At the moment I'm just using the main section (not header/trailer) but I'm willing to change.
Depending on the parameters the report will give 1-20 pages (if I was to print them) of output.
I would like to offer both HTML and PDF output but I'm having some issues.
If I set the height of the main section to 25 centimeters/10 inches and run the reports with parameters that produce 2 pages of output, I will get two pages i the PDF perfectly. The HTML will then get a seam (empty row) after 25cm/10In and then continue. The problem is that the second part of data is in a separate html table, making the columns not aligned to the first part.
So, PDF OK, HTML ugly.
If I set the height of the main section to 250 centimeters/100 inches and run the report again the HTML is fine. One long table and therefore consistent columns.
Now the PDF consists of only one page. It looks fine but after the last row I can scroll down much more as the PDF "page" is really tall now.
So, PDF ugly, HTML OK.
Any suggestions for acheiving a nice result in both PDF and HTML?
Kind regards
Tomas Albinsson
Stockholm, SwedenMany thanks Denis, worked perfectly!
Now the customer has decided that they want the header on each page...
So now I don't need to use your solution but it's good to know how to solve it.
Fortunately (?) I've got a new problem now.
If the output spans two pages I now get one head, the first part of data, head again, rest of data and foot. Fine.
The problem is that the columns of head and data on page two are not aligned with the ones on page one.
So head and data always align, but only withing the page. Page two might be much wider than page one.
This is is HTML output and the frames are set to horizontally fixed.
Seems to be the footer. Didn't help putting it in a horizontally fixed frame of it's own.
Suggestions?
Kind regards
Tomas -
Can I use word and PDF on my iPad with icloud
Can I use microsoft word and pdf files from my PC on my iPhone and iPad if I'm using iCloud?
Microsoft does Not make an iPad compatible version of their Office programs such as Word and Excel. But as Johnthe AppleFan pointed out, you can use Apple's Pages to to open Word Files.
Hope this helps -
My iPad and iPhone have iCloud icons. How do I access iCloud from my iMac?
How do I take advantage of the free storage? Can I upload photos,Word and PDF docs?Open contacts on your phone and check your groups. Do your contacts belong to any non-iCloud groups such as On My iPhone, a Gmail, Yahoo or Exchange account, or anything else? Also check Settings>Mail,Contacts,Calendars>Default Account (in the Contacts section). What is selected as your default account?
Maybe you are looking for
-
An update to my ipod touch failed to install. Somehow the driver failed to install and then somehow the drivers got "lost" I looked all over my system for a driver, windows searched the web for a driver to no avail. I looked on Itunes for updates
-
Help add Sun Application Server 7 on netbean 5.5
First I setup netbean 5.5 on winxp and then i add Sun Appliction Server 7 on netbean but I can't reg my domain at (C:\Sun\AppServer7\Domains\Domain1).I get my error in output of netbean: --domaindir : Option does not have an exact match Usage: create
-
Usage Customer Exit EXIT_SAPLCUKO_003 / Enhancement CCUX0004
Hello, I like to add new attributes of instances in LOVC during configuration of material in VA02. I found this Userexit and with function module CUDB_SET_VAL it is possible to add new values in the global table cudbd_pr_at_msg of function group CUDB
-
I ordered by credit card on 12/10/14 two color cartridges. The transaction was processed on my credit card but I did not receive my order. How long does it take for delivery? How can I check the status of an order?
-
The Character Viewer does not work in photoshop CS6 - any ideas why? Works beautifully in Word and other text editors but not in Photoshop.