Questions tagged as 'servlets'

2
answers

SQL query to check free rooms with PreparedStatement in Java

I have this query that I pass it to @raintrooper, in this other query that I did How to check if a room is available? : declare @Vfechaentrada date, @Vfechasalida date declare @reservaciones table ( habitacion int, fechaentrada date, fechasa...
asked by 13.12.2017 / 11:28
2
answers

Pass HTML table data to servlet

Greetings, I have the following table in which I am adding items. <table class="table table-hover"> <thead> <tr> <th>Codigo</th> <th>Descripcion</th>...
asked by 03.10.2016 / 00:28
4
answers

Should I always use a servlet to work with web applications?

I want to create a web application using Java. I have some knowledge of the language, and when searching online tutorials they always mention the creation of a servlet . Is it necessary to learn and use servlets to create these types of ap...
asked by 05.12.2015 / 19:21
1
answer

How to pass a Java String to Javascript

It is a java web application project. I want to put a bookmark using google maps, I have my jsp where I show it and I have the javascript where I use the api. I have a java where I make the connection to the bd MySQL and another where I make the...
asked by 27.10.2016 / 02:12
1
answer

Problem when registering a product

The problem I have is that when I register, in this case a product, it registers normal but the problem is that it registers it 2 times, it registers everything well in the Database but what happens is that it sends it 2 times and Obviously an e...
asked by 13.05.2016 / 05:16
1
answer

Send and get array of arrays js in servlet

I want to send an array of arrays to a java servlet via ajax, receive that data and go through it. Ex: var datos=[[1,2,3],[4,5,6],[7,8,9]]; $.ajax({ url: servlet, dataType: 'json', type: 'post', data: { lista: datos }, succes...
asked by 24.06.2016 / 18:22
1
answer

Problem login jsp & servlet with boolean attribute administrator in user class

I have problems to register, before I just registered as a user and it worked, now I register as an administrator and it does not enter, and if I register as a user it enters the path / admin, I leave code as it shows so that the error is seen....
asked by 18.06.2016 / 21:17
1
answer

Inject EJB into controller

I'm with a JEE application based on Servlets and EJB 3.1. I want to inject the EJBs by annotation. From the Servlet itself I can do it, but if I do it through another class (a Controller) it does not inject it. Let me explain by example: I ha...
asked by 28.06.2018 / 15:08
2
answers

Is it possible to run a servlet from a Thread class?

I'm doing a web application with JSP. This application has to show the result of a query in a table. The difficulty is that this has to be shown when the application is opened (url), without pressing any button. I thought about doing a Thread th...
asked by 14.06.2016 / 22:57
2
answers

redirect to a servlet from an ajax passing values

Hello, what I want to do is redirect to a servlet from a jsp using ajax, since I have to send data that are not in the form, but should not be seen in the url colo are mascot, age and the token since the latter expires every so often, so it must...
asked by 14.12.2018 / 19:47