Questions tagged as 'java'

1
answer

Doubt - HashMap & List

My need was as follows: A report that would bring the Event and the number of hotel reservations that were associated with that Event. And so it was followed as shown in the code below: List<IHotelReservation> iHotelReservationList =...
asked by 26.06.2017 / 19:44
0
answers

Help with search screen

Thequerythatmountsthescreenisasfollows:publicList<Produto>listarProdutosDoGerenteRegional(){try{returnmanager.createQuery(" select p from Produto p where p.gerenteFilial.chefe.codigo =:codigo", Produto.class) .setParameter...
asked by 26.06.2017 / 23:26
0
answers

Error saving request | java web application + jsp + hibernate + vraptor

I am doing a web application (E-commerce), which is the final work of the web discipline, it is only necessary to save the request in the bank, but it is giving an error that I can not solve. I looked, but could not find anything related. <...
asked by 26.06.2017 / 20:14
1
answer

How to get the IP of the Android device to be used in Socket () in java?

I'm trying to implement peer-to-peer communication (device to device) and I need to get the real IP of the server device to then insert into the client but I can not. I'm using: ServerSocket server = new ServerSocket(8000); Log.v("TAG", server...
asked by 27.06.2017 / 03:49
0
answers

How to fill the entire screen in landscape mode Table Layout?

I'm using a "TableLayout" in my application. This is my XML code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"...
asked by 13.06.2017 / 00:42
2
answers

Enabling Internet Connection in an Android Application

I would like to know a way to identify if the android cell phone is connected to the internet independently if it is the mobile network of the mobile or wifi carrier, and if it is not connected, I activate all connections both wifi and mobile da...
asked by 20.07.2015 / 21:23
1
answer

Maven Project Error Relative Path

I have to maintain a system in java with Maven . However the system has 3 projects where one refers to the other, already tried to change the build path adding projects and etc. So far nothing below follows the file pom.xm...
asked by 12.06.2017 / 21:56
1
answer

Open activity if you do not have internet

I have two activity one own one webview and another is a page where if there is no internet it should be displayed. The problem is, when there is no connection, there is an error and says that the application stopped instead of opening the "e...
asked by 10.06.2017 / 18:38
0
answers

How to update object using entity manager?

To create I used: public void adiciona(Produto produto) { em.getTransaction().begin(); em.persist(produto); em.getTransaction().commit(); } To remove I used: public void remove(Produto produto) { em.getTransaction().begin(); em....
asked by 21.06.2017 / 18:36
2
answers

Problem Handling a list of Objects in jsp

I'm trying to troubleshoot a list that comes from my controller in my jsp I believe I am not using the right way to treat and go through this list. Follow my controller that creates the list. @RequestMapping(value = "/show/{id}", method = R...
asked by 12.06.2017 / 15:12