Hello,
I am running Tomcat 4.1 on Windows 2000 as a service.
I have written a JSP page where in I am trying to read an XML. If I try
to access the file using absolute path, for eg. c:\abc\xyz.xml, the page
works without any problem. But if i try to access it thru relative path, for
eg.
Hello,
maybe you could save the absolute path inside a properties file
or pass it as an init parameter in web.xml. For each location of
your app you would have to set this path appropriately. You
could use absolute paths and wouldn't need to change the source
code of the application.
I think you could store it in WEB-INF and use
ServletContext.getRealPath(/WEB-INF).
Andreas Probst [EMAIL PROTECTED] wrote on 21.11.2002 12:19:51:
Hello,
maybe you could save the absolute path inside a properties file
or pass it as an init parameter in web.xml. For each location of
,
Harsha
-Original Message-
From: Andreas Probst [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 17:50
To: Tomcat Users List
Subject: Re: File Path Problem...
Hello,
maybe you could save the absolute path inside a properties file
or pass it as an init parameter in web.xml
. It may be deployed on win32 machines or Solarix machines or Linux
machines... :(
Any more ideas...
Regards,
Harsha
-Original Message-
From: Andreas Probst [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 17:50
To: Tomcat Users List
Subject: Re: File Path Problem...
Hello,
maybe
under Web-inf directory as jetspeed does.
thanks
bharani.
-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 5:40 PM
To: Tomcat Users List
Subject: Re[4]: file path problem
Hello Bharanidharan,
Ah, I didn't see that before.
You don't want
Hi all,
I have my login servlet under
webapp/jetspeed/web-inf/classes/myservlets/login.class. I invoke a
loggedin.html from this servlet. loggedin.html is located under
webapps/jetspeed/myhtml/loggedin.html. so in my servlet, i gave
window.open(../../../myhtml/loggedin.html);.
Hello Bharanidharan,
Don't confuse the system file path with the URL path.
What URL is in your browser on the page that contains the
window.open()?
window.open will try to find the page relative to your domain root.
If you are at:
http://www.myserver.com/mywebapp/servlet/myservlets.login
jack,
you are right.. i wasnt using url path.. it works fine now..
i appreciate your help..
thanks
bharani
-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 1:08 PM
To: Tomcat Users List
Subject: Re: file path problem
Hello
-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 1:08 PM
To: Tomcat Users List
Subject: Re: file path problem
Hello Bharanidharan,
Don't confuse the system file path with the URL path.
What URL is in your browser on the page that contains the
window.open()?
window.open
to comprehend the url path.
MB thanks
MB bharani
MB -Original Message-
MB From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
MB Sent: Monday, May 06, 2002 1:08 PM
MB To: Tomcat Users List
MB Subject: Re: file path problem
MB Hello Bharanidharan,
MB Don't confuse the system file path with the URL
unable to comprehend the url path.
MB thanks
MB bharani
MB -Original Message-
MB From: Jacob Kjome [mailto:[EMAIL PROTECTED]]
MB Sent: Monday, May 06, 2002 1:08 PM
MB To: Tomcat Users List
MB Subject: Re: file path problem
MB Hello Bharanidharan,
MB Don't confuse the system file path
:[EMAIL PROTECTED]]
MB Sent: Monday, May 06, 2002 3:52 PM
MB To: Tomcat Users List
MB Subject: Re[2]: file path problem
MB Hello Bharanidharan,
MB /servlet/ is a mapping provided for you by Tomcat. In fact, take a
MB look in the web.xml in $TOMCAT_HOME/conf and look for that mapping:
MB
13 matches
Mail list logo