Questions tagged as 'java'

1
answer

I need to save the result of my query in a List and then send it to an xhtml

How do I send these data from two tables to a List and how do I print them in the xhtml? What I need is that you bring me this information Ex: User Table Name: Juan IdCargo: 1 Cargo Tables IdLoad: 1 Name: Administrator Result: User.N...
asked by 03.03.2017 / 21:49
1
answer

Show TOTAL hidden files in a directory

I have this program: public class TestFileClass { public static void main(String[] args) { java.io.File file = new java.io.File("image/us.gif"); System.out.println("Existe " + file.exists() );...
asked by 22.02.2017 / 19:25
1
answer

Add object to an ArrayList using the Scanner

I have the following code in my main: if (opt1>0){ switch (opt1){ case 1: System.out.println("New customer"); Customer.addCustomer(); customerList.add(new Customer(getNa...
asked by 21.02.2017 / 20:42
1
answer

Obtain an sql connection using entityManager

I would like to know if it is possible to establish a DB connection type sql.connection using entityManager , that is, I need to call a procedure stored in the database, usually making a connection to the database in where previousl...
asked by 22.02.2017 / 20:17
2
answers

Serialization and sending of objects through Socket JAVA

Greetings I am doing a project in which I have a ServerSocket where I try to send a serialized object to a Socket with random numbers and the date in which they were generated for the client to operate with them. I have a main (), a ServerHilo (...
asked by 26.02.2017 / 13:22
2
answers

Filenamefilter I need you to let me know when I can not find anything

I have the following program: public class filtrado { public static void main(String[] args) throws IOException { try{ File f = new File("."); // current directory FilenameFilter textFilter = new FilenameFilter() {...
asked by 24.02.2017 / 17:48
1
answer

Moving image

What is the best way to make a moving image on Android? I have read that GIF is not recommended ... So what would be the best option? I need to upload from here    .image (R.drawable.ImagenNueva) An image that has movement, I do not car...
asked by 25.02.2017 / 23:35
1
answer

Save file in data / data / package /

The function that I do is create a .PNG of the image that I select in the Gallery, until now I have been saving them in Internal Memory but now I want to save them in data / data / package / images but I do not know how to do it. This is...
asked by 16.03.2017 / 23:18
1
answer

Maintain a session in several applications

I am using java and jsf I have created some applications each with their own login, now I need to validate session in one applications and when I move to another applications I do not log in again. I have tried saving variables in session and...
asked by 17.03.2017 / 19:32
2
answers

Open PDF on the client host

I have a web application developed with jsp and servlets. On the jsp page I request a pdf document, which is looked for in the servlet, which is obviously on the server. The problem is that, to open, I use the class Desktop d , and when us...
asked by 22.04.2017 / 16:08