Please help me to solve this Java Servlet

5 pts.
Tags:
HttpServlet
Java
Java Servlet
Web development
Hi i solved the classloader problem now its working good but if v create two servlet container named sample1 and sample2 example: i have created two servlet container named sample1 and sample2 i had created same package name for both. In sample1, i created one servlet class with package name like com.sample.Hellowrold and /hello1 is alias name In sample2, i created one servlet class like com.sample.Hellowrold and /hello2 is alias name. i need to register the servlet in registerServlet method. it takes only the first class name. pls help me to define the registerServlet for this. see below code in mainThread class hs = (HttpServlet) cls.newInstance(); System.out.println("war : "+wars[i]+" context:"+contexts[j][0]); httpService.registerServlet(wars[i]+contexts[j][0],hs, null,null); output: war : /sample1 context:/hello hs : /sample1 com.sample.HelloWorld@16ba008 war : /sample2 context:/hello hs : /sample2 com.sample.HelloWorld@@9f2cff sample1 only work.. pls help me to solve this problem..

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following