Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to stop Eclipse browser from displaying web page upon restarting tomcat?

The old eclipse bug which is very annoying for me.

The situation: I stop tomcat server => run web application again => get browser window. The problem is that browser window is displayed earlier before the redeployment process finishes itself, so whenever I try to close the browser window(since I prefer to open web application in standard browser since the native is laggy and slow) in that short interval, my Eclipse hangs with error message window:

Script Error: An error has occurred in the script on this page

Line: 1

Char: 1

Error: Unspecified error

URL: about:blank

Do you want to continue running scripts on this page?

Yes No

The problem is that application hangs plus the window is inactive and I can't make this window active.

To fix this I have to end the process and shutdown tomcat manually on .bat. This is very annoying when you repeat this around ten times a day.

It doesnt happen if I wait till the application is completely redeployed, but I have habit of working fast, so eventually I close the window again before redeployment.

The help could be either in:

  1. how to forbid eclipse showing browser window tab when web application is redeployed?

  2. or how to fix this error?

Thank You guys,

like image 452
Aubergine Avatar asked Jan 06 '12 02:01

Aubergine


People also ask

How to restart Tomcat server in Eclipse?

Also, when I need to restart Tomcat I need to stop it first by clicking on stop button. Then there is CTRL+F11 shortcut.

How do I know if Tomcat is running in Eclipse?

Go to the project in the Project Explorer, select the web project, right click and select "Run As", you will see Apache Tomcat, create runtime configuration for the web project by selecting "New" button.

How do I start an Eclipse server?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.


1 Answers

Aubergine, I've had the same experience as you. Here's one answer for selecting the external browser:

You can choose another browser as your default by changing preferences in Eclipse. Select Window > Preferences > General > Web Browser. Now choose the option "Use External Web Browser", and check the checkbox for the browser you use in the box belowenter image description here.

like image 114
MAbraham1 Avatar answered Sep 30 '22 05:09

MAbraham1