Eclipse Java EE preview port settings

Source: Internet
Author: User
Tags server port

How do I set up Eclipse's Java EE Preview Server port? Here is the eclipse Java EE Preview Server port setting method, come together to see it.

Eclipse java EE Preview Server Port Setup method

Recently, I wanted to test HTML5 in Eclipse, and struggled to build the service.

The system environment is Mac, using Eclipse is eclipse-jee-luna-sr1-macosx-cocoa-x86_64.tar.gz this version, the WTP component is integrated, then the problem comes, because just test the HTML, Do not want to take Tomcat (online search Eclipse HTTP server exclusively Tomcat tutorial, uh), I think the new Server is BASIC-J2EE preview, (the other two HTTP preview, HTTP server is a bit of a problem, The former report JRE error, the latter request when the error, the problem seems to have been treated as a bug submitted and did not solve the https://bugs.eclipse.org/bugs/show_bug.cgi?id=293398, only choose the Java EE this, Built-in for ease of use).

Only the Java EE preview slightly normal, can control the startup, the browser normal access, but the default port at startup is 8080, and the entire UI can not find where to change the port, need to change the words can only go the following method:

Go to the hidden directory of the current project folder

Workspace/.metadata/.plugins/org.eclipse.wst.server.core

Open Servers.xml, the default content is as follows:

<?xml version= "1.0" encoding= "UTF-8" standalone= "no"?>

<servers>

<server hostname= "localhost" id= "java EE preview at localhost" name= "java EE preview at localhost" runtime-id= "Java EE preview" Server-type= "Org.eclipse.jst.server.preview.server" server-type-id= "Org.eclipse.jst.server.preview.server" start-timeout= "stop-timeout=" timestamp= "1" >

<list key= "Modules" value0= "html::org.eclipse.wst.web.internal.deployables.static:html::wst.web::1.0"/>

</server>

</servers>

This is the configuration file of the Java EE Preview, then manually add a port property, modified as follows:

<?xml version= "1.0" encoding= "UTF-8" standalone= "no"?>

<servers>

<server hostname= "localhost" port= "9090" id= "Java EE preview at localhost" name= "java EE preview at localhost" runtime-id= "J 2EE Preview "server-type=" Org.eclipse.jst.server.preview.server "server-type-id=" Org.eclipse.jst.server.preview.server "start-timeout=" stop-timeout= "timestamp=" 1 ">

<list key= "Modules" value0= "html::org.eclipse.wst.web.internal.deployables.static:html::wst.web::1.0"/>

</server>

</servers>

Then restart Eclipse and you will be able to access the http://localhost:9090 successfully.

Eclipse Java EE preview port settings

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.