Questions tagged as 'java-ee'

1
answer

Object-relational mapping (JPA + Hibernate) using XML

For a specific reason, I need to map object-relational (JPA) of my entities with XML. [Unfortunately,] I can not use annotations to do this. It turns out that on certain properties I need to use Hibernate-specific features. For example, extra la...
asked by 09.07.2014 / 03:09
1
answer

Hibernate is not creating or updating DB tables

I have classes beans.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javae...
asked by 02.05.2018 / 21:30
1
answer

How to persist a record in the webservice database through restful Java?

I already have a method that takes a json and persists in the Mysql database. I can test it by the interface created by Netbeans, which has a field for inserting a json, but how do I, within a java application, make an http request by passing js...
asked by 06.09.2015 / 07:06
1
answer

How to handle Ajax requests with business error?

I searched the internet and still did not find a mature enough answer to a problem. I have an Ajax request and taking errors thrown by the application as a possible connection crash, for example, I do not want to throw an exception if I have...
asked by 12.12.2014 / 21:47
1
answer

Tomcat 8 + MySQL + Hibernate Name [jdbc / token_data] is not bound in this Context. Unable to find [jdbc]

I'm having serious problems with an application, trying to set it up, and nothing. As a beginner on the web part, I will first say what I understood: Tomcat needs settings (xml) to work with Hibernate. In the case of the TOMCAT folder y...
asked by 10.05.2016 / 02:33
1
answer

Maven with Proguard

Well, could anyone explain how I can use Proguard in maven's build to obfuscate the web project (war) in deploy direct to jetty? <project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi...
asked by 20.10.2015 / 00:36
2
answers

How to insert data from inpuText into a list using JSF?

I have the following problem: I need a form to submit test questions. Therefore, the form should contain a field for the question (question statement), and several fields for the alternatives. With this, I wanted the values of the input's...
asked by 25.04.2015 / 06:43
1
answer

Inject dependencies in the constructor of an EJB can cause modularization and performance problems?

I recently migrated from Spring to CDI + EJB, I tried to inject my dependencies directly into the builder just like I did in Spring and how it is supported by the CDI but in an EJB: @Stateless public class UserService { private UserDao u...
asked by 10.01.2015 / 20:55
1
answer

N-N relationship with additional fields (problems persisting data)

I have an N-N relationship that works as follows: Destination.java (N) - (N) CustomerService.java Within this relationship there is an entity that holds the Id's of relationships, which has some more values. The name of this is ServiceI...
asked by 17.12.2014 / 21:47
3
answers

Retrieve logged in user

I have Java Web application, but I want to do the following: When I log into my application with a certain user then I need to do some operations, such as saving some information in the database, but I want it at the time I do this insertion,...
asked by 11.06.2015 / 22:35