Questions tagged as 'servlet'

1
answer

how to convert a string request.Parameter to integer [duplicate]

In a program that I have to do I came up with this difficulty Familia.setSalariodoPai(request.getParameter("salariodoPai")); But this request is returning a String and I would need Integer .obs this snippet is in a servlet doGet     
asked by 13.03.2016 / 06:25
2
answers

Uploading files with Java

Good morning! I was trying to upload files, where I have a webpage that makes a request for my servlet. In the form of the page I have an input of type file and another one of type text. The coding mode of this form is as "multipart / form-data"...
asked by 31.01.2018 / 11:10
1
answer

Error while serving servlet - Java 7 vs Java 8

I rented a VPS server and when trying to connect my android application with Java EE, I received the following message: type Exception report message app/server/CSelerServer : Unsupported major.minor version 52.0 (unable to load class app....
asked by 23.09.2016 / 21:17
2
answers

NullPointerException on a servlet when using DataVoting method

I'm working with a servlet but this is giving% error of% when I use the method of object java.lang.NullPointerException . Here is the code: @Override protected void doGet(HttpServletRequest request, HttpServletResponse response)...
asked by 29.08.2015 / 13:08
2
answers

Problems with else if in servlet

I'm messing with jsp. In my servlet I have if and else if and both send to the same page, only with different values. However, when you enter the if option (it shows the result) and then when you return the page and t...
asked by 15.01.2015 / 21:57
1
answer

How to make it load the complete welcome-file url

In web.xml it is mapped like this: <welcome-file-list> <welcome-file>agendamento/index.xhtml</welcome-file> </welcome-file-list> When opening the application in the browser is opening right, but I need this url t...
asked by 06.03.2014 / 15:02
2
answers

Servlet attributes for more than one JSP?

I have a Servlet that does the following: L_sessao.setAttribute("Login", usuario); response.sendRedirect("InicioCliente.jsp"); It sends the user name to the HomeClient.jsp page, on this page I can recover it without any problems. But I need...
asked by 16.10.2018 / 20:33
1
answer

How to remove the project name in the Java Servlet Url

I have a question and I have already searched the entire internet and I did not find, how the hell did I get the name of the url project in java? ex: http://localhost:8084/MeuProjeto/login for http://localhost:8084/login Thank you!...
asked by 20.11.2017 / 22:42
2
answers

java.lang.NullPointerException JSP Servlet

I'm developing a web application using jsp and servlet and I want to show all my records from my database and the amount of records in a table, I created a DAO where I performed queries where they returned the data correctly and put a session in...
asked by 14.09.2017 / 06:31
1
answer

Filter passes before the login servlet

Good evening, I have a question, I do not even know if I need to post the code to solve it. The filter is being called before the login servlet, ie the user is never logged in. How do I get the servlet called before? Remembering that I do...
asked by 30.05.2017 / 23:05