Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet chaining

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a problem with servlet chaining.i have 2 servlets -Utilities and TallCoin.the TallCoin servlet calls the Utilities servlet.I am using Jbuilder.The code is as follows:
public classTallCoin extends HttpServlet{
public synchronized void init(servletConfig config){
try{
super.init(config);
}
catch(ServletException se){
System.out.println("Couldn't access superclass init");
}
when i run ,i am getting an error:init config parameter is null.
can anyone tell me under what conditions this NullPointer exception is thrown?
 
paul wheaton
Trailboss
Pie
Posts: 21449
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do a lot of servlet chaining and I found out the hard way that if you are using Apache and JRun, you can't have one servlet call another servlet in the same vm. It locks up apache. But if you have one servlet call another servlet on another vm, everything is fine.
This probably doesn't help you at all, but I thought I would toss it out there anyway.
Looking at your question: Do you need config?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic