servlet-3.0

What is an 'error dispatch' in servlet processing?

一笑奈何 提交于 2019-12-01 06:36:59
The javadoc of the javax.servlet.AsyncContext interface says: In the event that an asynchronous operation has timed out, the container must run through these steps: Invoke, at their onTimeout method, all AsyncListener instances registered with the ServletRequest on which the asynchronous operation was initiated. If none of the listeners called complete() or any of the dispatch() methods, perform an error dispatch with a status code equal to HttpServletResponse.SC_INTERNAL_SERVER_ERROR . If no matching error page was found, or the error page did not call complete() or any of the dispatch()

Tomcat 7 Async Processing failing - only one request processed simultanously

荒凉一梦 提交于 2019-12-01 05:56:21
I was trying to implement COMET chat using Async Processing defined in Servlet API 3. It was not working - chat got blocked, so I have created debug servlet to test async part only. This is my doGet method: @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.debug("doGet called"); int timeout = 30 + RandomUtils.nextInt(60); String message = RandomStringUtils.randomAlphanumeric(50 + RandomUtils.nextInt(250)); response.setHeader("Access-Control-Allow-Origin", "*"); final AsyncContext context = request.startAsync();

Dynamic columns with richfaces 4

孤者浪人 提交于 2019-12-01 05:56:01
I need dynamic number of columns. Richfaces supplies it with <rich:columns> in richfaces 3.3.3-final but for Richfaces 4 they seem to recommend <c:forEach> . c:forEach I can't get it to work properly.Since I can't depend on the var from the datatable I can't figure out how to feed <c:forEach> with the correct list of columns. (Each row has their own values but headers are the same) Basically the data I want to display is a list with rows of x size, each row has a list of column values with y size. But how can have <c:forEach> tell the backing bean what row it's at so I can feed the correct

What is an 'error dispatch' in servlet processing?

走远了吗. 提交于 2019-12-01 04:12:27
问题 The javadoc of the javax.servlet.AsyncContext interface says: In the event that an asynchronous operation has timed out, the container must run through these steps: Invoke, at their onTimeout method, all AsyncListener instances registered with the ServletRequest on which the asynchronous operation was initiated. If none of the listeners called complete() or any of the dispatch() methods, perform an error dispatch with a status code equal to HttpServletResponse.SC_INTERNAL_SERVER_ERROR . If no

Dynamic columns with richfaces 4

耗尽温柔 提交于 2019-12-01 03:45:44
问题 I need dynamic number of columns. Richfaces supplies it with <rich:columns> in richfaces 3.3.3-final but for Richfaces 4 they seem to recommend <c:forEach> . c:forEach I can't get it to work properly.Since I can't depend on the var from the datatable I can't figure out how to feed <c:forEach> with the correct list of columns. (Each row has their own values but headers are the same) Basically the data I want to display is a list with rows of x size, each row has a list of column values with y

Prevent Execution of ServletContainerInitializer or how to use absolute-order

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 02:45:24
问题 is it possible to prevent the execution of the ServletContainerInitializer of a provided jar. I want to prevent the execution of JerseyServletContainerInitializer.java which is provided by Glassfish 4.1 as an osgi-bundle (in jersey-container-servlet.jar ). Or how can I use the <absolute-order> of web.xml to enforce loading of the ResteasyServletInitializer.java provided in resteasy-servlet-initializer-3.0.11.Final.jar prior to the execution of the jersey counterpart? I do not understand how

Loading resources using Jersey and @ApplicationPath annotation

怎甘沉沦 提交于 2019-12-01 02:24:38
问题 I'm trying to deploy a basic jersey restful service to Tomcat7 without web.xml: @WebServlet(loadOnStartup=1) @ApplicationPath("resources") @Path("/mypath/{name}") public class MyResource extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> s = new HashSet<Class<?>>(); s.add(MyResource.class); return s; } @GET @Consumes("text/plain") @Produces("text/plain") public String getWelcome(@PathParam(value = "name") String name) { return "Welcome to jax-rs " + name; } } I

Primefaces FileUpload not working in Spring Boot

瘦欲@ 提交于 2019-11-30 22:04:40
I'm running my JSF project launching it with Spring Boot and taking advantage of the whole Spring environment. The configuration is: Mojarra 2.2.8 + Primefaces 5.1 + Spring Boot 1.1.9. That's how my POM.xml file looks like: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany</groupId> <artifactId>project</artifactId> <version>0.0.1-SNAPSHOT<

Server-sent event does not work with jersey SSE

元气小坏坏 提交于 2019-11-30 21:50:37
I am trying to use JavaScript SSE from Jersey. I have Following code in my resource. I am hosting on Java7 and Tomcat 7. I dont get any error. But I don't see data either on page. I call /broadcast to post data. It does show message. But nothing comes on client. In Firefox, I do see /broadcast event fired multiple times. This is reference I used. https://jersey.java.net/documentation/latest/sse.html package net.jigarshah.dse.tracker; import javax.inject.Singleton; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces;

Server-sent event does not work with jersey SSE

走远了吗. 提交于 2019-11-30 17:31:16
问题 I am trying to use JavaScript SSE from Jersey. I have Following code in my resource. I am hosting on Java7 and Tomcat 7. I dont get any error. But I don't see data either on page. I call /broadcast to post data. It does show message. But nothing comes on client. In Firefox, I do see /broadcast event fired multiple times. This is reference I used. https://jersey.java.net/documentation/latest/sse.html package net.jigarshah.dse.tracker; import javax.inject.Singleton; import javax.ws.rs.Consumes;