Gracias Jeffrey ;) So, as I've understood, the best thing is to check
if application is executing in production mode, and if not, use
GWT.getServletContext().getRealPath("my_app"), right?Thank you very much! Cheers!! On 7 nov, 14:59, Jeffrey Chimene <[email protected]> wrote: > On 11/6/2011 11:23 PM,Sabbiawrote: > > > > > > > > > > > Hi everyone! > > > I've developed a GWT-SmartGWT application using Eclipse. In this > > application, a Java class from the server side must read some txt > > files in a directory called "Transcriptions". Working with Eclipse, I > > had no problem at all to access to this directory. I had located it > > under the WAR directory, so every time I needed to read a file I had > > only to write "File f = new File('Transcriptions');". > > > But when I've deployed it into Tomcat, I can't access to my directory > > in this way anymore, because the default path of Tomcat is "webapps". > > So, I need to access to the transcriptions directory using a relative > > path. And here is my problem. I don't know where to locate this > > directory, and I don't know how to access it. > > > I had thought of using the GWT.getModuleName() method, but because of > > I have to use it in the server side, I can't use any of the methods of > > GWT class. > > > I've been trying to solve it in the last week, but I've not been able > > to do it. > > > Can anyone help me, please? Thank you very, very much in advance > > > Greetings! > > I'd use a two string Resources, one for production and one for test. > Check the environment using > GWT.isProdMode()http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/googl...() > > Bueno Suerte, > jec -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
