Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Browsing latest articles
Browse All 762 View Live

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


Apache 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 Article


Create a servlet in VScode maven project

I have created a maven-archetype-webapp in VScode and created a folder Servlets in src/main/. This folder Servlets contain servlets. And I have also added tomcat server but when I am trying to run this...

View Article

how to kill HTTP session after action completes?

I am calling one action for csv download in IE9 using OAF framework.After processing gets completed, browser is showing the csv to Save or Download.But, problem is my browser gerts hanged with...

View Article

HttpServletResponse sendRedirect permanent

This will redirect a request with a temporary 302 HTTP status code:HttpServletResponse response;response.sendRedirect("http://somewhere");But is it possible to redirect it with a permanent 301 HTTP...

View Article


BeanAlreadyExistsException - 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 Article

How to use slf4j-api > 2 in jersey servlet container

I have a Jersey servlet project, where I organize the depencies with maven. It runs in Tomcat.Update of slf4j-apiNow I am trying to use...

View Article

Tomcat login error

I'm trying to develop an web app using java. I was using apache tomcat 7 and it was working fine. But today I installed tomcat 8. Then I transferred my web app to the new installation of apache. But...

View Article


How to run Java Servlet in Eclipse or NetBeans with Tomcat

I have a servlet. I'm new in java. But i need to run the servlet. It has two methods:public void doGet (HttpServletRequest request, HttpServletResponse response) {...}and public void doPost...

View Article


Deploying another servlet to a wildfly instance

I'm trying to deploy a second web application to a Wildfly server currently hosting a single application. I've made the following modifications to standalone.xml (see Accessing Multiple web...

View Article

Spring 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 Article

Can't import javax.servlet.annotation.WebServlet

I have started to write app that can run on Google App Engine.But when I wanted to use my code from Netbeans to Eclipse I had an errors on:import javax.servlet.annotation.WebServlet;and@WebServlet(name...

View Article

Connecting Java backend(Servlets) to Vercel frontend(fetch API). Cors Error

So basically I have put up my backend on Render web Service (on tomcat) and my frontend(Nextjs) is on Vercel. I have put up a Filter for Cors Policy to intercept all policies and as well as handled...

View Article


Error 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 Article

Video file streaming from java server to iPhone

I have this java servlet which serves video, this works fine in desktop and Android browsers but in iPhone video is not displayed.here is my servlet code. OutputStream output; try (InputStream input =...

View Article


How to prevent (hold the refresh button) DoS Attack

My website is very dynamic and its collecting data from the database. while I was testing I pressed the refresh key and hold it for some time, the server went down. (This is a simple DoS attack). How...

View Article

How 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


Image may be NSFW.
Clik here to view.

(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 Article

curl 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 Article

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

render xhtml file from servlet

I wonder if there is a way to load, interpret and render a .xhtml file from a servlet.What I want is to have a xhtml file witch contain for example a custom row within a list, to be loaded from a...

View Article


Database connection in Java Servlet [duplicate]

I'm trying to connect to a database in a Java Servlet, but I am unable to connect. I searched on google and each website is showing different way I don't know why.Here is the code that I tried to...

View Article


How to get the @RequestBody in an @ExceptionHandler (Spring REST)

I am using Spring Boot 1.4.1 which includes spring-web-4.3.3. I have a class annotated with @ControllerAdvice and methods annotated with @ExceptionHandler to handle exceptions thrown by the service...

View Article

HttpServletRequest 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 Article

Handling 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 Article


Not 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 Article

Image 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 Article

SEVERE - 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 Article

Eclipse web project does not always appear in Add/Remove of Tomcat [closed]

I am working on a Java web project in Eclipse using Tomcat 10.1.49.My servlet code compiles with no errors, and I am mapping it using annotations:@WebServlet("/test")public class TestServlet extends...

View Article



Share 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 Article
Browsing latest articles
Browse All 762 View Live


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