Why tomcat server location property is greyed in Eclipse - java

I want to change server location but I can't it's greyed (I cannot select last radio button) how can I do it then:

On the Servers view, delete all the webapps published under your server (right click on the server > Remove or right click on the server > Add and Remove and then remove manually the webapps) and finally right click on the server > Publish (the 'empty' content). This way you would un-gray the Server Locations area.

As the dialog says : "Server must be published with no modules present to make changes."
Stop the server remove any modules. After that the options will be enabled.

One way to change the server location is by doing the following steps:
1)Right click on the Server(Example Tomcat server).
2)Go to Properties.
3)Click on "Switch Location" , in the "General" tab.
4)The "Location" information changes.
5)Now go back and the settings will be enabled to change the Server Locations

If you are still dont see the option enabled, start the tomcat and then it will be enabled.

Related

How do I get rid of the below stated issue when I try to add tomcat to Spring Tool suite in Ubuntu?

I am trying to add Tomcat server in to STS but I do am not able to do it. Some times the server name doesn't appear when I try to add Tomcat by selecting it from the list, I can't type in the server name myself as well and If that step works properly (I mean when the serve name appears automatically which it should when server is selected form the list); the Finished button is grayed out in the resource page which is the last step in adding the Tomcat server to STS.
Close Eclipse
In {workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings delete the following two files:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
Restart Eclipse
this is actually a bug.
got this from this question actually Eclipse add Tomcat 7 blank server name

How do I stop Eclipse (STS) from creating a new runtime configuration every time I start a server

I'm using Spring Tool Suite (rejiggered eclipse) and for some reason, occasionally when I start a server (servers view pane, right click, start), instead of using the runtime configuration I've edited (specifically, with new VM args, e.g. -Xmx1234g, -Dlog4j.doAThing=true etc), it will generate a new runtime configuration (so instead of Server-Name, it will run Server-Name(1), or if that already exists Server-Name(2)) with defaults and run that instead. It's more irritating than anything, but I'd like to find out what the cause might be and fix it instead of just tolerating it running wrong.
Rather than right clicking on the server and selecting Run, try clicking Run -> Run Configurations... from the menu bar at the top of the screen and then find and run the server from there. Alternatively there is a green run button on the tool bars with a small down arrow next to it. There should probably be a launch option for the server shown there.
I have the default config called
The following worked for me:
Created config called X copied VM args from , copied User Entries JARs on the Classpath tab. Launched the config to verify it is working
Removed config . Only have X left
Now launching server from the Servers view launches my config X
Perhaps Classpath tab User Entries are not matchi

Eclipse Tomcat not Updating

I am developing an application with SpringMVC and Tomcat using Eclipse. The problem is: the server does not update the changes I am making.
One example:
#RequestMapping(value = "test", method = RequestMethod.GET)
public ModelAndView test(){
ModelAndView mv = new ModelAndView("test");
System.out.println("test");
return mv;
}
Every time I hit the mapped url, Eclipse prints test in my console. If I comment out the println, I get the same result.
Attempts to fix the problem:
clean Tomcat directory
restart the server
close Eclipse
add/remove the project in the Server tab
delete the JSP the method is using
different browsers
All to no effect. It just looks like Tomcat is not updating any changes I make in the code.
To make Eclipse Tomcat update automatically or hot deploy you have to make certain changes in server configuration:
Below are the steps:
Double clicks on the Tomcat Server, refer to "publishing" tab in the "Overview" view, make sure "Automatically publish when resources change" is selected. This should be the default option, to support “hot deploy” resources, for example : JSP, XML and properties files.
In the Tomcat Plugin page, click on the "Modules" view, Select the Module then click on Edit button and make sure "Auto Reload" is "Disabled". Default is enabled.
Start Project in DEBUG mode. Hot Deploy is supported in DEBUG mode only.
Two more things to check:
deploy directory: in the tomcat server UI and according to "deploy path" configuration, check that the output directory has read/write access (you could also remove it and try to publish again : check expected output resources/classes).
deployment assembly: in project properties menu; in the "deployment assembly" section, check that you are publishing all wanted resources. For example, in my case I download/generate some items from maven custom plugin phase and this resources are not published by default. I had to add some target subdirectories here...
I had roughly the same problem and after tried it all with no success I gave up, created another fresh workspace and the problem was gone. Not the ideal solution but hey, it's an option.

Tomcat doesn't update until I restarted Eclipse

i have problem with tomcat. when i change something in my xhtml file, tomcat can not show the changes. it shows the page before changing. i restart the tomcat,i clean tomcat work directory, right click on server and select clean, but i have to restart the eclipse to see the result. i search in google but i could not find which setting i should do in tomcat to solve the problem.in publish tab i selected "automatically publish when resource changes" .
please help me. i have to restart eclipse for each changing.
Please be sure your XHTML file is not being cached by your browser. Try a forced refresh (on Firefox, press Shift+Refresh Button or Command+Refresh on Mac).
You might also try to configure Tomcat context to disable caching for static resources as documented in the Apache Tomcat Configuration Reference. Set the cachingAllowed property to false (default is true).
Check HTTP headers using Firebug. See what you is in the HTTP response: HTTP response code, Cache-Control and Expires headers.
Like #Sam said, make sure that your files are not being cached by your browser. On Mac (Command + R) Firefox and Chrome (Shift + F5).
If this does not work, double click the server on Eclipse and go to the Publishing tab. Make sure that it is set to Automatically publish when resources change.

Eclipse still using http.proxyHost settings when no longer set

I'm dealing with the same sort of problem as "Zombie http.proxyHost settings for JVM on OSX" except I'm on Kubuntu 8.04 and Eclipse 3.4.2. I had to use a proxy for work but have migrated off it. I've reset everything in my environment I can find inside and outside Eclipse to get rid of setting the proxy. However when I try to use the Software Update feature I find it's still using the proxy. In the error log I can see:
!ENTRY org.eclipse.core.net 1 0 2009-03-17 10:49:50.137 !MESSAGE System property http.proxyHost has been set to netproxy.blah.com by an external source. This value will be overwritten using the values from the preferences
!ENTRY org.eclipse.core.net 1 0 2009-03-17 10:49:50.164 !MESSAGE System property http.proxyPort has been set to 3128 by an external source. This value will be overwritten using the values from the preferences
Any ideas as to what the external source might be that's setting this property?
It's a bug in the preferences panel. You can see it if you tail your workspace/.metadata/.log file.
The workaround (at least in Eclipse 3.4.2) is:
Open Window > Preferences, then General > Network Connections
Select Manual proxy configuration
Click the Add Host... button to add a 'No Proxy' entry
Enter a random entry, say 'localhost' and click OK
Click Direct connection to the Internet
Close the property panel with the OK button.
Or go to your eclipse.ini file and check if there are some parameters like :
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=myproxy
-Dhttp.proxyUser=mydomain\myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.nonProxyHosts=localhost|127.0.0.1
OR same parameters but the first one finishes in 4 like below:
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
Since release of Eclipse Kepler (4.3)
With this parameters you can disable the HttpClient provider and have ECF use the JRE URLConnection-based provider instead(line 1). And set proxy settings.
I remember I had a similar problem with the mantis mylyn connector. I don't remember where exactly the entry was, but I think somewhere in the metadata folder of your workspace was an option file for this particualar plugin. Maybe something similar exists for your problem.
On a windows system I've already found eclipse settings in the application folder of the users home directory. Not sure though how this is handled on Ubuntu... it's been a while.
Worst case you could just install another eclipse instance and see if that works. Although if the config file responsible for this problem is not somewhere in the eclipse folder, you'll still have the same problem.
At least you'll have a hint about where it is - eclipse folder, workspace or system setting in home folder.
Greetings and good luck!

Categories