Problems to get started with VAADIN

Hi all,…

hopefully someone can help me.

I am a absolutely beginner with JSP / Vaadin, etc.

Background: We got a infrastructure portal written in php which we wrote during the last years.
Now it is my task to rewrite it in Java and we decided to use VAADIN.

But actually I got beginners problems .

a) Each time when I change my source code, I need to restart eclipse to get the changes on the tomcat website? How can I solve this?

b) If eclipse is closed, “http://localhost:8080/testProject/” is not longer available. How can I deploy it permanently? Actually I deploy it using the tomcat interface. But would like to have a functionality in eclipse to deploy.

c) Themes… Would like to use the reeinder theme. But it is not installed in [quote]
…/WebContent/VAADIN/themes/
[/quote]. How can I install it there?

d) Themes… Due to missing the default themes, I tried to make my own, and stored a css file in /WebContent/VAADIN/themes/TestTheme/styles.css. But using setTheme("TestTheme"); always causes this message: NFO: Requested resource [VAADIN/themes/TestTheme/styles.css]
not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

Please help me getting started with VAADIN…

regards, Dirk from Germany.

ps: a screenshot from my eclipse project explorer:

Most of your issues stem from the same thing; you are expecting Java to work like PHP.

When running java for the web, you always need to have a server running; in your case it is tomcat. I would recommend using the tomcat and WTP plugins for eclipse, that will let you control the server and deployment directly from eclipse. Java Servlets are deployed in WAR files that contain all the files the application needs. using WTP, eclipse will manage this process for you. You just need to select which project you want to deploy to which server.

Even if you can’t see it, the reindeer theme is in that particular folder; it is served from the Vaadin jar file by Tomcat. The reason your theme didn’t work is because it has the wrong name (style vs styles).

So, try WTP first, den post back if you have further issues :slight_smile:

WTP did not solve my problem.
I still have to restart the whole eclipse to get the changes visible in internal browser.

Maybe the problem is that you are just reloading an already running application instance without its components being recreated with your new classes etc.

Try adding “?restartApplication” to the URL and reload the page.

Before launching the application after a source code modification, did you clean the module work directory by right clicking on you application in the server tab ?

Depending on the way your server is configured, cleaning is not always automatic.

cool, that was working,… I always click on [Run as]
→ [Run on Server]

Am I able to let eclipse add [?restartApplication]
on using [Run as]
→ [Run on Server]
?

where can I configure that it automatically cleans ?

Bonjour,
I do not know how to force automatic cleaning of the working directory.
Automatic cleaning is supposed to be the default behavior. But I noticed that one and only one of my web projects, requires tthat I manually perform a cleaning of its working directory.
All my project use the same eclipse and tomcat server.

à bientôt,

Bonjour,…

it’s a mysterious behavior… From yesterday it works fine. But I did not change anything on the same project.

Regards.

Hey Ranjit,

I’d recommend starting here:
https://vaadin.com/book/-/page/intro.html