Working on application where I am upload a Testjava source file and compiling and running it over the web.
the problem I having here if the same test file upload again after some changes and run this file again.. the changes are not effecting
its like loading a previous .class instead even the .class and .java are updated with file modified date on server but don't know
where this loading previous .class which is not even exist. might be a cache problem but I don't know how to overcome this issue.
Updates to running Tomcat apps are not instantaneous. Tomcat scans periodically, so if you don't give it a minute or so to "take", you could end up still running the old code.
Not all resource updates perform well on the fly, though. Stuff with static initialization, stuff that's initialized on app startup can be resistant. Plus, Tomcat6 is infamous for running out of PermGen space when updating, so I usually just cycle Tomcat. It doesn't take that long unless you're doing it on a server with lots of apps with extensive startup/shutdown code.
An IDE is no substitute for an Intelligent Developer.
Ah yes, that option is on by default, but it wouldn't be an option if it couldn't be turned off!
As far as I know, the PermGen issue is a memory leak, so bumping it just expands the number of reloads you can do before it runs out. On the other hand, I had to seriously bump up PermGen just to even run more than one Hibernate/JSF webapp in Tomcat, because that architecture eats up a lot of PermGen to begin with.
Helpful hint: don't modify the catalina.bat/.sh file for JAVA_OPTS settings. Create a TOMCAT_HOME/bin/setenv.sh (or setenv.bat) and define JAVA_OPTS there. It's easier to maintain.