Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

relative path from within a bean?

 
Ronnie Bertino
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 209
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try putting your xml inside the webapp. You will have relative path.
 
Ronnie Bertino
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, that�s exactl what I did--I�ll look some more :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic