[英]How to set starting page in Netbeans Java Web project template?
When I run a java web project it always opens in my browser the "index.html" page, so I want to choose another page when the project starts.当我运行 java web 项目时,它总是在我的浏览器中打开“index.html”页面,所以我想在项目启动时选择另一个页面。
How can I do it?我该怎么做? Thanks in advance.提前致谢。
Configure the URL to be used when you run your project as follows:如下配置运行项目时要使用的 URL:
/WebApplication1
in the sample screen shot below.在下面的示例屏幕截图中,它设置为/WebApplication1
。 Leave that field alone.不理会那个领域。/Servlet1
, so this will be be appended to the context path of /WebApplication1
to build the URL http://localhost:8080/WebApplication1/Servlet1
to be used when the application is run. In the screen shot below the relative URL is set to /Servlet1
, so this will be be appended to the context path of /WebApplication1
to build the URL http://localhost:8080/WebApplication1/Servlet1
to be used when the application is run .Browsing: http://localhost:8080/WebApplication1/Servlet1
near the bottom of the screen shot.请注意屏幕截图底部附近的文本Browsing: http://localhost:8080/WebApplication1/Servlet1
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.