NetBeans and Tomcat Virtual Hosts

Let me start by saying that I am new to Java / JSP website development, so I may have completely missed something simple. If so, I apologize in advance for him.

Basically, I am trying to configure local development sites in Tomcat as a separate virtual host, similar to the way I installed Apache Virtual Hosts in the past. I do not like accessing a local developer site using http://localhost:8080/mywebapp. In Tomcat, I added a new Host element in the server.xml file and changed my Windows hosts file so that I can now access my site with a url http://mywebapp:8080that is exactly what I want. Everything works flawlessly up to this point.

The problem starts when I try to use the NetBeans 6.8 JSP project to work on the site. NetBeans is configured to use http://localhost:8080/mywebappno matter what I do when I debug or launch a site through it. I cannot find anywhere to change the URL that the site should use in any of the Properties menu. Does anyone know how to change this or something that I might have missed along the way? When I set up PHP projects in NetBeans, it allows me to enter a url. I want to start a site and change it using the project properties.

Again, JSP development and Tomcat are very new to me, but I really want to start creating JSP sites after working with ASP.NET over the past few years. Thank!

+3
1

, , , , , . Netbeans , " " , Catalina . , http://localhost:8080, http://localhost:8080/xxxxx. , , .

+3

Source: https://habr.com/ru/post/1748583/


All Articles