Skip to main content

Questions tagged [jakarta-ee]

Jakarta EE (formerly known as Java Enterprise Edition, Java EE, and J2EE) is a specification defining a collection of Java-based server and client technologies and how they interoperate. Use this tag for questions about Jakarta EE runtime/platform in general. For the more specific API questions, please use more specific tags such as [servlets], [jpa], [cdi], [jaxb], [jsf], [jsp], [jms], [ejb], etc.

Filter by
Sorted by
Tagged with
887 votes
16 answers
458k views

What is the difference between JSF, Servlet and JSP?

I have some questions. These are : How are JSP and Servlet related to each other? Is JSP some kind of Servlet? How are JSP and JSF related to each other? Is JSF some kind of Pre-Build UI based JSP ...
Cheung's user avatar
  • 15.5k
678 votes
22 answers
596k views

What's the difference between JPA and Hibernate? [closed]

I understand that JPA 2 is a specification and Hibernate is a tool for ORM. Also, I understand that Hibernate has more features than JPA 2. But from a practical point of view, what really is the ...
Anthony's user avatar
  • 35.3k
618 votes
9 answers
385k views

.war vs .ear file

What is the difference between a .war and .ear file?
ria's user avatar
  • 7,944
428 votes
5 answers
372k views

Why use @PostConstruct?

In a managed bean, @PostConstruct is called after the regular Java object constructor. Why would I use @PostConstruct to initialize by bean, instead of the regular constructor itself?
Jan's user avatar
  • 9,597
395 votes
12 answers
224k views

What is Java Servlet?

I read many articles to understand Java servlet but I did not succeed. Can you please give brief introduction of Java servlets (in easy language). What is a servlet? What are the advantages? I can't ...
hardik's user avatar
  • 9,261
385 votes
8 answers
457k views

Why does JPA have a @Transient annotation?

Java has the transient keyword. Why does JPA have @Transient instead of simply using the already existing java keyword?
deamon's user avatar
  • 91.3k
367 votes
1 answer
620k views

Java 11 package javax.xml.bind does not exist [duplicate]

I'm trying to deserialize XML data into a Java content tree using JAXB, validating the XML data as it is unmarshalled: try { JAXBContext context = JAXBContext.newInstance("com.acme.foo"); ...
Boris's user avatar
  • 24k
325 votes
14 answers
430k views

Difference between Java SE/EE/ME?

Which one should I install when I want to start learning Java? I'm going to start with some basics, so I will write simple programs that create files, directories, edit XML files and so on, nothing ...
Richard Knop's user avatar
  • 82.8k
299 votes
11 answers
163k views

Replacements for deprecated JPMS modules with Java EE APIs

Java 9 deprecated six modules that contain Java EE APIs and they are going to be removed soon: java.activation with javax.activation package java.corba with javax.activity, javax.rmi, javax.rmi.CORBA,...
Nicolai Parlog's user avatar
264 votes
12 answers
109k views

Eclipse add Tomcat 7 blank server name

I was trying to add Tomcat 7 in my Eclipse in Ubuntu. When I click "Add new server" in Eclipse and select "Tomcat v7.0 Server", the field "Server Name" is blank and I cannot type in anything in that ...
tonga's user avatar
  • 11.9k
237 votes
11 answers
304k views

Maven dependency for Servlet 3.0 API?

How can I tell Maven 2 to load the Servlet 3.0 API? I tried: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version&...
deamon's user avatar
  • 91.3k
235 votes
9 answers
177k views

What is Java EE? [duplicate]

I realize that literally it translates to Java Enterprise Edition. But what I'm asking is what does this really mean? When a company requires Java EE experience, what are they really asking for? ...
shsteimer's user avatar
  • 28.6k
230 votes
6 answers
276k views

Where to place and how to read configuration resource files in servlet based application?

In my web application I have to send email to set of predefined users like [email protected], so I wish to add that to a .properties file and access it when required. Is this a correct procedure, if ...
sansknwoledge's user avatar
223 votes
9 answers
64k views

Java / Jakarta EE web development, where do I start and what skills do I need? [closed]

I want to learn, at least at a basic level, how to build Java web applications (coming from a .NET background). I would like to be able to build, deploy a simple CMS type application from the ground ...
mrblah's user avatar
  • 102k
220 votes
7 answers
242k views

Can someone explain mappedBy in JPA and Hibernate?

I am new to hibernate and need to use one-to-many and many-to-one relations. It is a bi-directional relationship in my objects, so that I can traverse from either direction. mappedBy is the ...
brainydexter's user avatar
  • 20.2k
213 votes
20 answers
216k views

Intellij IDEA Java classes not auto compiling on save

Yesterday I switched to IntelliJ IDEA from Eclipse. I am using JRebel with WebSphere Server 7 as well. Everything now seems to be working somewhat fine, except that when I modify a Java file, and ...
mjs's user avatar
  • 22k
