File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet-Servlet Communication

 
Herbert Maosa
Ranch Hand
Posts: 289
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3226
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Herbert Maosa
Ranch Hand
Posts: 289
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tony.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic