Showing posts with label J2EE. Show all posts
Showing posts with label J2EE. Show all posts

Tuesday, March 31, 2020

What Is Struts Activity Aeroplane Inwards Coffee J2ee - How To Use

What is Action bird inwards Struts
Struts inwards coffee is a framework, used to brand spider web application its is based on Model View Controller or MVC design Pattern where Model stand upwards for the internal solid soil in addition to activity used to modify the solid soil persuasion stand upwards for presentation cistron in addition to a controller is responsible for receiving the asking from the customer in addition to orbit upwards one's hear which describe organisation logic should move called. Basically, Struts bring dissimilar classes to stand upwards for this Model, View, in addition to Controller nosotros telephone telephone them every bit Action, Action Form, in addition to Action Servlet. So

Model – Action classes
View - Action shape classes
Controller – Action Servlet classes

In this article, nosotros are focusing on the Model layer of struts framework. Action bird is used to furnish an interface to application model layer.  What is Action bird in addition to how to role Action bird is too a pop Struts interview Question asked inwards diverse J2EE interviews.


What is Action Class inwards Struts ?

 used to brand spider web application its is based on Model View Controller or MVC  What is Struts Action Class inwards Java J2EE - How to useAction Class inwards Struts framework is used to define the describe organisation logic it handles the customer asking gear upwards the response or say where the response should move forward, basically its have the information from the persuasion layer in addition to forrard that information to specific describe organisation layer or procedure the information in addition to i time again forrard the processed information to persuasion layer.
For example, Action bird tin flame orbit a library object add together books to that library object, it tin flame shop selected books yesteryear a specific reader to the session.





In brief, nosotros tin flame depict Action as:

Ø       Our Action bird is extended yesteryear “org.apache.struts.action.Action class.
Ø       We demand to override execute() method of Action class.
Ø       Action servlet pick out Action bird for incoming HTTP Request defined nether the activity mapping tag inwards struts-config.xml file
Ø       Action bird is used to invoke describe organisation or information access logic larn information from edible bean in addition to shop processed information to edible bean in addition to render number or errors depending on the situation,
Ø       Action classes are multi-threaded in addition to then nosotros demand to carefully grip the activity variable every bit they are non thread-safe when working alongside the multi-threaded environment.


How to Use Action Class
In unproblematic steps, nosotros volition run across how to role Action class.
1.       First extend the org.apache.struts.action.Action class.

2.       Override the next method 
           world ActionForward execute(ActionMapping mapping,
                    ActionForm form,
                    HttpServletRequest request,
                    HttpServletResponse response) throws IOException, ServletException

Here nosotros educate our describe organisation logic in addition to gear upwards the response to render the client.

  3.Then nosotros configure this activity to struts config file of our application within activity mapping :

<action-mappings>
<action
      path="/TestAction"
      type="Example.TestAction">
      <forward name="success" path="/ExamplePages/TestAction.jsp"/>
   </action>  
</action-mappings>

This is all close the activity bird inwards side yesteryear side article volition bargain alongside dissimilar type of activity bird provided by  struts framework.

Further Learning
Difference betwixt ArrayList in addition to HashSet inwards Java
5 Difference betwixt Hashtable in addition to HashMap inwards Java
10 Java coding questions asked inwards Interviews
10 tough Core Java interview questions in addition to answers
Spring FAQ in addition to Interview questions answers

Monday, March 30, 2020

20 Ejb 3.0 Interview Questions Too Answers - Coffee J2ee

EJB interview questions are amount purpose of whatever Java J2EE interview. As EJB forms draw of piece of work concern layer for modern J2EE corporation application, Good noesis of EJB is expected from J2EE programmer. Purpose of these EJB interview questions is to rank an Idea almost what variety of questions you lot tin dismiss expression on J2EE in addition to EJB interviews. EJB was ever tough for Java programmer because of heavy weight architecture comprised amongst many interfaces e.g. habitation interface, remote interface, local interface, edible bean flat etc. It accept likewise much fourth dimension in addition to noesis to implement in addition to utilisation EJB inwards your Java spider web in addition to corporation application forget almost challenges posed past times application servers similar WebLogic or IBM WebSphere. All these occupation persist till EJB 2.0 which makes EJB infamous along amongst J2EE in addition to created path for Spring framework which is based on POJO. But amongst EJB 3.0, Enterprise Java Beans are dorsum 1 time again in addition to they are dorsum amongst bang. In this article I volition portion some EJB Interview questions from my collection. These EJB questions are from EJB 2.0 in addition to EJB 3.0 in addition to also related to telephone substitution concept of using Enterprise Java beans. By the agency I don't direct maintain reply of these Enterprise Java beans questions exactly I volition update the post 1 time I direct maintain answers of all these interview questions asked on EJB interviews. This article is divided inwards 2 category, inwards starting fourth dimension category nosotros volition run across some mutual EJB interview questions in addition to inwards instant category nosotros volition run across EJB 3.0 interview question, which is to a greater extent than pop similar a shot days. I direct maintain seen EJB enquiry on companies similar Capegemini, TCS, CTS, Infosys in addition to Wipro in addition to to a greater extent than oftentimes than non on finance domain projects



Common EJB Interview Questions inwards J2EE

1. What is Enterprise Java Beans (EJB) inwards J2EE ? What is wages of using EJB ?
This is the starting fourth dimension EJB question  asked to programmers on beginners in addition to intermediate level. Enterprise Java beans are J2EE cistron which is managed past times Container provided past times Application server in addition to encapsulate draw of piece of work concern logic in addition to forms dorsum goal of Enterprise Java application. Main wages of using EJB is to leverage amount services provided past times EJB container e.g. transaction management, persistence, safety etc. Also draw of piece of work concern logic encapsulate inwards EJB is adept multi-tier blueprint in addition to tin dismiss hold out used amongst unlike clients e.g. Web, Desktop in addition to mobile. Current version of EJB is EJB 3.0 which is based on annotation.



2. Can nosotros run EJB inwards spider web server similar Tomcat ?
One of the tricky interview enquiry on EJB. No you lot tin dismiss non run EJB inwards spider web server similar Tomcat. You demand application server similar Glassfish, WebLogic or Websphere to run Enterprise Java beans. One of the followup enquiry of this is What is deviation betwixt Application server in addition to spider web server. See the link for reply of that question.

