G
gk
".....Crimson parser is bundled by default with JDK 1.4.To override
this parser we need to run our example with -Djava.endorsed.dirs
option....."
(1) why people dont want to use Crimson parser ?
(2) according to above comment , so we can run like this..
java -classpath .; -Djava.endorsed.dirs=c:\xerces\lib SAXParserExample
what does "-Djava.endorsed.dirs" do ? it says "override" ....how
does JVM identifies it ? does it searches the "c:\xerces\lib"
directory and try to match whether there is a similar kind of API
already exists in JDK or not ? if it finds , then it overrides with
the new one ......does it work this way ?
(3) ok, we can override the XML parser for JVM as above....but how do
we do it , when its an web application.
For example, i have a server which has a XML parser shipped with it
......but i am using "xerces" ..... in this case , how do i override it
and where to override it ? how can i reject the parser shipped with the
server and adopt the new one which i am using ?
what is the command for that ?
I am not specifying the server name . because , if i say Tomcat ...then
you might say, delete the JAR files from servers lib directory (really,
is it a solution ?) and it will automatically picks up your new JAR
file "xerces"....but there must be some other way out without deleting
the JAR files shipped with the server.....is not it ?
how do i override then in a web/app container ?
my preffered servers are jboss,weblogic,websphere,sun,and tomcat
this parser we need to run our example with -Djava.endorsed.dirs
option....."
(1) why people dont want to use Crimson parser ?
(2) according to above comment , so we can run like this..
java -classpath .; -Djava.endorsed.dirs=c:\xerces\lib SAXParserExample
what does "-Djava.endorsed.dirs" do ? it says "override" ....how
does JVM identifies it ? does it searches the "c:\xerces\lib"
directory and try to match whether there is a similar kind of API
already exists in JDK or not ? if it finds , then it overrides with
the new one ......does it work this way ?
(3) ok, we can override the XML parser for JVM as above....but how do
we do it , when its an web application.
For example, i have a server which has a XML parser shipped with it
......but i am using "xerces" ..... in this case , how do i override it
and where to override it ? how can i reject the parser shipped with the
server and adopt the new one which i am using ?
what is the command for that ?
I am not specifying the server name . because , if i say Tomcat ...then
you might say, delete the JAR files from servers lib directory (really,
is it a solution ?) and it will automatically picks up your new JAR
file "xerces"....but there must be some other way out without deleting
the JAR files shipped with the server.....is not it ?
how do i override then in a web/app container ?
my preffered servers are jboss,weblogic,websphere,sun,and tomcat