我现在用struts1+jasperreports 做报表,可是在应用中老是得不到正确的路径,请大家帮我看一下,谢谢
[code="java"]
public ActionForward lookAss(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws JRException {
String path = request.getContextPath();
String string = "C://Program Files//Apache Software Foundation//Tomcat 6.0//webapps//IRSSoftware//ireports//PDF.jrxml";
String paths = System.getProperty("user.dir");
System.out.println(paths);
JasperDesign design = JRXmlLoader.load(string);
return null;
}
[/code]
得到的结果是
[code="java"]
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
[/code]
晕了,怎样才能得到
[code="java"]
C://Program Files//Apache Software Foundation//Tomcat 6.0//webapps//IRSSoftware//ireports//PDF.jrxml
[/code]
这个路径呢
?