Tomcat

这个404你能解决吗?

别来无恙 提交于 2021-02-11 13:17:13
点击上方蓝字关注 👆👆 今天在tomcat里部署运行了一个小工程,工程结构如下: 运行tomcat服务器后,访问index.html,发现报404: 但是后台接口是正常返回的: 去看webapps里工程目录下,index.html文件是有的,见鬼了,是哪儿出了问题? 然后看到控制台日志(或者tomcat_home/logs/catalina.log)报错如下: org.springframework.web.servlet.PageNotFound.noHandlerFound No mapping fo und for HTTP request with URI [ /artmuseum/i ndex.html] in DispatcherServlet with name 'springmvc' 大致意思是springmvc这个servlet处理不了index.html。原来是配置有问题。 看看web.xml配置,是这样写的: <!-- 注册前端控制器 --> < servlet > < servlet-name > springmvc </ servlet-name > < servlet-class > org.springframework.web.servlet.DispatcherServlet </ servlet-class > < init-param > <

Problem on looking for running tomcat process id

被刻印的时光 ゝ 提交于 2021-02-11 13:10:27
问题 Sometimes my tomcat server auto shutdown due to some memory issue, so I want to use the below script to check whether tomcat is running: checkTomcatRunning.sh TOMCAT_PID=$(ps -ef | awk '/[t]omcat/{print $2}') echo TOMCAT PROCESSID $TOMCAT_PID if [ -z "$TOMCAT_PID" ] then echo "TOMCAT NOT RUNNING" sudo /opt/tomcat/bin/startup.sh else echo "TOMCAT RUNNING" fi Below is the crontab which output log to /opt/tomcat/logs/checkTomcatRunning.log crontab -l */1 * * * * /opt/tomcat/webapps

Problem on looking for running tomcat process id

半世苍凉 提交于 2021-02-11 13:07:24
问题 Sometimes my tomcat server auto shutdown due to some memory issue, so I want to use the below script to check whether tomcat is running: checkTomcatRunning.sh TOMCAT_PID=$(ps -ef | awk '/[t]omcat/{print $2}') echo TOMCAT PROCESSID $TOMCAT_PID if [ -z "$TOMCAT_PID" ] then echo "TOMCAT NOT RUNNING" sudo /opt/tomcat/bin/startup.sh else echo "TOMCAT RUNNING" fi Below is the crontab which output log to /opt/tomcat/logs/checkTomcatRunning.log crontab -l */1 * * * * /opt/tomcat/webapps

404解决方法

删除回忆录丶 提交于 2021-02-11 13:02:54
404问题分析(说说你项目中404的问题) 1.1) 请求资源404 a)检测输入的路径是否正确 b)检测tomcat启动是否ok c)检测项目的前端控制器的配置 d)检测项目部署目录中是否存在你要的资源(有可能没有编译) 1.2) 响应资源404 a)检测服务资源是否存在 b)检测视图解析器配置是否正确. c)检测方法上的注解@ResponseBody(假如方法返回串可以看做是普通串,否则可能认为是一个页面) 影响响应速度或性能的原因? 1)数据传输时间(CDN,带宽,数据流,压缩,缓存) 2)数据处理时间(硬件:cpu,硬盘,内存,架构,算法,缓存) 3)数据渲染时间(html,css,js) 来源: oschina 链接: https://my.oschina.net/u/3998851/blog/2254514

What's the best way to redirect a Tomcat 404 URL with Apache as front-end?

心不动则不痛 提交于 2021-02-11 12:20:32
问题 I have Apache 2.4 forwarding *:80 traffic to my sole Tomcat 7.0 webapp (Guacamole) like so: ProxyPreserveHost On ProxyRequests off ProxyPass / http://localhost:8080/guacamole/ ProxyPassReverse / http:/localhost:8080/guacamole/ ProxyPassReverseCookiePath / http://localhost:8080/guacamole This works, except when I log out of the webapp, I get the following 404 as reported by Tomcat: HTTP Status 404 - /guacamole/guacamole/index.xhtml From what I've read I've got several options, including using

What's the best way to redirect a Tomcat 404 URL with Apache as front-end?

纵然是瞬间 提交于 2021-02-11 12:20:20
问题 I have Apache 2.4 forwarding *:80 traffic to my sole Tomcat 7.0 webapp (Guacamole) like so: ProxyPreserveHost On ProxyRequests off ProxyPass / http://localhost:8080/guacamole/ ProxyPassReverse / http:/localhost:8080/guacamole/ ProxyPassReverseCookiePath / http://localhost:8080/guacamole This works, except when I log out of the webapp, I get the following 404 as reported by Tomcat: HTTP Status 404 - /guacamole/guacamole/index.xhtml From what I've read I've got several options, including using

HTTPS communication failed , jdk 1.6 (32 bit client) with jdk 1.8 (64 bit) server : READ: Unknown-3.3 Alert, length = 2

守給你的承諾、 提交于 2021-02-11 11:47:12
问题 This is my first question of stackoverflow. I am trying HTTPS communication between two tomcats: Client Tomcat, using JDK1.6 32 bit. Server Tomcat, using JDK1.8 64 bit. Client Code for HTTPs request: HttpClient hc = new HttpClient(); hc.startSession(monitAppURL); int code = hc.executeMethod(poster); Exception I get: Received fatal alert: handshake_failure I obtain the more detailed exception by starting JVM with -Djavax.net.debug=ssl:handshake:verbose : trigger seeding of SecureRandom done

HTTPS communication failed , jdk 1.6 (32 bit client) with jdk 1.8 (64 bit) server : READ: Unknown-3.3 Alert, length = 2

喜欢而已 提交于 2021-02-11 11:46:30
问题 This is my first question of stackoverflow. I am trying HTTPS communication between two tomcats: Client Tomcat, using JDK1.6 32 bit. Server Tomcat, using JDK1.8 64 bit. Client Code for HTTPs request: HttpClient hc = new HttpClient(); hc.startSession(monitAppURL); int code = hc.executeMethod(poster); Exception I get: Received fatal alert: handshake_failure I obtain the more detailed exception by starting JVM with -Djavax.net.debug=ssl:handshake:verbose : trigger seeding of SecureRandom done

Tomcat 7 + Annotations in log4j-api-2.11.1.jar

耗尽温柔 提交于 2021-02-11 10:24:54
问题 I get this exception from tomcat upon startup of the war file: Unable to process Jar entry [META-INF/versions/9/module-info.class] from Jar [jar:file:/C:/tomcat/apache-tomcat-7.0.61/webapps/monitormonitor/WEB-INF/lib/log4j-api-2.11.1.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19 at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97) I tried to switch the log4j to an older version in the pom

SEVERE: Exception looking up UserDatabase under key UserDatabase javax.naming.NameNotFoundException: Name [UserDatabase] is not bound in this Context

孤者浪人 提交于 2021-02-11 09:52:20
问题 im using TOMCAT 9 and latest hibernat jars with java 1.8 i create simple user in mysql and 1 table db called foo1 in my webapp in tomcat i configured based on examples online : workspace\HibernateApp\src\hibernate.cfg.xml: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="show_sql">true<