取得tomcat服务器路径之斜杠问题

来源:互联网 发布:ubuntu mysql下载64位 编辑:程序博客网 时间:2024/06/12 07:45

打开图片、pdf格式模板的时候,IO异常:是路径问题在输入路径的时候,复制的原路径是单斜杠,会报错,而且即使存在数据库,从数据库中取得的时候,也会识别不了而报错


以下是部分报错内容:

java.io.IOException: D:/Tomcat/7.0.55/apache-tomcat-7.0.55/webapps/.../......pdf not found as file or resource.
at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown Source)
at com.lowagie.text.pdf.RandomAccessFileOrArray.<init>(Unknown Source)
at com.lowagie.text.pdf.PRTokeniser.<init>(Unknown Source)
at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)

阅读全文
1 0
原创粉丝点击