Facing Problem in saving to Excel Sheet

Hi,

This is Anupam from Kolkata of India.

I am writing a jsp in which I am facing some problem .I am trying to save the content of a table to a excel shhet.The code is follows

<%@ page contentType="application/vnd.ms-excel" %>

<html>

<%-- Set the content disposition header --%>

<%

response.setHeader("Content-Disposition", "inline; filename=\"mult-table1.xls\"");

%>

<body>

<table>

<% for(int i = 1; i <= 12; i++){ %>

<tr>

<% for(int j = 1; j <= 12; j++){ %>

<td>

<%= i * j %>

</td>

<% } %>

</tr>

<% } %>

</table>

</body>

</html>

The jsp is saving the the table to the Excel Sheet but in the browser I am getting the Error Message

Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable

This may be because I have changed the changed the content type from text/html.

Another problem I am facing that I am creating a portlet in the weblogic Portal but it is displaying error message box informing that the jsp can not be downloaded.

Can any body help me out

Thanks in advance

Anupam Sarkar

[1343 byte] By [Anupam035a] at [2007-11-26 14:50:21]
# 1
Your code works, when I try to access your JSP page, it correctly downloads the table data into an excel spreadsheet.Regarding the weblogic portlet you can check with Weblogic forum or provide more details so we can diagnose the problem.
appy77a at 2007-7-8 8:38:29 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...