You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by The Duke <mi...@lycos.com> on 2001/10/23 08:57:46 UTC
Apache and Tomcat
I'v setup tomcat 4.0.1 with apache webserver. Also I have build an application in tomcat that works like it should.
Only when I go to my application with apache it doesn't find the xml files. I use an URL to find the xml file. When I put the URL in the address line of the browser the xml file appears on screen.
In tomcat the url looks like this:
http://localhost:8080/MyApp/MyDir/MyXMLfile.xml
In apache
http://localhost:80/MyApp/MyDir/MyXMLfile.xml
But in the code everything stops as soon as the xmlparser (jdom)
builds the document:
URL link = new URL("http", request.getServerName(), request.getServerPort(), request.getContextPath, "/MyDir/MyXMLfile.xml
");
Saxbuilder builder= new Saxbuilder();
Document doc = builder.build(URL)
At the last line everyting stops.
Does anyone have an answer to this problem?
Dennis.
Make a difference, help support the relief efforts in the U.S.
http://clubs.lycos.com/live/events/september11.asp
Re: Apache and Tomcat
Posted by Pier Fumagalli <pi...@betaversion.org>.
The Duke at mini78@lycos.com wrote:
> I'v setup tomcat 4.0.1 with apache webserver. Also I have build an application
> in tomcat that works like it should.
>
> Only when I go to my application with apache it doesn't find the xml files. I
> use an URL to find the xml file. When I put the URL in the address line of the
> browser the xml file appears on screen.
>
> In tomcat the url looks like this:
> http://localhost:8080/MyApp/MyDir/MyXMLfile.xml
>
> In apache
> http://localhost:80/MyApp/MyDir/MyXMLfile.xml
>
> But in the code everything stops as soon as the xmlparser (jdom)
> builds the document:
>
> URL link = new URL("http", request.getServerName(), request.getServerPort(),
> request.getContextPath, "/MyDir/MyXMLfile.xml
> ");
> Saxbuilder builder= new Saxbuilder();
> Document doc = builder.build(URL)
>
> At the last line everyting stops.
>
> Does anyone have an answer to this problem?
It could be a bug in "request.getContextPath()"... I'll check that out.
Pier