Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing an Instance, creted by Servlet

Status
Not open for further replies.

rwthAachen

Programmer
Jul 10, 2005
3
DE
Hello,
I am facing a problme regarding servlets.
a 3rd party servlet - LocationReportServlet takes parameter name called reportHandler. The value of this parameter has to be a class name of a class that implements the LocationReportHandler interface. The LocationReportHandler instance is added to the ServletContext attributes with the REPORT_HANDLER_KEY as register key.

this servlet is running on Apache server. and I need to get the instance of reportHandler class in a normal java class(which is not a servlet). LocationReportServlet also has a public method which returns reportHandler instance.
_______________________________
public LocationReportHandler LocationReportServlet::getLocationReportHandler()
----------------------------------
but I am not aware of any technique to get this handler instance(which is created by servlet) in some class.

Do I need to specify proper webserver address, port on which servlet is running.. etc. etc.
I have put all my classes in \webapps\ROOT\WEB-INF\classes of my project.

I have no Idea.

Any help will be appriciated :)

Thanks in advance
Pankaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top