SEC_E_INVALID_TOKEN (0x80090308) - Jetty HTTPS servlet
I am trying to solve an issue with my Jetty servlet running over HTTPS.This is an error in the browser:This is an error in the curl:What I did:I created my Keystore and Truststore as is described here:...
View ArticleApache Velocity - Resource not found exception
I have a requirement to generate some automated mails and so I wanted to use velocity for this task.I have copied all velocity jars to the lib folder and created a hello.vm template and placed in...
View ArticleBeanAlreadyExistsException - Oracle WebLogic
I deployed an app on my web server and now I am trying to deply another one on the web server and I am getting a BeanAlreadyExistsException. I thought it might be due to the fact that I have two beans...
View ArticleSpring Security ExceptionTranslationFilter throw "Unable to handle the Spring...
I'm using spring security web 5.0.9 and tomcat 8. ExceptionTranslationFilter throw ServletException "Unable to handle the Spring Security Exception because the response is already committed."I dig into...
View ArticleError 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException...
I have created a servlet.java file for my application and added it in web.xml as follows:servlet:public class CheckServlet extends HttpServlet implements Servlet { @Override protected void...
View ArticleHow to handle HTTP 510, 598 and 599 error codes in web.xml
We use weblogic to deploy our application, the requirement is to handle all the server errors, in web.xml and have 500 through 510, 598 and 599. The specification of error codes - 510, 598 and 599...
View Article(httplog)-static: issbsettingenabled false android
I am developing Android app and running in Samsung J7. The problem is while running the app it show the error "(httplog)-static: issbsettingenabled false" is there any way to enable httplog true or an...
View Articlecurl url with option location not working properly
I have a Java Servlet app deployed on WebLogic. The client makes a POST request say /WebServletApp/employee.EmployeeServlet (doPost) receives it and for some specific condition i.e not always, the code...
View Articleredis.clients.jedis.exceptions.JedisConnectionException:...
While trying to use Jedis.get(key) while accessing the Redis using Jedis I'm getting this error.redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write...
View ArticleHttpServletRequest details returning null with @Async Spring
I would like to extract the URI of an incoming request.I have the following code in my application - a @RequestMapping which is @Async. I would like to extract the path URI via request.getRequestURI()...
View ArticleHandling delete a parent record using java JDBC , jsp , servlet
I have an Employee management application that can perform operations on tables in the database.My problem is when i try to delete a parent record (department record) it doesn't delete it because the...
View ArticleNot any listener for ServletConfig
While there is a listener for ServletContext events, why there is none for ServletConfig events? Or if it is there, kindly tell me what is it?
View ArticleImage not displaying when running Java Servlet project on server (but works...
<img src="images/logo.png">I created a web project using HTML and Servlets (no JSP).When I open the HTML file directly using “Open in Browser,” the image displays correctly.But when I run the...
View ArticleSEVERE - For security constraints with URL pattern [/*] the HTTP methods...
I am getting this error when I start Tomcat:SEVERE - For security constraints with URL pattern [/*] the HTTPmethods [POST GET] are uncovered.What is the reason of this?I think this is a different...
View ArticleShare variable/object between multiple servlets
Suppose I want to create a simple counter app with three different servlets: one to read the value (GET), one to increment and one to decrement the value (both...
View ArticleApplication migration to Websphere Liberty
I am migrating an application to liberty based. the application is servlet based and Jsp files based. I have created dockerfiles, helm chart and liberty config files like server.xml. my application is...
View ArticleCan we open mysql connection from a servlet ? (using mysql connector)...
I have a DatabaseConnectionOpen.java class as follows :package db;import java.sql.*;public class DatabaseConnectionOpen {static String dbHost = "jdbc:mysql://localhost:3306/javaweb?useSSL=false";static...
View ArticleHttpServletRequest - how to obtain the referring URL?
I need to log URLs that are linking to my site in a Java Servlet.
View ArticleGenerated servlet error: default methods are not supported in -source 1.5...
I am using Netbeans version 8.2 to practice my spring MVC project.The version of default IDK provided by netbeans is 1.8 , I am using this project to learn form validation. I am using all the libraries...
View ArticleHow do i read an incoming JSON from JavaScript inside a servlet in doPost()?
I'm trying to send some JSON information from a JavaScript client through XMLHttpRequest (Ajax) to a servlet in java, but I do not know the proper way of getting and decoding the data. I've seen many...
View ArticleJetty 12 cannot load ResourceServlet
I'm running a Java 21 web application with a static part under /webapp path. Until Jetty 11, we used the DefaultServlet for this. Now we get a warning that it is recommended to use the ResourceServlet...
View ArticleSSL/TLS protocol version in Java EE
Is there any way in Java EE to know what SSL/TLS protocol is being used for a secure connection?Ideally I want the application to use TLS/1.2 for everything, but I know some browsers (IE 9 say) by...
View ArticleImplementing remember-me/stay logged in logic in a Servlet
I would like to implement a remember-me functionality in my very plain servlet-based system. No Spring, No Shiro, nothing. I'm mightily struggling to make it work.On paper, it seems fairly...
View ArticleInputStream closed when using DeferredResult
I have an old application where the client uploads large files over a very slow connection (GPRS). Currently we use Spring MVC and the older servlet 2.0 standard and get the request inputStream...
View ArticleWhat's the difference between getRequestURI and getPathInfo methods in...
I'm making a simple, very lightweight front-controller. I need to match request paths to different handlers (actions) in order to choose the correct one.On my local machine...
View ArticleHow do I get the remote address of a client in servlet?
Is there any way that I could get the original IP address of the client coming to the server?I can use request.getRemoteAddr(), but I always seem to get the IP of the proxy or the web server.I would...
View ArticleDisplaying search results with JSP and JS not rendering
I'm currenlty working on a hotel management system, and for user management, the user should be able to search the user accounts by their ID, username, or email.So I'm having trouble with displaying my...
View ArticleJava Web Application "Event Listener for Expired Sessions"
Is there a way to run Java code, after a HttpServletRequest Session expired?If a Session expires, I need to make a DB call.Callback and Listener would be useable.
View ArticleServletException: ClassNotFoundException...
I set up a Websocket Server that is supposed to run a servlet which is created by a websocket servlet factory.However, whenever I try to reach the websocket via my favourite browser I get:HTTP ERROR:...
View Articlejava.lang.ClassCastException: class...
I took over some "legacy app" which is a SOAP web service based on WSDL files.As the app was not updated in years and failed to compile with anything but Java 8, I decided, I should try to somehow...
View Article