Category "servlets"

how to insert multiple checkbox values into database?

So, I have a form in that i have two check boxes and both can be checked but when i check both the data is not going into database only the first value is inser

Resources won't load with the second url pattern in J2EE

I'm having a strange problem, i have a servlet that is mapped to /home and /home/next with the web annotation as follows: @WebServlet(urlPatterns= {"/home", "/h

Tomcat 10 on Mac not Recognizing servlet-api.jar when compiling servlet

I'm working on creating a Servlet for a tomcat webpage and the Servlet will not compile. I'm using the servlet-api.jar & mysql-connector.8.0.28.jar for the

jstl variable is not even removed after setting it to null or using the c:remove

im trying to remove a session variable using the c:remove or c:set to ${null} but it did not work. I'm expecting the variable will be removed once I refresh the

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet netbeans in netBeans

I'm developing a servlet that get a some detail from index.jsp form when i submit servlet throws following exception. I'm using NetBeans and Apache Tomcat/10.0.

Servlet returns "HTTP Status 404 The requested resource (/servlet) is not available"

I have an HTML form in a JSP file in my WebContent/jsps folder. I have a servlet class servlet.java in my default package in src folder. In my web.xml it is map

Regex for allowing words which have only first letter as uppercase?

I am trying to make a regex which will validate if all the words have their first letter as upper case. ex like Fruits is allowed but fruits is not allowed. als

Java servlet illegal characters

Original Question I have a Java web application that allows users to create an account and login. For some reason, after someone has sent enough illegal charact

When FileUploadBase.SizeException (FileUploadException) is thrown, it seems the request is repeated (using Commons FileUpload)

I have an Ajax POST call that uploads one or more files to a servlet. In my servlet, I use Commons FileUpload library to manage the uploading file process: priv

HttpServletRequest throws error when used within Aspect

I have a method which has an aspect. When I try to @Autowire HttpServletRequest, and use request.getHeader(something), I get this error - No thread-bound reque

package javax.servlet does not exist | package jakarta.servlet does not exist

javac -classpath "/opt/tomcat/lib/servlet-api.jar" /opt/tomcat/webapps/ROOT/WEB-INF/classes/NewServlet.java I have tried replacing the javax.servlet with "jaka

context.getInitParameter("") and config.getInitParameter("") always returning null

I am a beginner in servlets and JSP and I've tried my best to get the values yet I am getting null, any help is welcomed: This is basic code on using ServletCon

Application logout Cannot call sendRedirect() after the response has been committed

After login to the application and while trying to perform any activity the page keeps loading for some time and logged out of the application. I checked t

why my external css file not loading with html file on my tomcat server

I am beginner and I don't know why my external studentinformation.css file is not loading when I run my Signup.html on tomcat 3.2 or above but loads when I righ

Why I am getting java.lang.IllegalStateException when the validate servlet is called?

I have a login web application. Whenever I login, the request must be validated by validate Servlet and it must be forwarded to admin.jsp Everything is fine exc

JSP is not found with error java.lang.NoClassDefFoundError after renaming it

I am facing typical issue with the simple servlet, JSP application. I have developed some JSP pages and servlet. It works fine. After it, I have changed JSP fil

how to get clicked value and pass it to another jsp page (integer)

I am working in a project in which I have a Display.jsp page which fetches all the records from mysql database and shows in a table on the page. While I want to

Spring Boot Upgrade from 2.3.x -> 2.6.x Breaks mvc forward:

After upgrading From Spring Boot 2.3.x to 2.6.x Forwarding MVC REST Calls doesn't work. We have a controller for /health that returns forward:/actuator/health/.

Error instantiating servlet class org.glassfish.jersey.servlet.ServletContainer

Hi Trying to write a simple rest webservice. And following the tutorial below: http://www.tutorialspoint.com/restful/index.htm But i am getting HTTP Status 500

how to read json array from servlet to jsp

JSONObject,jsonarray cannot be resolved to a type servlet: while(rs.next()) { JsonObject jo=new JsonObject(); jo.put("id",rs.getString(1));