210 votes
15 answers
331k views

How to change context root of a dynamic web project in Eclipse?

I developed a dynamic web project in Eclipse. I can access the app through my browser using the following URL: http://localhost:8080/MyDynamicWebApp I want to change the access URL to: http://...
Amit's user avatar
  • 34.4k
207 votes
8 answers
230k views

Please explain about insertable=false and updatable=false in reference to the JPA @Column annotation

If a field is annotated insertable=false, updatable=false, doesn't it mean that you cannot insert value nor change the existing value? Why would you want to do that? @Entity public class Person { ...
Thang Pham's user avatar
  • 38.6k
202 votes
31 answers
887k views

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved

org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for ...
Curt's user avatar
  • 3,014
201 votes
9 answers
276k views

What is the difference between Spring, Struts, Hibernate, JavaServer Faces, Tapestry?

May I know what is the difference between:- Spring Struts Struts 2 Hibernate JavaServer Faces JavaServer Pages Tapestry Are these technologies/framework complementary to each other? Or they are ...
CMW's user avatar
  • 2,367
196 votes
7 answers
69k views

What exactly is Java EE?

I have been doing Java SE for some years now and moving on to Java EE. However, I have some trouble understanding some aspects of Java EE. Is Java EE just a specification? What I mean is: Is EJB Java ...
Frank Zimmer's user avatar
  • 1,979
192 votes
4 answers
91k views

EJB's - when to use Remote and/or local interfaces?

I'm very new to Java EE and I'm trying to understand the concept of Local interfaces and Remote interfaces. I've been told that one of the big advantages of Java EE is that it is easy to scale (which ...
Brian DiCasa's user avatar
  • 9,417
191 votes
4 answers
120k views

How to define servlet filter order of execution using annotations in WAR

If we define webapp specific servlet filters in WAR's own web.xml, then the order of execution of the filters will be the same as the order in which they are defined in the web.xml. But, if we define ...
siva636's user avatar
  • 16.3k
181 votes
15 answers
321k views

Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)

I am getting the below exception when I run my mvn install. I have even deleted the local repository and ran again getting same exception. [ERROR] Failed to execute goal org.apache.maven.plugins:...
Karthick's user avatar
  • 1,963
180 votes
11 answers
287k views

What does the servlet <load-on-startup> value signify

I am getting a bit confused here. In our application we are having a few servlets defined. Here is the excerpt from the web.xml for one of the servlets: <servlet> <servlet-name>...
Vini's user avatar
  • 8,379
168 votes
9 answers
123k views

Should I use @EJB or @Inject

I have found this question: What is the difference between @Inject and @EJB but I did not get any wiser. I have not done Java EE before nor do I have experience with dependency injection so I do not ...
LuckyLuke's user avatar
  • 48.7k
167 votes
11 answers
353k views

Another Repeated column in mapping for entity error

Despite all of the others post, I can't find a solution for this error with GlassFish, on MacOSX, NetBeans 7.2. Here the error : SEVERE: Exception while invoking class org.glassfish.persistence.jpa....
canardman's user avatar
  • 3,243
164 votes
5 answers
96k views

What is an EJB, and what does it do?

Been trying to learn what EJB beans are, what does it mean their instances are managed in a pool, blah blah. Really can't get a good grip of them. Can you explain me what they really are (practically ...
jacktrades's user avatar
  • 7,314
160 votes
4 answers
151k views

Performing user authentication in Java EE / JSF using j_security_check

I'm wondering what the current approach is regarding user authentication for a web application making use of JSF 2.0 (and if any components do exist) and Java EE 6 core mechanisms (login/check ...
ngeek's user avatar
  • 7,833
154 votes
22 answers
288k views

web.xml is missing and <failOnMissingWebXml> is set to true

Consider: When I create a simple Maven project in Eclipse I am getting this error: web.xml is missing and <failOnMissingWebXml> is set to true How can I fix this problem?
Yogesh Doke's user avatar
  • 1,706
153 votes
1 answer
7k views

How can a JACC provider use the Principal-to-role mapping facilities of the server it's deployed on?

I am writing a JACC provider. Along the way, this means implementing a PolicyConfiguration. The PolicyConfiguration is responsible for accepting configuration information from the application server,...
Laird Nelson's user avatar
  • 15.9k
152 votes
14 answers
183k views

Servlet for serving static content

I deploy a webapp on two different containers (Tomcat and Jetty), but their default servlets for serving the static content have a different way of handling the URL structure I want to use (details). ...
Bruno De Fraine's user avatar
148 votes
10 answers
84k views

Describe the architecture you use for Java web applications? [closed]

