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
13
votes
1 answer

What does a Servlet 3.0 compatible web-app declaration in web.xml do?

I am deploying a web application that is declared in web.xml and deployed as a .war file. I am deploying on Jetty 9.1.x (but I think this question is not container specific). My web.xml file is quite old and declares itself as a Servlet 2.4…
Jen S.
  • 4,106
  • 4
  • 35
  • 44
12
votes
2 answers

servlet 3.0 @WebServlet use..what will be in web.xml?

I want to know the directory structure for using servlet 3.0 with Tomcat 7. I have used annotation @WebServlet without initialization parameters. I want to know what is to be written in web.xml file then?? Is and is still to be written...?? The…
user460920
  • 887
  • 5
  • 17
  • 27
12
votes
1 answer

Configuring OpenSessionInViewFilter with Spring 3 and Servlet 3

i want to configure OpenSessionInViewFilter to able to use hibernate lazy initialization in view, so i added the filter definition in web.xml, but it doesn't work i still get the same lazy initialization exception, here's what i did:
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
12
votes
1 answer

Problem with session security feature of JBoss 6 using servlet 3.0

We migrated our application from JBoss 5 to JBoss6 and one of the main reasons for this is to make use of the new features of servlet 3.0. Everything works fine apart from one new feature of JBoss 6 and servlet 3.0: setting the session cookie to…
Alex
  • 616
  • 1
  • 12
  • 28
12
votes
5 answers

How to use Servlet 3 @WebServlet & async with Spring MVC 3?

I would like to integrate the servlet 3.0 async support with spring MVC. Something like: @RequestMapping("/chat") @WebServlet(name="myServlet", asyncSupported=true) public String getMessage(String userName) { ...... } is it possible?
Ben
  • 1,657
  • 4
  • 16
  • 21
12
votes
2 answers

How to prevent net::ERR_INCOMPLETE_CHUNKED_ENCODING when using HTML5 Server events and Java Servlets?

i just started to play around with Server Events and i run into a chrome error message i would like to understand. i searched the web real quick but didn't find an explanation so i guess i may do something terribly wrong. On the server side i have a…
Chris
  • 15,429
  • 19
  • 72
  • 74
12
votes
1 answer

Servlet 3.0 Spring Java Config JNDI

I am trying to replicate the resource-ref attribute of web.xml in my spring web apps WebApplicationInitializer to configure JNDI. How would I do this: Connection…
ctrlspace
  • 519
  • 5
  • 15
11
votes
2 answers

How servlet container finds WebApplicationInitializer implementations

Spring WebApplicationInitializer provides a programatic way to configure the Spring DispatcherServlet and ContextLoaderListener in Servlet 3.0+ compliant servlet containers. But how does it work? How servlet container finds WebApplicationInitializer…
Anton Ilinchik
  • 221
  • 2
  • 7
11
votes
1 answer

Jetty addFilter with Spring Security and no web.xml

Normally I would have added org.springframework.web.filter.DelegatingFilterProxy with a snippet like this to web.xml: springSecurityFilterChain
vertti
  • 7,539
  • 4
  • 51
  • 81
10
votes
3 answers

How to change the character encoding for Servlet 3.0 Spring MVC multipart upload forms?

I have a pretty simple JSP/Servlet 3.0/Spring MVC 3.1 application. On one of my pages, I have multiple forms. One of these forms allows the user to upload a file and it is thus configured with enctype="multipart/form-data". I configured the…
Mopper
  • 1,677
  • 2
  • 18
  • 41
10
votes
1 answer

Programmatic configuration of error pages in Servlet 3.0

Servlet 3.0 allows for programmatic configuration of servlets, filters and listeners. But what about error pages? I can't see that there's any methods for doing that in ServletContext. It would be nice to be able to completely abolish the web.xml.
Henrik Barratt Due
  • 5,614
  • 1
  • 21
  • 22
10
votes
1 answer

Jersey @ManagedAsync and copying data between HTTP thread and Worker thread

I am working on a project that works in two flavors with and without multi tenancy. The project exposes a REST service which I would like to be asynchronous. So my basic service looks…
Haim Raman
  • 11,508
  • 6
  • 44
  • 70
10
votes
2 answers

How to configure display-name when no web.xml

We used to specify display-name in our web.xml Currently we don't have a web.xml (and adding one seems to break the application) We are using spring boot / spring 4 / java 7 / maven3 to develop rest services. Can anyone tell me how the display-name…
Raymond Domingo
  • 173
  • 2
  • 9
10
votes
3 answers

How to integrate JAX-RS with CDI in a Servlet 3.0 container

I have a web application running on a Servlet 3.0 container (Jetty 9.0.4) using JSF 2.2 (Mojorra 2.1.3) & CDI 1.1 (Weld 2.0.3). No full-fledged application server is used. In this application I also have a JAX-RS 2.0 (Jersey 2.2) resource class…
Sebastian S.
  • 1,545
  • 6
  • 24
  • 41
9
votes
3 answers

RESTEASY003210: Could not find resource for full path : Tomcat

I am getting the following error: This is the stack trace: javax.ws.rs.NotFoundException: RESTEASY003210: Could not find resource for full path: http://localhost:9050/scenarioplanner/api/models/ at…
Sabyasachi
  • 411
  • 4
  • 9
  • 21
1 2
3
62 63