Struts2 Hello World in Eclipse

Struts2 Hello World Example in Eclipse

Below Example use struts2.3.X version

Project Structure

Strut2 Hello File Structure
















 Struts2 Hello World


Download Struts2 Hello Program



JSTL Tags in Jsp

JSTL is stands for JSP – standard Tag Library

JSTL gives the collection of jsp tags that are very useful if you are not using any framework like Struts2.

File Structure





Download jstl.jar




Download JSTL Hello Example


First Java Program using Notepad

You can write Java program using any IDE like Netbeans, Eclipse etc or you can directly write Java program using Notepad and can compile using CMD (command prompt)


Let’s write the First Java Program using Notepad

Step 1. Create a text document with name

Step 2. open the created file and write the following code


Now open the CMD

Go to the path where your is kept then give the file name to compile it



You can see the command javac

Here by this command we are calling java compiler to compile file

Now press enter and this creates a new file with name Hello.class

To run the file type java Hello i.e. java <Class Name>


Note: You have to set the path first to run the java program if your program is any where except bin folder.

Hibernate and Java hello example

Step 1:  Open netbeans
File> New Project >java web> web application .click next
Project name : hibernatehello .click next . again click nextnow select framework : hibernate . click finish

Step 2: Now hibernate.cfg.xml file opens edit this line change the database name if required in am using hibernate 

after edit:

make sure that this database should exists 
complete code of hibernate.cfg.xml

Step 3:
Make a java class named student and copy the below code.(

Step 4:
Now right click on the folder and select hibernate mapping wizard
File Name: student.hbm .click next

class to map: one.Student .click finish
code in student.hbl

Step 5:
Again right click on package “one” select
name this class as HibernateUtil and just click finish.
now last step:
copy this code in index.jsp