I noticed that when I deploy a war file under webapps, Tomcat explodes the war file under the webapps folder. It also creates another folder under $TOMCAT_HOME/work/Catalina/localhost/mywarname/. I noticed this is where the servlet classes are kept.
However, another folder is created under $TOMCAT_HOME/work/Catalina/mywarname/ , this folder contains 2 files 1. SESSIONS.ser 2. tldCache.ser. What is stored in these files ? How/When are these refreshed ?
The work directory, as its name suggests, is where Tomcat writes any files that it needs during run time, such as the generated servlet code for JSPs, the class files for the same after they are compiled, the serialized sessions during restarts or shutdowns (SESSIONS.ser). It is also where your application's tmpdir is located context scoped attribute with name "javax.servlet.context.tempdir".
Also, if you have Tomcat configured not to unapack war files when deployed, your web app's directory structure will be created under the work directory instead of the "webapps" directory.
I am one of the moderators of the JavaRanch forums. Here on JavaRanch, we have a naming policy. We want the users of JavaRanch to use a real-sounding name as their display name.
Unfortunately, your name "rajpreet" does not comply to the naming policy. Your name should consist of a real-sounding first name, space, and second name. No obviously fake name and your second name should not consist of initials only.
Please read the naming policy carefully and change your display name. You can change your name by editing your profile.
Please note that we are taking the naming policy seriously. If you do not change your display name, your account on JavaRanch might be locked.
Note that if your name does not comply to the naming policy, you will not be eligible to win the book in the book giveaway currently running in this forum.