Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to a war file in TOMCAT

 
santosh akella
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
basically i am new to tomcat.... , and i am learning JSP.
so, could any one tell me how to run a JSP file which is calling a servlet class file ...
and i got some advice that we should make a war file and keep it in web-apps
folder.. and then call that file in the URL like http://localhost:8080/filename but its not working..
pls guide me ...
thank u in advance
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Santosh,
Its not a compulsion that you need to create a war for running the servlets and jsps on Tomcat. you can just put the class files as they are and can get them running .
First you need to create your servlets then had to update the WEB-INF/web.xml with the servlet entries.
In this WEB-INF folder only create a 'lib and classes inside lib' folder and add your classes to it.
You should be able to access them.No need to go for war file,you can use war file , once you gain some expertise


Raj
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want some examples you can find some simple ones here:
http://simple.souther.us

There is a good tutorial on the Tomcat site:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/index.html

It should help you get started.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic