On Sun, Aug 15, 2004 at 07:11:17PM -0700, David Aleksanyan wrote: : I'm trying to design an app in a way that all requests will have to go : through a servlet. : e.g. http://localhost:8080/myservlet?somestring : : But I want to make use of the JSP technology. : So I'm thinking that I'll have to somehow include the JSP compiled classes : into the servlet. and somehow put the output of the JSP into the response of : the servlet.
It sounds like you're new to servlet technology? Depending on your end-goal, you could use: - servlet filter: allows you to pass all requests through a common point for added services such as logging, request/response tweaks, security checks, etc. This is part of the servlet spec v2.3 and later. - page controller: perform business logic in the servlet, then use RequestDispatcher#forward() to pass control to a given JSP to produce the output content. This is a well-known design pattern, and the combined servlet+JSP implementation is quite common in J2EE circles. Either way, Googling these terms should turn up lots of advice and examples. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
