Most voted "java-ee" questions
Java Platform, Enterprise Edition, or Java EE (or Java Platform, Enterprise Edition) is a programming platform for servers in the Java programming language.
Learn more…631 questions
Sort by count of
-
4
votes1
answer616
viewsThread problem
public class ThreadTest implements Runnable { private String word; private long time; public ThreadTest(String word,long time){ this.word = word; this.time = time; } public void run() { try {…
-
4
votes1
answer306
viewsObject-relational mapping (JPA + Hibernate) using XML
For a specific reason, I need to do object-relational mapping (JPA) of my entities with XML. [Unfortunately,] I cannot use annotations to do this. It turns out that in certain properties, I need to…
-
4
votes2
answers851
viewsIs it possible to limit the number of lines in a class attribute that is a list via JPQL?
I have the query below in JPQL FROM User u INNER JOIN FETCH u.enderecos e WHERE u.id =:id ORDER BY e.id DESC A user can have more than ten addresses, so we want to bring only ten addresses and if…
-
4
votes1
answer702
viewsHow to properly reuse business rules using Ejbs?
I am refactoring a system where the greatest concern is to decrease the coupling and complexity of the various levels of inheritance, so the examples are illustrative. I have the entities Contrato,…
-
4
votes1
answer1107
viewsHow to handle Ajax requests with business error?
I searched the Internet and I still haven’t found an answer mature enough for a problem. I have an Ajax request and taking out errors released by the application as a possible connection drop, for…
-
4
votes1
answer785
viewsN-N relationship with additional fields (problems to persist 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 keeps the relationship Ids, which has some more…
-
4
votes1
answer512
viewsCan injecting dependencies into an EJB builder cause modularization and performance problems?
Recently I migrated from Spring to CDI + EJB, I tried to inject my dependencies directly into the constructor as I did in Spring and as it is supported by CDI but in an EJB: @Stateless public class…
-
4
votes1
answer115
viewsProblems with using JSTL
I’m implementing a WEB application with J2EE, but I’m not able to list the data coming from Servletlistarcursos to the Listdecursos.jsp page that uses JSTL. public class ServletListarCursos extends…
-
4
votes0
answers53
viewsWhat is the advantage of using OSGI?
What is the advantage of using the OSGI to separate the modules from the project? What would transactions look like in transactions between modules, and relationships between different module…
-
4
votes2
answers1269
viewsHow to insert inpuText data into a list using JSF?
I have the following problem: I need a form to submit questions of evidence. Therefore, the form should contain a field for the question (question statement), and several fields for the…
-
4
votes1
answer2391
viewsWhat is Entity Manager?
What is the Java Entity Manager? Attending a class on java the teacher mentioned that the method find() of Entity manager and that this method, when searching for a record in the database stores the…
-
4
votes1
answer163
viewsError executing function for the second time
Inside the controller I have this function: public void salvaEncaminhamento() { Integer qtdEncaminhamento = 0; if (manifestacao.getTbEncaminhamentoCollection() != null) { qtdEncaminhamento =…
-
4
votes3
answers1762
viewsRecover 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,…
-
4
votes1
answer524
viewsHibernate is not creating or updating BD tables
I have the 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"…
-
4
votes1
answer341
viewsHow to add data to a list whenever a <p:hotkey> is used?
I have a <p:hotkey> which is the Primefaces component for working with shortcuts. Every time I press Ctrl + 1 two new fields appear on the page but I would like every time I press this…
-
4
votes1
answer1474
viewsHow to persist a record in the database through Java restful webservice?
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 make an http…
java web-service java-ee netbeans restfulasked 9 years, 2 months ago Marco Aurélio Soares de Souza 125 -
4
votes1
answer1762
viewsHow to take the value bound to a selectOneRadio and assign it to an attribute in a bean
I request help to implement a method/way to take the value bound to a selectOneRadio (which is an Enum) and assign it to an attribute within a Bean. After obtaining the value linked to…
-
4
votes3
answers2362
viewsHow to Recover User Session
I just wanted to retrieve a user’s session. I have a class called User system, that identifies which user is logging in. In this class, I take the session and play for an object. @ManagedBean(name =…
-
4
votes1
answer622
viewsMaven with Proguard
Well someone could explain to me how I can use Proguard in the Maven build to obfuscate the web project (War) in the direct deploy for Jetty? <project…
-
4
votes1
answer1187
viewsTomcat 8 + Mysql + Hibernate > Name [jdbc/toca_data] is not bound in this Context. Unable to find [jdbc]
I’m having serious problems with an application, I’m trying to set up and nothing. As I am beginner in the web part, I will say first what I understood: Tomcat needs settings (xml) to work with…
-
4
votes2
answers1673
viewsHow to resolve this 'java.lang.Illegalargumentexception: Unknown Entity' when running this simple application?
I am new to the world of Hibernate and when I run this application, I get the following exception: java.lang.IllegalArgumentException: Unknown entity: com.nataniel.api.domain.User at…
-
4
votes2
answers13018
viewsUsing Bootstrap for Multiselect Dropdown with Checkbox
I found on this site: (http://www.webslesson.info/2017/05/bootstrap-multi-select-dropdown-with-checkboxes-using-jquery-in-php.html) a code that he uses Bootstrap to help create a multiselectable…
-
3
votes1
answer299
viewsHow to receive a list of Strings in a Struts2 select?
I have a select on my page that should have its value and caption populated through a list of Strings that come from my Action. I am sending the list correctly, because I see the combo have the…
-
3
votes1
answer1708
viewsHow to create a project with JSF, Primefaces, and Tomcat running in Eclipse and Netbeans at the same time?
How do I create a Maven project with JSF, Primefaces, and Apache Tomcat so that it runs on both Eclipse and Netbeans without problems? (Preferably with the latest versions of the technologies)?…
-
3
votes1
answer406
viewsAuthentication in Java EE
I am developing an app whose client will be Html5 + javascript (single-page-app) and the backend will be basically Jax-rs + cdi + nosql (glassfish & orientdb). In this scenario, I need help to…
-
3
votes1
answer359
viewsSlow search for Hibernate Search index
That’s a crosspost that I did in the stackoverflow in English. It is difficult to understand (and correct) this problem. I’ll put it here to see if anyone in our community has been through this and…
-
3
votes1
answer724
viewsTimetask scheduling Java Tasks
I’m trying to set up some task cycles in Timetask so that it happens every day at a certain time, could someone give me a tutorial or some example that employs this question ? What happens is it…
-
3
votes1
answer1056
viewsHow to include . jsp file in solution?
I am developing Java web applications using JSP’s. I have a file called header.jsp, which contain links from CSS files and other things that are important to my system that is in the root directory.…
-
3
votes0
answers821
viewsHow to return an imported value from one JSP page to another?
I have two JSP pages: in one it checks a condition of client links, if it has no link, it enters a function that calls another JSP to import client data. He even imports the data but, when he…
-
3
votes1
answer634
viewsIf I use "provided" libs on the application server (wildfly), do I gain performance?
imagine the following scenario. I have a Wildfly 8.0.0 application server running with settings default from "factory". On this server I run 4 simple web applications. These applications use some…
-
3
votes2
answers383
viewsGetting around the problem with hot Java development?
Problem situation: You are developing a website and debugging on it. For example a CRUD of users. For this you are using Javaee 1.7, Eclipse Kepler and Apache Tomcat 7. However, at the development…
-
3
votes1
answer338
viewsWhat is the design pattern to use to save objects that have similar ways to save?
I have this doubt because if I am not mistaken I have read, seen, or even implemented something of this type but I am no longer remembering, it is the following: I have here an EJB project with…
-
3
votes1
answer2259
viewsProblems with Maven package dependencies
When I insert this package it generates an error, because it will be? <!-- Abstração para envio de e-mails --> <dependency> <groupId>com.outjected</groupId>…
-
3
votes1
answer802
viewsTransfer files by FTP to Java Hosting
If I hire a host to host my Java application I can transfer files by ftp? for this application of mine to read these files? I have a desktop application that sits on the server that generates a file…
-
3
votes1
answer2487
viewsHow does Htmlunit work?
Someone has some example of login of a web system communicating with another, where I will send the user and password to another site and this site will authenticate and give me a feedback if the…
-
3
votes1
answer896
viewsHow to handle request header with Filter
How to change, remove or add a header of a request in a web application using Filter?
-
3
votes2
answers1142
viewsConvert and Validator with CDI injection
Can someone inject CDI or EJB into JSF 2.2 Converter or Validator? It was said that from 2.2 it would be possible but I’m not getting it. I’ve tried to @EJB UserService userService and also @Inject…
-
3
votes1
answer690
views -
3
votes1
answer1333
viewsConditional validation in Primefaces component
Hello! I have the following problem. I have inputText description which gets disabled by default. When I click the search button, it enables inputText and then instance an object for search. If I do…
-
3
votes1
answer99
views"div loading" Servlet
I have a screen that has the function of sending a file to the server via servlet but since this file might be big, I needed to put a panel or a div with a gif of load. I’m wearing richfaces, I’ve…
-
3
votes1
answer611
viewsTracert or Traceroute in Java, without calling the OS
I am developing a web application that will test the servers and will bring the result equal to a tracert of Windows or the traceroute Linux. I am developing in Java and using the commands mentioned…
-
3
votes1
answer87
viewsWhat dependencies do I need to add to the Glassfish folders?
Fala galera! I am using the Hibernate framework in my JSF project. On the computer I’m developing is all right, running though, when I try to deploy on the glassfish server on another machine starts…
-
3
votes0
answers53
viewsUse vraptor-brutauth in jsps
Expensive, I have a problem that when I put a rule with @GlobalRule, I can’t use it in jsps.. When I just put ${rules} to list the rule map, which has the @GlobalRule does not appear. When shot it…
-
3
votes1
answer616
viewsHow to get the name of the remote user connected to the java server?
I have a problem that I do not know if it is possible to solve, I am in the development of an intranet system and I need to get the name of the local user(ie in pc client). tried to use…
-
3
votes1
answer892
viewsHow to correctly declare Server Runtime or provided Wildfly dependency on Gradle
I have a Java web project being developed to run in Wildfly, using the Eclipse IDE. This application uses JPA, JTA, JSF and CDI at first, but will use other Java EE resources in the future. The…
-
3
votes1
answer377
viewsCopy Outputstream object to a file
I confess it’s the first time I’ve worked with Stream’s and File in Java. Currently I use the Spring (Core) in my application, I soon use a simple copy utility feature stream’s and file’s called…
-
3
votes1
answer549
viewsIntegration between R and Java
I’m working on a project and I have to integrate the language R with Java. You could help me by indicating a good library or a code (Hello World) make this integration?…
-
3
votes1
answer2243
viewsFamous error: Conversion error when setting the value XXX to 'null Converter'
Good afternoon. I’m having the famous error "Conversion error when setting the value XXX to 'null Converter'." I’ve seen several topics here and in other forums, Showcase of the first faces and I…
-
3
votes1
answer250
viewsPartial update of object / Do not update null values with JPA
I’m using JPA for a webservice, and I’m using the Merge to update, but it updates all values of my object, there is some way to perform a partial update of it ? Example, only change values that are…
-
3
votes1
answer152
viewsMy List is not updated correctly with database data
I have a dataTable and a button that selects the object in each line of the dataTable. When I click on that one button Dialog is opened with some data and a Send button, when I click this send the…