Category "servlets"

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));

How to avoid duplicate submission form when Servlet take long time to response

I have a problem in java Servlet. Suppose i have two Servlet and two page(jsp). In index.jsp client enter your mobile number and submit form to sendSMS.do. send

HttpServletRequest unable to get body of request

I'm trying to create a little test servlet (Tomcat 10) to accept simple "POST" messages, however no matter what I've tried the servlet never seems to get the bo

How to calculate age from date of birth

I have a user registration form where all user data is stored in database. I am listing all user data in the UI in a member listing page. In there I have to cal

Information flow when redirecting from HTML to Servlet

I have a question regarding the information flow of a simple link. Let's say I have an HTML that does this: <a href="servlet">Go to Servlet</a> A

Servlet 5.0 JAR throws compile error on javax.servlet.* but Servlet 4.0 JAR does not

I am trying to compile and deploy a simple web app from command line. servlet-api.jar from Apache Tomcat does not compile my java file, but javax.servlet-api-4.

java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z

I am trying to connect my Servlet to mysql database using data Source . But whenever I run my servlet I end up getting this exception : java.lang.AbstractMetho

Java Servlet: How can I retrieve selected radio button values?

I have created a simple servlet in which a user will be presented with 2 questions, answering either true or false. My problem lies in retrieving the answers se

Play java video streaming with player

I want to steam live video using Java to a player (FlowPlayer, JW Player, etc) I found an example but it is using java servlets: Servlet code: byte[] data =

How to iterate through an array list on a JSP without JSTL

//I have retrieved a Result from MySQL and created and Array-list User .i have sent this //US er Array-list in and sent it through request Response Object. Now

How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resolved

I don't know what I've done incorrectly, but I can't include JSTL. I have jstl-1.2.jar, but unfortunately I get exception: org.apache.jasper.JasperException: