• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inline servlet content generation in JSP

 
Bob Baker
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to use the <jsp:include> tag to have a servlet dynamically generate some content for inclusion in a JSP. I know Weblogic can do this, because we use WL at work, but I can't get the same to work in my version of Tomcat at home (4.1.2):
Basically, this test page should generate the word "Orange" into my test area. It's almost as if the servlet can't even be seen, becuase I have debug statements in the servlet to print to the log files when the init(), doGet(), and doPost() methods are called, and I don't see anything in the logs.
Is there something I need to configure in Tomcat to do this? What do I need to do?
Bob
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The use of the /servlet/ nomenclature requires that the servlet engine have the "invoker" servlet running. Tomcat 4 does NOT have the invoker on by default. Look at the web.xml file in ../conf for invoker.
Problems related to this are at the top of the hit parade. It has been discussed a number of times.
Bill
[ July 25, 2003: Message edited by: William Brogden ]
 
Bob Baker
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I had to do two things. The first was to enable the Invoker servlet mapping as you suggested. The other was to remove the application context from the <jsp:include> of the call. Everything works as expected now.
Thanks for your help.
Bob
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!