Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

J2EE vs Jakarta Struts 2

Status
Not open for further replies.

zivrap

Technical User
Aug 10, 2004
31
CA


Hi,

I have recently been looking into various java technologies a bit and j2EE and struts seem to be the in thing right now. What are the similarities/differences of the two? When should one be used over the other? Thanks.
 
Well, J2EE is a set of standards which specify tools and services required for enterprise Java development. The JDK J2EE Edition provides the Java classes which deliver this.

Struts is a web-framework based on the popular 'Model-View-Controller' design pattern. It makes use of JavaServer Pages and Java Servlets which are themselves part of the J2EE standards.

There is plenty of info to be had on the Sun website and the internet in general. Google should be useful to investigate further.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
J2EE is an over-arching extension to the core/standard Java packages (J2SE).

Its encompasses many APIs, once of them being the JSP/Servlet specification.

Struts is a "web framework" that builds upon the JSP/Servlet APIs - so there is no real "similarity or difference" between Struts and J2EE. Struts is just an API framework that utilises one part of J2EE.

For a full list and tutorial on J2EE, see
--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Wow. What're the chances of not replying for 3 days then nearly simultaneously replying together, sedj? [smile]

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
weird ... I hadn't even noticed you'd posted !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks for your input. What I am still unsure of is when one should be used over the other? If Struts includes the major technologies provided by J2EE, doesnt that make J2EE a little redundant?
 
As I said before, J2EE encompasses many technologies - Struts just uses one of those.

Struts does NOT provide APIs for SMTP mail, EJB, JMS, JTA, Connectors, activation API, SOAP, WSDL etc etc etc.

I you want to use any of those, then Struts cannot help - but if you want to use a web framework (and there are many others apart from Struts), then you should look into Struts.

My two cents is that Struts is an over-bloated framework that sometimes can extend dev and maintentance time rather than lowering it, but thats my opinion.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
If you're using Struts then you are making use of part of the J2EE extensions.

Look at Struts as a separate library which builds on facilities within J2EE.

You would use J2EE facilities if you wanted (generally) to write an Enterprise application, and Struts in particular if you wanted to write a Web Application which is structured around the MVC pattern.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
sedj/timw:

You guys must be on the phone when you're posting! You NAILED your last set of posts (simultaneous posts)! Stop trying to pull one over on us! :)

--Dave
 
Honest, it was pure chance!! It must just be a case of 'Great Minds....'.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Another related for you guys if you dont mind. I've also read quite a bit of comparison between Java Server Faces and Struts - as JSF is itself a web application framework. How do the two of these compare?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top