css file in gwt.xml

1,271 views
Skip to first unread message

Meera

unread,
Apr 6, 2010, 3:52:52 PM4/6/10
to Google Web Toolkit
Hi,

I am new to GWT. I am looking at the stockwatcher example in google
gwt tutorial.

I have StockWatcher.css in war folder and I am trying to use this .css
in gwt.xml module file.

For some reason it is not reading the css file from gwt.xml file. If I
refer the file from host page (.html) it works fine.

I am not sure what I am doing wrong.

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='stockwatcher'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->

<inherits name='com.google.gwt.user.theme.standard.Standard'>
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->


<!-- Specify the app entry point class. -->
<entry-point
class='com.google.gwt.sample.stockwatcher.client.StockWatcher'/>

<!-- Specify the application specific style sheet. --
>
<stylesheet src='StockWatcher.css' />

</module>


thank you

Sheldon Hicks

unread,
Apr 19, 2010, 3:49:29 PM4/19/10
to Google Web Toolkit
I'm in the process of upgrading some GWT 1.5 apps to 2.0 and noticed
the same thing in the tutorial. If you want to reference the css file
in the module xml file instead of the html file, you still need to
create a folder called 'public' in the same directory as your module
xml file and stick your css file in there. Your package will look like
this:

- com.google.gwt.sample.stockwatcher
+ client
+ server
+ shared
- public
|- StockWatcher.css
- StockWatcher.gwt.xml

When you compile or run the app in dev mode the css file will be
copied to the /war/stockwatcher directory with the other generated
files.

On Apr 6, 5:52 pm, Meera <meera.sha...@gmail.com> wrote:
> Hi,
>
> I am new to GWT. I am looking at the stockwatcher example in google
> gwt tutorial.
>
> I have StockWatcher.cssin war folder and I am trying to use this .css
> in gwt.xmlmodulefile.
>
> For some reason it is not reading thecssfile from gwt.xmlfile. If I
> refer the file from host page (.html) it works fine.
>
> I am not sure what I am doing wrong.
>
> <?xmlversion="1.0" encoding="UTF-8"?>
> <modulerename-to='stockwatcher'>
>   <!-- Inherit the core Web Toolkit stuff.                        -->
>   <inherits name='com.google.gwt.user.User'/>
>
>   <!-- Inherit the default GWT style sheet.  You can change       -->
>   <!-- the theme of your GWT application by uncommenting          -->
>   <!-- any one of the following lines.                            -->
>
>   <inherits name='com.google.gwt.user.theme.standard.Standard'>
>   <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
>   <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->
>
>   <!-- Specify the app entry point class.                         -->
>   <entry-point
> class='com.google.gwt.sample.stockwatcher.client.StockWatcher'/>
>
>     <!-- Specify the application specific style sheet.              --
>
>  <stylesheet src='StockWatcher.css' />
>
>  </module>
>
> thank you

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Reply all
Reply to author
Forward
0 new messages