Develop Java MVC web apps using MyBatis, Servlets and JSP
What you'll learn
- Learn the basics of Mybatis
- Understand SQL-Mappers
- CURD operations using Mybatis
- Build a DAO layer using Mybatis
- Create a Java dynamic web application using Servlets
- Differentiate between GenericServlet and HttpServlet
- Understand servlet life cycle functions
- Read and process HTTP request (query string) parameters
- Understand different scopes - request, session and application
- Generate different types of content (like .doc or .xls) based on user choice
- Understand the JSP architecture
- Understand JSP life cycle functions
- Combine Servlet and JSP to handle a single HTTP request
- Learn how JSP Custom tags work
- Learn JSP Expression Language and JSP Standard Tag Libraries (JSTL)
- Create a full fledged MVC application
- Basic knowledge of Java programming language is good enough
- Basic knowledge of HTML will help, but not necessary
Servlets and JSP
A Java servlet is a Java software component that extends the capabilities of a server. Although servlets can respond to many types of requests, they most commonly implement web containers for hosting web applications on web servers and thus qualify as a server-side servlet web API. Such web servlets are the Java counterpart to other dynamic web content technologies such as PHP and ASP.NET.
A Java servlet processes or stores a Java class in Java EE that conforms to the Java Servlet API, a standard for implementing Java classes that respond to requests. Servlets could in principle communicate over any client–server protocol, but they are most often used with HTTP. Thus "servlet" is often used as shorthand for "HTTP servlet". Thus, a software developer may use a servlet to add dynamic content to a web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML and more commonly, JSON. Servlets can maintain state in session variables across many server transactions by using HTTP cookies, or URL mapping.
To deploy and run a servlet, a web container must be used. A web container (also known as a servlet container) is essentially the component of a web server that interacts with the servlets. The web container is responsible for managing the lifecycle of servlets, mapping a URL to a particular servlet and ensuring that the URL requester has the correct access rights.
The Servlet API, contained in the Java package hierarchy javax.servlet, defines the expected interactions of the web container and a servlet.
Servlets can be generated automatically from JavaServer Pages (JSP) by the JavaServer Pages compiler. The difference between servlets and JSP is that servlets typically embed HTML inside Java code, while JSPs embed Java code in HTML. While the direct usage of servlets to generate HTML has become rare, the higher level MVC web framework in Java EE (JSF) still explicitly uses the servlet technology for the low level request/response handling via the FacesServlet. A somewhat older usage is to use servlets in conjunction with JSPs in a pattern called "Model 2", which is a flavor of the model–view–controller.
MyBatis is a Java persistence framework that couples objects with stored procedures or SQL statements using an XML descriptor or annotations.
MyBatis is free software that is distributed under the Apache License 2.0.
MyBatis is a fork of iBATIS 3.0 and is maintained by a team that includes the original creators of iBATIS.
Unlike ORM frameworks, MyBatis does not map Java objects to database tables but Java methods to SQL statements.
MyBatis lets you use all your database functionality like stored procedures, views, queries of any complexity and vendor proprietary features. It is often a good choice for legacy or de-normalized databases or to obtain full control of SQL execution.
It simplifies coding compared to JDBC. SQL statements are executed with a single line.
MyBatis provides a mapping engine that maps SQL results to object trees in a declarative way.
Who this course is for:
- Core Java developers who want to learn about advanced concepts in Java
- Web developers with Java knowledge who want to build powerful dynamic/interactive web applications
- Developers from other programming background who want to explore MVC in Java
After my graduation from Kuvempu University with a University Rank in 1994, continued my studies in Computer Science with Aptech Computer Education for couple of Years.
I got into teaching Computer Software in 1996, when I got a job as teaching faculty in Aptech Computer Eduction, where I was a student. That’s when came to know that teaching is not only a respectable job, but one can enjoy too.
In 1999, I became the founder of a small computer training institute, Lotus Infodesk in Bangalore. Students mostly used to come to my institute for learning C, C++, VB, Oracle and Java.
At the same time, I also got an opportunity to teach in a college for 11th and 12th year students, and had a wonderful time teaching them Pascal.
Unfortunately, the recision hit year 2000-2001 badly hit my training institute, and I like many others had to shutdown the same.
This brought not only a very tough one year, but also brought new opportunities in venturing into Software development and consulting.
In the year 2003, a new door was opened for me – training software engineers in big software companies like Infosys, HP, Cap Gemini and few others.
Since then I am enjoying my journey in this industry, finding few development opportunities on the way.
Here are some of the clients (in alphabetical order) I worked with in the last 6 years:
ABB, Accenture, Amadeus, Bosch, Brillio, CA, Cadestech, Cisco, Collabera, EBay, EFI India, EMC, Epsilon, Exillant, HCL, HP, HPE, Infosys, Manipal Global, Metric Stream, MicroFocus, Mindtree, Persistent, Philips, Publicis Sapient, QSI, Sasken, SLK, Sony, Thomson Reuters, Trianz, Unisys, and Yodlee.
And the technologies I was fortunate enough to conduct classes on:
In the mean while, I had a great opportunity to create e-learning content for Manipal Global on Java and JDBC, in 2015. This assignment consisted of 50 hours of learning material including face shot videos, screen recordings, quizzes, assignments, reading material and others.
Somewhere in mid 2018, I started creating video courses, which published for free on this website, which was like a helping content for my classroom students.
In December 2018, I published my first course on Udemy, and since then I have published a total of 14 courses till date.
However, I have published all of my courses on my website for a price, which is like almost free.
Tell me what’s the last thing you purchased for less than 50 rupees, that you own it for your lifetime?