level 1
dm61617
楼主
使用jcom在tomcat项目上实现打印预览的功能。在MyEclipse上运行正常看,但发布到tomcat上运行不了了。代码如下:
public ActionForward tostamp(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response){
logger.info("tostamp getDownload method start");
ReleaseManager rm = new ReleaseManager();
condition = new HashMap();//初始化HASHMAP
downloadtabledataForm = (DownloadTableDataForm)form;//取得FROM
menuFlg = Utility.nullToString(request.getParameter("menuFlg"));//取得数据来源
try {
// 取得项目路径
String path = servlet.getServletContext().getRealPath(File.separator);
String tos1 = Utility.nullToString(request.getParameter("tos1"));
String tos2 = Utility.nullToString(request.getParameter("tos2"));
String tos3 = Utility.nullToString(request.getParameter("tos3"));
String tos4 = Utility.nullToString(request.getParameter("tos4"));
String tos5 = Utility.nullToString(request.getParameter("tos5"));
Map maps = new HashMap();
maps.clear();
maps.put("tos1", tos1);
maps.put("tos2", tos2);
maps.put("tos3", tos3);
maps.put("tos4", tos4);
maps.put("tos5", tos5);
String fileUrl = path + File.separator + CommConst.fileMYDownload + File.separator
+ CommConst.fileMYSubDownload + File.separator + "moban.xls";
2011年06月24日 08点06分
1
public ActionForward tostamp(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response){
logger.info("tostamp getDownload method start");
ReleaseManager rm = new ReleaseManager();
condition = new HashMap();//初始化HASHMAP
downloadtabledataForm = (DownloadTableDataForm)form;//取得FROM
menuFlg = Utility.nullToString(request.getParameter("menuFlg"));//取得数据来源
try {
// 取得项目路径
String path = servlet.getServletContext().getRealPath(File.separator);
String tos1 = Utility.nullToString(request.getParameter("tos1"));
String tos2 = Utility.nullToString(request.getParameter("tos2"));
String tos3 = Utility.nullToString(request.getParameter("tos3"));
String tos4 = Utility.nullToString(request.getParameter("tos4"));
String tos5 = Utility.nullToString(request.getParameter("tos5"));
Map maps = new HashMap();
maps.clear();
maps.put("tos1", tos1);
maps.put("tos2", tos2);
maps.put("tos3", tos3);
maps.put("tos4", tos4);
maps.put("tos5", tos5);
String fileUrl = path + File.separator + CommConst.fileMYDownload + File.separator
+ CommConst.fileMYSubDownload + File.separator + "moban.xls";