applet 不能使用java.net.socket吗?

brightsea 2001-05-09 12:56:00
我用applet通过tcp socket和server通讯,appletviewer通过IE打开得到异常:
com.ms.security.SecurityExceptionEx[TcpClient.waitForPackets]: cannot access "workflow"。
我该如何解决?
...全文
67 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
repus 2001-05-09
  • 打赏
  • 举报
回复
可以,但只能和CODEBASE同一主机,不然,就得降低IE的安全选项。
skyyoung 2001-05-09
  • 打赏
  • 举报
回复
终于给我找到了一个好东西。看大家找不找到!?

==========================

TCPReflector




A multithreaded java class that allows you to redirect all connections to a particular machine and port to another machine and port.
To download the package:
Click tcp.tar.gz to download as gzipped tar file
Click tcp.zip to download as a zip file.
If your unzip program cannot handle long filenames (many cannot) you may also want to download this one, it handles long filenames just fine.
Click unzip.exe to download
Once you have downloaded the package, to unpack it
Unix:

First run: gzip -d tcp.tar.gz
Then run: tar xvf tcp.tar


PC:

Run: unzip tcp.zip
Now you will have created a directory called TCPReflector. To run the program, change
to that directory and run the following command:

java TCPReflector -port 8888 -dest www.cnn.com:80

Now put in the following URL into your favorite web browser


http://localhost:8888/

Viola, it takes you to cnn's homepage!


Other potential uses for this program:
To allow an applet to talk to a socket not located on the host from which it was served. You
run the TCPReflector back on your server on a known port (which could be supplied to the
applet via the PARAM tag) and set it up to connect the the host and port your applet needs to
connect to. Then have your applet connect to the TCPReflector and it'll behave as if your applet
has a direct connection to that host and port


To "spy" on a particular network protocol in order to determine how it works. In the example using
cnn's site above, if you add the additional switch "-echo" when you run the reflector you'll get to see
the http protocol in action as your browser communicates with the web server


* Modifications
* 1999-12-07 by Carl Forde cforde@backweb.com
* 1 - changed args -echo -quiet are default
* 2 - added -noecho -verbose
* 1999-10-14 by Carl Forde cforde@backweb.com
* 1 - removed extraneous "\n"
* 2 - default destination port is 80
* 3 - timestamp source/dest messages
* 4 - changed names to client/server, server/client
* 5 - added hex dump display
Back to the java page ...

wangtaoyy 2001-05-09
  • 打赏
  • 举报
回复
编辑相关目录下的。java.policy文件,并授予相关权限。
brightsea 2001-05-09
  • 打赏
  • 举报
回复
降低IE的安全选项我试了,没有用。

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