1. The first method is to start the local tomcat and view jsp Create a folder HBuilderX in the webapps directory of tomcat Open HBuilderX software, click File/Import/Import Local Files, and find the webapps of tomcat This is what a successful import looks like. Open the tool settings, find the run settings, external web server call url, enter http://localhost:8080. The port number behind it is the default port of your tomcat. If it has not been modified, it is 8080. Because I changed it to port 80 (port 80 is optional), it is not filled in the configuration. Pay attention to the option below, whether the external web server url contains the project name. If you did not import the webpps directory when importing, but the next level directory, you need to check it. Finally, we find the bin directory in the tomcat directory, open tomcat8w.exe, click start, and then view the jsp interface in HBuilderX <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> </head> <% String a = "a"; %> <%=a%> <body> </body> </html> Note that in this case eclipse cannot run the web program. If you want to run it, you need to click Stop to close it. After closing it, HBuilderX will not be able to view jsp. The second method below solves this problem. 2. The second method is to run the project and then view it. You can run the project at the same time and use HBuilderX to view jsp
Double-click tomcat below to enter the configuration page. We find that Server Locations is gray. It doesn’t matter. We just need to remove the project under tomcat and clean it to configure it. The specific operation is to right-click tomcat, and there are ADD and Remove and Clean. After the clearing is successful, we select the middle option Use Tomcat installation to actually deploy to Tomcat, select the webapps directory under Tomcat in Deploy path, and finally set the timeouts in the upper right corner to 100 to prevent the project from being too large and taking a long time to start, judge the response timeout, and finally save. After setting these, we only need to start the web program to see the project in the webapps in HBuilderX and view the jsp. If the imported directory is the next level of webapps, it needs to be re-imported. Note that these settings do not mean that you can run a web project and local tomcat at the same time, but that you can view jsp in HBuilderX when running the project. There is a problem with this method. There is a problem with saving changes in HBuilderX, or in the project under webapps. If you re-run it in eclipse, the content in HbuilderX will still be overwritten. The specific reasons are not explained here. Two solutions are given. One is to copy it directly to eclipse after modification. The other is to copy the jsp file directly from the project to the HBuilerX created in the first step, and then perform the operation to prevent accidentally re-running the program and doing useless work. Summarize: Although these two methods solve the problem of viewing and editing jsp using HBuilderX, they are still quite troublesome due to problems with the HBuilderX software. If you edit the jsp code, it is recommended to do it directly in eclipse. If you need to adjust the html code in the jsp, you can configure it in this way. Finally, with the above configuration, any files in HBuilderX that are not under webapps will not be able to run. You only need to delete the external web server call url in the configuration to restore it to normal. This is the end of this article about HBuilderX configuration of tomcat external server to view and edit jsp interface. For more relevant content about HBuilderX configuration of tomcat external server, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: vue+element custom query component
>>: How to use mysqladmin to get the current TPS and QPS of a MySQL instance
XML Schema is an XML-based alternative to DTD. XM...
Table of contents 1. TypeScript is introduced int...
Example: tip: This component is based on vue-crop...
Key Takeaways: 1. Mastering CSS3 3D animation 2. ...
1. Deploy nginx service in container The centos:7...
Preface Previously, static IPs assigned using pip...
When I configured mysql, I set the default storag...
Recently, when upgrading the Zabbix database from...
Using iframes can easily call pages from other we...
URL rewriting helps determine the preferred domai...
1. Create a runner container mk@mk-pc:~/Desktop$ ...
MySQL 8.0.18 stable version (GA) was officially r...
Introduction to sudo authority delegation su swit...
Copy code The code is as follows: <div class=&...
What can Arthas do for you? Arthas is Alibaba'...