Let's share Java based web application architectures! There are lots of different architectures for web applications which are to be implemented using Java. The answers to this question may serve as ...
141 votes
11 answers
169k views

Simplest way to serve static data from outside the application server in a Java web application

I have a Java web application running on Tomcat. I want to load static images that will be shown both on the Web UI and in PDF files generated by the application. Also new images will be added and ...
Janne's user avatar
  • 3,707
138 votes
35 answers
201k views

Questions every good Java/Java EE Developer should be able to answer? [closed]

I was going through Questions every good .Net developer should be able to answer and was highly impressed with the content and approach of this question, and so in the same spirit, I am asking this ...
138 votes
11 answers
177k views

What's the main difference between Java SE and Java EE? [duplicate]

What's the main difference between Java SE and Java EE?
omg's user avatar
  • 139k
137 votes
2 answers
59k views

Where to use EJB 3.1 and CDI?

I am making a Java EE based product in which I'm using GlassFish 3 and EJB 3.1. My application has session beans, a scheduler and uses web services. I recently came to know about Apache TomEE, which ...
Dhrumil Shah's user avatar
  • 2,156
137 votes
4 answers
235k views

How to create and handle composite primary key in JPA

I want to have versions from the same data entry. In other words, I want to duplicate the entry with another version number. id - Version will be the primary key. How should the entity look like? ...
Kayser's user avatar
  • 6,664
136 votes
9 answers
63k views

Would you, at present date, use JBoss or Glassfish (or another) as Java EE server for a new project? [closed]

If you started a new Java EE project today which is to be finished in about a year, which application server would you choose and why? Part of your answer should include your arguments for your ...
133 votes
10 answers
335k views

How to generate JAXB classes from XSD?

I'm a total newbie with XML. I'm doing a Java EE project REST implementation and we return a lot of XML. With this we decided to use JAXB. So far, we manually coded the Models for the XML. But there ...
Rey Libutan's user avatar
  • 5,294
132 votes
5 answers
69k views

What is the difference between an application server and a servlet container?

I am trying to understand the difference between a full fledged application server (e.g. Weblogic, JBoss etc.) and a servlet container (Tomcat, Jetty etc.). How do they differ and when to use which?
Pushkar's user avatar
  • 7,540
126 votes
9 answers
58k views

Why is spawning threads in Java EE container discouraged?

One of the first things I've learned about Java EE development is that I shouldn't spawn my own threads inside a Java EE container. But when I come to think about it, I don't know the reason. Can you ...
LiorH's user avatar
  • 18.7k
125 votes
2 answers
24k views

Difference between JSP EL, JSF EL and Unified EL [closed]

I would like to know the detailed difference between the Expression Languages (EL). There is JSP EL, JSF EL and Unified EL. I would like to know the history behind the EL and what the latest EL is ...
Krishna's user avatar
  • 7,234
122 votes
1 answer
142k views

What is the difference between Eclipse for Java (EE) Developers and Eclipse Classic?

What is the difference between Eclipse for Java (EE) Developers and Eclipse Classic? Both are marked as version 3.6. Which one should I use?
Tony the Pony's user avatar
121 votes
5 answers
182k views

When to use EntityManager.find() vs EntityManager.getReference() with JPA

I have come across a situation (which I think is weird but is possibly quite normal) where I use the EntityManager.getReference(LObj.getClass(), LObj.getId()) to get a database entity and then pass ...
SibzTer's user avatar
  • 1,767
116 votes
5 answers
82k views

Backing beans (@ManagedBean) or CDI Beans (@Named)?

I've just started reading through Core JavaServer Faces, 3rd Ed. and they say this (emphasis mine): It is a historical accident that there are two separate mechanisms, CDI beans and JSF managed ...
Matt Ball's user avatar
  • 358k
116 votes
31 answers
159k views

How to improve Netbeans performance?

Is there a real way to get Netbeans to load and work faster? It is too slow and gets worse when you have been coding for some time. It eats all my RAM. I am on a Windows machine, specifically ...
yeradis's user avatar
  • 5,307
114 votes
3 answers
104k views

Problems with making a query when using Enum in entity

I have the following in a Question entity: @NamedQuery(name = "Question.allApproved", query = "SELECT q FROM Question q WHERE q.status = 'APPROVED'") and @Enumerated(EnumType.STRING) private ...
LuckyLuke's user avatar
  • 48.7k
113 votes
6 answers
102k views

JPA map collection of Enums

Is there a way in JPA to map a collection of Enums within the Entity class? Or the only solution is to wrap Enum with another domain class and use it to map the collection? @Entity public class ...
Gennady Shumakher's user avatar
112 votes
8 answers
119k views

What is the difference between web server, web container and application server? [duplicate]

What is the difference between web server, web container and application server?
Gautam's user avatar
  • 3,376

1
2 3 4 5
588