RE: Excel sheets

2003-02-24 Thread John Leveille
And the swirl goes on ...
try putting putting
response.setHeader(Content-disposition, attachment; filename=foo.csv);
and watch as you get two save as dialogs from the browser (I.E. 5.5, I think) ... ouch!

WARNING: You can waste a lot of time on this problem.  Proceed at your own risk :-)

We reported a bug to Microsoft on the double dialog problem ... you guessed it ... 
software is working as designed.  They actually said that having to respond to two 
save as dialogs was per design.

Figures,
John

-Original Message-
From: Mike Johnson [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 22, 2003 2:52 AM
To: Tomcat Users List
Cc: John Leveille
Subject: RE: Excel sheets



I was having the same problem with IE until I finally found a microsoft
document on the subject. It suggested setting the Content-disposition
header, which does force IE to treat files like you'd expect.

*shrugs*

eg:
response.setHeader(Content-disposition, filename=foo.csv);


On Thu, 2003-02-20 at 18:31, John Leveille wrote:
 Ah, I have done battle with this one many times.  I grow weary of the fight.
 
 First let me say that this problem can stem from a variety of causes given the many 
 combinations of browser make, browser version, and web server make and version.  In 
 the past I have found that I.E. ignores the content-type header (bad browser! bad 
 browser!).  But, by all means, do as Tim says and set the proper header (probably 
 text/csv).
 
 If that doesn't do it, try adding a couple fake parameters to the URL (because I.E. 
 is looking there to decide what client app to launch).  For example, if you have a 
 servlet creating the CSV your URL might look like
 
 http://localhost:8080/myservlet?a=b
 
 change this to
 
 http://localhost:8080/myservlet/foo.csv?a=bsaveas=/foo.csv
 
 This is usually enough to convince the browser to do the right thing.
 
 John
 
 -Original Message-
 From: Tim Funk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 20, 2003 9:10 PM
 To: Tomcat Users List
 Subject: Re: Excel sheets
 
 
 Tomcat is not sending the right header back( Content-type probably). 
 Telnet into port 80, simulate a web request and see what the server 
 repsonse header is and adjust tomcat accordingly.
 
 -Tim
 
 David Epstein wrote:
  I have a website that serves up files, which are often .csv files. When
  I run the site using IIS (ick), a user with Excel on their machine will
  see the .csv files automatically open in Excel. But when I use the
  Tomcat server, I can't get it to do the same. Is there an easy way to
  enable this functionality?
  
  Any help appreciated.
  
  David Epstein
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Mike Johnson [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem with POST and mod_jk, AJP

2003-02-20 Thread John Leveille
Hi,

I am running apache web server and mod_jk, AJP to forward JSP request to tomcat.  The 
platform is Solaris, JDK 1.3, Tomcat 4.01.  Occasionally I see a failure in what 
appears to be the data coming from apache over to tomcat.  Here is the exception.  
Anybody know what causes this and how I might prevent it?

Thanks for the help,
John

java.lang.RuntimeException: Read of HTTP Request POST parameters failed: read  
content length
at 
org.apache.catalina.connector.HttpRequestBase.parseParameters(HttpRequestBase.java:658)
at 
org.apache.catalina.connector.HttpRequestBase.getParameter(HttpRequestBase.java:691)
at 
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:160)
at org.apache.jsp.processpayments$jsp._jspService(processpayments$jsp.java:101)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:484)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]