Questions tagged as 'servlet'

1
answer

Pass variable from the daughter page to the parent page in jsp

I am making a simple crud in java using jsp and servlets . And I came across the following situation: I have layout.jsp which makes the include of another dynamic page, which in this case will be excluir.jsp ....
asked by 22.02.2017 / 19:09
2
answers

How to limit the amount of addresses that a user can have in the database

I have a database, and I have the user table and the address table. I need to validate in some way so that a user can have a maximum of 5 addresses in the registry. I use the PostgreSQL database and treats an application with Servlet. Any sugges...
asked by 24.11.2016 / 20:23
1
answer

Method call inside the JSP

Good morning everyone! I was having trouble formatting dates in jsp, but with the help of friends here, I managed to resolve. The problem is that I think my code is far from the good practices in JSP, I had to program it inside the page, but...
asked by 23.01.2017 / 12:12
1
answer

Events and changes in a JSP?

Hello. I have a jsp being a chat (due to a restriction, I'm using Struts 1). In this JSP, I have the following div : <div class="conteudo" id="conteudo" name="conteudo"> . I need to return an automatic response (can be an...
asked by 18.11.2014 / 20:02
2
answers

Transfer .class files to the / web-inf folder in Eclipse

I am developing a web project for a final college job. When creating .jsp files for the application, it fails because it does not find the servlet class. Classes and .class files must be inside a hidden folder called classes. Do I have to cre...
asked by 21.05.2014 / 01:24
0
answers

Error using resources of a Servlet

Good evening colleagues, Please, I need the help to understand what is going wrong, I have the following form: form action="CronogramaNegocio" method="get"> <div class="col-md-3 form-group">...
asked by 11.11.2018 / 03:19
0
answers

Redirect Servlet to JSP passing data

I am doing a library project, I register Book, Publisher and Parents and then view them in the JSP. When I register the data appear normally in the JSP but if I refresh the page they are re-registered. I've never used Servlet and JSP before....
asked by 11.06.2018 / 00:43
1
answer

How can I show an image that is in the database using jsp?

Well, here's the thing. I'm using JSP, SERVLET and MySQL to insert images into my project, I just happen to save the image path in the database, and then call that path to show the image. Hence the problem: <% ArrayList<Fotos>...
asked by 19.11.2017 / 20:02
0
answers

Write image format in the database

By registering the product data in my database it presents the error in getFileType at line 124 follows error Line 124 String extensao = nomeDoArquivo.substring(nomeDoArquivo.indexOf('.' + 1)); java.lang.StringIndexOutOfBoundsException: S...
asked by 26.10.2017 / 03:31
1
answer

Servlet is giving 404 error

I am trying to create a post application, I started to study Java Web and every time I run the servlet in Apache 8, a 404 error page appears. My servlet package app.web4.servlets; import java.io.IOException; import java.util.ArrayList;...
asked by 25.10.2017 / 14:05