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

Ajax Call to servlet and load new page

I want to load an Ajax loader image on clicking the href link with id="test". After clicking this href I want to call a Jsp Servlet which will sent an new request to load an new .jsp page.The problem...

View Article


I can't get servlets to work on a personal project I'm working on (Intelij...

So I'm trying to create a WebApp on Intelij Ultimate about a telecom website and I wanna get familiar with servlets but i can't get them to work properly<!DOCTYPE...

View Article


How to create a library that will work for both Spring Boot 3 and Spring Boot...

I have a library I'm creating that has a bean that is RequestScope and it has an autowired HttpServletRequest object. This works fine when used in a Spring Boot 2 application. But when I try to use...

View Article

I am getting directed to the wrong url while running new Dynamic Web Project...

I am starting with learning JSP and servlets and while setup i followed all the steps correctly and added the tomcat server then created a servlet in a new package for a dynamic web project. But...

View Article

404 error when redirecting to Servlet from a html page [duplicate]

So I'm trying to create a WebApp on InteliJ Ultimate about a telecom website and I wanna get familiar with servlets but i can't get them to work properly<!DOCTYPE...

View Article


Maven build successful but compiled class files contain unresolved type errors

I have a project that compiles to WAR file, when I am using 'clean install' to build my project it is giving "Build Success", but when I decompile some files it is giving following lines in the...

View Article

How to resolve 413 Request Entity Too Large error in Java Web App in Azure?

I have a Java - JSP and Servlets web application hosted in Azure. One of the function in web app allows user to upload a comma separated CSV files. However when the file size of more than 2.8MB, the...

View Article

An established connection was aborted by the software in your host machine...

Below is a stacktrace I get when my rest service tries to fetch a large data set (database and tomcat are on my local machine, so everything is local). It works on smaller ones, but in some cases user...

View Article


Can you authenticate a login through a servlet with a database?

so im trying to get my web app to redirect the user depending on what role they have from objects in a database. i have a basic login page that redirects you to a servlet where i then want to connect...

View Article


Cookies are null in interceptor HttpServletRequest, however the same cookies...

Cookies are getting null in getCookies() method of interceptor HttpServletRequest, However the same cookies are available in HttpServletRequest in the filter class from getCookies() method. Is anything...

View Article

Async Filter in Spring Jetty causes IllegalStateException

I have a simple spring application with a single controller:@Controller@RequestMappingpublic class TestController { private static final Logger log = LoggerFactory.getLogger(TestController.class);...

View Article

Unable to compile class for JSP: The method prs(java.lang.String,...

I upgraded from Apache Tomcat 9 to 10, but when I uploaded my project (developed a few years ago) I got the following errorAn error occurred at line: [9] in the jsp file: [/index.jsp]The method...

View Article

How to transform jakarta.servlet.http.HttpServletRequest to...

I use package com.oreilly.servlet to upload files to my server which is build by Tomcat 10, but it seems this package is old and the class MultipartParser need javax.servlet.http.HttpServletRequest as...

View Article


Moving from tomcat9 to tomcat10, system still tries to load...

My servlet used to work on tomcat9. I try to use tomcat10.I removed javax.servlet-api-3.1.0.jar from my build path and added jakarta.servlet-api-5.0.0.jar.I changed any reference to javax.servlet in my...

View Article

Invalidating old httpsession drops current httpsession's context

My app handles logins with a @ViewScoped LoginBean, which is injected with a @SessionScoped SessionBean that stores user information and the current HttpSession. This app allows a user N separate...

View Article


Keycloak CustomUserStorageProvider always returns "invalid_user_credentials"...

I am currently working on integrating Keycloak with a custom user storage provider. I have implemented a CustomUserStorageProvider to authenticate users against my own database via HTTP requests....

View Article

How to send a redirect after generating a file download in Servlet

I'm developing a web page using Java Servlets and JSP. I have functionality where, depending on the received action (action), different operations are performed. However, I'm encountering an issue with...

View Article


My class is not a servlet error

I have the following servlet codepublic void doPost(HttpServletRequest request, HttpServletResponse response){ Backup bup = new Backup(); bup.doBackup(); response.setContentType("text/html");...

View Article

How to effectively close/destroy/terminate sessions?

I have a servlet where i validate the login using POST and logout using GET. So, i want when i click on logout button, i cannot go back to previous page because the session is terminate. But it did not...

View Article

JSP file output not updating after changes [Eclipse Internal Web Browser issue]

Let me start off by saying that I'm completely new to JSP and servlets. I'm using Eclipse and Tomcat 7. I tried the answer given on this question: JSP page is not getting refreshed after updating, but...

View Article
Browsing all 714 articles
Browse latest View live


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