Hi,
iam having problem in applet and servlet communication.iam passing
userid,clientid,and password to servlet from applet.
but,iam not able to get hold of servlet.my applet isnot able to recognize
the servlet.can anyone help me in this.
this is the code iam trying in applet to contact servlet and pass values to
servlet:
public void actionPerformed(ActionEvent e)
{
URL u = null;
int i = -1;
String str = null;
if (e.getSource().equals(b1))
{
try
{
u = new
URL("http://localhost:8080/servlet/appServlet?name="+a.getText().trim());
System.out.println(u);
URLConnection uc = u.openConnection();
InputStream is = uc.getInputStream();
while ((i=is.read())!=-1)
{
str = str+String.valueOf(i);
}
is.close();
a.setText(str);
}
catch(Exception ee)
{
System.out.println(ee);
l3.setText("Server Not available.");
}
}
--------------------------------------------------------------------------
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html