Hi,
Am relatively new to
JSP. Am trying to access a oracle DB through
JDBC using JSP.
1. I have created a database EmployeeDB with columns emplname, empid, salary, location etc.
2. Next, I have
tomcat installed.
3. I created a directory called "Root" in c:\ The Root directory has another sub-directory "WEB-INF" and employ2.jsp.
c:\root
/ \
employ2.jsp WEB-INF
/ \ \
lib classes web.xml
4. The WEB-INF has 2 more sub-folders "classes" and "lib" and a file "web.xml"
5. The employ2.jsp loads the JDBC driver, connects it to the EmployeeDB database and executes the query "select * from EMPLOYEEDB"
6. Then I wrote a basic web.xml which mentions the welcome-file as "employ2.jsp"
7. After that I start Tomcat server using startup.bat in command prompt.
8. Then I create a emp.war file in c:\root using jar cvf command i.e jar cvf c:\root\emp.war -c c:\root
9. Now I copy the emp.war file in the webapps folder of tomcat directory
10. After that I go to browser and type in
http://localhost:8181/emp
Here, I get a Http 404 error.
Can somebody point out where am wrong.
Thank you.