J
Justin
I am trying to write to a CSV for the user to download through my JSP.
The following is the entire JSP test page (MyJsp.jsp) I created:
<%
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment;
filename=data.csv");
out.println( "a,b,c" );
out.println( "10,34,55" );
%>
When I run this file in IE6 from my project that has a security
constraint set in the web.xml, the download window popups up and
prompts the client to download. Saying the file name is MyJsp.jsp and
the file type is blank. When I try and save or open the file I get the
following error:
"Internet Explorer cannot download MyJsp.jsp from localhost.
Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later."
If I remove the security constraint it works fine, but I would need
this process to run only for authenticated users. I have tried this on
both Tomcat 4.1.24 and 5.0.3 and had the same results.
Any help is greatly appreciated.
Thanks,
Justin Erickson
The following is the entire JSP test page (MyJsp.jsp) I created:
<%
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment;
filename=data.csv");
out.println( "a,b,c" );
out.println( "10,34,55" );
%>
When I run this file in IE6 from my project that has a security
constraint set in the web.xml, the download window popups up and
prompts the client to download. Saying the file name is MyJsp.jsp and
the file type is blank. When I try and save or open the file I get the
following error:
"Internet Explorer cannot download MyJsp.jsp from localhost.
Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later."
If I remove the security constraint it works fine, but I would need
this process to run only for authenticated users. I have tried this on
both Tomcat 4.1.24 and 5.0.3 and had the same results.
Any help is greatly appreciated.
Thanks,
Justin Erickson