Writing data into an XML file on Unix/Tomcat platform - URGENT!!!!
Hi,
Thanks for the solution about using a protocol prefix before accessing the XML file from the Unix file system. I used the http protocol before the file path and the servlet is able to read the XML file. But however, now while writing into the XML file, a SecurityException is thrown by Tomcat. It seems there needs to be some kind of security manager settings that need to be done in order to write into any file.
Could you please help me out in this regard.
Thanks in advance,
Jatin Shroff
Re: Parsing XML on Unix/Tomcat platform - Urgent!!!!
Author: theforce Aug 10, 2001 4:15 AM
Hi,
I think I may have ideas that might just solve your problem with the malformed url exception.
1) on unix (as I'm sure your aware) things are case sensitive (unlike windows), so check the case on the path and file and mimic it exactley.
2) make sure the permissions on the file and path is ok
i.e. the user that is running apache, usually nobody, sometimes root owns the path and file.
3) I notice the error suggests you are not supplying a protocol where the file resides.
i.e. http, file, etc.
this might not be needed on windows, but its still good practice to specify your protocol.
e.g. file://somepath/somedir/somefile.xml - reading directly from disk.
OR
http://<server>:<port>/somepath/somedir/somefile.xml
Author: jcshroff Aug 10, 2001 3:41 AM
Hi,
I'd like to know if it is possible to parse a XML file using the JAXP API on a Sun Solaris system running the Jakarta Tomcat servlet engine.
When trying to execute the servlet that parses the XML document, the following error message comes:
java.net.MalformedURLException:
no protocol: /install/jakarta-tomcat-3.2.2/webapps/ROOT/Orders.xml
The same servlet works fine on Windows NT platform running Java Web Server. I have installed JAXP on the Unix system and set all classpath variables also.
Is this something to do with the web server/servlet engine or are there some additional parsers for XML required on Unix?
Thanks in advance,
Jatin Shroff

