From: "Christian J. Dechery" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 10, 2002 6:56 PM Subject: RE: Need Ideas... big problem! (long)
>But that's exactly what I'm talking about... >if doSomething() has to receive parameters, then the answer to my question (like 10 posts ago) is NO >- there is no WAY a class/Servlet can know in which context its method was called. This can only be >done if the something is passed to this class: the Context itself or the Request and Response objects... >right? > > know little of the Servlet spec, but my question was so simple... I guess I didn't make myself clear. > >Sorry to bother you all... I now know that my problem has no solution. :(( Come now, there is always a solution. It may not be pretty but there is always a way. Why does "doSomething()" need to be called? For a servlet there are three methods that you can use to perform processing "service()", "doPost()" and "doGet". Normally, you would not deal with "service()" but simply define an appropriate "doPost" or "doGet" method to do your processing. Both of these take as parameters the "request" and "response" objects. You should be aware of this as you have a working app. How does your webapp work? Do the users access a JSP and then that JSP performs all processing and displayes the results or is a servlet called when a user accesses a url and that servlet performs all the processing and forwards to a JSP to display the results? These are the two most common models. If you can let us know how your app works then we can help you. I can assure you that what you are trying to do is not outrageous. I have a very similar setup, I have the same webapp in development, test, prod, etc. My development/test box has a single instance of tomcat serving several virtual hosts with the same webapp connecting to different databases, etc. Regards. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
