Re: PDF to acrobat

2010-06-29 Thread Zachary Valentiner
Hi Dola,

Setting the content type to "application/octet-stream" will force a download. 
If I recall my headers correclty, setting "application/pdf" is as close as you 
can get to telling it to open in the browser without embedding it in an HTML 
file directly and thereby forcing the browser to use a plugin to render the 
PDF. 

Someone might have some other tip, but this is also somewhat browser/plugin 
dependent, e.g., I notice different behavior between Firefox and Chrome, even 
when opening the same links to the same PDFs.

Good luck,

Zach


On Jun 29, 2010, at 9:08 PM, Dola Woolfe wrote:

> Hi,
> 
> I set
> 
> response.setContentType("application/pdf");
> 
> 
> as a result, the served up content triggers a "Download" rather than opening 
> acrobat within browser window.
> 
> 
> Do I get to control what happens at client end? I want acrobat to open within 
> browser.
> 
> How do I achieve that?
> 
> Thanks,
> 
> Dola
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



Re: Basic Question

2010-04-16 Thread Zachary Valentiner
For starting Tomcat in Eclipse, check this out:
http://www.eclipsetotale.com/tomcatPlugin.html

As for the other part, I'm not really sure at all. Good luck, though.

Zach


On Apr 16, 2010, at 3:07 AM, Rhino wrote:

> I hope someone will take pity on me and help me with this very basic 
> question. I was moderately fluent with servlets and Tomcat several years ago 
> but haven't touched them in a while. I'm trying to get back into servlets now.
> 
> I am having trouble getting my servlets to start in Tomcat. I inevitably get 
> a 404 error. I am running Tomcat 6.0.26 on Windows XP SP2. The sample 
> applications in Tomcat run fine.
> 
> My servlets are in Eclipse 3.5.2. They compile fine and I have used the 
> Tomcat menu to export them to the war file directory; no error gets reported 
> when I do the export. I did a manual deploy of the war file from the "war 
> file to deplay section of the Tomcat Manager page.
> 
> When I start the Tomcat Manager in my browser, it shows several servlets, 
> including the examples and the servlets that I have deployed myself. In each 
> case, my own servlets seem to be started just fine. All of them say 
> "running", the number of sessions is 0 for each of them, and all of them have 
> stop, reload and undeploy options which are clickable and a start option 
> which is not clickable. To me, that says these puppies are started and there 
> is no error in any of them.
> 
> However, when I click on my servlets, like /FileUploadServlet for example, I 
> get this:
> 
> 
> HTTP Status 404 - /FileUploadServlet/
> 
> 
> 
> *type* Status report
> 
> *message* _/FileUploadServlet/_
> 
> *description* _The requested resource (/FileUploadServlet/) is not available._
> 
> 
> 
> 
> Apache Tomcat/6.0.26
> 
> 
> 
> I feel sure that I've simply neglected to do something simple and 
> straightforward but my memory is failing me. I can't remember what other 
> steps are needed to get a servlet configured so that it runs in Tomcat.
> 
> I was going to try to run the servlet in Eclipse but I'm darned if I can 
> remember how to start it there either.
> 
> Can someone help me out?
> 
> --
> Rhino
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org