WTP HTTP Preview server - How can I re-configure default server port?

Steel Plume picture Steel Plume · Apr 12, 2009 · Viewed 26.1k times · Source

Under Eclipse Ganymede how can I re-configure the default server port (8080) of the Eclipse WTP "HTTP Preview Server"?

@Leonel

I suppose you never saw the "view" linked to this question, I asked "HTTP Preview Server", not other server views where the port is obviously visible between any other settable option ;-) otherwise I would not have asked on StackOverflow if the real problem was only to search between form settings

@Leonel

Tnx for your reliability, it's not a common virtue in these days ;), in fact as read I'd like to know if there is some hidden configurable param :p

Answer

Andres Rios picture Andres Rios · Nov 10, 2009

HTTP and J2EE Preview servers can be used as well, but as you have discovered, there isn't any UI to change the port used if there is a conflict. However, you can change it manually.

  1. Go into your workspace directory and open the file .metadata.plugins\org.eclipse.wst.server.core\servers.xml into a text editor or using File > Open File... in Eclipse.
  2. Find the <server> element for the Preview server in question and add a port attribute, e.g. port="8181".
  3. Restart Eclipse to pickup the change.