aspose file tools*
The moose likes Tomcat and the fly likes  deployment under tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark " deployment under tomcat " Watch " deployment under tomcat " New topic
Author

deployment under tomcat

Ankesh Kumar
Greenhorn

Joined: Dec 01, 2011
Posts: 3

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

Joined: Oct 27, 2005
Posts: 19783
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ankesh Kumar
Greenhorn

Joined: Dec 01, 2011
Posts: 3
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

Joined: Oct 27, 2005
Posts: 19783
    
  20

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

Joined: Dec 01, 2011
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: deployment under tomcat