Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8242141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:04:09+00:00 2026-06-07T21:04:09+00:00

How do I set up gwt to use my custom css for the makeup

  • 0

How do I set up gwt to use my custom css for the makeup ?
These links didn’t help me at all:
https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCss?hl=cs
http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/GettingStartedStyle#Default_styles

  • The issue is that I can’t get gwt to detect the css files I declare in my lorum.gwt.xml file, when I start debug mode jetty gives the following error in log output on startup:

:

 00:00:00.811  [WARN] 404 - GET /lorum/stylesheet.css (127.0.0.1) 1418 bytes
          00:00:00.811  [INFO] Request headers
            00:00:00.811  [INFO] Host: 127.0.0.1:8888
            00:00:00.811  [INFO] Connection: keep-alive
            00:00:00.811  [INFO] User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.168 Chrome/18.0.1025.168 Safari/535.19
            00:00:00.811  [INFO] Accept: text/css,*/*;q=0.1
            00:00:00.811  [INFO] Referer: http://127.0.0.1:8888/Home.html?gwt.codesvr=127.0.0.1:9997
            00:00:00.812  [INFO] Accept-Encoding: gzip,deflate,sdch
            00:00:00.812  [INFO] Accept-Language: en-US,en;q=0.8
            00:00:00.812  [INFO] Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
            00:00:00.812  [INFO] Cookie: JSESSIONID=ywoku1zfjs0b
          00:00:00.812  [INFO] Response headers
            00:00:00.812  [INFO] Content-Type: text/html; charset=iso-8859-1
            00:00:00.812  

And it doesn’t load my css.

lorum.gwt.xml source:

l version="1.0" encoding="UTF-8"?>
<module rename-to='lorum'>
    <!-- Inherit the core Web Toolkit stuff.                        -->
    <inherits name='com.google.gwt.user.User'/>
    <inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
    <inherits name="com.google.gwt.resources.Resources" />
    <inherits name="com.company.lorum.gwt.client.stylesheet.css"/>
    <entry-point class='com.company.lorum.gwt.client.LoadModuleLorum'/>

    <stylesheet src='stylesheet.css' />

    <servlet path="/AuthenticationImpl" class="com.company.lorum.gwt.server.implementations.AuthenticationServiceImpl" />
    <servlet path="/GeneralImpl" class="com.company.lorum.gwt.server.implementations.GeneralServiceImpl" />
    <servlet path="/ProjectImpl" class="com.company.lorum.gwt.server.implementations.ProjectServiceImpl" />
</module>
  • I tried inherriting my css file in the welcome-file (Home.html), which works; but it doesn’t apply the style rules to my widgets. And I don’t prefer this method since different browsers act differently on css syntax. Altough if you know how I get it to work I will use it. This is my Home.html source

:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf8"/>
    <link href="stylesheet.css" rel="stylesheet" type="text/css">
    <title>lorum</title>
</head>
<body>
<script language="javascript" src="lorum/lorum.nocache.js"></script>
</body>
</html>

CSS (stylesheet.css) source (its simple because I just want to test if it works):

.gwt-MenuBar {
color:green;
}
.gwt-Button {
font-size: 200%;
}

Sub question:
Where do I have to store my css file in order for my lorum.gwt.xml file to detect and use it using the following syntax: <stylesheet src='stylesheet.css' />

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:04:11+00:00Added an answer on June 7, 2026 at 9:04 pm

    This worked for me, I am not going to vote for my own answer, only if it is verified by other people that this solution also works for them.

    It actually is fairly simple to achieve in 2 simple steps.


    Step 1.
    put your stylesheet (css) file in your webapp folder


    Step 2.
    Add the following line to your gwt.xml file:

    <stylesheet src='/yourstylesheetname.css' />
    

    NOTE: put this line between the last inherit decleration and your entry point decleration.


    EXTRA:
    My gwt.xml source:

    <?xml version="1.0" encoding="UTF-8"?>
    <module rename-to='lorum'>
        <inherits name='com.google.gwt.user.User'/>
        <inherits name='com.google.gwt.user.theme.chrome.Chrome'/>
        <inherits name="com.google.gwt.resources.Resources" />
    
        <stylesheet src='/customsheet.css' />
    
        <entry-point class='com.company.lorum.gwt.client.LoadModuleLorum'/>
    
        <servlet path="/AuthenticationImpl" class="com.company.lorum.gwt.server.implementations.AuthenticationServiceImpl" />
        <servlet path="/GeneralImpl" class="com.company.lorum.gwt.server.implementations.GeneralServiceImpl" />
        <servlet path="/ProjectImpl" class="com.company.lorum.gwt.server.implementations.ProjectServiceImpl" />
    </module> 
    

    Project tree

    java     __ com __ company __ lorum __ gwt __ client __ **
                                               __ server __ **
                                               __ shared __ **
                                               __ Lorum.gwt.xml
    resources__ **
    webapp   __ WebFiles __ **
             __ WEB-INF  __ **
             __ Home.html
             __ mystylesheet.css
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use smart Gwt, Listgrid. I am using both com.google.gwt.user.client.ui and
I want to define a set of CSS rules for my FlexTable in GWT.
I am trying to set a custom style to a GWT CellBrowser widget using
I'm trying to set up and use Mockito into a GWT project, and I'm
I use Eclipse for everything. Python, Django, GWT, Android... But when you install all
Do you have any suggestions of graphing libraries to use with a GWT project?
We are using GWT & GWTP with UiBinder and I want to use properties
I have a GWT web-app with a nearly full page Google map window. Inside
I am updating an existing project from GWT 1.5.2 to GWT 2.0.0. We use
We decided to use gwt modules in our application about 1 week ago. We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.