File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes relative path from within a bean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "relative path from within a bean?" Watch "relative path from within a bean?" New topic
Author

relative path from within a bean?

Ronnie Bertino
Greenhorn

Joined: Nov 13, 2002
Posts: 3
Hi all!
I have a problem and I was hoping someone in here could help me out;
I am developing a webapplication where my JSP pages make use of various beans. Yesterday I was changing all absolute paths in my JSP-pages and servlets into relative paths so I could easily port my application to any other directory, and I did exactly that to see if everything worked like I wanted it to.
Only, I forgot to change one path in a bean I am using.
Right now this bean is using
"C:\development\projects\zorgpad.xml"
as a path towards a xml file it needs to parse. But I want it to change into something like
"\zorgpad.xml",
just like I did with all the paths in my jsp-pages..
I hope everything I�ve written is kind of understandable :-)
Thanks in advance!
Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
try putting your xml inside the webapp. You will have relative path.
Ronnie Bertino
Greenhorn

Joined: Nov 13, 2002
Posts: 3
hmm, that�s exactl what I did--I�ll look some more :-)
 
wood burning stoves
 
subject: relative path from within a bean?
 
Similar Threads
about accesing js function in JSP
servlet mapping
file separators
Getting out of WEB-INF
getDispatcher().forward()