ky schrieb:
> Thanks for the tip; I am calling getClass().getResourceAsStream
> ("config.txt") from ServiceImpl.java in the server package. It works
> when I put config.txt in the server package, but I was hoping to put
> it in the war in the same place as the main .html file, on the same
> level where /WEB-INF resides.
Why do you want to place a server-side configuration file into a
world accessible folder? Everyone is able to download it with their
browser by simply entering the corresponding URL.
If your configuration file contains private data like DB authenti-
cation informations you will end up in the list of defaced/hacked
sites on hacker congresses, like the one reported at
http://www.heise.de/newsticker/meldung/26C3-Flirtboerse-der-rechten-Szene-gehackt-893403.html
where a dating site (for nazis) now has thousands of "external
backups" of their backend database. Hackers already cracked many
passwords stored in the database whery many were also used for the
webmailer many of these people are using...
> If I try getClass().getResourceAsStream
> ("/config.txt") however, I get a null. Any idea what I might be doing
> wrong?
getResourceAsStreams checks all locations specified in the classpath,
the base-directory of the war-file isn't part of it.
Regards, Lothar
--
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.