tomcat7

ClassNotFoundException for java.util.logging handler in Maven tomcat7:run

南楼画角 提交于 2020-07-10 11:47:59
问题 I have followed the BIRT FAQ in regard to getting BIRT's logging (which seems to be based on java.util.logging ) redirected to log4j, which is my project's standard. I've subsequently made a BIRT logger like so: public class BirtLogger extends Handler { private final Logger log = Logger.getLogger(BirtLogger.class); @Override public void publish(LogRecord record) { Level level = record.getLevel(); String message = record.getMessage(); if (Level.SEVERE.equals(level)) { log.fatal(message); }

Guacamole ,Failed to load resource: the server responded with a status of 403 (Forbidden)

为君一笑 提交于 2020-07-10 10:29:18
问题 I'm facing same problem as 'https://stackoverflow.com/questions/33499048/the-user-mapping-xml-file-doesnt-work-in-guacamole-invalid-login#' However, it doesn't solve my problem so far. Mine is guacamole-client-1.0.0 on tomcat 7.0.76 and CentOS 7.8.2003. I did ln -s /etc/guacamole/ /usr/share/tomcat/.guacamole and restart tomcat Then,google Chrome shows. `Failed to load resource: the server responded with a status of 403 (Forbidden) http://10.0.3.13:8080/guacamole-1.0.0/api/tokens` I need

Guacamole ,Failed to load resource: the server responded with a status of 403 (Forbidden)

帅比萌擦擦* 提交于 2020-07-10 10:28:47
问题 I'm facing same problem as 'https://stackoverflow.com/questions/33499048/the-user-mapping-xml-file-doesnt-work-in-guacamole-invalid-login#' However, it doesn't solve my problem so far. Mine is guacamole-client-1.0.0 on tomcat 7.0.76 and CentOS 7.8.2003. I did ln -s /etc/guacamole/ /usr/share/tomcat/.guacamole and restart tomcat Then,google Chrome shows. `Failed to load resource: the server responded with a status of 403 (Forbidden) http://10.0.3.13:8080/guacamole-1.0.0/api/tokens` I need

Setting up Tomcat in nginx proxy

南楼画角 提交于 2020-07-10 07:21:10
问题 I'm setting up my web server and I need to run tomcat on http://ip/tomcat/ instead of http://ip:8080/ . How I can do this on nginx? I've tried to find an answer in the internet, but all of them is useless for me. My nginx configuration: upstream tomcat { server ip:8080; } server { listen 80 default_server; listen [::]:80 default_server; server_name _; location /tomcat/ { proxy_pass http://tomcat; } } Server answer: server answer image 回答1: You can use /tomcat/ location with using below tag.

Multi-instance tomcat server.xml permission denied

一笑奈何 提交于 2020-06-17 09:31:25
问题 I'm trying to run a multi-instance configuration of tomcat7 on centos. I have installed tomcat with yum install tomcat which works when started with systemctl start tomcat.service Following the readme I created a copy of the catalina base directory structure which originally was located in /var/lib/tomcats/name, but has since moved drwxr-xr-x. 7 tomcat tomcat 69 Jul 17 16:16 . drwxr-xr-x. 3 tomcat tomcat 23 Jul 17 15:50 .. drwxr-xr-x. 4 tomcat tomcat 231 Jul 17 15:52 conf drwxrwx---. 2 tomcat

Reading from an Excel (xlsx) file using Apache POI library throws NullPointerException

Deadly 提交于 2020-04-18 12:33:43
问题 I 'm building a JSP web application using Eclipse IDE. The web application loads without issue on tomcat server ver 7. We got a new requirement to read from xls and xlsx file. So we have used Apache POI library (4.1.2) to implement this as follows: I have taken out other codes as they are not relevant for this post FileInputStream file = new FileInputStream(new File(args[0])); //Create Workbook instance holding reference to .xlsx file XSSFWorkbook workbook = new XSSFWorkbook(file); //<- This

Maven实现直接部署Web项目到Tomcat7

岁酱吖の 提交于 2020-04-07 10:04:59
以前在项目中很少使用Maven,最近自己学习了一下maven,真的是非常强大的项目构建工具,对于依赖包的定义及版本,以及依赖包的集中管理(中央仓库)都让人惊喜(原谅我的大惊小怪,虽然Maven出来很久了,但小弟刚接触),但发现开发Web项目时,需要手动部署到Web服务器(Tomcat7),如果能自动部署到Web服务器,而不用每次手动把target下编译好的war包拷贝到Tomcat下就更好了。 下面是具体的使用方法: Tomcat7的用户及权限配置:在conf目录下,找到tomcat-users.xml,添加manager权限的用户。这里我把所用的权限都添加给admin用户了,具体代码如下: <role rolename="admin-gui"/> <role rolename="admin-script"/> <role rolename="manager-gui"/> <role rolename="manager-script"/> <role rolename="manager-jmx"/> <role rolename="manager-status"/> <user username="admin" password="password" roles="manager-gui,manager-script,manager-jmx,manager-status,admin

How to check if app is running on Tomcat 7 embedded?

早过忘川 提交于 2020-03-05 04:22:48
问题 I have a application that runs as war or in standalone mode with tomcat embedded, I want to check if the application is running as a war within tomcat or if it is running with tomcat embedded. 回答1: This is my solution. String path = getClass().getProtectionDomain().getCodeSource().getLocation().getFile(); boolean onWar = path.contains("WEB-INF"); 来源: https://stackoverflow.com/questions/56587068/how-to-check-if-app-is-running-on-tomcat-7-embedded

[org.jaxen.util.AncestorAxisIterator->org.jaxen.ut

青春壹個敷衍的年華 提交于 2020-03-02 15:25:34
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.jaxen.util.AncestorAxisIterator->org.jaxen.util.AncestorOrSelfAxisIterator->org.jaxen.util.AncestorAxisIterator] at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2159) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2105) at org.apache

Memory usages high - Slow application response : Used memory value not decreasing + Free memory value not increasing

冷暖自知 提交于 2020-02-20 05:23:50
问题 When application is in use for few minutes then it slowly increases the Used memory value and decreases Free memory value. Application get very slow after few minutes. Why isn't it releasing the memory. System configuration : CPU : Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz (No. of processors : 4 / No. of cpu cores : 8) RAM : 30 GB OS : CentOS-7 Application configuration : java version "1.8.0_171" -- build 1.8.0_171-b11 apache-tomcat-7.0.55 Tomcat setting Free -h command Top command . .