aspose file tools*
The moose likes GWT and the fly likes on using GWT.getHostPageBaseURL() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "on using GWT.getHostPageBaseURL()" Watch "on using GWT.getHostPageBaseURL()" New topic
Author

on using GWT.getHostPageBaseURL()

christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
Hello,

I'm using GWT.getHostPageBaseURL() to access a file in my server, right now, what i deploy is the war file containing my folder docsFromUpload.

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ipres\docsFromUpload


I access the files inside using this:



But the directory changed such that my docsFromUpload is now outside (one level higher) of my deployed war file, may I know how I can still access filename.doc? Using the code above, I can't seem to reach filename.doc in this directory:

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\docsFromUpload


Thank you in advance!

Regards!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9993
    
    7

Not sure about this but did you try out somePath/../stuff?
I am not even sure this will work. Does the servlet container allow you to touch stuff outside your deployed app?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
Hello,

Yes, I have permission to touch other folders outside the deployed app. I was wondering, what do you mean by somePath/../stuff, this is how I "save" to the said folder one level up, but I don't know how to view these files from my system given that when I use GWT.getHostPageBaseURL(), what I get is http://localhost:8080/_____.file, if I use this, the system can't find the files specified, does this mean that i have to put an absolute path instead? because I'm trying to avoid this.

Thanks.

Regards,

Chris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: on using GWT.getHostPageBaseURL()
 
Similar Threads
please help! classpath not working
Request Resource not available.
Compiling java file
Servlets and relative file path io
Using External style sheet to include background image in JSP