i have been using netbeans so far thats why i dont have a tight grip in the internal structure of a web application which is done automatically in netbeans IDE.
now i just want to dig out the mystery by deploying my webapplication without any IDE. so far i have organized a web application directory structure in a valid format as below
here Context Directory can be replaced by E:/java/OnlineExam
now the next step supposed to be done is to set the context root inside $catlina home$/conf/context.xml file. i have searched across the web to make this problem solved but still not got the solution. please exemplify, how to set the context root and what else should i do to make entire web application deployed successfully?
i am sorry i didn't elaborate it actually this code already exist in context.xml file stored at the given location. i didn't make any changes in it. actually i've been having this problem since long and have googled to find the solution, but the problem still exist.
it would be really helpful if you kindly write down the steps to deploy the application. rest, all that i have done already is explained.
Well, other than watching web.xml (something you probably don't need to do in production) there isn't anything custom in there so you could probably just get rid of it and let Tomcat autodeploy the application for you.
Joined: Jun 25, 2008
please be more specific how tomcat autodeploy the application....please read out the situation first and kindly tell me the solution step by step.
You'll notice that, shortly after downloading the war file, a directory named SimpleServlet was created next to the war file. Tomcat will recognize any folder that contains a WEB-INF folder in it as a web application.
Joined: Jun 25, 2008
here the scene in different, i just want to create my own web application enviroment,organized at diffrent location than where the tomcat is installed.
at E:\java\OnlineExam,while tomcat is at C:\....\...
please suggest me how and where to set the context root so that the tomcat, installed in C drive, start configuring the web application.
The tomcat/conf/context.xml file is for settings that will apply to all webapps.
If you're just trying to deploy one webapp, create an xml file named after your app, plus the extension, and place it in tomcat/conf/Catalina/localhost. You don't need the path attribute. Tomcat will use the name of the file to determine this. The docBase attribute is what you use to tell Tomcat where your app's file structure is.