Note that there are some explanatory texts on larger screens.

plurals
  1. POJava applet use httprespon
    primarykey
    data
    text
    <ul> <li>This is my code.</li> <li>I use a simple way to make POST httprespon.</li> <li>Mounted on applet.</li> <li>I work correctly in Eclipse.</li> <li>But mounted in appletviewer cause shot down.</li> <li>Web page will be shot down too.</li> <li>The amount of data is too large to deal with?</li> <li>Or is there any other reasons?</li> <li><p>I need help Thank you</p> <pre><code>public class we extends Applet { Button sd = new Button("11"); Label title= new Label(); Label prompt = new Label(); TextField input = new TextField(8); Label result = new Label(); public void init() { add(sd); } public void start() { } public void paint (Graphics g) { } public boolean action(Event e, Object o) { if (e.target == input) { match(); } else if (e.target == sd) { abandon(); } return true; } private void match() { } private void abandon() { String url="http://119.14.80.132/ACT_ID_355"; HttpPost httppost=new HttpPost(url); List&lt;NameValuePair&gt; params=new ArrayList&lt;NameValuePair&gt;(); params.add(new BasicNameValuePair("UNCLOSE1","1")); try { httppost.setEntity(new UrlEncodedFormEntity(params,HTTP.ISO_8859_1)); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } HttpResponse response = null; try { response = new DefaultHttpClient().execute(httppost); } catch (ClientProtocolException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } if(response.getStatusLine().getStatusCode()==200){ try { String resultq=EntityUtils.toString(response.getEntity()); } catch (ParseException e1) { e1.printStackTrace(); } catch (IOException e1) { e1.printStackTrace(); } } } </code></pre> <p>}</p></li> </ul> <p>appletviewer </p> <pre><code>Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: acc ess denied ("java.net.SocketPermission" "119.14.80.132:80" "connect,resolve") at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:366) at java.security.AccessController.checkPermission(AccessController.java: 560) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkConnect(SecurityManager.java:1051) at java.net.Socket.connect(Socket.java:574) at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSoc ketFactory.java:127) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect ion(DefaultClientConnectionOperator.java:180) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedCli entConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(Default RequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultReq uestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl ient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl ient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl ient.java:784) at we.abandon(we.java:130) at we.action(we.java:49) at java.awt.Component.handleEvent(Component.java:6751) at java.awt.Component.postEvent(Component.java:5160) at java.awt.Component.postEvent(Component.java:5170) at java.awt.Component.dispatchEventImpl(Component.java:4877) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:682) at java.awt.EventQueue$3.run(EventQueue.java:680) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo main.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo main.java:87) at java.awt.EventQueue$4.run(EventQueue.java:696) at java.awt.EventQueue$4.run(EventQueue.java:694) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDo main.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:693) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre ad.java:244) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread. java:163) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre ad.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) at java.awt.EventDispatchThread.run(EventDispatchThread.java:97) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload