I have to work on a java web application which someone else did. Since I'm new to java web development, I scanned the code some and stumbled over some instantiated objects where I can not find the reference to where it is instantiated, i.e. in a .jsp page
...some includes
UserFactory uf=null;
if (application.getAttribute("userFactory") == null){
...
strUser=request.getParameter("user");
pw=request.getParameter("pw");
...
(notice application, request, response)
Now I realise that it could have been declared in some of the includes, and I did go through them all but could not find the declaration (possible though that I did oversee it). Now the question is: Are these objects somehow globally instantiated by tomcat (if so where can I find that) and if that is not the case, how would one go about finding them in a fairly big project (btw I'm using Eclipse JUNO) (i.e. like a feature of eclipse to find the instantiation), preferably without looking manually through every single include.
Aucun commentaire:
Enregistrer un commentaire