Questions tagged as 'java'

0
answers

How to handle error code from an http request

Below is a method that I use to do some validation, but so far I have not been able to retrieve the request response code. I need to say that when the server response code is 403 show that the user is not allowed to access. @Target({TYPE}) @Re...
asked by 12.04.2018 / 19:27
1
answer

How to use the JavaScript library pdf.js in Selenium with Java through the JavaScriptExecutor class

I found this library that does exactly what I need, extract the text from the PDF and transform it into a String. link link From what I researched (a lot), it seems to me that the version below is the most recent of pdf.js. However, I can...
asked by 12.04.2018 / 16:28
0
answers

Select from 2 Java tables

Hello everyone, I'm having trouble getting data from 2 different tables from the HSQLDB database, my DAO class looks like this: @Override public List<Animal> listar() throws Exception { List<Animal> lista = new ArrayList<>...
asked by 12.04.2018 / 19:13
1
answer

Ide Eclipse stopped complaining about the need to declare the serial default Version ID. in serialized classes

Hello, using the Eclipse IDE when we create a class that we tell it to implement serialization (implements Serializable) it is common for IDE to claim the default serial Version Id. I created a new project in the IDE and almost everything work...
asked by 21.04.2018 / 17:31
1
answer

Problem with list directories with java

I'm trying to list all the files in the C: \ directory of my PC. Smaller directories with 11,000 files are picking up normally, it takes a while, but it's no problem. The problem is when I will list the C: \ files, because it is the root folder...
asked by 15.04.2018 / 02:11
0
answers

Calling a void method of an action in a javascript function

Is it possible to call a javascript function a method that returns nothing (void) from a java action type class (HttpServlet)? I'm maintaining a project with struts, and the action already exists. I created a method void (public void conta...
asked by 15.04.2018 / 04:18
1
answer

BeanUtils.copyProperties (Ignore more than one field)

Alright? I'm using java and Spring-framework in a restful project, so I created the following class: Categoria (id, descrição, dtCadastro, dtAlteração) In the class I am using the @PrePersist and @PreUpdate annotations for the...
asked by 13.04.2018 / 15:42
0
answers

Remove object inside another Java List object

I have a list in java, that within each object, it has an attribute that is an object of the same list. I'm trying to remove the object that is inside object 1 for example. There is recursion that I mounted to get to the element infinitely....
asked by 13.04.2018 / 15:36
2
answers

Is it possible to filter a p: dataTable when the filterBy attribute is a list of objects?

I am using the P: dataTable component of Primefaces and I am having problem with the filter. I have an Email List of Sectors and within that list I have another list with the aliases of each email. Code: <h:panelGroup id=...
asked by 18.04.2018 / 01:44
2
answers

Clicking button inside an iframe

I'm using selenium to test a page but the button I need to click is inside an iframe that is inside a frame. this.wait.until(ExpectedConditions.elementToBeClickable(By.id("corpo"))); WebElement iframeCorpo = this.driver.findElement(By.id("corp...
asked by 10.04.2018 / 21:06