Welcome Guest Search | Active Topics | Members

test 5.1 version Options
Jimzhou
Posted: Thursday, July 24, 2008 2:54:58 AM
Rank: Newbie
Groups: Member

Joined: 7/24/2008
Posts: 1
Points: 3
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)
Fedor
Posted: Monday, July 28, 2008 2:24:28 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
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
Fedor
Posted: Saturday, August 02, 2008 8:34:05 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
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
Fedor
Posted: Monday, August 18, 2008 5:55:20 PM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
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
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.