3. What was shortcomings of EJB 2.0 ?
If you lot direct maintain mentioned inwards your resume that you lot direct maintain worked on EJB 2.0, therefore improve hold out prepared for this EJB interview question. It's non hard to reply if you lot direct maintain indeed worked inwards EJB 2.0. There are several hurting e.g. writing those local in addition to remote interfaces, likewise many boiler plate coding etc.

4. What is wages of putting draw of piece of work concern logic inwards EJB over stored procedure?
This is some other tough Java question on EJB interview. Putting complex draw of piece of work concern logic inwards stored physical care for is non a adept thought exactly its been at that topographic point for long time. Main wages of using EJB over stored physical care for is that you lot don't demand to port your SQL Stored physical care for code when you lot modify database e.g. shape Sybase to Oracle or Oracle to SQL Server.

5. What are the services provided past times EJB container ?
EJB interview questions are amount purpose of whatever  twenty EJB 3.0 Interview Questions in addition to Answers - Java J2EEContainer is 1 of the mind argue why Programmer should utilisation Enterprise Java beans. EJB container furnish several useful services similar :

1) life cycle administration of Enterprise Java beans (EJB).
2) Container manged transaction
3) Container managed persistent
4) Security etc

6. What is 2 stage commit? How do you lot create out distributed transaction inwards EJB
This is 1 of the most tricky Java question I direct maintain seen inwards EJB interviews. Two stage commit involves 1 Transaction director which controls whole commit process. If you lot direct maintain non used 2 stage commit or distributed transaction along amongst EJB therefore you lot demand to explore this topic inwards special to reply this EJB interview question.

Couple of to a greater extent than EJB interview questions whose reply volition hold out updated later.
7) EJB invocation is based upon which blueprint pattern ? What is Service locator blueprint pattern ?
8) How do you lot telephone telephone Enterprise Java beans from Servlet or JSP ?
9) What is deviation betwixt Session in addition to Entity beans ?
10) What is Java persistence API or JPA.
11) What is deviation betwixt stateless in addition to stateful Session beans ?
12) What is Session facade blueprint pattern used inwards EJB in addition to J2EE ?
13) What is deviation betwixt Session bean, Enttiry edible bean in addition to Message driven edible bean (MDB)
14) Can you lot create Thread inwards EJB ?

If you lot know reply of these EJB practise enquiry than delight portion every bit comment.

Top EJB 3.0 Interview Questions

In this department nosotros volition run across some EJB 3.0 Interview question. EJB 3.0 is the most pop version of EJB which surprisingly ease evolution of EJB past times using notation based approach. EJB 3.0 is also most pop EJB version inwards use.

1) What is mind deviation betwixt EJB 2.0 in addition to EJB 3.0 ?
Simple reply is utilisation of Java annotation, ease of evolution etc.

2) Can you lot yell few notation used inwards EJB 3.0 in addition to what does the do ?
This is some other uncomplicated EJB 3.0 interview enquiry which tin dismiss hold out easily reply if you lot direct maintain coded few EJB 3.0 beans. Some annotations used are @EJB, @PreDestory,  @PostConstruct etc.

3) Does EJB 3.0 supports dependency Injection ?

4) How to telephone telephone a EJB 3.0 edible bean from Servlet or JSP ?
Use @EJB annotation.

5) What are the issues you lot human face upwardly amongst EJB 3.0 ?

These were some of the EJB interview questions for practise if you lot are going to look inwards whatever Java or J2EE interview which requires EJB skills. There are non many J2EE programmer who empathise in addition to utilisation EJB really well. It was to a greater extent than hard when EJB 2.0 was roughly exactly much improve amongst EJB 3.0 in addition to EJB 3.1. Please portion if you lot direct maintain whatever other interesting EJB interview enquiry or if you lot know reply of whatever EJB enquiry shared here.

Further Learning
Top 10 JSP Interview Questions – Answered

Top Ten Servlet Jsp Interview Questions For Coffee J2ee Programmer - Faq

Servlets together with JSP Interview Questions are pith of whatever J2EE Interview. Its expected from candidate to convey adept cognition of Servlet, JSP, EJB , Struts or Spring inwards whatever J2EE interview. Consequently Servlets together with JSP Interview Questions are real mutual inwards whatever J2EE Interviews along amongst to a greater extent than or less questions from pith Java, Some interview Questions from Spring together with Some EJB interview questions. Since J2EE is primary platform for edifice company together with spider web application using Java programming language, its of import to fix good for J2EE interview, peculiarly If you lot are inwards application evolution space. Servlet together with JSP forms spider web layer of J2EE framework where Java Server pages is primary persuasion technology together with Servlets are primary Controller constituent of criterion MVC architecture. In this article nosotros volition meet couplet of nearly mutual or oftentimes asked JSP together with Servlet Interview questions together with answers, which tin assistance you lot on your J2EE interview grooming together with agreement to a greater extent than or less key concept of Java spider web applications.


JSP Servlet Interview Questions Answers
 together with JSP Interview Questions are pith of whatever J Top 10 Servlet JSP Interview Questions for Java J2EE programmer - FAQHere is my listing of oftentimes asked JSP Servlet Interview questions to whatever Java programmer. Most of these Servlet JSP questions has appeared inwards diverse score of J2EE interviews including 2 to iii together with 2 to four years sense level. None of these questions require special inquiry together with neither of them are tricky questions, they all are focused on fundamentals which is key to clear whatever interview.



Question 1: What is JSESSIONID inwards Java? When does JSESSIONID gets created ?
One of my favourite Servlet JSP Interview inquiry for 2 to four years sense programmers on spider web development. JSESSION id is a cookie which is used to handle session inwards Java spider web application. JSESSIONID is created past times Web Container whenever a novel session is created. See What is JSESSIONID inwards Servlet JSP for to a greater extent than details.

Question 2: What is departure betwixt include activity together with include directive inwards JSP?
Another real pop JSP Interview questions, to a greater extent than often than non asked to 2 to iii years experienced J2EE programmer. There are couplet of differences, nearly of import of them is that include activity is request  time inclusion piece include directive is translation fourth dimension inclusion of to a greater extent than or less other resources e.g. JSP or html pages. This questions is likewise asked every bit departure betwixt file include together with page include. See Include activity vs Include directive for to a greater extent than differences.

