Questions tagged as 'java'

0
answers

Is it a good programming practice to write a while with a true argument so that it runs infinitely?

In a hypothetical situation: Is it a good programming practice, writing a while this way? So that it continues to run endlessly? while(true){ System.out.println("Por favor, Escolha: "); System.out.println("1: Adicionar Cliente");...
asked by 10.05.2016 / 19:49
0
answers

Spring Boot [Maven (Multi-Modules)] Managing the application.properties

Well I'm having a little problem I have a project where I'm using a project with Maven, Spring Boot. And inside maven I am dividing the modules [multi-modules] as eg Persistence and Web The Web module is dependent on the Persistence...
asked by 30.05.2016 / 00:55
1
answer

Add row with empty fields in a JTable

I have a AbstractTableModel only that I do not know how to add blank lines, when I hit the add line button in my frame I want it to call a method called addLine () from my TableTable, can anyone help me? public class ModeloTabela2 e...
asked by 29.04.2016 / 14:53
0
answers

Show and receive response from a p: confirmDialog triggered through the Managed / CDI Bean

I have a view with a record button, but the method that executes on the record button does some checks on the bean and asks the user if they really want to save. Show the dialog: RequestContext.getCurrentInstance( ).execute( "PF('confG').show(...
asked by 29.04.2016 / 18:18
0
answers

View PDF in a Dialog

I'm wanting to change the way the user views the system report I'm developing, currently clicking the button to view the report, is given the option for the user to download or open direct in the PDF viewer that is installed on the machine, but...
asked by 01.05.2016 / 20:10
0
answers

Configuration Persisisntece.xml with datasource Glassfish

Next staff I made 2 datasources of glassfish !!!! Where the first is a fixed database !!! Here is the image: Thisdatasourceisworkingcorrectly!!!MysecondIdonotpasstheDatabasepropertybecausethispropertycomesfrommyfirstdatasource,ie,Igetthepath...
asked by 28.04.2016 / 22:50
0
answers

Error org.apache.jasper.compiler.TldLocationsCache

I am developing an application in JSF 2 (Mojarra 2.1.1), JPA 2.0 (Hibernate 4.2.3), Apache Tomcat 7.0.47 and JDK 7u79 and this error message is appearing: / p>    ContextListener:   attributeAdded ('org.apache.jasper.compiler.TldLocationsCac...
asked by 22.04.2016 / 16:48
0
answers

Measure RTT in JAVA

Is there a way to measure latency between a client and a server in JAVA? I intend to create a proxy server that will redirect a client's request to one of the other two servers, and one of the metrics for server choice will also be based on t...
asked by 07.06.2016 / 21:32
0
answers

Disable browsing cache with Wildfly

Hello, I'm using VRaptor 4 with Wildfly 9, and I noticed that in my browsing in localhost, with every refresh or navigation between other pages, HTML content is reloaded normally. However, when I'm making a request to a production server, tha...
asked by 08.06.2016 / 02:10
1
answer

Sort objects according to the name attribute using Collections.sort () or reverse ()

How to sort objects through the name attribute? I'm implementing the Comparator interface. I gave a small example. Let's go to the codes: file: Person.java import java.util.ArrayList; import java.util.List; public abstract clas...
asked by 06.06.2016 / 22:08