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

HTTP Status 405 - HTTP method is not supported by this URL

I have the following servlet:public class MyServlet extends HttpServlet { private static final long serialVersionUID = 16252534; private static int ping = 3000; private Thread t; private static boolean...

View Article


session.invalidate() is sometimes not working and not destroying the session...

Public class Logout extends HttpServlet{ @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession();...

View Article


Database ConnectionError

java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1892) at...

View Article

commons-fileupload and jakarta.servlet

We are currently in the process of migrating our application to Spring Boot 3. We have been using the Commons FileUpload streaming API to directly load large multipart files into a remote file share....

View Article

servlet page is blank

I have a html page where i get the no of tickets to be booked from the user. it thus goes to an servlet page called a1 where insertion and updations occur. from there it moves to another servlet called...

View Article


GetParts() returning null in servlet [duplicate]

Hello guys i'm facing a problem with my code, i have a jsp form that send a file into a servlet, and when i try to extract the file using request.getParts() it return null value wheni try to print it...

View Article

How to Use an External JAR Offline in a Maven Project for Servlets Without...

enter image description herehttps://i.stack.imgur.com/G40Rx.pngclick above to get that photo,Hello Everyone, I seek your assistance with a Maven project that involves servlets. As depicted in the...

View Article

Filter out / remove extension from spring rest api

I had to upgrade the dependencies of a project...

View Article


Nothing happens when I click on a link(Java) [closed]

What should I do if nothing happens when I click on a link (on the created website) and it doesn't send me anywhere? Everything is fine with the link and the servlet is there (Java, IDEA)package...

View Article


The servlets named [ClassName] and [com.example.ClassName] are both mapped to...

I have created a little Java Jsp program to learn Java Jsp.But when Itry to show the data in the browser I allways get this error message.Can someone please help me with this problem? I just post the...

View Article

Unexpected servlet config parameter contextConfigLocation=

I am working on an old service that uses servlets in tomcat v7.0.99 with java v11. I have not used servlets in years, so I am unfamiliar with configuration of the servlet container. Tomcat fails to...

View Article

return if a user exist in database

I have a MySQL database where I have a userid and a password column. Each of them has the value "mads". I have some problems that I have been struggling with some days now, because I didn't program so...

View Article

Read an image file using okhttp3.RequestBody in java and send it to client...

I tried to below code to send the response as byteStream, but I cannot read the image in my client side using Javascript.Code to get image file:Request getResponse = new Request.Builder()...

View Article


flutter Multipart file upload server side error: Unable to process parts as...

Flutter:var request = new http.MultipartRequest("POST", url);request.fields['name'] = 'John';request.files.add(http.MultipartFile.fromPath('file1','/path/to/file1.jpg',));var response = await...

View Article

Servlet not displaying data obtained from dao [duplicate]

in daopublic class DAO { Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; public List<Product> getAllProduct() { List<Product> list = new ArrayList<>();...

View Article


How to accurately replace scripts / html before saving data from servlet to...

So this sounds like a very basic question, but I seem to find very little information about it online.I imagine a simple replace with regex, something likereplaceAll("\\<.*?>", "") but is it...

View Article

Excluding list of URLs from servlet filter

What could be the best practice for Excluding a list of URL patterns from below servlet filter?Use case: Create a whitelist of URLs that could be skipped through the below Http servlet...

View Article


How to get ServletRequest in any class using @Context or similar?

I've used @Context to access the HttpServletRequest in the past, and it's worked.I've got another class where I've tried to use this, but it's not being assigned, (ie request is...

View Article

Image may be NSFW.
Clik here to view.

How can i connect my 4 objects in my jsp file so it can run perfectly...

So i have been working on this project my teacher gave me. A SIMPLE(but problematic for me) Java website made from 4 objects, 1 servlet, and 1 jsp file. And after long hours of finding the error, i...

View Article

Best Practice to skip URL pattern's from getting applied servlet filter...

What could be the best practice for Excluding a list of URL patterns from below servlet filter?Use case: Create a whitelist of URLs that could be skipped through the below Http servlet...

View Article
Browsing all 675 articles
Browse latest View live


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