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
-
16
votes1
answer776
viewsHTTP cache headers in Servlets
I would like to know if there are libraries or solutions to treat requests containing headers as Last-Modified, If-Modified-Since, If-Range (for download summary), If-None-Match, Cache-Control,…
-
10
votes1
answer10730
viewsWhat is the difference between sendRedirect and requestDispatcher.forward?
What is the fundamental difference between the use of methods response.sendRedirect("Alguma pagina"); and RequestDispatcher despachar = request.getRequestDispatcher("/Alguma pagina");…
-
10
votes3
answers31029
viewsWhat is a Servlet and what is it for?
I’ve heard a lot about the term servlet, however, I still can’t understand. What really is a servlet? What is the point? What is its practical applicability?
-
7
votes1
answer751
viewsIs it possible to add Origin in the Header of a redirect according to the HTTP protocol?
I am implementing an application where I need to perform a redirect from one server to another and am encountering problems. While performing a redirect, receive the following error message:…
-
6
votes2
answers2013
viewsHow to pass a JSP file to Servlet?
I have a page . jsp, where I have an input file. I need to open this file to use the information contained in it. Suppose it is a pdf. I receive this pdf, sent to Servlet for the purpose of using in…
-
6
votes0
answers1020
viewsDigital Certificate Login ( E-CPF, E-CNPJ ) with Servlet / JSP
Hello. I’m looking to develop a login system similar to what government portals use ( E-CAC, NFE and the like ), where E-CNPJ is used to log in. I did the following: 1) I created and signed an RSA…
-
5
votes1
answer3767
viewsdynamic path out of context in Servlet
To get the dynamic path within the project is easy, just run the code : String path = this.getServletContext().getRealPath(""); Here is returned:…
-
5
votes2
answers3756
viewsHow to save the path of an image in the Database?
I’m using JDBC and picking up an image to save in the database. However I want to save the image in the hard drive and save in the database only the way (path) hers. I wanted to know which is the…
-
5
votes2
answers458
viewsHow do I move the A context session to B context within Tomcat 05
Try two applications made in Java using Tomcat 6 and are in different contexts but one interacts with the other, by being integrated, I need one to be able to pass their session to the other…
-
5
votes1
answer1392
viewsHow to use redirect methods with Java Servlets
Hello, I have a page ordem_servico.jsp with a form that when submitted goes to Servletinsertordemservico which inserts the form data into the database. I am trying to make sure that when the data is…
-
5
votes1
answer566
viewsCreate inputs for images dynamically and move to Servlet without redirecting the page?
I would like to create a button that brings up a input for sending images. This button can be used multiple times. When the user(a) click the Submit, these images should be sent to the server…
-
5
votes1
answer590
views -
5
votes1
answer54
viewsLink does not send parameters and redirects to Servlet
I put on my index page where I have three links one with T-shirts, Bermuda and Pants on href I put so that when clicked on the link it was redirected to Servlet and sent the parameters according to…
-
4
votes1
answer743
viewsBy what means does Android automatically update the calendar?
I am developing an app that is connected on a local network but without internet. I am using an APC 8750 card http://apc.io/products/8750a no battery, ie when off loses the calendar. By which means…
-
4
votes2
answers2215
views -
4
votes1
answer115
viewsProblems with using JSTL
I’m implementing a WEB application with J2EE, but I’m not able to list the data coming from Servletlistarcursos to the Listdecursos.jsp page that uses JSTL. public class ServletListarCursos extends…
-
4
votes1
answer359
viewsWhat programming should be done to use Spring Security with Jboss with annotations?
According to requirements of a project that is in the research phase, I need a large distributed system to work properly with Spring, at the moment I am having a lot of difficulties in integrating…
-
4
votes1
answer533
views"java.lang.String cannot be cast to ..." using access control in Servlet
I have a system made for my company and together I have the new website. I can log into the system normally with the accounts registered in the database, but when I enter a filter into Servlet, I…
-
4
votes1
answer1544
viewsHow to use the Servlet context Listener to start a Servlet so when the application is loaded?
I have the following declared Servlet on web.xml and would like it to be initialized before any of the other application Serrvlets: <servlet>…
-
3
votes1
answer377
viewsHow to ensure that a Servlet is Deployed in Tomcat 7 using Servlet Container 3.0?
I am developing an application that uses the Servlet API 3.0 via Annotations and porting does not need WEB-INF/web.xml file The problem that sometimes when I deploy in Tomcat 7 the Servlet is not…
-
3
votes1
answer561
viewsTwo pages using the same Servlet
I have my main page(index.jsp) uses Servlet for a few little things. Then redirect to the final page.jsp. This page will use Servlet as well, as I need the user to choose the functions (buttons) he…
-
3
votes1
answer1056
viewsHow to include . jsp file in solution?
I am developing Java web applications using JSP’s. I have a file called header.jsp, which contain links from CSS files and other things that are important to my system that is in the root directory.…
-
3
votes1
answer613
viewsHow to know which page is responding to the JSP request
I have several pages JSP , and treat them all in mine servlet Control. I wonder if you have how to identify which page is being displayed so I can do all treatments , requests and responses,…
-
3
votes1
answer99
views"div loading" Servlet
I have a screen that has the function of sending a file to the server via servlet but since this file might be big, I needed to put a panel or a div with a gif of load. I’m wearing richfaces, I’ve…
-
3
votes1
answer176
viewsWhy does my Drivermanager return null Pointer?
Postgresql 9.4 I execute my class Noticias(). Within the method public static void main() class Noticias() a method is called getConexao(); When I execute pagecontroller?=p=noticias in the browser…
-
3
votes1
answer888
viewsHow to open a JSP within a JSP through a Servlet?
I am using a Script but I am not using Servlet to do the desired action within my page index.jsp, the goal is not to use this Script below to open a JSP file inside my home page index.jsp.…
-
3
votes1
answer183
viewsHow to bring the content of a postgis query to a JSP page?
I have postgis with a database that I downloaded from ibge and I need to make a javaweb application that reads the name of a municipality and brings back the data in svg format and displays the…
-
3
votes1
answer1201
viewsError 404 directed/or not to the Servlet. Problems with Layout
I am studying java for web (EE) and would like to know if you could help solve a java problem! I have in my web.xml a call to the erro404.jsp file that is at the root of the site to filter out pages…
-
3
votes2
answers588
viewsServlet with JSP does not insert into the database
I am doing my Interdisciplinary Project of the college and would be an e-commerce. Well, I was following the part of entering in the bank for a booklet of the course I did by Caelum, but I do not…
-
3
votes1
answer192
viewsJquery/Ajax Duplicating
Good afternoon, I already researched this problem here in the forum and tried some solutions but I do not know what I can do wrong. I have this Function that calls my Modal. function…
-
3
votes2
answers118
views -
2
votes1
answer1055
viewsPass parameter between two Jsps
I have the.jsp end page and output.jsp. On the.jsp end page I send the parameter like this: <form action="saida.jsp"> <input type="hidden" name="informal"…
-
2
votes2
answers588
views -
2
votes2
answers847
viewsChanging index.jsp dynamically without reloading the page
Within my index.jsp I have a table that in one of its cells and an iframe that displays one of my jsp, and depending on the type of action taken by the user it changes which page is displayed within…
-
2
votes1
answer56
views -
2
votes1
answer124
views -
2
votes1
answer634
viewsTomcat does not update files
The problem is this, every time I change a file (index for example), restart the tomcat(v7) and F5 tightening in the browser, it stays the same, does not update anything, ie end up staying in the…
-
2
votes1
answer206
viewsWebservice consumed via Servlet error 500 Jboss AS 7
Talk, you guys! I have a project, which I decided to divide in two: a core and a web. The core uses CDI with all rules of persistence and business, exposing its functionality via REST and Json…
-
2
votes1
answer727
viewsShow PDF on the page via Servlet
Hello, I am developing a web application using Servlets and Jsps. I still don’t have much experience with it. My page contains a button that downloads a BD file and a <object> HTML to display…
-
2
votes1
answer2069
views -
2
votes1
answer713
viewsHow to pass information from a JSP page to a Servlet
I need to pass information from a String variable that is on a JSP page to a Servlet. For example: String path = "C: test.jpg"; How do I get this information from Servlet?
-
2
votes0
answers695
viewsHow to make a download available on a web page having the files on my computer, outside of my web project?
I need to make a web application that the user uploads PDF files and can download them later. The upload part is done, save the files to a folder on my PC /home/william/web. To save the files on my…
-
2
votes2
answers416
viewsUpload files and data SERVLET
How do I receive files and other parameters in Servlet? Follow the sending code: <form action="myservlet" method="post" enctype="multipart/form-data"> <input type="text" name="mytext">…
-
2
votes0
answers41
viewsExtract content from a JSP page to a String in a Java class or Servlet
Good afternoon, I would like to check if anyone knows how to extract content from a JSP page to a String. Example: I have a JSP page with HTML content, I want to pass this HTML content to a String…
-
2
votes1
answer41
viewsWhat is the right way to consume Blobs via JAVASCRIPTS, HTML5, etc?
I am using Google App Engine BLOBSTORE. I already have some images saved on the server now I would like to consume them via browser (HTML5, JAVASCRIPT etc...) It turns out that I have only the link…
-
2
votes1
answer38
viewshttp get method called automatically
Good morning guys, I’m implementing the get a Servlet method here with a very simple logic. If the user passes a url in the default: ".../entities/id", the editing form should be opened with the…
-
2
votes1
answer1092
viewsAngularjs - Problems with accentuation
I’m getting strings on servlet with problems in accentuation. Such as for example: Send $scope.nome = "Pé" to the servlet. In the servlet the line: String nome = request.getParameter("nome"); does…
-
2
votes1
answer288
viewsNo Mapping found for HTTP request with URI [/Milicia] in Dispatcherservlet with name 'Dispatcher'
Does not find the uris that I type, always gives the same error, I have remade and still the error persists. Follows the relevant classes and files. relevant part of pom.xml <build>…
-
2
votes2
answers79
views -
2
votes0
answers128
viewsHow to differentiate sessions in browser guides?
In a web application implemented in Java using JSP and Servlets, if I store information in the user’s session, this information is shared from all tabs in the same browser. How to differentiate…