Suppose we have function foo() in Servlet A.
From Servlet B how can we call this foo() function of servlet A?
both servlet are from same application and in same context....

Recommended Answers

All 4 Replies

how we can call one servlet from other servlet and give the source code of all process?
<snipped email>

how we can call one servlet from other servlet and give the source code of all process?
send it in this id: <removed>

1) Do not hijack threads. Post your own thread if you have a question.
2) Do not ask for code to be emailed. This is against the rules.
3) Read the tutorial that was already posted above. It is directly related to your question and you are just plain lazy if you cannot bother to read it.

just use response.sendRedirect(

commented: Well done. 3 years to late and not even full method name -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.