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

redis.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 Article


How to Send a List of Objects with MultipartFile[] and Metadata in a Single...

The official documentation describes what to do if you need to get both json and multipart data from a request:@PostMapping("/")public String handle(@RequestPart("meta-data") MetaData metadata,...

View Article


How do I send an e-mail in Java?

I need to send e-mails from a servlet running within Tomcat. I'll always send to the same recipient with the same subject, but with different contents.What's a simple, easy way to send an e-mail in...

View Article

Quarkus - problem accessing HttpServletRequest

I'm developing a Java application, using Quarkus 2.13.8.Final.There is a simple endpoint, in which I'd use the HttpServletRequest instance: @RequestScoped @Path("/rest/user") @Slf4j public class...

View Article

Difference between Filter and Listener in Servlet (Java EE)

There are Filters and Listeners functionality in Servlet. I want to know exact difference between Filter and Listener.

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

javax.servlet.Filter ClassNotFoundException OAuth2 [duplicate]

I'm trying to implement OAuth2.0 in my Spring Boot backend service, but I'm encountering the following error when adding my SecurityConfig class:Caused by: java.lang.NoClassDefFoundError:...

View Article

Image may be NSFW.
Clik here to view.

Changed my language level to 15 on intellij-idea and now it doesn't recognize...

I was working on a maven project in intellij-idea and for some reason decided to change my java language level to 15 from 8 and now it does not recognise the jakarta package that I imported.I tried...

View Article


What are the security risks on making public the command...

I am trying to fragment my custom applications, while keeping the total design standard.I have recently learned compiling java applications to native exe files on windows with graalvm.I am thinking of...

View Article


java servlet error on compile [duplicate]

So I was compiling a package using javac -Xlint from the command prompt and then it was complaining: package javax.servlet does not existI know that this refers to the servlet jar from the tomcat and I...

View Article

Login servlet app with session and cookies

I need to codificate a login servlet in java, using cookies as well. These are the requirements:-The page has to offer both registration and login (the user choose what to do). If they choose to...

View Article

How to properly configure Jakarta EE libraries in Maven pom.xml for Tomcat?

I have been trying in vain to implement tomcat 9's jakarta servlet as opposed to the previous javax.servlet implementation (as its my understanding that the jakarta package is the way forward). The...

View Article

How to forward a request from the servlet to the action in Struts 2?

I want to forward a request from Servlet to Action using RequestDispacher like thisRequestDispatcher dispatcher=request.getRequestDispatcher("hello.action");dispatcher.include(request, response);It's...

View Article


Hard-coding HTML element names

I know that when the name of an HTML form element changes, in order for the Servlet that is processing the form to retrieve the parameter, it has to be aware of the updated element name. I'm trying to...

View Article

Test is not abstract and does not override abstract method getServletConfig()...

The code:import javax.servlet.*;import java.io.*;public class Test implements Servlet { public void init(ServletConfig config) throws ServletException { System.out.println("i am init()........."); }...

View Article


Unable To Instantiate Servlet Class While Deploying WebApp through Tomcat...

I was trying to make a servlet for webapp, In INTELLIJ IDEA. While deploying there was no error but when the servlet is called in the web, it says"jakarta.servlet.ServletException: Error instantiating...

View Article

Image may be NSFW.
Clik here to view.

Why com.google.code.gson package can not convert value of java.sql.Timestamp...

What I do?I sent a GET request from Postman to Tomcat v9.0 with following data.{"diaryId":2,"userId":2,"createTimestamp":"2022-05-05 12:00:00",...

View Article


Image may be NSFW.
Clik here to view.

Why are they sometimes inconsistent? value of java.sql.Date type received...

issueintroWhy are they sometimes inconsistent? value of java.sql.Date type received from server Postman then is deserialized by com.google.gson.Gson (and before instantiating the Gson instance, I...

View Article

How to hide query string URL in Struts 2 [duplicate]

How to Hide query string URL in Struts 2.We are using third party URL , when we hit the URL it open a PDF, we want to hide some parameters in query string URL.In the URL there pass invoice number and...

View Article

Tomcat ignore metadata-complete="true" with servlet 6.1

My application does not use any servlet annotations. That I want skip the scanning for annotations. But it look like that Tomcat 11.0 ignore the metadata-complete="true"attribute. Do I have to handle...

View Article
Browsing all 675 articles
Browse latest View live


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