Most voted "servlet" questions
Servlets are programs that run on a web server or application server, acting as an intermediate layer between the request coming from a web browser or some other HTTP client and a database or application that runs on the HTTP server.
Learn more…191 questions
Sort by count of
-
0
votes0
answers56
viewsgetNamedQuery back null
I have a namedQuery that for some reason, is returning null results from the database. The namedQuery itself: @NamedQuery(name="Usuario.userLogin", query = "SELECT u.email, u.senha FROM Usuario u…
-
0
votes0
answers145
viewsERROR while trying to recover data on JSP
Error: org.apache.jasper.JasperException: An exception occurred processing JSP page /ViewAluno/index.jsp at line 20 17: 18: <body> 19: 20: <input type="text"…
-
0
votes1
answer853
views -
0
votes2
answers313
viewsError running Java program - Mapping Servlet Web.xml
I have the following software, it should allow me to pass a file, will send a message on the console to just positive access to a class and list the result on the page, I’m starting and do not know…
-
0
votes1
answer244
viewsHow to show a confirmation message after checking in Servlet?
Good afternoon, you guys! By clicking the Change button, I perform a check to see if the data in the database remains the same. How do I return a confirmation window if the results are not the same?…
-
0
votes0
answers559
viewsHow to generate/send (Server-Side) JSON via Java and receive via Jquery (Client-Side)?
I’m having trouble exchanging information between my web application (client) and my application java on the server side. I am trying to query the server via JQuery and hoping to receive as a return…
-
0
votes1
answer148
viewsUse request.getattribute("key"))
I am passing a List list and want to recover in jsp through request.getattribute("key"): @Override protected doGet(HTTPServlet request, HTTPServletResponse response) throw new ServletException {…
servletasked 7 years, 11 months ago André Nascimento 1,258 -
0
votes0
answers66
viewsDoubt about JSP page by calling
If I consider that an application has run a JSP page through the call http://localhost:8080/application/list.processes Which of the alternatives is correct? a - Pode existir um servlet acessando um…
-
0
votes0
answers255
viewsJSP does not display images or find CSS and Javascript
Good night, I’m having a weird problem, I’m trying to display images, map CSS and JS in jsp and it’s not working, it just doesn’t, the weirdest thing is that I’m using the c:url tag of "jstl/core"…
-
0
votes0
answers107
viewsServlet to add Contacts in mysql does not work
I have an html uploading request for a servlet which answers with error but when I have a class rotated testaAdicionaContato. mysql 5 table: create table contatos ( id BIGINT NOT NULL…
-
0
votes2
answers452
viewsComparison request.getParameter with JSP string
I’m wanting to pick up what the user will type with request.getParameter and compare with a String and if the value the user enters is equal to string, the user is redirected to the page but this is…
-
0
votes1
answer394
viewsResultset is not positioned correctly, you may need to call next
I am developing a web application using JSP and Servlet and that registers the product data in the database and present the data in a table, but when trying to see the image registered by the…
-
0
votes1
answer1259
viewsConvert String to Date (request.getParameter)
I have a form in JSP that makes a register that has a date. <form method="Post" action="InserirCompromisso"> titulo : <input type="text" name="titulo" required="true"> local : <input…
-
0
votes0
answers127
viewsjava.lang.Nullpointerexception when passing to Servlet
Good morning I’m having a hard time passing the data of a jsp to Servlet that will insert the data in the database, I made three forms for scheduling and in the third it will send to Servlet but it…
-
0
votes1
answer72
viewsA function run infinitely in Servlet
I have a Servlet application that constantly receives POST requests, I do the data processing and processing normally in its due Java classes, however one of my applications it should not be rotated…
-
0
votes1
answer61
viewsApache Tomcat mirroring - Work
Explanation : Currently when we update our client’s project it is "off the air" during this update, the idea is to be able to update the project without having to stop the client, I saw something…
-
0
votes1
answer162
viewsError passing Jasperreports subreport path
Good afternoon guys, I’m having a problem I’m not getting past the subreport path to the main report. I’ll go with the code I’ve made so far, please help me, I don’t know what I’m doing wrong.…
-
0
votes1
answer953
viewsHow to make Ajax requests in Java
Good Morning I’m developing a web application where I need something simple: when the user selects a state in a Combobox, the system shall update another Combobox with all cities. I am programmer .…
-
0
votes1
answer529
viewsSend a Servlet object array to a jsp page
I need some help I have a Servlet that returns an array object p with a select query. I would like to know how to display this object in my jsp in HTML input fields (text box)
-
0
votes0
answers258
viewsSubmit html form to a Servlet
I made a connection with mysql and I’m making a crud on its own java. I want to use html and send to java to do the crud. From what I read, you need a servlet. I tried to do it, but I couldn’t. They…
servletasked 8 years, 1 month ago André Nascimento 1,258 -
0
votes0
answers119
viewsReceive a json as Java Servlet parameter
I’m developing a API using java Servlet, would like to know how do I receive a JSON in the body of the request as parameter and save to a database? Example: { "nome": "José da Silva", "email":…
-
0
votes1
answer57
views -
0
votes0
answers59
views500 error on Servlet instantiation
Hello. I am trying to make a Servlet, but Tomcat does not find this Servlet class. The error is: HTTP Status 500 - Error instantiating Servlet class…
servletasked 8 years ago André Nascimento 1,258 -
0
votes1
answer28
viewsSimpledateformatt write with empty field
I’m having trouble recording an empty field as it is being formatted with Simpledateformatt.. Saving the console generates an error java.text.ParseException: Unparseable date: "" Servlet private…
-
0
votes1
answer2531
viewsHow do I get user id in a session?
I am doing a project using jsp and Servlet, I need that when a user logs in, his id is saved in the session, so that with this id, the system knows that this id user is making changes to his data…
-
0
votes1
answer86
viewsWhat is the purpose of the Servlet protected void service method and why can’t you override it?
Would you like to know why you can’t overwrite the service method? In the book he says you shouldn’t overwrite it, but why? But if I use the super.service(request, sponse) I won’t be calling the…
servletasked 4 years, 10 months ago Matheus Braga 1 -
0
votes0
answers154
viewsrequest.getRequestDispatcher is not working and shows no errors
I have a problem in request.getRequestDispatcher("Valida.jsp"). forward(request, Response); from my non-forward Folder to the Valida.js page. I need to go from an HTML to a javascript (by Ajax) that…
-
0
votes2
answers1507
viewsJava and Hibernate date formatting
Good morning, everyone! I am trying to return a formatted date, is in the database as date, but for return could be a string msm. Some friends have indicated two modes, either creating a new method…
-
0
votes1
answer57
viewsURI Rest with Httpservlet
So, guys, I’m developing a mini framework for study purposes, using the Java front controller, and I came across the following problem. First of all I’ll explain how it’s working. I embed the Jetty…
-
0
votes0
answers196
viewsProblem to return to jsp by changing url using sendRedirect in Servlet
I log in to my jsp, so I have Servlet do the checks, and return to jsp, but returning the url continues with the Servlet path, and not with my index.jsp follows part of the code that returns to my…
-
0
votes1
answer815
viewsLoad data from a method list to Servlet
Good afternoon people! I have this method in Servlet that returns a list of values. How do I load the values it has, with jquery?…
-
0
votes1
answer1509
viewsJSP Eclipse Project - Linking CSS style page
how to correctly link my style sheets in my JSP Servlet project? Below is the structure of my project. Also I do not know if the correct hierarchy. Help me. I already tried ..…
-
0
votes1
answer38
viewsDoubts - JSP - Servlets
Good morning, you guys, I’m having difficulties to perform the CRUD in a test app.... I made it with the default (almost) MVC, the problem is that by clicking on the form of "New Product" and…
-
0
votes1
answer1126
viewsHTTP Error Status 405 Servlet
I’ve been doing the "5.5 First Servlet" exercise of the Caelum FJ21 Java Web booklet, "http://localhost:8080/fj21-agenda/oi" to access the page occurs error: HTTP Status 405 - HTTP method GET is not…
-
0
votes1
answer294
viewsJSP with Servlet
I’m trying to get Servlet to work as a controller I was following the booklet from Caelum but I can’t find the error the jsp to Servlet @WebServlet(urlPatterns = "/LoginInfo") public class LoginInfo…
-
0
votes1
answer83
viewsPass JSP date to Servlet
I have a Datepicker bootstrap as below, and I have a button that must pass the date selected in datepicker to the Servlet that will use this date as parameter for a mysql search. How can I pass this…
-
0
votes1
answer387
viewsPass and receive data to Servlet in the same AJAX Function
Do you have any way to send parameter to Servlet and receive a json in the same AJAX Function? Example of what I need: function UpdateGrafico(){ $(function () { //--------------------- //aqui…
-
0
votes1
answer292
viewsEditing a record with Daialog primefaces framework
I’m a beginner in the java and java web world, starting with jsf, primefaces and I’m having a problem that I’m not able to solve. I have a datatable listing some data, I have the ajax event to…
-
0
votes1
answer307
viewsProblem with Firebird Hibernate bank connection
I have an application in java that provides Rest services with Servlets and Hibernate, which at first works perfectly. I can make thousands of requests to various services that recover information…
-
0
votes1
answer135
viewsI cannot put Servlet value on the JSP page
I am trying to validate the login and password of the user, in which if you do not enter the login and password fields a message will appear on the screen "Please fill in the login fields or…
-
0
votes0
answers234
views -
0
votes1
answer734
views -
0
votes2
answers800
viewsProblem when mapping Servlet in web xml
I’m getting error 500 when trying to map Servlet, I don’t know what can be, I think it’s the class Servlet is wrong. Servlet public class addContatoServlet3 extends HttpServlet { protected void…
-
0
votes1
answer244
viewsWhat is the problem with this java class that consumes a Rest service?
I have a Servlet : import br.edu.ifpb.pos.model.Art; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import…
-
0
votes1
answer442
viewsSend login and password in Javamail email
I am developing a web application using jsp and Servlet and I would like that when sending the email an image is passed and the login and password but the email only send the image and does not send…
-
0
votes1
answer35
viewsHow else to do it?
I am getting this error when I try to upload data to the page via Ajax. There is another way to send Json objects from Servlet to JSP without using document.write? error: "A parser-blockingis…
-
0
votes1
answer118
viewsServlet is responding but ajax does not reflect the answer
Good morning, I have a simple form in which I do Ubmit via ajax, then my Servlet takes this result and gives an answer, from the answer ajax will do something. I can see the answer in the browser,…
-
0
votes1
answer456
views -
0
votes1
answer131
views -
0
votes0
answers60
viewsAngular Authentication 2 - Java Servlet
I have a problem using an API to which I can not make changes, it happens as follows, I have a Folder extending from a security library, that library is in charge of making the logins, allow the use…