dcsimg
including a servlet in a customed tag
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Treves
Posted On:   Wednesday, March 28, 2001 05:41 AM

can anyone show me how to include a servlet within a tag? I wrote a tag and in the doEndTag() method I want to include a servlet, I tried doing it (with the RequestDispatcher object) yet it idi not work.

Can anyone show me how to do it?

David.

Re: including a servlet in a customed tag

Posted By:   AlessandroA_Garbagnati  
Posted On:   Saturday, March 31, 2001 11:37 PM

David,

You cannot use the include method of the RequestDispatcher ojbect inside a custom tag because the included servlet will be inserted directly into the response object, and this is not allowed during the execution of a custom tag.

A possible solution is to use a java.net.HttpURLConnection for executing a connection to the servlet, and retrieving the response.
About | Sitemap | Contact