Questions tagged as 'java'

1
answer

Add data to JSONArray

I need to add to this result, in each position, some data that I have in json.getJSONObject(l) at the end of the ones I already have. But according to what I have what it does is replace the data that already exists in datosReserva....
asked by 19.09.2018 / 08:34
1
answer

SQL query to get fields in Java

What exactly would an SQL query be according to the following method? The problem is that with the three tables I can not get it out correctly. The only thing that would have to be modified would be the consultation. -show OrderData (int...
asked by 04.09.2018 / 21:07
1
answer

problem getting objects stored in an arrayList in a repository

I'm doing a Java desktop app with the M.V.P architecture for now I'm simulating the database in an arrayList in a repository public class RepositorioClientes { private static ArrayList<Cliente> listaClientes; public RepositorioClientes...
asked by 04.09.2018 / 14:39
3
answers

How to validate a json if there are null parameters in java

I wanted to ask you how I can validate using the if you execute certain actions, what happens is that in a json come null values when I want to set the records that are in the BD, set so to say the records that the user inserted ( edit) this is...
asked by 07.09.2018 / 23:12
1
answer

data search method

This is my code and I need to create a search method that when entering the name of the book also shows me its naturalness and its author who helps me please. this is what I wear package libro; import java.util.Scanner; public class Libro...
asked by 24.08.2018 / 20:14
1
answer

Problem when pressing a floating button

I am developing an application for Android, the fact is that I have a floating button that when I pulse it displays several options The fact is that when I pulse I deploy the options and occupy a ListView and when I want to press o...
asked by 20.08.2018 / 18:06
1
answer

Tour Json Array of 4 levels or more Java (android)

I have a JSON that has 4 JSON objects, my question is how to travel in such a way that with first do one thing with the second one and so on I've tried with: JSONArray ja = new JSONArray(response); for (int i = 0; i < ja.length(); i++) {...
asked by 21.08.2018 / 21:47
1
answer

SimpleDateFormat for month abbreviated in 3 characters

I am having problems when paging dates that express the abbreviated month to 3 characters. I use a SimpleDateFormar that I build in the following way: DateFormat dateFormat = new SimpleDateFormat("dd MMM HH:mm yyyy", new Locale("es")) ; Whe...
asked by 20.08.2018 / 17:02
1
answer

How to redirect to a jsp from another controller in java?

I have the following method in my controller, which sends me to the login page @RequestMapping(value= "/login", method= RequestMethod.GET) public String irPaginaLogin(){ return "/login"; } and it contains the following field...
asked by 22.08.2018 / 04:24
1
answer

Why do I get error with glassfish and netbeans?

And I really do not know what's wrong. This is the code: index.html <!DOCTYPE html> <html> <head> <title>Todo supply a tittle</title> <meta charset="UTF-8"> <met...
asked by 20.08.2018 / 04:39