Maksim Dmitriev
Maksim Dmitriev

Reputation: 6209

Eclipse Web Application Project. Introduced CSS properties doesn't work

I created a new Web Application Project. But if I edit my war/Sandbox_Project.css, the localhost:8080/Sandbox_Project web page isn't affected. E.g., if I add a new property body and some values, there is no effect. But if I change automatically added example properties, everything works.

Automatically added when creating the project. It works.

h1 {
    font-size: 2em;
    font-weight: bold;
    color: #777777;
    margin: 40px 0px 70px;
    text-align: center;
    background: fuchsia; // I added it
}

.sendButton {
    display: block;
    font-size: 16pt;
    font-style: italic; // I added it
} 

I added this property and it doesn't work.

body {
    background: green;
}

Upvotes: 0

Views: 486

Answers (2)

iConnor
iConnor

Reputation: 20189

Here are some things you can try.

  1. Clear your cache & try again.
  2. Rename your CSS File
  3. !important may be worth a try.
  4. Edit your CSS file then make sure that the changes are in the file linked to your page
  5. Create a new css file, link it up then try again.
  6. Use chrome dev tools to see whats going on.

Try this

body{
   background: #FF0 !important; // Just to see if it works.
}

#Dev Tools Steps

  • Open Chrome dev tools (i use F12)
  • Right click on the body and click inspect element.
  • Look at the css panel to see whats going on.
  • if the background color is crossed out then something else is over-riding it
  • else it's more than likely a cache issue.
  • Rename your css file. or you can add something like this to your url /something.css?this=renameIngYourCSSFile

By trying all of this you should get some idea of what's going on.

Upvotes: 1

maqjav
maqjav

Reputation: 2434

If you are working with GWT and JBoss, I suggest you to use the plugin JBoss GWT Integration in the package JBoss Tools, that will help you to create a normal Web application project but using GWT.

Here you have information about how to make it: Create a project with GWT + JBoss

If you don't use this plugin, you will have to move the content from the war folder to the WebContent folder in order to make it work in localhost, or copy your war directory into the webapp folder of your server.

Upvotes: 0

Related Questions