Design Patterns web based applications [closed]

A bit decent web application consists of a mix of design patterns. I’ll mention only the most important ones. Model View Controller pattern The core (architectural) design pattern you’d like to use is the Model-View-Controller pattern. The Controller is to be represented by a Servlet which (in)directly creates/uses a specific Model and View based on … Read more

What is Java Servlet?

A servlet is simply a class which responds to a particular type of network request – most commonly an HTTP request. Basically servlets are usually used to implement web applications – but there are also various frameworks which operate on top of servlets (e.g. Struts) to give a higher-level abstraction than the “here’s an HTTP … Read more

How can I upload files to a server using JSP/Servlet?

Introduction To browse and select a file for upload you need a HTML <input type=”file”> field in the form. As stated in the HTML specification you have to use the POST method and the enctype attribute of the form has to be set to “multipart/form-data”. <form action=”upload” method=”post” enctype=”multipart/form-data”> <input type=”text” name=”description” /> <input type=”file” … Read more

How do servlets work? Instantiation, sessions, shared variables and multithreading

ServletContext When the servlet container (like Apache Tomcat) starts up, it will deploy and load all its web applications. When a web application is loaded, the servlet container creates the ServletContext once and keeps it in the server’s memory. The web app’s web.xml and all of included web-fragment.xml files is parsed, and each <servlet>, <filter> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)