tomcat8

How does Server-Sent-Events work

不问归期 提交于 2019-11-30 03:43:27
I tried an SSE (Server-Sent-Events) using java on tomcat 8.0. Here are few things I noticed. I click a button that automatically makes a request to the servlet. Servlet's GET method gets executed which returns an event stream. Once the full stream is received, the page again automatically makes another request which receives the same data again!!! I don't have an infinite loop there!!! What is actually happening on the server? In normal scenarios, tomcat creates a thread to handle every request. What is happening now? What is the correct way to ensure that the event stream is sent only once to

“Unknow type constant pool at position X” in tomcat logs since java 8

Deadly 提交于 2019-11-30 03:30:58
问题 I have a Java JSF2 web based application deployed on a Tomcat server, and since we moved to Java 8 / Tomcat 8 this error appears a lot in the tomcat output: déc. 05, 2016 10:51:07 AM com.sun.faces.config.JavaClassScanningAnnotationScanner$ConstantPoolInfo containsAnnotation GRAVE: Unknow type constant pool 0 at position 178 I tried different stuff to fix this warning but it always comes back. Is this log a symptom of any issue ? Is it just a normal output? Is there a way to fix this? 回答1: I

Accessing file resources in SoapUI Mock Service Deployed in tomcat

左心房为你撑大大i 提交于 2019-11-30 03:26:08
问题 Problem in short : Accessing local file in SCRIPT Dispatcher with respect to project path i.e., def file = new File(groovyUtils.projectPath+"/${responseFileName}.xml") . This is working fine when the test is run from SoapUI as Mock Service . But giving nothing or empty for above statement ( groovyUtils.projectPath ) when the same test is run against Deployed(remote tomcat) Mock Service . Note: Here the responseFileName is present in the same location(when running SoapUI tool), relative to the

Tomcat 8 Embedded - WebServlet - 'A child container failed during start'

半腔热情 提交于 2019-11-29 18:06:25
I have an embedded Tomcat server that is serving static files just fine. But when I add the buildPath code required to get @WebServlet working, it doesn't work in one of my projects (there are plenty of differences between projects... about 50K lines worth). I get the following error before web.xml is even read (I know this from strace -ff ). org.apache.catalina.LifecycleException: Failed to start component [StandardServer[-1]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:367) at app.http.TomcatServer

IntelliJ hot swapping classes, but not JSF pages

给你一囗甜甜゛ 提交于 2019-11-29 18:02:27
First of all, I would like to say that there is plenty of pages on StackOverflow and I tried all I found related, but I am doing something wrong. I have IntelliJ server set up to: server Tomcat 8 JDK 8u65 Maven IntelliJ 14 In Run/Debug configuration I have set VM Options: On Update action: Update resources On frame deactivation: Update classes and resources Before launch: Build xxx.war exploded Deployment tab set to deploy xxx.war exploded If I change the body of any class (e.g.returned value), everything is fine and it hot swap the class as I would expect. Unfortunatelly when I change some

How to connect NetBeans 8 with Tomcat 8 in Mac OS X?

痞子三分冷 提交于 2019-11-29 12:34:53
I found other Questions and Answers dealing with getting the NetBeans IDE to talk to the Apache Tomcat servlet container. But they seem to be out of date or involve extraneous steps. I remember the process as being less complicated on my Mac. But I cannot remember the exact steps. Indeed, getting Tomcat to talk to NetBeans is fairly simple though not obvious. Java EE edition of NetBeans If downloading NetBeans, grab an edition of NetBeans IDE already bundled with Tomcat. You may need to customize the installation to get Tomcat, as described in this Question . But that version of Tomcat is

Unable to process file module-info.class within a Java9 project results in ClassFormatException

一曲冷凌霜 提交于 2019-11-29 12:12:22
Trying to Run Vaadin 8.1 app under Java 9 prerelease in IntelliJ 2017.2.2 I was able to build a vaadinjavanine.war using a fresh project and host the same using Jetty Server. I ended up trying to deploy the generated war to a tomcat server. But, during the startup of the tomcat server, I am getting the following exception: 21-Aug-2017 22:53:38.830 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsFile Unable to process file [/Library/Tomcat/apache-tomcat-8.0.22/webapps/vaadinjavanine/WEB-INF/classes/module-info.class] for annotations org.apache.tomcat

symlinking tomcat 8 directory resources

空扰寡人 提交于 2019-11-29 11:58:02
问题 I would like to symlink JSP directories under Tomcat 8. It worked as well in Tomcat 7 on this way: <Context allowLinking="true"> but seems the Tomcat 8 dropped this feature, and it started to use the Resources ( http://tomcat.apache.org/migration-8.html#Web_application_resources ). My example usage: ROOT/jspdirectory -->linksto--> /var/tmp/realplaceofjspfiles/ A bad configuration: ROOT/META-INF/context.xml: <Context> <Resources allowLinking="true"> <PreResources className="org.apache.catalina

NullPointerException deploying Spring/MyFaces Applicationon Tomcat 8.0.0 RC5

岁酱吖の 提交于 2019-11-29 07:49:10
I developed a new application and it runs perfectly on Tomcat 7! But I am trying to deploy the same WAR on Tomcat 8 and I am getting a NullPointerException . To develop this application, I am used the following frameworks and libs: Maven 3; JPA 2 / Hibernate 4.2.6.Final; Spring 3.2; Spring Security 3.2.RC; MyFaces 2.1.12; Primefaces 4.0; No error occurs when I deploy on Tomcat 7.0.42. Runs fine. But, when I deploy the same WAR on Tomcat 8.0.0 RC5, I am getting this exception: 30-Oct-2013 16:00:27.659 INFO [http-nio-8080-exec-2] org.apache.catalina.core.ApplicationContext.log No state saving

java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name

▼魔方 西西 提交于 2019-11-29 05:33:30
I have a Spring MVC application running on Tomcat8. Once in a day or two I get an exception in my log file 15-Jun-2016 10:43:39.832 INFO [http-nio-8080-exec-50] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:228) at org.apache.coyote.http11.AbstractHttp11Processor.process