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

.war vs .ear file

A WAR (Web Archive) is a module that gets loaded into a Web container of a Java Application Server. A Java Application Server has two containers (runtime environments) – one is a Web container and the other is a EJB container. The Web container hosts Web applications based on JSP or the Servlets API – … Read more

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

As you state JPA is just a specification, meaning there is no implementation. You can annotate your classes as much as you would like with JPA annotations, however without an implementation nothing will happen. Think of JPA as the guidelines that must be followed or an interface, while Hibernate’s JPA implementation is code that meets … 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

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