Most voted "jsp" questions
Javaserver Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML, XML, or other types of documents. Launched in 1999 by Sun Microsystems, JSP is similar to PHP, but uses the Java programming language.
Learn more…390 questions
Sort by count of
-
16
votes1
answer9352
viewsDifferences between JSF and JSP
Web programming a little while ago (4 months) and went straight to JSF, I mean I didn’t study anything about JSP. I started taking a course and my teacher kind of belittles JSF saying that it has…
-
14
votes3
answers20505
viewsHow to resolve the error - The superclass "javax.servlet.http.Httpservlet" was not found on the Java Build Path
I’m using Eclipse Mars.1 for web development, I received this error when including a file JSP, The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path. I also have…
-
10
votes2
answers1019
viewsHow to avoid HTML Injection and XSS on . JSP pages?
In the PHP have seen uses of htmlspecialchars and mysqli. But in Java there is some way to avoid XSS and HTML Injection? I would also like to know what would be the best way (the safest): Escaping…
-
8
votes2
answers456
viewsError in include JSP
I have the following situation: Servlet instantiated at the root /Minhaservlet Jsp instantiated in a folder inside the root: /folder/file.jsp Inside that file I have the following <img…
-
8
votes1
answer81
viewsUser without access to resources mapped in the Security-role of the web.xml
What is the behavior of security-role of web.xml when the user does not have access to project resources? It is default for Weblogic to return a 404? This status is configurable? There is the…
-
7
votes1
answer120
viewsDoubt with Servlet
Hello, I have a question with Servlet’s. Picture the picture: raiz / / formulario.jsp / Servlet / retornos / retorno.jsp The form sends to Servlet the data by post or get! After this submission,…
-
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
votes1
answer1128
viewsWhy put . jsp file in WEB-INF directory?
Taking Maven as an example, when starting a new web project, the structure is equal/similar to this: Meu Projeto |- src |- main |- java |- resources |- webapp |- WEB-INF Where, in the directory…
-
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…
-
6
votes1
answer221
viewsDoubt about inserting Javascript object
Context I am trying to make the persistence in the database of a purchase as well as all of its items. For this I am using a file .jsp. But I need to send the data from a web page. The purchase data…
-
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
answers3778
viewsUsing JSP and JAVA
I’m starting to mess with JSP. But I’ve been using JAVA for some time. I have the index.jsp file which is my page and I have my indexJava.java which is the program itself. I would like to know how…
-
5
votes1
answer1469
viewsHow to make a site multilingual and identify the country of origin?
I am developing a site in Javaee and would like it to be multilingual (at least English, Portuguese and Spanish). But I would like to know how large websites, such as Facebook, for example, do to…
-
5
votes1
answer4182
viewsGet File Size in Bytes in Java Script
I am validating the size of the attached file on my page before uploading using the following code: var tamanhoArquivo = parseInt(document.getElementById("documento").files[0].size);…
-
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
answer1115
viewsInput loading data from Modal
Good afternoon! I’m trying to make a modal to fetch the products and assign it to the input. Idea: When I click on the input, it opens the modal. Then I choose the product in the modal and it loads…
-
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
votes2
answers2215
views -
4
votes2
answers1765
viewsSort by value in Datatables
I am using the Bootstrap SB Admin2, which makes use of the component Datatables. On my jsp page I am loading the following table: <table class="table table-striped table-bordered table-hover"…
-
4
votes1
answer2159
viewsHow to pass the value of one variable in JSP to another in Javascript?
I’m trying to define the value of a variable within a tag script with JSP expression language. I tried this to check that the value was not empty: <c:if test="${!empty newsletter.id}">…
jspasked 9 years, 7 months ago Renan Gomes 19,011 -
4
votes1
answer163
viewsError executing function for the second time
Inside the controller I have this function: public void salvaEncaminhamento() { Integer qtdEncaminhamento = 0; if (manifestacao.getTbEncaminhamentoCollection() != null) { qtdEncaminhamento =…
-
4
votes2
answers13018
viewsUsing Bootstrap for Multiselect Dropdown with Checkbox
I found on this site: (http://www.webslesson.info/2017/05/bootstrap-multi-select-dropdown-with-checkboxes-using-jquery-in-php.html) a code that he uses Bootstrap to help create a multiselectable…
-
3
votes1
answer701
viewsHow to not filter only a folder in JAVA - Filter
I’m using a class inherited from Filter in Java to do login control. I did the mapping on Web.xml as follows: <filter> <filter-name>ValidacaoLoginFilter</filter-name>…
-
3
votes0
answers821
viewsHow to return an imported value from one JSP page to another?
I have two JSP pages: in one it checks a condition of client links, if it has no link, it enters a function that calls another JSP to import client data. He even imports the data but, when he…
-
3
votes1
answer856
viewsSpring MVC in HTML pages without JSP
1 - You can use data sent by Spring Controllers in HTML pages (using HTML5 tags), not to use JSP? 2 - If not possible, how can I make JSP pages with Spring MVC with minimal Java code intrusion on…
-
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
votes2
answers1762
viewsPass JSP model to Springmvc controller
Could someone please explain to me how to correct my JSP error? This form will serve to register products in my system, it receives a list of product categories from the database. My Product…
-
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
answer208
views500 Action does not contain method named
I’m making an action call but I get Exception that the method doesn’t exist in Action: 500 Action[/historicoAction] does not contain method named listar Would anyone know what’s going on? Follows…
-
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
votes2
answers612
viewsJSP - Using request in a method
I am trying to use a request within a method as follows: <%! public void method() { RequestDispatcher disp = request.getRequestDispatcher("t2.jsp"); disp.forward(request, response); }; %> But…
-
3
votes1
answer121
viewsExport to database
I load 3 Strings from a CMS. String Data da Noticia String Titulo da Noticia String Texto da Noticia Within a loop, create the query to insert with these 3 strings. I’m just having some problems.…
-
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
votes4
answers369
viewsDoubt in database query, error in query
I am doing a work on Java Web ticket sales system and I have a question in my code to bring this data example: In select I consult 3 fields of my table: origin, destination and date the problem that…
-
3
votes2
answers148
viewsHow to write a JSP page using characters from other languages?
I’m writing a JSP page that uses Japanese characters and I’m using the get method, but when I switch to the post method it doesn’t work. I’ve tried to use charset = Shift_jis, but nothing!! Page…
-
3
votes1
answer379
viewsHow to mount a link in JSP with the value of an input?
You can mount a link(href) or action(form) by taking the value of an input to pass to a @Pathvariable of a method in the controller? My code is next in the controller:…
-
3
votes1
answer778
viewsImplement Filter Access Control - JSP
You can help me implement a java filter access control? This was the implementation I tried to do so far, but I couldn’t make it work. public void doFilter(ServletRequest request, ServletResponse…
-
3
votes0
answers137
viewsUpload excel (.xlsx) with jsp
I am developing an application to submit Excel files to an application. However if I try to submit a file .txt,works properly if I send a file .xlsx the file copied to the server directory appears…
-
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
answer58
viewsGraph without image jsp
Hello! I’m looking to generate graph by jsp I tried to follow that tutorial But only a little square appears in the left corner of the page when I run Filing cabinet Torta.jsp <% try{…
jspasked 8 years, 2 months ago adventistaam 3,354 -
3
votes2
answers1041
viewsA link to go back one level in the folder hierarchy and go to the level below in another folder
Hello. The problem is this: inside the Webcontent folder I have the hotel folder and inside this hotel folder I have the arqivo cadastro_hotel.jsp. In the Webcontent root, I have the menu folder and…
jspasked 8 years, 1 month ago André Nascimento 1,258 -
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 -
3
votes1
answer110
viewsHow can Maven’s archetype webapp work without web.xml?
I tried creating an app Maven archetype webapp in Eclipse JEE Photon: File > New > Maven Project > Next > maven-archetype-webapp 1.0 It generates the following file structure: . |-- src…
-
3
votes2
answers1399
viewsFind element in HTML and add a class with pure Javascript
I need to locate a class called uk-slideshow inside the HTML, after locating, I need to check inside the uk-slideshow image, if you have, add a class in this img. PS: It’s more of an image. The…
-
2
votes2
answers1115
viewsStatic jsp content is not shown
I’m using netbeans 7.3.1, apparently it’s working ok. Pages are opening normally, but when I try to access css content, jpg, ... within the Resources folder, no content appears. In the file…
-
2
votes2
answers2660
viewsHow to grab a file extension?
I am using JSP and HTML and need to select a file and know its extension. The only way I know how to open a file is with input file but with it I can’t get the extension. How can I get this result?…
-
2
votes2
answers1597
viewsRemove JS file via JS
I have a site that has the fixed side menu and the other part is loaded the pages. For each page of the site I made a js file. For example: Home.jsp I have the home.js file, Contacts.jsp I have the…