Thank you a lot Ben.
I appreciate your help.
This code in my jsp works fine, has there been only one custom name to display:
<%@ page contentType="application/vnd.ms-excel" autoFlush="true" %>
<% response.setHeader("Content-Disposition", "attachment; filename=\"EmployeeReport.xls\""); %>
But still I am not able to figure out completely.
I know the logic , but need some help.
I have nearly 10 reports and I need to use <c:if ...> tag in my Jsp and display the right report name ( on the Excel file)
Can you pl help me how I can do it in my report.jsp .
// In the ReportAction.execute(.....) method
//I have set the report name as an attribute
....
Report report = new Report ();
String r_name = report. getName(); // EmployeeReport, ?ManagerReport etc
System.out.println ("\n\n rep...name: " + s_r_name + "\n") ;
//outputs the expected name to console
req.setAttribute("reportName", r_name );
I need to retrieve it in jsp and add logic to display specific report name such as EmployeeReport, MangerReport etc
Currently my jsp file has these 6 lines of code code:
<%@ taglib uri="/WEB-INF/rep.tld" prefix="rep" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ page import="com.xyz.report.Report" %>
<%@ page contentType="application/vnd.ms-excel" autoFlush="true" %>
<% response.setHeader("Content-Disposition", "attachment; filename=\"EmployeeReport.xls\""); %>
<rep:displayReport/>
Thanks,
Mike