All Questions
3,781
questions
0
votes
0
answers
23
views
Why does a java servlet retain bad form entries? [duplicate]
We have a special search page in a java web app running on a Tomcat 9 server. The page uses a form with a few <input> tags of type "text". During some testing I was doing, I found a ...
1
vote
1
answer
93
views
Can't use external css styling with jsp [duplicate]
I'm just trying to learn servlets and using JSP files. I would like to do the format of the start page (/login page) with external css file but I didn't manage to do that. It works with internal css ...
0
votes
0
answers
15
views
Tomcat 9 servlet: cannot decrease buffer size for writing the response
I found the strange behavior of the Tomcat 9 servlet: when a client is disconnected before the servlet returns the response, the response is still "returned" without raising any exception.
...
0
votes
1
answer
37
views
Asynchronous event-driven servlet in Tomcat 9 for long polling
I am looking for a best practice to implement the long polling in Tomcat 9, to enable sending messages from the server to the client by using the HTTPS protocol.
Using a synchronous I/O doesn't seem ...
0
votes
0
answers
12
views
I am trying to implement notification system using SSE in tomcat server, how to hold the connection in the server with the user identity [duplicate]
I am new to Java Servlet concepts and Web Development with Java.
I am trying to implement a notification System using ServerSentEvents.
I know that whenever an announcement was made, It will be stored ...
0
votes
0
answers
26
views
implementing SSE (Server Sent Events) in java Servlet for sending notification by calling wait inside the HttpServlet [duplicate]
I am trying to implement real-time notification system using Servlet and ServerSentEvents
This is the following code I have implemented
@WebServlet("/notification")
public class ...
0
votes
0
answers
44
views
I am getting directed to the wrong url while running new Dynamic Web Project on a server [duplicate]
I am starting with learning JSP and servlets and while setup i followed all the steps correctly and added the tomcat server then created a servlet in a new package for a dynamic web project. But ...
0
votes
1
answer
96
views
Implementation of SSE(Server Sent Events) using HttpServletRequest.newPushBuilder() Always Returning null
I am new to SSE - server sent events implementation.
I am trying to implement SSE using java jakarta.HttpServletRequest.
import java.io.IOException;
import jakarta.servlet.annotation.WebServlet;
...
0
votes
0
answers
39
views
How to Access Direct Buffer Used by Tomcat for Sockets in a Servlet's doPost Method?
I'm currently working with Apache Tomcat web server, and I came across a feature mentioned on the official Tomcat website regarding socket.directBuffer support. This implies that Tomcat can use direct ...
1
vote
3
answers
133
views
Java Servlet does not recognize my route/class [duplicate]
I am running a Java servlet using JDK 17, Tomcat 9.0 and Maven on VSCode. I am facing the problem that, when I create a new class to use a new route, Tomcat returns me an Error 404 saying that "...
-1
votes
1
answer
62
views
Tomcat does not create a new request instance on every client request
I learned when a request comes in from a client, the Tomcat generates a new request instance for each request.
So I print out HttpServletRequest's hashcode but it was always same
Here is my code,
...
0
votes
0
answers
31
views
Unexpected servlet config parameter contextConfigLocation=<NONE>
I am working on an old service that uses servlets in tomcat v7.0.99 with java v11. I have not used servlets in years, so I am unfamiliar with configuration of the servlet container. Tomcat fails to ...
0
votes
0
answers
12
views
session.invalidate() is sometimes not working and not destroying the session object. What should I do? [duplicate]
Public class Logout extends HttpServlet{
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession ...
0
votes
1
answer
57
views
Getting Status: HTTP Status 404 after running Maven project on Eclipse and Tomcat " The requested resource is not available" [duplicate]
I am making a simple Maven Project using Eclipse. There is a form that has Username and Password and a submit button.
When I enter and submit the default username(admin) and password(admin). It should ...
0
votes
0
answers
269
views
IncompatibleClassChangeError: javax.servlet.http.HttpServlet (while deploying a Spring Boot project in a JBoss WildFly environment)
This is my error message:
IncompatibleClassChangeError: javax.servlet.http.HttpServlet
In my opinion, the primary error appears to be this one:
Caused by: java.lang.IncompatibleClassChangeError: javax....