Questions tagged [servlet-3.0]

Java Servlets 3.0 is a new API that supports extensibility/pluggability, Ease of Development (EoD) using the newer language features, Async and Comet support, Security, and other features being as part of the revision for Java EE 6.

Version 3 of the servlet API adds the following to version 2.5

  • async response
  • multipart support
  • annotation configuration (no web.xml)
  • generics in the API
  • resources (including JSPs) in JARs under META-INF/resources

Links

941 questions
6
votes
1 answer

java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.startAsync

Any idea why I'm getting this error at runtime ? I'm trying to deploy an AsyncServlet on Jetty. java.lang.NoSuchMethodError:…
Soumya Simanta
  • 11,523
  • 24
  • 106
  • 161
6
votes
3 answers

How to let JSF pass through HTML attributes

I am using Primefaces 3 in JSF 2 to make a search box. I need to add a non-standard attribute (x-webkit-speech) to the control so you would have something like this... Since this attribute…
Adam
  • 4,590
  • 10
  • 51
  • 84
5
votes
2 answers

WebSphere 8, web.xml version="3.0", default servlet-mapping?

Migrating a legacy application from WebSphere v.6 to WebSphere v.8. The application's web.xml only contains declarations of servlets but not servlet-mappings. Yet all servlets without a servlet-mapping are accessible by a default url pattern…
Maxim Suponya
  • 1,419
  • 2
  • 20
  • 43
5
votes
2 answers

How to handle session timeout when using Servlet 3.0 programmatic security

Regarding Servlet 3.0 programmatic security, when a session times out there is no way to invoke HttpServletRequest#logout(). Does the user remain logged into JAAS? If so, what is best practice to handle logging out of JAAS after session times out?…
Patrick Garner
  • 3,201
  • 6
  • 39
  • 58
5
votes
2 answers

Tomcat 7 Async Processing failing - only one request processed simultanously

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…
Danubian Sailor
  • 1
  • 38
  • 145
  • 223
5
votes
2 answers

Servlet 3.0 streaming api for file upload

New Servlet 3.0 API provide us with convenient way to parse multi-part form data. But it stores content of uploaded files in file system or in memory Is there streaming API for Servlet 3.0 ? Something like Commons FileUpload. I have to write…
user12384512
  • 3,362
  • 10
  • 61
  • 97
5
votes
0 answers

SpringBoot Async requests throwing 503 Service Unavailable

I was experimenting with springboots async controllers when I came around with this issue. I set the number of threads for the servlet container to 10 by setting the following @Bean public JettyEmbeddedServletContainerFactory…
jtkSource
  • 675
  • 9
  • 21
5
votes
1 answer

How to define resource in SpringBoot application, which is equivalent to in traditional web.xml?

I'm working on a project, which is developed using SpringBoot 1.4.3-RELEASE. According to the company internal document, it requires us to define a in the WEB-INF/web.xml, per application. The example is below:
Gin
  • 91
  • 7
5
votes
2 answers

Force Spring Boot to use servlet mapping in web.xml

I'm currently trying to shift my existing dynamic web project to Spring boot project and it uses web.xml for servlet mapping. I understand that spring would ignore the web.xml file, what should be the correct approach for spring to use the existing…
NatureWonder
  • 501
  • 1
  • 7
  • 10
5
votes
5 answers

How to enable async support in a Springboot application packaged and deployed as WAR

The following REST endpoint shown below works as expected when my SpringBoot application is run from an executable JAR. That is, it returns the text "My test response" to the client. However, when I package the same application as a WAR and deploy…
Gareth Hughes
  • 91
  • 1
  • 1
  • 6
5
votes
2 answers

defined in web.xml always comes back with HTTP status 200

I have an EE6 JAX-RS application that runs on Jboss 7 (EAP 6.4) and handles most of its exceptions and errors internally through an implementation of ExceptionMapper. There are circumstances, though, (most notably when HTTP Basic Auth fails) when…
Antares42
  • 1,406
  • 1
  • 15
  • 45
5
votes
4 answers

How to disable Servlet 3.0 scanning and auto loading of components

We have an application which keeps loading instances of ServletContainerInitializer from our 3rd party libs. One instance is JerseyServletContainerInitializer and the other is SpringServletContainerInitializer. These classes from Jersey and Spring…
benstpierre
  • 32,833
  • 51
  • 177
  • 288
5
votes
1 answer

WebAppContext pass argument to servlet constructor

I have webAppContext in main class and I have a servlet, that have WebServlet annotation and constructor with args. How I can pass args from Main class to Servlet? Main.java: String webappDirLocation = "src/main/java/frontend/webapp/"; WebAppContext…
Bulat
  • 53
  • 1
  • 7
5
votes
0 answers

Servlet 3.0 File Upload Handling Exceptions

I am trying to use Java Servlet 3.0 to upload files. @WebServlet("/uploadFile") @MultipartConfig(fileSizeThreshold=1024*1024*1, // 1 MB maxFileSize=1024*1024*10, // 10 MB maxRequestSize=1024*1024*100) …
Risu
  • 796
  • 2
  • 14
  • 26
5
votes
0 answers

How to get a path to file written out by Part of multipart Servlet 3.0 request?

I'm writing Spring MVC controller that will accept multipart file uploads (the standard way to upload a file from HTML form). Servlet 3.0 specification introduced standard way for servlet containers to handle multipart/form-data with introduction of…
Andrzej H
  • 434
  • 3
  • 9