for properties on the clientSide :
you should take a look at Messages
(com.google.gwt.i18n.client.Messages)
you'll need to have an interface that extends Messages
and a .properties file for the values

for example

----- CommonMessages.java

import com.google.gwt.i18n.client.Messages;
public interface CommonMessages extends Messages {
        String usernameLabel();

        @Key("field.password.minLength")
        @DefaultMessage("6")
        String passwordMinLength();

        @Key("err.field.empty")
        String fieldEmpty(String param);
}

---- CommonMessages.properties
usernameLabel=Username
field.password.minLength=6
err.field.empty= Field "{0}" is empty !

both the java and properties file should be in the clientside (so that
the gwt compiler would have acces to them)
and in the code
you would have
CommonMessages commonMessages = GWT.create(CommonMessages.class);

commonMessages.fieldEmpty("First name");
commonMessages.usernameLabel();

if you need acces to the properties from the server side then the only
way i think it's by having them returned by a RPC call

On Mar 14, 9:36 am, rjcarr <[email protected]> wrote:
> First of all, only classes in the server portion of your module have
> access to the web.xml file (since browser client's don't have access
> to the WEB-INF folder).
>
> So, assuming you're in the server portion, you can just open the file
> with, say, a FileInputStream.  However, I've been programming servlet
> for years and years and years and I've never once had to parse the
> web.xml file myself.  If you just want to get properties out of it
> you'll likely just want to use init parameters, or, if you need to
> look up servlets, you can use a named dispatcher.
>
> Good luck!
>
> On Mar 11, 11:16 am, tom <[email protected]> wrote:
>
>
>
> > Hi --
>
> > What class can I use to access the web.xml (properties & such) from my
> > GWT module?
>
> > Thanks!- Hide quoted text -
>
> - Show quoted text -

-- 
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.

Reply via email to