[ Team LiB ] Previous Section Next Section

Q&A

Q1:

Why doesn't the browser recognize my JSP as an XML file?

A1:

You probably forgot to change the content type to text/xml.

Q2:

Why can't the Java compiler find the XML libraries?

A2:

Make sure that both jaxp.jar and parser.jar are in your classpath.

Q3:

My program compiles okay; why does it tell me it can't find the parser library?

A3:

You must have both jaxp.jar and parser.jar in your classpath. The jaxp.jar file defines the standard interfaces for SAX and DOM, but it doesn't contain any of the implementation classes. You can compile a program by using only jaxp.jar, but when you run the program, you need to include an actual XML parser in the classpath.

Q4:

Why do I get a ClassNotFoundException when I use the JOX library?

A4:

JOX also requires the Sun XML libraries, so you must also include jaxp.jar and parser.jar in your classpath. Make sure that the JOX JAR file is also in your classpath.


    [ Team LiB ] Previous Section Next Section