Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
About
Disclaimer
13-02-2013 15:58
2 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
...
EmployeeDBdatabase = (EmployeeDB)
getServletConfig().getServletContext().getServlet(employeedB);
EmployeeDetail bd = database.getEmployeeDetails(empId);
...
}
}
29 Votes
0
Vinay
I am software professional, working on Java/J2EE/ADF technologies i.e
Java,J2ee,Oracle ADF,hibernate,J2ee,PL/sql,Apps for 5+ years.I am
passionate about learning new technologies.I am sharing my knowledge. Give
your views and suggestion on vinay[at]techartifact.com
More Posts - Website
Follow Me:
Related Posts
creating a basic skeleton to invoke an AM in Java Class in Oracle ADF
01 Feb 2013
Java program to SORT MAP based on KEYS
08 Jan 2013
Why use hashMap when ConcurrentHashMap is there | Techartifact
12 Dec 2012
1.
Mirko
Mar 02, 2011
Why dont you use a RequestDispatcher?
13-02-2013 15:58
3 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
reply
2.
Pravin Jain
Mar 02, 2011
The method getServlet has long been deprecated for security reasons, and will not give direct
access to a Servlet, you may however use the getnamedDispatcher method to get a
RequestDispatcher and then forward to it.
reply
Ricky
Aug 16, 2011
A bit surpisred it seems to simple and yet useful.
reply
3.
Misterz
Mar 17, 2011
As already said, getServlet is deprecated, other than call in HTTP or using RequestDispatcher, that
are clean method of invocation, its possible to use the same aim of using public method, you can
use ServletContext
Example.
interface EmployDAO{
Employee findById(String id);
}
MyServlet implements EmployeeDAO{
init(){
getServletConfig()
.getServletContext()
.setAttribute(EMPL::DAO,this);
}
}
MyOtherServlet{
public void doGet (HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
13-02-2013 15:58
4 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
}
}
but i think its not so clean
BYE
reply
Leave a Reply
Name (*)
Website
13-02-2013 15:58
5 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
Archives
Top Post
Thread Pool in java - 122,281 views
Implementation of thread Pool in java - 44,349 views
Oracle ADF interview Question Part 1 - 40,108 views
Serialization Vs Externalization - 36,453 views
Anonymous Classes in Java - 35,272 views
What is Ext-Js(Extended JavaScript) - 31,741 views
Interview question on thread in Java - 30,427 views
Interface vs Abstract Class - 29,911 views
Marker interface in java - 29,040 views
Hello World Tutorial in ADF - 23,440 views
13-02-2013 15:58
6 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
Tags
ADF ajax ASP.NET ASP.NET 2.0 C#.NET C#.NET 2.0 code example column Design Pattern
Example extjs features get hashmap hibernate J2EE Java Java design Pattern Javascript Jetspeed2 Jquery
JSF JSF 2.0 lifecycle managed bean Memory method Microsoft Mysql Open Portal Open Source
Oracle ADF portal programmatically row Spring sql server table Task flow Techartifact Tips value
view object Web Development XML
Go To Top
Copyright 2009-2012 Techartifact.com
7 of 7
http://www.techartifact.com/blogs/2011/03/calling-servlet-from-servlet...
13-02-2013 15:58