Questions tagged as 'java'

1
answer

Doubt - HashMap

I need to go through a list of hotel reservations and, for each such reservation, capture the Event that is associated with it. At the end of the process I need to say how many hotel reservations each event has and finally play the result on the...
asked by 24.06.2017 / 18:51
1
answer

Starts the bank service with a role

I would like to know how I can do a function that as soon as I start the software, I can start the database service if it is turned off. to use java with swing, netbeans and MySQL Thank you in advance.     
asked by 25.06.2017 / 15:04
0
answers

How to receive the actual location of a file

I upload files to a folder, which works when running in eclipse. But when I try to upload through a browser, I am not allowed to upload it because of its security. My question is, is there any way to get the browser to return the file locatio...
asked by 06.07.2017 / 15:59
0
answers

Hibernate: query performance drop after a few repetitions

I am developing a Farm Management system. One of the basic queries is to list the animals by type that are alive (% with%). Below is the method that performs this query. public List<T> findByInFarm(T model, boolean inFarm) throws DAOExce...
asked by 23.06.2017 / 16:10
1
answer

Corrupted image using UploadedFile of primefaces with FTPClient

Hello everyone, I have a problem with the "File Upload" component of Primefaces. When trying to save the file via "FtpClient" the file gets corrupted. Form configuration <h:form id="formNavegacao" enctype="multipart/form-data"> The...
asked by 11.07.2017 / 21:54
0
answers

How do I resolve the Arrayindexofbox exception in this program?

package projecto_algoritmia; import java.util.Scanner; import java.io.File; import java.io.FileReader; import java.io.FileNotFoundException; /** * * @author Jeje */ public class Projecto_Algoritmia { /** * @param args the comma...
asked by 23.06.2017 / 21:43
0
answers

Registration screen return

I have a registration screen, which compares the edittext text with the bank field, and this comparison is working normally. What I would like to do is that if there was already the email field in the bank, the activity does not proceed. C...
asked by 11.07.2017 / 18:19
0
answers

Calculated field in Java

I'm doing a Java project and I have a database with two tables and one with a calculated field. The calculated field is of type "time" and was done with the UPDATE nome_da_tabela SET Nome_do_campo = TIMEDIFF(hora2, hora1) I have two prep...
asked by 23.06.2017 / 13:17
1
answer

Prime components do not appear

My web.xml. <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/ja...
asked by 22.06.2017 / 22:11
1
answer

Authentication and Security JAAS with multi modules

I'm working on an application with the following architecture: As you can see the system will have several modules. In Project Portal I implemented JAAS, and I am not able to maintain authentication when I enter another module within...
asked by 23.06.2017 / 13:57