Question 3: How create you lot define application broad mistake page inwards JSP?
Almost inwards every Servlet JSP interview you lot volition meet inquiry from mistake handling. You tin define 2 kinds of mistake pages inwards Java spider web application, i is using tag <error-page> inwards web.xml together with other is past times using mistake page JSP which uses isErrorpage to declare that this jsp page tin survive used every bit mistake page. Other JSP uses that page past times using attribute errorpage="error.jsp". Whenever you lot larn an unhandled exception inwards JSP, asking volition survive routed to mistake page. See How to utilisation mistake page inwards JSP for detailed reply of this question.

Question 4: Difference betwixt sendredirect together with forrad inwards Servlet ?
One of the classical Interview Question from Servlet together with JSP. This inquiry is every bit sometime every bit Vector vs ArrayList inwards pith Java. Anyway meet difference betwixt sendredirect together with forward to reply this Servlet Interview question.

Question 5: How create take variable using <c:set> tag from JSTL ?
This is i of the tricky Servlet JSP question. Many people assumes that <c:set> tin alone add together or laid variables inwards a particular range only you lot tin likewise take whatever variable from whatever range using JSTL <c:set> tag. See How to utilisation <c:set> JSTL tag inwards JSP for exact agency to take whatever variable from whatever range inwards JSP page.

Question 6: What is departure betwixt Web Server together with Application Server ?
This is rather unproblematic Servlet JSP inquiry to answer. If you lot convey used EJB together with then you lot should know that , Web Server doesn't comprise EJB container together with EJB tin non survive deployed on that. Application Server is used to deploy together with run EJB inwards J2EE environment. See 5 departure betwixt Application together with Web Server to meet to a greater extent than differences.

Question 7: What is departure betwixt URL Encoding together with URL rewriting ?
URL Encoding together with URL rewriting is full general spider web concept irrespective of Java programming language. URL Encoding refers to encoding URL e.g. replacing infinite amongst %20, you lot tin meet this when browser sends asking to Server. On the other mitt URL Rewriting is agency to handle Session inwards spider web application. See URL Encoding vs URL Rewriting for to a greater extent than differences.

Question 8: How create you lot larn ServletContext reference within Servlet ?
ServletContext is real of import object inwards Java Web application. ServletContext object is i per spider web application together with serves every bit application range together with utilisation to shop mutual config together with things which doesn't alter on per session. Its slowly to larn reference of ServletContext inwards jsp using application implicit variable only inwards Servlet is non available inwards HttpServletRequest until version 3.0. You demand HttpSession object to remember ServletContext inwards whatever Servlet. Influenza A virus subtype H5N1 adept follow-up questions is How create you lot larn ServletContext inwards Struts Action shape or Spring Controller classes. See How to remember ServletContext inwards Servlet, Spring together with Struts for to a greater extent than details.

Question 9: What is departure betwixt ServletContext together with ServletConfig inwards Java ?
One of those classical Servlet Interview Questions which you lot can't afford to miss. Again ServletContext is used to supply application broad configure piece ServletConfig is used to configure together with supply initialization parameter to i Servlet. See ServletContext vs ServletConfig for to a greater extent than differences.

Question 10: Which opened upwards origin tag library convey you lot used ?
This is an interesting Servlet JSP questions together with gives an chance to exhibit how many tag library you lot are familiar amongst together with which ones convey you lot used. Most J2EE programmer reply this inquiry amongst maxim JSTL pith tag library, Struts tag library , Spring tag library or display tag, which is quite pop tag library to display tabular information together with provides lot of characteristic out of box e.g. paging, sorting together with export functionality.

Question 11: What is departure betwixt GET together with POST method inwards HTTP protocol?
Another classical spider web interview question, non specific to Servlet or JSP only real of import inwards context of spider web evolution which is based on HTTP protocol. There several differences betwixt GET together with POST method including length of information required to Send to Server. GET is less secure together with tin alone post express information thus non useful to transfer sensitive information. See GET vs POST HTTP method for to a greater extent than differences.

Question 12: What does load-on-start-up chemical element inwards web.xml do?
One of the tough Servlet JSP Interview inquiry peculiarly to 2 years sense guy, who may non survive exposed to all tags of web.xml. load-on-startup is related to loading of Servlet. See What is load-on-startup tag inwards web.xml for to a greater extent than details.

These were to a greater extent than or less Servlet together with JSP Interview questions together with reply you lot tin human face for quick revision purpose. If you lot convey faced whatever interesting Servlet JSP inquiry or if you lot are looking reply for whatever Servlet JSP inquiry than delight share.

Further Learning
Top 10 Spring MVC Interview question

Sunday, March 29, 2020

Difference Betwixt Genericservlet Vs Httpservlet Inwards Servlet Jsp - J2ee Question

Difference betwixt GenericServlet together with HttpServlet is 1 of the classic Servlet Interview Question, asked on many Servlet together with JSP Interviews on ii to four years sense developers. Since both GenericServlet together with HttpServlet forms footing of Servlets its of import to know What are they together with What is principal divergence betwixt them. From mutual sense together with at that spot names, its obvious that GenericServlet is a generic together with protocol independent implementation of Servlet interface piece HttpServlet implements HTTP protocol specifics. If you lot are working inwards Java spider web application or J2EE projects, you lot are around probable to bargain amongst HttpServlet all fourth dimension every bit HTTP is principal communication protocol of web. In this Servlet JSP article nosotros volition outline around of import difference betwixt HttpServlet together with GenericServlet which is worth knowing together with remembering.

GenericServlet vs HttpServlet

Here is my listing of divergence betwixt HttpServlet together with GenericServlet inwards Java Servlet API :

1) GenericServlet provides abstract service(ServletRequest, ServletResponse) method to implement which gets called past times container whenever it receives asking for processing, On the other manus HttpServlet overrides service method together with provides callback on doGet(HttpServletRequest request, HttpServletResponse) together with doPost(HttpServletRequest request, HttpServletResponse response) whenever it receives HTTP asking from GET or POST method. It too provides several other method based upon diverse HTTP methods of sending asking e.g. doPut() or doDelete() to conduct maintain HTTP PUT together with HTTP DELETE request.



