jsp (eclipse, tomcat) configured installation environment encountered an error and some solutions

jsp (eclipse, tomcat) configured installation environment encountered an error and some solutions

• 1 tomcat root path tomcat \ webapps \ ROOT

• 2 tomcat startup configuration file command sudo sh startup.sh, sh shutdown.sh shut down Tomcat

• 3.jsp page error:

• Multiple annotations found at this line:- The superclass "javax.servlet.http.HttpServlet" was not found on the Java.Build Path

• solution:
•   1.右键项目 build path
•   2.选择 configure build path
•   3.切换至 libraries 选项卡
•   4.点击 add external jars
•   5.找到tomcat安装路径lib文件夹下的servlet-api.jar,添加
•   6.确定 -> 完成

• 4 new jsp file appears The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path error

•   右击web工程->Build Path->Java Build Path->Libraries-> Add Libray...->Server Runtime ->Tomcat Server

• 5服务器Several ports (8005, 8080, 8009) required by Tomcat v8.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).问题

•   sudo lsof -i:8080 查看端口进程

•   sudo kill -9 进程号

• 6. page displays a 500 error HTTP Status 500 - java.lang.IllegalStateException: No output folder

• linux/mac

• The main reason for this is the question of powers, in tomcat / work / Catalina / localhost /, mainly this directory is not read and write permissions, resulting file can not be compiled into the designated working directory, in which case we will have for the at least do some privileges to modify permissions to this directory to reach 755 or more, while paying attention here to modify permissions must be performed as root, or can not be modified

(sudo chmod 755 / tomcat/work/Catalina/localhost/) 。

• I encountered this error, because once the service started as root, then start the services performed by other users, but not before launching content under tomcat / work / directory deletion, there is still the owner of the directory for the root Catalina user's directory, when another user performs a start, as the Catalina already exists, it is no longer re-created, but incremental modify the directory, but because of other user does not have permission to modify the owner to root directories and files, error. Recommended after each stop tomcat successfully, delete tomcat / work / *; If you do not want to delete every time, we must ensure that every time a user starts to use tomcat strictly correct.

Reference https://blog.csdn.net/huangjin0507/article/details/46342835

• windows

• tomcat divided install version decompress, unpack the installation disk version if the extract to visit in the browser HTTP: // localhost: 8080 . 500 errors occur, an error message is as follows:
• localhost: 8080 java.lang.IllegalStateException: No the Output Folder

• for the following reasons: tomcat directory does not have permission to read and write, leading to the file can not be compiled into the designated working directory.

•   解决办法:找到tomcat目录,右键“属性--->安全--->编辑”,找到Users,将“完全控制”选项“允许”打钩,应用。

Reference https://blog.csdn.net/libaineu2004/article/details/52098589

Guess you like

Origin www.cnblogs.com/goodlucktinux/p/11579460.html
Recommended