Java – can I start / stop Tomcat using the keyboard shortcut in eclipse?
I tried to make eclipse as mouse - free as possible I can't find the key binding for quick start and stop server in eclipse WTP (Web Tools Platform)
One way to start the server is to switch to the package browser (ALT CMD q p), select the project (up / down arrow), and then select debug on server – key binding (shift ALT d r on MAC) But it takes too many steps
Solution
I've found a way to reduce the number of keystrokes to boot the server (after some simple initial setup)
Doctor: F11, enter
You may need to make some settings to make it work:
Make sure you have a run / debug configuration defined for Tomcat
>Click the Run menu at the top of the window > Click debug configuration... > select Apache Tomcat from the menu on the left > if you have not defined a server, click new startup configuration (upper left corner), and then select the correct server from the selection menu in the right pane (you must have defined a tomcat server in the server view)
>Save all this, return to the file in the project, and press F11 (the desired key is preferred)
>If you receive an error message saying "no code can be found to execute on the server", you either dirty the first step, or your server may already be running
>A dialog box pops up, and the preference is "run on server" Press enter (this is the second key) > if this is your first time, you will see another dialog box asking you to select a server Select the server on which you want to run it (you may only have one), and check "always use this server when running this project" and bypass this window in the future
Tip: you will soon notice that as a bonus, it will open a web browser pointing to your server You can change the browser used in windows - > Preferences - > General - > Web browser
Then you have it Start your server with two keys – F11, enter
Stop it is another story I haven't found a good way except to click the stop icon in the server or console If you do, let me know