Restart Jetty through Eclipse - eclipse

I'm new to Eclipse and Google App Engine development.
I am unable to refresh my localhost to display changes in my code. Clicking Run doesn't seem to rebuild it. I can't find the option to refresh the server in the Eclipse IDE to reflect the changes.
Refreshing the browser / clearing my browser cache doesn't work, so it's clearly server side.

At first you should stop launched application -> red rectangle in console window. After that click at the top menu Project -> Clean. Choose your project and set check box "Start build immediatly" if it present. Then run again your project and see your changes.

Related

LibGDX's HTML project doesn't show anything in Browser

The question is self explanatory, when I run my demo-html project as a Web Application and I open Chrome with the provided link by eclipse, my browser doesn't show the image it is supposed to show in a new project.. However, the tab displays the correct title "Demo". Can somebody help me with this?
Eclipse after Running the project:
And Chrome running the app:
You don't run it as web application. The simplest way is to run
gradle html:superDev
in command line. I'm not very familiar with Eclipse, so here a guide how to run it via IDE from the wiki:
Right click the html project, Run As -> External Tools Configuration. Create a new configuration by double clicking the Program entry in the left sidebar. Give the configuration a name, e.g. GWT SuperDev. Set the location field to the gradlew.bat (Windows) or gradlew (Linux, Mac) file. Set the working directory to the root folder of your project. Specify html:superDev as the Argument. Press 'Apply', then 'Run'. Wait until you see the message The code server is ready. in the console view, then open the URL http://localhost:8080/html. You can leave the server running. If you change code or assets, simply click the SuperDev Refresh button in the browser. This will recompile your app and reload the site.
In IntelliJ you can trivially run the gradle task itself.

Debug GWT application on server side

I want to know how to debug the GWT application on server side. I am using eclipse and GWT default server. I run my application by right click and run as web application. I tried to use System.out.println and it didn't work.
If you use the embedded server of DevMode, then it works just like for client-side: Debug as… ⇒ Web Application then set your breakpoints (either client-side or server-side, they run in the same JVM).
When you change your server-side code, Eclipse will recompile it on-the-fly (unless you disabled it, in which case you'll have to explicitly build your project) into your WEB-INF/classes (this is what the GPE should configure), then hit the "reload" button on the DevMode view in Eclipse (the two yellow arrows). The next call from the client to server will use the new server code (without the need to reload the app in the browser).
If Eclipse proposes to hot-swap the code on change, you can say "no".
Follow the below steps to run in debug mode.
Right click on the project -> Debug As -> Web application
OR you can follow below steps also.
Click on Debug As.. as shown in toolbar of Eclipse -> Debug configuration -> Debug

Clearing Eclipse's 'application cache' when performing launch (Run/Debug) for Eclipse Application

I have an RCP project in Eclipse which I launch as an 'Eclipse Application'. After launching and playing with the application, I close it, make some more code modifications and launch again. When I launch the second time, the same changes in the application (tabs opened, fields highlighted...) remain the same as my previous launch. How can I get the Eclipse Application launcher to completely forget my previous run. I am already performing Project > Clean, and running Eclipse with -clean. I would like my 'eclipse application cache' to be cleaned for every run of the code.
On the Run/Debug Configurations dialog, choose the configuration you want to change, go to Main tab, check the Clear checkbox inside Workspace Data group and select the workspace radio button. Uncheck Ask for confirmation before clearing if you wish.

Eclipse: Apache Tomcat doesn't update my project until I restarted Eclipse

I have tested my a simple form.html. I change something on here, and right click on project, run on server. My server (Apache Tomcat) will run my project.
But, I don't know why, it rarely update my project. (mean form.html no change !!!) until I restart eclipse and run project again.
Maybe the strange thing is : no message box appear asked me: "Do you want to restart server" like before. But I have config in Eclipse that "always restarted server when required" to "always". But, after I change something like some space in form.html, I just see that Eclipse save and run project. (not stop and start server again). Maybe the problem here !!!
(before that, I have clicked that not restart server, and remember this action), but I don't know how to config again for this
Thanks :)
Open the "Server" view and doubleclick on your server. Check the server location and deploy path. Open the publish tab and make sure "automatically publish when resource changes" is selected. Static resources will be hot deployed and there's no need to restart the server.
You can always republish resources by clicking your servers name in the Server view and then clicking the icon to the very right (in the header), Ctrl+Alt+P.
The "restart server" function can be modified here: window > prefereces > server > launching.

Stop Eclipse restarting my web app on file save

I'm creating a JSF/Facelets web app in Eclipse. I've configured my project to use a Tomcat (6.0) server that is started/stopped by Eclipse.
Whenever I save a file (eg .xhtml) Eclipse restarts the app, trashing my HTTP session. This is annoying, because I'm frequently updating my .xhtml files, and the app doesn't need restarting to detect the changes.
Is there a way to stop Eclipse restarting the app? Specifically, can I configure Eclipse to only restart the app when I save files of a certain type?
In the server View, double click on your Tomcat instance.
This will open the properties of your Tomcat server.
As I am not sure of which parameter will help you to solve your problem, check the following options in the latter view:
Automatic Publishing, option "Override default settings" selected, 1 second for the publishing interval.
In server options, uncheck options "Server modules without publishing" and "publish module contexts to separate XML files".
In the modules tab, for each modules deployed, check that Auto Reload is enabled.
Hope this will help you.
I have always used this and it works fine for me. The context is reloaded only when you change classes or the web descriptor.
In your project structure where you keep .xhtml files which makes eclipse reload the context on changing?
This can happen if you have a builder in Eclipse set to deploy on save. Right click on your project -> properties -> builders
Turn off "Build Automatically"