Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Browsing all 714 articles
Browse latest View live

After upgrading to Spring Boot 3.0, still referring to javax.servlet

I recently upgraded my project to Spring Boot 3.0, and now I'm encountering an issue where the class javax.servlet.ServletException is still being referenced, even though Spring Boot 3.0 uses Jakarta...

View Article


Image may be NSFW.
Clik here to view.

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 Article


How to set up a Facelets template for a Jakarta Servlet web application (not...

This question was asked on Stack Overflow more than 12 years ago, and the answer was "No". Today, JSP is considered a deprecated technology, and Facelets has replaced it.However, my application is not...

View Article

Java Servlet Filter Capture Root Path [duplicate]

I am creating a small servlet project to mock an authentication flow. I am performing authentication with a servlet filter sitting in front of a few JSP pages.To map the urlPatterns captured by the...

View Article

Vaadin 23, Blank index.html page when routing any URL

I am trying to run a page using Vaadin 23, but I get index.html on any urlMy project uses:java version=17spring-mvc version=5.3.20apache tomcat version=8.5.85But as a dependency manager on the project...

View Article


javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7fa2258640:...

I am trying a demo Android app to connect servlet (both local server and aws instance) it gives Handshake failed error. I have tried with volley and http client also. The relevant code and logcat...

View Article

Accessing ServletContext and HttpSession in @OnMessage of a JSR-356...

I need to get the ServletContext from inside a @ServerEndpoint in order to find Spring ApplicationContext and lookup for a Bean.For the moment my best approach is to bind that bean in the JNDI naming...

View Article

Jar related to com.msi.dbo.menuitems is not found in google [closed]

import com.msi.dbo.menuitems.*;In my old project having JSP's the compile is failing due to the package does not exist.Tried everywhere in google but did not find any jar related to this in internet. I...

View Article


HttpServletRequest to complete URL

I have an HttpServletRequest object.How do I get the complete and exact URL that caused this call to arrive at my servlet?Or at least as accurately as possible, as there are perhaps things that can be...

View Article


How can I get MIME type of an InputStream of a file that is being uploaded?

Simple question: how can I get MIME type (or content type) of an InputStream, without saving file, for a file that a user is uploading to my servlet?

View Article

Embedded Jetty with WebAppContext and ServletContextHandler and other Handlers

I an using embedded Jetty server in my java application. I want to use a web application (war file) and a Servlet in embedded jetty server dynamically at the same time. For that I am using...

View Article

How to add a "meta" element to the HTML in a response from a Servlet?

In Jakarta Servlet 6.1, how does one add a meta element to the response from a servlet?For example, in HTML5 we can specify a character encoding like this:<meta charset="UTF-8"> The meta elements...

View Article

Error while running my first servlet program

I am trying to run my first servlet program. But getting errorHelloWorldServlet.java:5: error: package javax.servlet does not existimport javax.servlet.ServletException;^HelloWorldServlet.java:6:...

View Article


Custom OncePerRequestFilter reads empty request body – why is the body...

I'm developing a Spring Boot application (with Spring Security) and need to add default headers (specifically, Content-Type and Content-Length) to requests targeting the endpoint /api/v1/mpos/set-token...

View Article

IllegalArgumentException ("getWriter() has already been called for this...

SummaryWe're seeing an intermittent IllegalArgumentException during HTTP response serialization using Spring Boot 3.4.2 on Kubernetes. The exact same image sometimes works perfectly, and other times...

View Article


Servlets and jsp and html [closed]

Type Status ReportMessage The requested resource [/Login/loginServlet] is not availableDescription The origin server did not find a current representation for the target resource or is not willing to...

View Article

Server http://localhost:8081 requires username and password

I am trying to access localhost:8080 but it is showing me I need to enter user name and password.I tried to enter the password that I was playing with but non of those are working. Is there anyway I...

View Article


MongoDB Java Driver returns all documents instead of matching filter in Java...

I'm building an Expense Tracker web app using Java Servlets and MongoDB. I want to filter expense documents based on user and category (e.g., user: "chir", category: "education").However, when I run...

View Article

java.lang.IllegalStateException: getReader() has already been called for this...

I want to add logging to my Servlet, so I've created Filter which should display request and go to the Servlet. But unfortunately I've encoutered exception:java.lang.IllegalStateException: getReader()...

View Article

not working for jakarta netbeans only for SELECT statements

This Code is not working on Apache NetBeans. I'm using jakarta not javax. Apparently it works on javax.<%@page contentType="text/html" pageEncoding="UTF-8"%><%@taglib prefix="c"...

View Article
Browsing all 714 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>