aspose file tools*
The moose likes Servlets and the fly likes Servlet-Servlet Communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet-Servlet Communication" Watch "Servlet-Servlet Communication" New topic
Author

Servlet-Servlet Communication

Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
I understand that you can get a servlet instance in the current context by invoking ServletConfig.getServletContext().getServlet("ServletName").
I however understand that beginning jdk1.2, this is not permitted anymore for among other things, security reasons. As such Servlets have to explicitly declare which attributes they want to export to the context, even be it the instance itself.
I would appreciate if anyone farmiliar with this new approach would educate me on the intricacies on how to do this.
Thanks in advance,
Herbert
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Deprecated. As of Java Servlet API 2.1, with no direct
replacement.
This method was originally defined to retrieve a servlet from a
ServletContext. In this version, this method always returns null and
remains only to preserve binary compatibility. This method will be
permanently removed in a future version of the Java Servlet API.
In lieu of this method, servlets can share information using the
ServletContext class and can perform shared business logic by
invoking methods on common non-servlet classes.


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Herbert Maosa
Ranch Hand

Joined: May 03, 2000
Posts: 289
Thanks Tony.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet-Servlet Communication
 
Similar Threads
Help! Can't create Web-apps in Tomcat!
ServletContext in Distributed Env.
Number of Servlet Instances
Default servlet context
using jsp in the background