Questions tagged as 'jsp'

1
answer

How to print the name of the Browser or the OS in a JSP - Java Web

I would like to know how to print the browser the client is using and the OS if using jsp. Some people have suggested using ${header["user-agent"]} however, this command returns a lot of information and I would just like the browser and O...
asked by 21.11.2016 / 01:29
1
answer

avoid Form Resend Confirmation

I'm developing an application and when I click on save it redirects to where I want it updated. But if I refresh the page it asks if I want to take advantage of the data passed before, I would not want that to happen That's how I'm doing:...
asked by 01.12.2016 / 23:26
1
answer

How to display a confirmation message after checking in the servlet?

Good afternoon everyone! When I click the Change button, I 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? Example: I select the material I want to change, fill...
asked by 13.11.2016 / 19:34
1
answer

SimpleDateFormatt write with empty field

I'm having trouble writing an empty field because it's being formatted with SimpleDateFormatt .. Writing the console generates an error java.text.ParseException: Unparseable date: "" Servlet private void gravarProximo(HttpSer...
asked by 14.11.2016 / 04:02
0
answers

Exception in the Filter of only one page

I have a filter @WebFilter ("/ *") that blocks everything, however, I would like it to have exception of a few pages ... A page (or one I chose) was not blocked What is it like? @WebFilter(urlPatterns = {"/retiro","/valor","/pessoa","/ga...
asked by 22.12.2016 / 21:25
3
answers

Error comparing java strings

I have the following situation. I get a string that is in the ApplicationStorage location in a javascript variable. <script> var sendForm = localStorage.getItem('f'); </script> This same string I pass to a java variable t...
asked by 21.12.2016 / 19:10
1
answer

How to convert String to Double using JSP FMT EL

Hello I have a string 9,9, I would like to convert it to 9.9 and double it to do sum Currently I use this way: <c:set var="media" value="0" /> //onde a funcao.valor é uma string 9,9 <c:set var="ontem" value="${ontem + funcao.valor}...
asked by 03.11.2016 / 15:13
1
answer

reCaptcha - submitted form is validated?

I'm implementing reCaptcha, the box with the checkbox for the user to click and confirm that it is not a robot being presented, however I have doubts if it is really working, as I am using: "... if(grecaptcha.getResponse() == "")..." And I...
asked by 05.11.2016 / 23:37
1
answer

Problem with enconding: JSTL fmt

I'm using fmt to do internationalization of texts on a page. It turns out that when using accents, the text gets strange characters. I tried to change: <fmt:requestEncoding value="UTF-8" /> but there was no difference. Is there any ex...
asked by 05.09.2016 / 15:58
0
answers

Load * .pdf file into a JSP page

I was able to open a page from a * .pdf file in Acrobat by java from this code: try { File pdfFile = new File("C:\testes\teste.pdf"); if (pdfFile.exists()) { String cmd = "C:\Program Files (x86)\Adobe\Acrobat Reade...
asked by 19.08.2016 / 18:44