Questions tagged as 'servlets'

2
answers

Where should JSP files be created?

I am starting to learn about java web with tomcat and it is giving me problems where to place each file. The servlets and the java classes, I am creating them within src but the files jsp , html , the view of my application, w...
asked by 04.06.2016 / 22:57
3
answers

pass data to a jsp from a java class

How can I pass data from a query to a jsp? Let me explain: I have a jsp page from which I get parameters, I pass them to a servlet, this in turn executes a query class that goes to the bd, but I do not know how to pass the result of that quer...
asked by 01.08.2016 / 03:31
1
answer

Multiple Sessions in Java Web?

Good morning, have all of you. My question is this, I have a coupon printing system for raffles, made in NetBeans (Servlets), this system has the option to log in and enter, until there everything works fine. The problem begins when registering...
asked by 18.11.2018 / 18:07
1
answer

Jsp does not recognize Javascript files

I'm doing a web application with JavaEE and I need to pass certain parameters from a Servlet to a Jsp, I do it like this: request.setAttribute("car", per.getCarrera().getNombre()); And for the redirection: request.getRequestDispatcher("/o...
asked by 20.10.2018 / 23:05
3
answers

I need to list an arrayList in java, but only list the first element of my array

I need to list an array to show it in a table (specifically the user table with its attributes), I'm using JSTL to show the data in the JSP, the only problem is that it only lists the first object of my ArrayList, here I leave the code of the fu...
asked by 18.07.2018 / 18:18
1
answer

Send variable from Scriptlet to Servlet

Good evening people from Stack Overflown, I write pq I have a problem and I would like to see if you could help me A teacher sent us an exercise where you should create a shopping cart and by pressing the submit button you should show the res...
asked by 13.04.2018 / 06:06
1
answer

I need to make a user validation in a JSP Login with Servlet

if(bte.equals("ENVIAR")){ if(g.alta(p)){ validar="Error al registar"; }else{ validar = "Registro Insertado"; } }//registrar By pressing the blank send button without fie...
asked by 16.04.2018 / 03:55
1
answer

Can I work with Java EE without using JSP?

My doubt is that if I can work javaEE without using JSP, because what I have read JSP is like a template where you specify html tags along with java code, I understand that we can work without JSP, because we directly we can implement the servle...
asked by 27.02.2018 / 07:51
1
answer

How to insert data in a single column?

I want to insert in a table column T_tiphab but I can not tell me:    ERROR 1452 (23000): Can not add or update a child row: a foreign key constraint fails ( reservas . T_tiphab , CONSTRAINT T_tiphab_ibfk_1 FOREIGN K...
asked by 05.01.2018 / 01:34
2
answers

When request.getRequestDispatcher is redirected to a doGet or a doPost

Dear Luiggi, I have a huge doubt. I schedule with Servlets and I got the following surprise: I send data by submit to a servlet_1, then it is captured by a doPost (included!) from this servlet_1 -> doPost I do a request.getRequestDispat...
asked by 20.09.2017 / 18:42