Rank: Newbie
Groups: Member
Joined: 7/23/2008(UTC) Posts: 1
|
System windows xp sp2 Tomcat 5.0.24 JDK jdk1.5.0_08
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 2 in the jsp file: /BasicDemo/upload.jsp
Generated servlet error: [javac] Compiling 1 source file
D:\soft\webserver\Tomcat5\work\Catalina\localhost\imageUpload\org\apache\jsp\BasicDemo\upload_jsp.java:54: ????? ??? ?? getFeature(java.lang.String,java.lang.String) ??? ?? org.w3c.dom.DOMImplementation DOMImplementationLS implementationLS = (DOMImplementationLS) implementation.getFeature("LS", "3.0"); ^ ???D:\soft\webserver\Tomcat5\work\Catalina\localhost\imageUpload\org\apache\jsp\BasicDemo\upload_jsp.java ?????????? API? ?????????????? -Xlint:deprecation ????? ???D:\soft\webserver\Tomcat5\work\Catalina\localhost\imageUpload\org\apache\jsp\BasicDemo\upload_jsp.java ??????????????? ?????????????? -Xlint:unchecked ????? 1 ??
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:83) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:306) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:398) org.apache.jasper.compiler.Compiler.compile(Compiler.java:441) org.apache.jasper.compiler.Compiler.compile(Compiler.java:422) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
I need to install Tomcat 5.x to reproduce the problem. I will do it tomorrow and let you know about the results. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
I am sorry for delays. I have installed Tomcat 5.5 and can not reproduce the problem. The only change I have done to run the sample on Tomcat 5.5 is in gallery.jsp: Code:org.w3c.dom.Document descriptions = builder.parse(absGalleryPath + File.separator + "Descriptions.xml");
to: Code:org.w3c.dom.Document descriptions = builder.parse("file:///" + absGalleryPath + File.separator + "Descriptions.xml");
I will install version 5.1 and check on it. |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
I am sorry for a long answer. Just open upload.jsp file and modify saveXml method: Code:private void saveXml(Document document, String path) throws IOException {
/* DOMImplementation implementation = document.getImplementation();
DOMImplementationLS implementationLS = (DOMImplementationLS) implementation.getFeature("LS", "3.0");
LSSerializer serializer = implementationLS.createLSSerializer();
LSOutput output = implementationLS.createLSOutput();
FileOutputStream stream = new FileOutputStream(path);
output.setByteStream(stream);
serializer.write(document, output);
stream.close();
*/
// use specific Xerces class to write DOM-data to a file:
org.apache.xml.serialize.XMLSerializer serializer = new org.apache.xml.serialize.XMLSerializer();
serializer.setOutputCharStream(
new java.io.FileWriter(path));
serializer.serialize(document);
}
|
Best regards, Fedor Skvortsov
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.