I’m working in another company’s code base for a .jsp based site. Most of the site is straight up .jsp pages, but they have a few .java objects those pages use as well. I’ve modified one of those objects to add an extra function to it, recompiled, and yet the .jsp pages generate a “Method … not found in class” error when I try calling it.
Obvious things I’ve already checked out:
- It’s not a simple typo in the method name.
- The method is public.
- I’m passing the one String the method signature demands.
- The .java file has been recompiled into a .class file that has overstalled the old one.
- The object with the new function was already imported and in use.
- I have successfully modified other .java objects on this webserver (though not in this exact folder) and seen the changes take effect.
What else might it be?
Generally you have to explicitly set up hot-code replace in Tomcat, and usually it doesn’t support adding method signatures – you may have to get the application redeployed and restarted to see the effects properly.
Here’s some links for reference information about it:
Link 1
Link 2