Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

deployment under tomcat

 
Ankesh Kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi every body i have one question regarding tomcat i am using tomcat 7.022 i am a beginner to it . i was trying to run servlet examples from head first servlet.
as they say that we just need to copy our project in tomcat/webapp folder and hit the url project will work.
but its not working for me.
if i deploy it by making it war file it works nicely. wahta may be the error?

2. another question i have that what is special in web app folder inside tomcat - when i put my project in other directory its not accecible to other ppl who are in same network
and when i put this in tomcat/webapps it is accecible by everybody just by hitting the url http:my ip:8080/project name ?
my basic question is what is special in the tomcat/ web apps how actually it works.
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat has a configuration file called server.xml. This specifies the base directory of all web applications. By default it's the webapps folder, and this is why it works.

As for the deployment, do you copy an entire project folder, or only the new JSP files? Because when JSP files are modified or added they are usually immediately picked up, whereas anything else needs a restart of the web application. When you first deploy a new project you must start it manually, from Tomcat's management application at http://server:port/manager/html.
 
Ankesh Kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Tomcat has a configuration file called server.xml. This specifies the base directory of all web applications. By default it's the webapps folder, and this is why it works.

As for the deployment, do you copy an entire project folder, or only the new JSP files? Because when JSP files are modified or added they are usually immediately picked up, whereas anything else needs a restart of the web application. When you first deploy a new project you must start it manually, from Tomcat's management application at http://server:port/manager/html.


thanks Rob
but if we will chage that path in server .xml file suppose as d:/my project/Selectbeer will it work? my question is what is speciality in tocat or say server that it make my project available to intire network.if they have acces to my system.
and
buddy i dont have even a jsp file in my project onkly html file and one SelectBeer.class and one web.xml file is there. i made one folder selecrbeer inside that i put my form.html and created new folder WEB- INF /classes->SelectBeer.class
i have put web .xml inside the web-inf folder. the similar example run whe i make this as war file.
but doesnt run when i put is as simple folder view.
 
Rob Spoor
Sheriff
Pie
Posts: 20531
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any changes to Tomcat's own server.xml will require a full Tomcat restart. Any changes to web.xml or a servlet will require the entire application to be stopped and restarted. With WAR files this stopping and restarting may happen automatically, I don't really know.
 
Ankesh Kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Spoor wrote:Any changes to Tomcat's own server.xml will require a full Tomcat restart. Any changes to web.xml or a servlet will require the entire application to be stopped and restarted. With WAR files this stopping and restarting may happen automatically, I don't really know.

Ok Rob iagree with you i already did what you said like restarting the tom catafter putting the folder in tomcat webapps

but its still not working.
anyway thaks for reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic