其实很多时候为了面子工程我们都会配置域名映射,通过域名来访问我们的java web项目,显得更加友好和上档次
举例tomcat配置:
关于域名和公网ip以及开设端口的操作就不作赘述了:访问域名直接到项目 关键在tomcat中的一句话是:
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl