Senthil Nathan

Greenhorn
+ Follow
since Nov 22, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Senthil Nathan

Get the Servelt Context using getServletContext() method.
Then invoke a method on the Servlet Context object called getServlet("name of the servlet to be communicated")
Then cast the result to the specifed servlet and then use that refernce for ur further process.
Sample Code just a frame work) Servlet1 and Servlet2 are the
Servlet classes to be communicated.
public class Servlet1 extends HttpServlet
{
ServletContext cxt = getServletContext();
Servlet2 sl2 = (Servlet2)cxt.getServlet("Servlet2");
}
Hope this clear ur doubt!!!
If u have further doubts, let me know
24 years ago
Inside the Applet, u instantiate a URL object by passing the url of the servlet which is going to handle the request as a parameter. Invoke a method called open request on the URL object which would give u URLConnection Object. Using connection object, get input & output streams and then write into the stream the datas which u want to pass to the servlet.
I would give u the code (frame work)
URL url = new URL("servlet url");
URLConnection con = url.openConnection();
OutputStream out = con.getOutputStream();
out.write("date to be sent");
Does this clears ur doubt?
24 years ago
Can you Please tell us how to make DLL Thread safe? We are using
Microsoft C++ Compiler.
We are trying to call Vendor's C API's from our Java native codes and we are not successful.
Vendor suggested us to make our DLL's Thread safe to resolve the issue.
Could anyone help us in achieving a thread safe dll?

------------------
24 years ago