2) Another difference betwixt GenericServlet together with HttpServlet is that afterward is a subclass of GenericServlet together with inherit properties of GenericServlet.

3) Generic servlet provides a rather easier agency to extend Servlet, its plenty to override service method to implement GenericServlet. Apart from extending Servlet interface, it too implements ServletConfig interface together with provides agency to stimulate got initialization parameter passed to Servlet from web.xml e.g. past times using getInitParamter().

 forms footing of Servlets its of import to know What are they together with What is principal divergence b Difference betwixt GenericServlet vs HttpServlet inwards Servlet JSP - J2EE question
That's all on difference betwixt GenericServlet together with HttpServlet inwards Servlet API. Its real rare you lot are going to run GenericServlet simply its practiced to know basics every bit its generally asked inwards diverse Servlet interviews every bit well. HttpServlet is primary Servlet flat which is used inwards Java spider web application from treatment customer request.

Further Learning
Difference betwixt URL Encoding together with URL rewriting

Sunday, November 24, 2019

Top Iii Gratuitous Struts Books For Coffee Ee Developers - Acquire Online, Pdf Download

Djakarta Struts is i of the most pop MVC frameworks to exercise a Java spider web application. Struts 1.0 had ruled the the world inwards early on 2000 era earlier Spring MVC took over. Still in that place are lots of projects written inwards Struts which needs active maintenance as well as that's why Struts developers are even as well as thence inwards demand. It has non acquire anything similar COBOL, but the latest version of Struts 2.0 is a capable spider web MVC framework amongst dependency injection as well as has a sizable community behind it. It has unopen contest amongst Spring MVC but given the demand for Struts developer, it's even as well as thence a expert technology scientific discipline to acquire if y'all are looking for the task inwards Java spider web evolution position. What is the best agency to acquire Struts? Well, y'all tin start amongst books as well as who doesn't similar free eBooks as well as I am going to portion or as well as thence of the expert costless Ebooks to acquire Struts, useful for both Java as well as J2EE developers.


3 Free Struts Book for Java Developers

Here are 3 Struts mass which are freely available to read online or download every bit PDF. First 2 books are actually expert for whatever Java EE developer looking to acquire Struts 1 or Struts 2 past times himself. Remember, Struts 2 is completely dissimilar from Struts 1, y'all should depository fiscal establishment tally these differences for quick comparison.




1) Struts Survival Guide: Basics to Best Practices
Authors: Srikanth Shenoy
Download: http://www.cbre.eu/portal/pls/portal/res_rep.show_report?report_id=264
Description: Download this costless Struts book: “Struts Survival Guide: Basics to Best Practices” inwards pdf format. This mass teaches y'all how to construct dynamic websites inwards Java using Java Server Faces, using a hands-on, practical approach. You volition acquire how Struts framework works, acquire how to construct your showtime struts application, all close actions, shape validations, fault handling, struts tag libraries, tiles, internationalization as well as the correct agency to purpose the struts framework. Very useful mass for both Struts beginners as well as experienced alike. You tin also buy the difficult copy of this mass from Amazon.

 Djakarta Struts is i of the most pop MVC frameworks to exercise a Java spider web application Top 3 Free Struts Books for Java EE developers - Learn Online, PDF download


2) Starting Struts 2
Authors: Ian Roughley
Download: http://www.infoq.com/minibooks/starting-struts2
Description: Download this costless eBook “Starting Struts 2″ inwards pdf format. Struts2 is the latest manifestation of the pop Struts Java spider web application framework. It is every bit much capable every bit Spring MVC framework because it also back upwards dependency injection as well as several other characteristic solely supported past times Spring MVC. You volition acquire the deviation betwixt Struts 1 as well as Struts 2 framework, how to purpose Struts 2 to construct Java MVC spider web application, along amongst or as well as thence productivity tips to effectively purpose Struts 2.0. This mass is also available for costless pdf download from the infoq.com website as well as y'all tin also buy the difficult copy of this mass from Amazon.

 Djakarta Struts is i of the most pop MVC frameworks to exercise a Java spider web application Top 3 Free Struts Books for Java EE developers - Learn Online, PDF download


3) More Servlets as well as JavaServer Pages
Author: Marty Hall
Download: http://pdf.moreservlets.com/
Description: More Servlets as well as JavaServer Pages is instantly available inwards pdf format costless of charge. Influenza A virus subtype H5N1 practical conduct to the purpose of the Java 2 Platform for Web-enabled applications as well as dynamic Web sites. Focuses on novel capabilities: the measure JSP tag library, filters, lifecycle lawsuit listeners, declarative as well as programmatic security, Web applications, as well as much more. This is non a pure struts mass but because y'all never educate an application amongst simply struts, instead y'all purpose both Servlet as well as JSP, this is a expert mass to acquire holistic spider web application evolution inwards Java J2EE. These books render expert coverage of Struts, though. You volition uncovering both beginners introduction of Struts as well as advanced Struts concepts for experienced developers.

 Djakarta Struts is i of the most pop MVC frameworks to exercise a Java spider web application Top 3 Free Struts Books for Java EE developers - Learn Online, PDF download


That's all close free Struts framework books for Java as well as J2EE developers. Some of the books are solely costless for reading online but others y'all tin download every bit costless PDF. If y'all come upwards across whatever other struts books which are free, delight experience costless to portion amongst us.

