//SERVER PROGRAM

import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.awt.event.*;
import java.io.*;
import java.applet.*;


/*<applet code="AServer" width="500" height="500"></applet>*/

public class AServer extends Applet implements ActionListener
{
TextField t1=new TextField("Hello");
Button b1=new Button("B1");

Panel p1=new Panel();


public void init()
{

p1.setLayout(new GridLayout());
p1.add(t1);
p1.add(b1);
b1.addActionListener(this);
add(p1);
}

public void actionPerformed(ActionEvent ae)
{
System.out.println("BUTTOJ ACTION");
try{

Socket cs=new Socket("localhost",8080);

ServerSocket ss=new ServerSocket(8080);

cs=ss.accept();

BufferedReader br=new BufferedReader(new InputStreamReader(cs.getInputStream()));
PrintWriter out=new PrintWriter(cs.getOutputStream(),true);
out.println("1 AM SENDING FROM SERVER "+t1.getText());
}

catch(Exception e)
{
System.out.println(e);
}


}


}



//CLIENT PROGRAM

import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.awt.event.*;
import java.io.*;
import java.applet.*;

/*<applet code="AClient" width="500" height="500"></applet>*/

public class AClient extends Applet
{
public void init()
{

TextField t1=new TextField("Hello");


setLayout(new FlowLayout());
add(t1);
try{

Socket s=new Socket("localhost",8080);

BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream()));

t1.setText(br.readLine());
}
catch(Exception e)
{
System.out.println(e);
}
}


}

C:\>AppletViewer AServer.java
java.security.AccessControlException: access denied (java.net.SocketPermission 1
27.0.0.1:8080 connect,resolve)

Please solve my problem

PS: The Socket cs declaration is correct
while connection the Socket Exception is thrown