Results 1 to 1 of 1
Thread: servlet problem
- 04-29-2009, 09:34 AM #1
Member
- Join Date
- Apr 2009
- Posts
- 37
- Rep Power
- 0
servlet problem
Hi da 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..
Similar Threads
-
[SOLVED] Problem using jsp:forward to a servlet
By Norm in forum Java ServletReplies: 6Last Post: 04-27-2009, 09:49 PM -
problem compiling servlet
By vivek_9912 in forum Java ServletReplies: 1Last Post: 02-13-2009, 11:37 AM -
Servlet problem
By maheshkanda in forum New To JavaReplies: 5Last Post: 02-10-2009, 08:55 AM -
servlet Filter problem
By saint_jorjo in forum New To JavaReplies: 1Last Post: 03-13-2008, 12:05 PM -
Problem in Servlet with JDBC
By *New Programer* in forum Java ServletReplies: 2Last Post: 12-20-2007, 09:15 AM


LinkBack URL
About LinkBacks

Bookmarks