Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Browsing latest articles
Browse All 784 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


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

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

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


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


What'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 Article

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

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

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


ServletException: 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 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


java.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

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


Java servlet download filename special characters

I am writing a simple file download servlet, and I can't get correct filenames. I tried URLEncoding and MimeEncoding, the filenames as seen in existing answers, but none of them worked.The fileData...

View Article

Image may be NSFW.
Clik here to view.

Eclipse Build Path Nesting Errors

I'm working on a simple JSP/Servlet/Tomcat webapp for my class. The professor asked us to use a folder structure that is slightly different than the default dynamic web project structure. Rather than...

View Article

How to get host name with port from a http or https request

I have two applications deployed in a JBoss container (same unix box). If I receive a request from app1, I need to send a corresponding request for app2.An Example: If app1 requests:...

View Article

Disable save button in Adobe PDF reader and hide menu bar in IE window

I am trying to render a PDF via servlet,using Itext for getting PDF file.Need to disable save ,print option in adobe pdf reader menu bar while other options like scroll,find should be there and in...

View Article


Java Servlet HttpSession not maintained on Weblogic session forward

I come a long way asking this question here and am slightly out of options so I thought I would refer instead to this site which seems to always have an answer to most of my problems. Sorry for the...

View Article


Error 404 occurs when accessing pages within web-inf in the production...

Error 404 occurs when accessing pages within web-inf in the production environment, however the error does not occur in the development environment. The server is Tomcat 9. Java 8.I simply can't find...

View Article

java.net.HttpRetryException: cannot retry due to server authentication, in...

We have two parts in our app:Server - provide REST servicesClient - consume them via Spring restTemplateIn addition to the HTTP status our server returns an HTTP body with JSON that describe error in...

View Article

updating jetty servlet 9.2.2 to 9.3.8 [closed]

I'm trying to update Jetty server and servlet from version 9.2.2 to version 9.3.8. After updating my pom.xml file, I get some errors like ServletContextHandler and ServletHolder are not found.Here is...

View Article


What's the purpose of "async-supported" in file 'web.xml'?

Consider:<servlet><description>xxx</description><servlet-name>xxx</servlet-name><servlet-class>com.xxx.yyy</servlet-class><async-supported>true</async...

View Article

How to store usernames and passwords in a very simply registration form using...

I understand how to use session cookies to pass a username and password from servlet to servlet but I am baffled on how to store successful registrations so that when someone new registers it checks it...

View Article

Fix "No primary or single unique constructor found for interface...

I want to build a Register and login module for my application and ran into the error in the title.My login.html<!DOCTYPE html><html lang="en"...

View Article

How to change the default jdk in Netbeans 30

I am using Netbeans 30 as well as jdk 25.Whenever I am trying to run a servlet on Payara server, it says that Payara server cannot run on the default jdk 26 of Netbeans.I edited the netbeans.conf file...

View Article



Controller and service layers: where to write, how much logic, and how to...

I have this setup:Controller layer (servlet for handling the requests)Service layer (for processing the needed service for model)DAO layer for interacting with db for particular modelFor instance, I...

View Article
Browsing latest articles
Browse All 784 View Live


Latest Images