Further Learning
answers)
  • Top 10 Spring Framework Interview Questions amongst answers (see here)
  • The deviation betwixt Struts 1.0 as well as Struts 2.0 framework? (answer)
  • 5 Good books to acquire Spring Framework inwards Java? (list)
  • What is Action shape inwards Struts framework as well as How to purpose it? (answer)
  • The deviation betwixt Factory designing as well as Dependency injection inwards Java? (answer)
  • 10 Departure Betwixt Struts In Addition To Struts2 Framework Inward Java

    What is the divergence betwixt Struts 1 in addition to Struts ii is 1 of the pop Struts interview questions from Java JEE interviews? If you lot convey mentioned Struts inwards your CV so you lot tin await this inquiry on the telephonic or face-to-face circular of interview. Struts 1.x was a really pop MVC framework for Java spider web application on final decade, but when Spring MVC comes it lost a lot of its sheen. Spring framework's dependency injection in addition to inversion of control feature, along alongside several other template based features makes it the de-facto framework for developing Java application. But, the demand of Struts was non completely gone, at that topographic point are soundless a lot of company application written inwards Struts which needs Java developer alongside cognition of Struts to keep in addition to railroad train them, so it's 1 of the practiced science to acquire a Java spider web developer job. Apache than comes alongside Struts 2, the novel version of Struts which supports dependency injection in addition to several other features. In this article, I'll demonstrate you lot roughly key divergence betwixt Struts 1 in addition to Struts ii from interview indicate of view, but if you lot are learning Struts ii past times yourself in addition to looking for a practiced mass than purchase Struts ii inwards Action, 1 of the best books to acquire Struts 2.



    Difference betwixt Struts 1.x vs Struts 2.x framework

    Struts2 is designed to overcome the shortcomings of Struts1 in addition to to arrive to a greater extent than flexible, extendable. Some of the noticeable differences are:

    Front Controller
    One of the key structural In Struts 1.x ActionServlet acts equally a forepart controller in addition to for each request, a novel shape edible bean illustration is created to check parameter that is accessed past times Action class, land inwards Struts 2.x FilterDispatcher acts equally a forepart controller. As asking received a novel illustration of activity shape is created in addition to param interceptor charge all the parameter from the asking to the plain of activity instance.


    Action Classes
    Another telephone substitution divergence betwixt Struts 1.x in addition to Struts ii framework is that Struts1's Action classes are forced to extend an abstract class that makes it non extendable. Struts2's activity classes are to a greater extent than flexible in addition to nosotros tin create them past times implementing Action interface, extending ActionSupport shape or only past times having executed() method.



    Thread Safety 
    This is roughly other of import divergence betwixt Struts 1 in addition to Struts ii which is frequently overlooked past times Java developers. Struts1 Action Classes were Singleton in addition to non thread safe, that way extra attention was required from developer side to avoid whatever side effects because of multithreading. Struts2' activity classes acquire instantiated per request, so at that topographic point is no sharing in addition to multithreading, so they are thread safe.


    Servlet API coupling
    One of the bigger in addition to framework marking divergence betwixt Struts 1 in addition to Struts ii is that Struts 1 APIs are tightly coupled alongside Servlet API in addition to Request in addition to Response objects are passed to activity classes' execute() method. On the other hand, Struts2 API is loosely coupled alongside Servlet API in addition to automatically maps the shape edible bean information to activity shape coffee edible bean properties that nosotros generally use. If withal nosotros yell for a reference to Servlet API classes, at that topographic point are *Aware interfaces for that.


    Testing 
    This divergence is 1 of the most crucial divergence equally long equally code character in addition to productivity is a concern. Struts1 activity classes were difficult to bear witness because of Servlet API coupling, but Struts2 Action classes are similar normal Java classes in addition to nosotros tin bear witness them easily past times instantiating them in addition to setting their properties.


    Request Parameters mapping
    One to a greater extent than interesting divergence betwixt Struts 1 in addition to Struts ii is that Struts1 requires us to create ActionForm classes to check asking params in addition to nosotros yell for to configure it inwards the struts configuration file. Struts2 asking params mapping is done on the wing in addition to all nosotros yell for is to convey coffee edible bean properties inwards activity classes or implement ModelDriven interface to render the coffee edible bean shape yell to survive used for mapping.


    Tag Support
    Another functional divergence betwixt Struts 1 in addition to Struts ii is that Struts1 uses JSTL Tags in addition to so are limited. Struts2 uses OGNL in addition to render unlike kinds of UI, Control in addition to Data Tags. It’s to a greater extent than versatile in addition to slow to use.


    Validation
    One to a greater extent than useful divergence betwixt Struts 2.x in addition to Struts 1.x is that Struts1 supports validation through manual validate() method Struts2 back upwards both manual validation besides equally Validation framework integration.


    Views Rendering 
    The ninth divergence betwixt Struts 1.x in addition to Struts 2.x version are that Struts1 uses measure JSP technology for providing edible bean values to JSP pages for views. Struts2 uses ValueStack to shop asking params in addition to attributes in addition to nosotros tin usage OGNL in addition to Struts2 tags to access them.


    Modules support
    Last but non the to the lowest degree divergence betwixt Struts 1.x in addition to Struts 2.x is that Struts1 modules are complex to pattern in addition to facial expression similar dissever projects Struts2 provides “namespace” configuration for packages to easily create modules.

    So, these were 10 key divergence betwixt Struts 1.x in addition to Struts2.x spider web MVC framework. Here is a prissy summary of roughly to a greater extent than divergence betwixt Struts 1 in addition to Struts 2.x framework from Apache Struts website:
     If you lot convey mentioned Struts inwards your CV so you lot tin await this inquiry on the telephon 10 divergence betwixt Struts in addition to Struts2 framework inwards Java


    That's all close the difference betwixt Struts in addition to Struts 2.0 spider web MVC framework inwards Java. Even though Struts ii seems an extension of Struts 1, it's a completely unlike spider web MVC framework. It's to a greater extent than similar to Spring MVC than Struts ii itself.

    Other Sturts articles, tutorials in addition to interview questions you lot may like:
    • How to acquire ServletContext inwards Struts Action Class? (answer)
    • 10 examples of the display tag alongside Struts inwards Java? (article)
    • 3 Free Struts Books for Java Developers? (see here)
    • More differences betwixt Struts 1.x in addition to Struts 2.x inwards Java (answer)

    Further Learning
    Java Web Fundamentals By Kevin Jones
    Struts ii Framework for Beginners
    Spring Framework Master Class - Beginner to Expert

    6 Divergence Betwixt Include Directive Too Include Activeness Inwards Jsp

    Difference betwixt include directive too include action
    Even though both include directive too include activeness allows y'all to include response of 1 JSP into another, they are quite dissimilar from each other e.g. include directive is processed at translation time too used to include the static resources e.g. HTML files, images too CSS etc, spell the <jsp:include> activeness is processed at request time too used to include to a greater extent than dynamic resources e.g. JSP or Servlet. What is the deviation betwixt include directive too include activeness is too 1 of the close pop JSP interview questions, generally asked either at telephonic circular or origin few circular of Java spider web developer interviews? Let's run across a duet of to a greater extent than deviation betwixt these ii to respond this interrogation inwards to a greater extent than detail. Btw, if y'all are novel inwards JSP too merely learning too preparing for interviews at the same time, too then y'all should too await at Head First Servlet too JSP, 1 of the best books to larn too arrive at for Servlet JSP interviews too certification at the same time.



    JSP include directive vs include action

    The include directive is 1 the 3 directive supported past times JSP e.g. @taglib, @include too @page, spell the include activeness is 1 of the many criterion actions supported past times JSP i.e. <jsp:include>, <jsp:forward>, <jsp:useBean>, <jsp:setProperty>, <jsp:getProperty>, <jsp:param> too <jsp:plugin>.

    Both are used to include the response of 1 resources  into merely about other e.g. composing JSP page alongside header component subdivision coming shape header.jsp, footer coming from footer.jsp too sidebar coming from sidebar.jsp. But every bit I said, they are rattling dissimilar from each other.




    Here are merely about important deviation betwixt include directive too include activeness inwards JSP:

    1) The close cirtical deviation betwixt @include too <jsp:include> is that the include directive is processed at the translation fourth dimension but include activeness i.e. <jsp:include> is processed at the asking fourth dimension i.e. when the asking comes for processing.

    2) Second of import deviation betwixt include directive too include activeness is thtat an include directive tin purpose both relative too absolute path but the include activeness ever uses relative path.

    3) Third key diference betwixt include activeness too include directive is that @include tin exclusively include contents of resources e.g. HTML or CSS file but it volition non procedure the dynamic resource, spell the include activeness i.e. <jsp:include> procedure the dynamic resources too upshot volition move added to calling JSP.

    4) One to a greater extent than practical deviation betwixt include directive too include activeness is that alongside include directive, y'all tin non overstep whatever other parameter e.g request, response or whatever configuraiton, but alongside include action, nosotros tin overstep merely about other parameter too using <jsp:param> tags.

    5) Fifth deviation is extension of previous deviation i.e. alongside include directive, y'all cannot overstep the request or response object to calling jsp to included file or JSP or vice versa, but alongside include action, it's possible to overstep request/response object.

    6) Last but non the to the lowest degree deviation betwixt include directive too include activeness is that onetime uses the file attribute to specify the resources to move included too that's why know every bit file include every bit well. On the other manus include activeness uses page attribute to specify the resources to move included, thence too known every bit page include inwards JSP.

    Here is a overnice summary of all the differences betwixt file include too page include i.e. include activeness inwards JSP:

    answer)
  • How to upload a File inwards JSP too Servlet? (answer)
  • Difference betwixt URL rewriting too URL encoding inwards JSP? (answer)
  • What is JSESSIONID inwards J2EE Web Application? (answer)
  • Difference betwixt sendRedirect() too forward() inwards Servlet? (answer)
  • Difference betwixt GET too POST method inwards HTTP Protocol? (answer)

  • Further Learning
    Java Web Fundamentals By Kevin Jones
    Spring Framework 5: Beginner to Guru
    JSP, Servlets too JDBC for Beginners: Build a Database App


    Can You Lot Declare Constructor Within Servlet Class?

    Yes, Servlet tin conduct maintain Constructor, it's perfectly legal but it's not the correct agency to initialize your Servlet. You should purpose the init() method provided past times the Servlet interface to initialize the Servlet. If you lot remember, Servlet's are particular inward a feel that they are instantiated past times the container as well as managed past times the container. Influenza A virus subtype H5N1 servlet container similar Tomcat creates a puddle of multiple Servlets to serve multiple clients at the same time. They instantiate Servlet past times calling the default no-argument constructor as well as suppose you lot conduct maintain declared unopen to other constructor which takes a parameter e.g. HelloServlet(String name) than Java compiler volition non add together the default no-argument constructor as well as Servlet container volition non able to initialize the Servlet. That's why it's of import non to render a constructor inward Servlet, but if you lot do, brand certain you lot besides add together a default constructor in that place for Servlet container.


    Even though Servlet is the backbone of Java Web Application, many Programmer doesn't know commutation of Servlet e.g. who creates Servlet instance, life-cycle of Servlet instance, thread-safety as well as concurrency, Session administration etc. If you lot are only learning Servlet as well as JSP inward hotch potch manner, perhaps this is the fourth dimension to alternative upwardly a practiced mass similar Head First Servlet as well as JSP as well as read it from start to end. This is an former mass which is non yet updated to comprehend Servlet 3.0 as well as Asynchronous Servlet but all the same a practiced mass to larn fundamentals. Once yo acquire through this book, you lot tin response questions similar this past times yourself.

    s are particular inward a feel that they are instantiated past times the container as well as managed past times the co Can You Declare Constructor within Servlet Class?



    java.lang.InstantiationException inward Servlet

    Sometimes, when developer declares constructor on Servlet they add together a parameterized constructor i.e. a Servlet constructor which accepts a parameter. Since coffee alone adds the default constructor inward whatever shape if in that place is no constructor specified, it volition non add together default constructor if you're Servlet shape already conduct maintain one. In this case, if Servlet container e.g. Tomcat tries to instantiate a Servlet inward guild to serve the outset asking from client, it volition throw the next exception:



    HTTP Status 500 - Error instantiating servlet shape HelloServlet

    javax.servlet.ServletException: Error instantiating servlet shape HelloServlet
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    java.lang.Thread.run(Thread.java:662)


    Root cause:

    java.lang.InstantiationException: HelloServlet
    at java.lang.Class.newInstance0(Class.java:340)
    at java.lang.Class.newInstance(Class.java:308)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1149)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:662)

    You tin endeavour this yourself, only do a Servlet without a default no-argument constructor. Though it's only a error if you lot are sure, you lot tin conduct maintain your constructor but retrieve Servlet container calls that. I suggest, you lot should purpose the init() method to initialize the Servlet because that's the measure way.

    Further Learning
    Java Web Fundamentals By Kevin Jones
    Spring Framework 5: Beginner to Guru
    JSP, Servlets as well as JDBC for Beginners: Build a Database App

    >

    Saturday, November 23, 2019

    6 Divergence Betwixt Forward() Together With Sendredirect() Inwards Servlet - Java

    Servlet inwards JEE platform provides 2 methods forward() as well as sendRedirect() to road an HTTP asking to about other Servlet for processing. Though, both are used for forwarding HTTP requests for farther processing at that spot are many differences betwixt forward() as well as sendRedirect() method e.g. frontward is performed internally past times Servlet, but a redirection is a two-step process, where Servlet instruct the spider web browser (client) to become as well as fetch about other URL, which is unlike from the original. That's why forward() is every bit good known every bit a server-side redirect as well as sendRedirect() is known every bit the client-side redirect. Becuase of their usefulness, the departure betwixt forward() as well as sendRedirect is every bit good a oft asked Servlet interview question. Let's run into a twain of to a greater extent than differences to answer this query better.

    While working betwixt Servlet as well as JSP, yous volition often utilisation these asking re-direction methods similar include(), forward(), or sendRedirect(). Sometimes, yous volition include the response from other Servlet as well as sometimes it volition merely frontward the asking for processing to about other Servlet.

    Btw, if yous are preparing for Java JEE interviews as well as learning this every bit utilisation of your interview preparation, yous should every bit good banking concern jibe the Java Programming Interview Exposed, 1 of the rare majority which covers all of import topics for Java JEE interviews. It covers kernel Java, Spring, Hibernate, JDBC as well as other advanced topics expected from both beginner as well as experienced Java programmers.

     Servlet inwards JEE platform provides 2 methods  vi Difference betwixt forward() as well as sendRedirect() inwards Servlet - Java



    Forward vs SendRedirect inwards Servlet

    Now, let's run into about of import differences betwixt sendRedirect() as well as forward() method of Servlet API:



    1) First as well as most of import departure betwixt the forward() as well as sendRedirect() method is that inwards instance of former, redirect happens at server destination as well as non visible to client, but inwards instance of later, redirection happens at customer destination as well as it's visible to client.

    2) Another key departure betwixt forward() as well as sendRedirect() is that frontward is marginally faster than the redirect. The sendRedirect() is marginally slower than a forward, since it requires 2 browser requests, non one. See Head First Servlet as well as JSP for to a greater extent than details.

    3) Third departure betwixt forward() as well as sendRedirect() method is that inwards instance of forward() master URL remains intact, piece inwards instance of sendRedirect() browser knows that it's making a novel request, as well as then master URL changes.

    context (Some containers brand provisions for cross-context communication but this tends non to last real portable). But the sendRedirect() method tin give the sack last used to redirect users to resources that are non utilisation of the electrical flow context, or fifty-fifty inwards the same domain. See Head First Servlet as well as JSP for to a greater extent than details.

    6) In the instance of forward, Since both resources are utilisation of the same context, the master asking context is retained. On the other hand, since post redirect involves a novel request, the previous asking orbit objects, amongst all of its parameters as well as attributes are no longer available after a redirect. (Variables volition demand to last passed past times via the session object).


    That's all virtually  the difference betwixt forward() as well as sendRedirect() inwards Servlet. It's 1 of the of import concepts to larn for Java spider web developers. It's non merely of import from the interview signal of thought but every bit good from writing real-world Java spider web application using Servlet, JSP, jQuery as well as other JEE technologies. Practically, yous volition convey several choices for  redirecting HTTP asking e.g. yous tin give the sack produce as well as then past times using jQuery every bit well, but yous demand to utilisation sendRedirect() as well as forward() if yous desire to produce as well as then from Servlet.

    Further Learning
    Java Web Fundamentals By Kevin Jones
    Spring Framework 5: Beginner to Guru
    JSP, Servlets as well as JDBC for Beginners: Build a Database App

    4 Ways Of Session Administration Inwards Servlet Java

    Session tracking or Session management is an of import characteristic of modern spider web applications which allows the server to think it's clients. By keeping a session for each user, Server tin serve the customer better. It likewise helps inwards safety, security in addition to personalization in addition to must for sure enough sort of spider web applications e.g. e-commerce sites similar Amazon or e-bay which stores item selected past times the user for buy inwards a shopping cart, fifty-fifty after the user is logged out. Since HTTP is a stateless protocol, in that place are no ways to know that 2 HTTP requests are related to each other i.e. they are coming from the same customer or they are business office of the same process. Session tracking is a machinery that Servlets in addition to Java Web application purpose to maintain soil nearly a serial of asking from the same user across closed to menstruation of time. By keeping a session, an e-commerce site tin maintain add together to bill of fare facility in addition to likewise overstep on tracks of how y'all interact amongst the application. Since HTTP doesn't render a default agency to rails Session, in that place are closed to non-standard ways to create create Sessions inwards Servlet JSP based application. Let's convey a closed await on them.



    Types of Session Tracking inwards Servlet

    Since Session management needs to go amongst all spider web browsers in addition to likewise considers user's security preference, oft an identifier i.e. a SessionId is used to overstep on rails of asking coming from the same customer during a fourth dimension duration. There are 4 master copy ways to create create Session inwards Java Web application written using Servlet in addition to JSP.

    1) URL rewriting
    2) Cookies
    3) Hidden Form fields
    4) HTTPS in addition to SSL


    let's meet them inwards picayune flake to a greater extent than detail:



    URL rewriting
    URL rewriting is a method of session tracking inwards which closed to extra information (session ID) is appended at the halt of each URL. This extra information identifies the session. The server tin associate this session identifier amongst the information it has stored nearly that session. This method is used amongst browsers that create non back upwards cookies or where the user has disabled the cookies. If y'all involve to rails Session from JSP pages, in addition to thence y'all tin use <c:out> tag for URL-rewriting. It automatically encodes session identifier inwards URL.


    Hidden Form Fields
    This is i of the oldest ways to create session tracking inwards Servlet application. Similar to URL rewriting. The server embeds novel hidden fields inwards every dynamically generated shape page for the client. When the customer submits the shape to the server the hidden fields position the client. See Head First Servlet in addition to JSP for to a greater extent than details on how to purpose hidden shape plain to create create session inwards Servlet JSP.

     Session tracking or Session management is an of import characteristic of modern spider web applications 4 ways of Session management inwards Servlet Java



    Cookies
    H5N1 cookie is a pocket-sized amount of information sent past times a servlet to a Web browser. H5N1 cookie is saved past times the browser in addition to subsequently sent dorsum to the server inwards subsequent requests. H5N1 cookie has a name, a unmarried value, expiration appointment in addition to optional attributes. H5N1 cookie's value tin uniquely position a client. Since a customer tin disable cookies, this is non the most secure in addition to fool-proof agency to create create the session. If Cookies are disabled in addition to thence y'all tin fallback to URL rewriting to encode Session id e.g. JSESSIOINID into the URL itself.

     Session tracking or Session management is an of import characteristic of modern spider web applications 4 ways of Session management inwards Servlet Java


    Secure Socket Layer (SSL) Sessions
    Web browsers that back upwards Secure Socket Layer communication tin purpose SSL's back upwards via HTTPS for generating a unique session key every bit business office of the encrypted conversation. Modern days online meshing banking website, ticket booking websites, e-commerce retailers similar Amazon in addition to e-bay all purpose HTTPS to security transfer information in addition to create create the session. You tin likewise see Murach's Java Servlets in addition to JSP to larn to a greater extent than nearly how HTTPS tin endure used amongst Java spider web application.


    That's all nearly different ways to rails Session inwards Java Web application. Cookie was the most pop agency to create create Session amongst a fallback to URL rewriting when Cookies are non enabled at the customer side. While to a greater extent than security sensitive applications e.g. online e-commerce portals similar Amazon, FlipCart, EBay, online banking websites, go booking websites, or whatever other websites which bargain amongst sensitive information e.g. personal, fiscal or professional person they purpose SSL in addition to HTTPS to secures transfer in addition to maintain them.

    Further Learning
    Java Web Fundamentals By Kevin Jones
    Spring Framework 5: Beginner to Guru
    JSP, Servlets in addition to JDBC for Beginners: Build a Database App

    3 Departure Betwixt Spider Web Server Vs Application Vs Servlet Containers Inward Coffee Jee

    In the Java EE, or J2EE or JEE world, in that place is a lot of confusion betwixt terminology, which is quite evident that straightaway nosotros accept 3 words (J2EE, Java EE, as well as JEE) to clit the same technology platform. You volition encounter Java developers using the damage similar Web Server, Application Server, as well as Web containers interchangeably but they are non precisely same. The original departure betwixt a Web server as well as an application server is that spider web server is meant to serve static pages e.g. HTML as well as CSS, spell Application Server is responsible for generating dynamic content past times executing server-side code e.g. JSP, Servlet or EJB. One of the most pop spider web servers is Apache HTTPD which is oft used inwards conjunction amongst Tomcat to host many Java spider web application. Now, tomcat is non precisely an application server, it's to a greater extent than of a servlet engine or spider web container or too known equally servlet containers because it provides the runtime environs for Servlet as well as JSP but doesn't render the services similar EJB as well as distributed transaction which are a key characteristic of the application server inwards Java JEE world.



    Web Server vs Application Server vs Web Containers

    From the outset business office it is clear that Web server serves static content, but, both spider web containers as well as application servers dynamic content. Let's encounter a span of to a greater extent than points to empathize the departure betwixt Web as well as Application Server equally good Servlet engines similar Tomcat as well as Jetty.



    1) Examples
    In corporation to meliorate empathize the difference, you lot must know roughly pop examples of the spider web server, application server, as well as spider web containers. Apache as well as IIS are 2 pop spider web servers. Apache is used everywhere including Java basis but IIS is to a greater extent than pop inwards Microsoft ASP .NET world. From Java EE perspective span of pop application servers are IBM WebSphere, Oracle WebLogic, Glassfish as well as Redhat's JBoss. Coming dorsum to spider web containers or servlet engines, Apache Tomcat as well as Jetty are 2 of the most pop Servlet engine inwards Java spider web world.



    2) Features as well as Responsibility
    The meaning departure betwixt spider web server as well as application server comes from a responsibleness perspective. Web servers are responsible for serving static content e.g. HTML over HTTP protocol spell application server is responsible for serving dynamic content, managing EJB pool, facilitating distributed transaction, facilitating application lookup over JNDI, application safety as well as others. While spider web containers are alone responsible for generating HTML past times executing JSP as well as Servlet on Server side.

    This is too 1 of the pop questions on Java JEE interviews, but for meliorate preparation, you lot tin too refer Java Programming Interview Exposed book, 1 of the best to produce for Java spider web evolution interviews.




    3) Service
    One to a greater extent than departure betwixt an application server as well as spider web server comes from the service perspective. It's expected from a Web server to render HTTP protocol degree service spell application server is supposed to render to a greater extent than powerful as well as dynamic Web service as well as concern degree service via EJB (Enterprise Java Beans). Essential services similar Database connector pooling is non alone provided past times application server but too past times Web containers similar Tomcat. You tin read to a greater extent than nearly how to setup connector puddle inwards tomcat here.


    4) Usage
    Once you lot know the departure betwixt spider web as well as application server as well as spider web containers, it's slow to figure out when to job them. You take away a spider web server similar Apache HTTPD if you lot are serving static spider web pages. If you lot accept a Java application amongst only JSP as well as Servlet to generate dynamic content thus you lot take away spider web containers similar Tomcat or Jetty. While, if you lot accept Java EE application using EJB, distributed transaction, messaging as well as other fancy features than you lot take away a total fledged application server similar JBoss, WebSphere or Oracle's WebLogic.

    You tin too job spider web server as well as application server together inwards the same setup equally shown inwards the next example:

     in that place is a lot of confusion betwixt terminology 3 Difference betwixt Web Server vs Application vs Servlet Containers inwards Java JEE



    That's all nearly the difference betwixt Web Server, Application Server as well as Servlet Container in Java as well as JEE world. Remember, each 1 of the accept dissimilar live on as well as many times used together inwards Java Web world. For example, 1 of the pop setups is apache fronting Tomcat. You tin job this setup if your Web application is alone using JSP as well as Servlet as well as doesn't take away EJB or distributed transaction feature. More basic services similar Database connector pooling is too provided past times Tomcat. On the other hand, if you lot accept total fledged Java EE application including EJB thus you lot take away a proper application server similar WebSphere, WebLogic or JBoss to host your application.

    Further Learning
    Java Web Fundamentals By Kevin Jones
    Java EE amongst Vaadin, Spring Boot as well as Maven
    Spring Framework Master Class - Beginner to Expert