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

Servlet 3.0 doesn't load on application startup

I've a JSF 2.0 web application running in tomcat 7.0.29 and tried to use the Servlet 3.0 annotation but the servlet didn't work as i can't see the log written in its init() method. i ve read many answers for the same problem but still not…
Bardelman
  • 2,176
  • 7
  • 43
  • 70
0
votes
1 answer

ServletContextListener: Isn't this incorrect usage?

I was going through a expert(?) tutorial on "Asynchronous processing support in Servlet 3.0" (http://www.javaworld.com/javaworld/jw-02-2009/jw-02-servlet3.html?page=2). In it there is this following code snippet: @WebServlet(name="myServlet",…
2020
  • 2,821
  • 2
  • 23
  • 40
0
votes
1 answer

replace old request with new one in async servlet

I wrote an asynchronous servlet to feed changes in a cached object to all clients who have sent a request to the servlet. With the request a client can get a subsection of the cache by including different parameters. I am simply storing the requests…
egerardus
  • 11,316
  • 12
  • 80
  • 123
0
votes
4 answers

can i use "index" as the name of the servlet name?

I am getting this error in RAD Web Application 3.0 Deployment Descriptor Editor: Servlet Mapping (index): Servlet Name:The value is not among the possible selections Then under my Markers: Web Problem: The servlet mapping "index" refers to a…
takajode
  • 23
  • 5
0
votes
0 answers

Maven Dependencies in web application and java application

I am trying to do connection pooling on remote server(not database server) using JNDI, tomcat, Maven and etc. In details, I have two maven projects 1)Web application 2)Java Application in non maven Project and try to access the methods of Java…
Ankit Ramani
  • 76
  • 1
  • 1
  • 6
0
votes
1 answer

Reuse ServletContainerInitializer in Jetty tests

I have my servlets configuration in class I that extends ServletContainerInitializer. I register servlets and define mappings there. I don't want to do same work in my integration tests. Is there are common way to reuse I config in my jetty…
Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132
0
votes
1 answer

Injecting ejb instances into the servlet, @EJB injects null - JBoss6

I am developing an enterprise app using ejb 3.1 and servlets 3.0 that runs in jboss 6.1.0. I deploy the jar and war as separate copies in the same jboss instance. I inject the ejb (remote interface instance) into the servlet using the…
vvra
  • 2,832
  • 5
  • 38
  • 82
0
votes
1 answer

Spring MVC (Can't Instantiate my Object in correct sequence)

I want to get an instance of ServletContext right after my project initialization and before any other controller class load into memory then after that I want to use ServletContext Features like: getRealPath(); This is because I want to parse an…
Mehdi
  • 3,795
  • 3
  • 36
  • 65
0
votes
3 answers

Where is the web.xml file in Servlet3.0 enviroment?

I'm looking for the web.xml file in a Servlet 3.0 enviroment. The reason is because I want to change my welcome file from "index.jsp" to "hello.jsp". I know that in the web.xml file, there is a welcome-file-list, and I want to change this setting so…
JK-Kim
  • 3
  • 3
0
votes
1 answer

Webapp behaves as expected when run from eclipse while when exported as war fails

This has been driving me nuts. So I have a (very simple vanilla servlet 3) web app. When I run it in eclipse all is fine. Among others I am able to register an account with Unicode (greek) username and then log in as site admin and visit the user's…
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
0
votes
1 answer

Retrieving images using Jquery and servlet produces HTTP Status 500 error

I need to retrieve images from my database. For this I used jquery and servlet to retrieve all images stored in a table. But when i run the code it produces HTTP Status 500 - class oracle.jdbc.driver.OracleBlobInputStream declares multiple JSON…
James
  • 2,874
  • 4
  • 30
  • 55
0
votes
1 answer

How to get notified when session expires in spring mvc 3 and servlet 3.0

Using tomcat 7, servlet 3.0, spring mvc3 with spring social, I get my class to listen sessions with; public class AClass implements ApplicationContextAware, HttpSessionListener{ ... public void setApplicationContext(ApplicationContext…
hevi
  • 2,432
  • 1
  • 32
  • 51
0
votes
2 answers

Java Servlets transmitting data to browser

Just have a few questions regarding Java Servlets: 1) What happens when a browser requests a servlet for the first time? 2) Is the the response.setContentType(text,html) the first instruction sent to the browser? Have been searching the web for…
0
votes
1 answer

how to save a base64 as image in java server faces project

I am doing a project for school. Subject of project is tshirt design. I am using jsf and primefaces. But I don't know well jsf and primefaces. I wanted save a base64 from html as image in jsf project. But when I had tried to following functions,…
0
votes
1 answer

web.xml + jsp file like servlet

I'm trying to dfine my jsp file as a servlet inside the web.xml: help.jsp /Help.jsp help.jsp
Andrey Yaskulsky
  • 2,458
  • 9
  • 39
  • 81