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

Java EE webapp using servlets and freemarker, trouble including css file

In a Java EE webapp using servlets and freemarker as view technology, i can't seem to include css files for proper browser render. I'm only using .ftl for view and i path for css files is inside resources/css, being resources inside 'webapp'. Tried…
Arthur Portas
  • 129
  • 1
  • 2
  • 13
0
votes
0 answers

included jsp page can't call servlet

I have two jsp files login.jsp which has a login form
..........
The second file is pages/errors.jsp which include login.jsp When login.jsp runs it calls…
jmt
  • 223
  • 1
  • 8
  • 28
0
votes
0 answers

scan HTTP POST key-value pairs

In atypical http POST request,customer is appending some key-value pairs as querystrings and some key-value pairs as request payload. Logically,everything should be treated as a query string . How to detect in servlet layer that some of the…
sskumar86
  • 161
  • 1
  • 2
  • 13
0
votes
2 answers

Storing values in arraylist and printing it

i am storing logged in user name in arraylist and than putting the arraylist in session .Whenever the user logged in for the first time it is printing the user name but when refreshing the page the same name is printing twice but i only want to…
rhsabbir
  • 247
  • 1
  • 6
  • 19
0
votes
2 answers

CDI Servlet java.lang.NullPointerException

People, please, help me!!! I am driving really crazy. My code have been working before today, and now it's broken... Here is my servlet: @Stateless class TempSession { void createFile( String fileName ) { try { FileWriter…
nightin_gale
  • 781
  • 3
  • 11
  • 26
0
votes
1 answer

same form in different tabs on jsp page

Based on the number of input i want multiple froms tab to appear on same page in jsp. I am new to this so please help. Below is the image what i want to implement. It is done in .net
user3150808
  • 87
  • 2
  • 3
  • 13
0
votes
1 answer

Change the URL to access my Servlet

I have a servlet which is basically a hello world kind of... The class is: package net.jgp.baseapp.validation.tomcat; [...] @WebServlet(name = "tv", description = "...", urlPatterns = {"/TomcatValidator", "/" }) public class TomcatValidator…
jgp
  • 2,069
  • 1
  • 21
  • 40
0
votes
1 answer

how to specify jsp file upload storage folder path dynamically in server

i wrote file upload programme in jsp in elipse id using cos.jar described in this link i got desired output. -> now i want to specify the path folder to store image in server to be dynamic, because if this path is fixed type to particular directory…
akcHitman
  • 117
  • 3
  • 16
0
votes
1 answer

Why am I getting "java.net.MalformedURLException: no protocol:" when I post form to a servlet?

Good day, in my simple test webapp project I have this Test.jsp file: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
Vojtech
  • 2,533
  • 9
  • 34
  • 65
0
votes
1 answer

Asynchronous servlet 3.0 url mapping

How to set two Url patterns in Servlets 3.0 through annotation as: @WebServlet(urlPatterns = "/flow", asyncSupported = true) public class FlowService extends HttpServlet This example is for one url pattern but I want to set it for two urls.
Charles Stevens
  • 1,568
  • 15
  • 30
0
votes
0 answers

i18n issue using servlet 3 and spring 3.2.3

Im working with spring 3.2.3, servlet 3 and maven 3.1, so i'm trying to use i18n, but for some dark reason i can't start my app saying: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code…
0
votes
2 answers

Does ServletContext.getRealPath() work with web fragments?

I use web fragments (servlet 3 spec) and thus can load e.g. META-INF/resources/access.xml file which is in a library in /WEB-INF/lib/ of my WAR via ServletContext.getResourceAsStream("access.xml"). Doing the same with…
Ginkgochris
  • 455
  • 4
  • 25
0
votes
0 answers

To pass a parameter in HTML5 web sockets to java class

How to pass parameter in HTML5 web-sockets and get this values in java class I passed parameter like this in Chat.initialize function Chat.connect('ws://' + window.location.host + '/examples/websocket/chat?id=man'); my JS code is: var Chat =…
user2976215
  • 51
  • 1
  • 8
0
votes
1 answer

Async Servlet - what it actually gives?

I think, I don't really get concept of asynchronous Servlet. First of all, why we had to mark asyncSupport = true? Whether it true/false I can created ThreadPool and add task to it, to execute that task asynchronous, right? So what is the…
abc
  • 2,371
  • 3
  • 25
  • 36
0
votes
0 answers

webfilter css missing when redirecting requests

i am working on webfilter to control access to all pages in my JSF application,the filter makes sure if the user is logged in then redirect him to his home page ,if not the user will be redirected to the login form , every thing works fine but the…
Scaou
  • 1
  • 1