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
-1
votes
2 answers

how can i edit the url of my page using JSP and Servlet

This is the url of my project on localhost which is a login page:: "http://localhost:8080/OnlineExamination" Here as soon as the login is valid, I want the url to be changed to "http://localhost:8080/OnlineExamination/home-page" so that it would…
Aashish
  • 33
  • 5
-1
votes
2 answers

Is it possible to use jasper report with java to make it like a popup coming in the browser window?

I am using Jasper report with java. I want to make the export file ask for the location to download when launching it as web app. What i am doing now is. I am giving a path for the file(PDF,DOCX,XLS) to be exported in a location. What i need is, the…
alexander
  • 11
  • 6
-1
votes
1 answer

Not able to write logs using RollingFileAppender in log4j2

I am doing a Simple demo project in Servlet 3.0 and Tomcat I am accepting JSON request from Postman and providing JSON response . Now i also want to do logging in my project . So i have use log4j2 Jars used :- log4j-1.2.12.jar , …
-1
votes
1 answer

The method setString(int, String) in the type PreparedStatement is not applicable for the arguments (int, String[])

I know that setString permits to insert a value in specified position, now I want get checkbox values from the jsp page in order to pass it to the database. I defined the variable of checkbox as a String array since it may handle one or more…
user11114695
-1
votes
1 answer

JSP servlet JSTL

When I send attribute 'saved' from servlet to jsp, if it equals to true I show alert msg otherwise I want to assign it to false in the second refresh. Servlet: saved = true; request.setAttribute("saved", saved); …
-1
votes
1 answer

How to display the JSON value in a java servlet

JSONObject jsonObj = new JSONObject(); jsonObj.put("name","raja"); Declare the jsonobject var(jsonObj) and gave value("name","raja") using above code. System.out.println(jsonObj.name); Just print the name but it shows the error.
raja
  • 15
  • 7
-1
votes
1 answer

add parameter to HTTPRequest header

I have form method declared as HTTP get, I have framework level restriction not to use POST request. As I have a restriction in Apache that could not send more parameters as part of GET method in URL. Is there any way to append parameters to…
Ananth
  • 31
  • 4
-1
votes
1 answer

How to authorize a compute engine to access a secured servlet in app engine?

I deployed a jar file in a compute engine, this jar file trying to access a servlet deployed in app-engine with this details: servlet path: https:/pathToAppEngine/tasks/sendMail and its secured by…
-1
votes
1 answer

How to redirect user to random part of url and this url should match jsp page?

I use servlets 3 and jsp and this is configuration question. In servlet for url 'mydomain.com/builder/', I have to generate random ID and append it to my current url, like: 'mydomain.com/builder/randomID0' Next, I want to redirect user to this url.…
Jay Smith
  • 2,331
  • 3
  • 16
  • 27
-1
votes
1 answer

addservlet vs createservlet servlet context methods

I'm exploring Servlet 3.0 features for programmatically adding servlets to the context and I can't completely get the differences between: createServlet(Class clazz) addServlet(String servletName, Class
watery
  • 5,026
  • 9
  • 52
  • 92
-1
votes
1 answer

How to use a stylesheet (CSS) in the JSP pages found in WEB-INF (Netbeans)

How would I use a stylesheet (CSS) in the JSP pages found in WEB-INF (Netbeans)? This is what I've tried: Tennis
Jean-Paul
  • 127
  • 2
  • 15
-1
votes
2 answers

java : Is it possible to dynamically modify the code of a servlet's method (like doPost)

I'm trying to write a Framework like Spring MVC. I'm looking for a way to modify the code of the doPost/doGet method of a servlet 3.0 deployed on tomcat using javassist or reflection or whatever so the doPost can call a service method dynamically…
tutanck
  • 11
  • 4
-1
votes
2 answers

How to add Servlet filter using spring.factories

Is it possible to register new servlet filter by using Spring ApplicationContextInitializer? Or is there a way to access ServletContext specifying custom class in spring.factories? Idea behind is to create small library which will automatically…
d-sauer
  • 1,485
  • 1
  • 15
  • 20
-1
votes
1 answer

prevent refresh of my jsp page on submit button clicked

I am working on jee project, When I am clicking the submit button, the function of the button is right but the page is refreshing so the data that i entered on text field for example will be deleted!!! the code of my jsp is:
Jamél Samar
  • 3
  • 1
  • 3