由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 求救
相关主题
Read this about JApplet[转载] JSP access database的问题
suggestion needed for graphJSP/SERVLET里面如何实现弹出窗口(新短信)功能
【请教】怎么往一个applet里面填字符串?JSP程序中如何在客户端启动另外的JAR程序
one questionJ2EE和未来工作问题
新手求助applet问题interview求助
Re: can Applet use JDBC?[合集] Connection Pooling.
Re: Can I use JSP on server and use Applet as user interface on client学JavaWeb和J2EE有什么好教材?
Java能帮我做这个project吗?现在 Java Web 开发过时了么?
相关话题的讨论汇总
话题: applet话题: use话题: java话题: access话题: database
进入Java版参与讨论
1 (共1页)
c***a
发帖数: 251
1
我的一个JApplet再JCreator中运行非常正常,没有任何异常。
但是把该JApplet加入一个html文件
运行该html文件
再java控制台有如下错误提示:
java.sq.SQLException:unable to connect to any hosts due to exception:
java.security.AccessControlException:access denied(java.util.Property
Permission file.encoding read)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
at com.mysql.jdbc.Connection.(Connection.java:562)
at com.mysql.jdbc.Connection.NonRegisteringDriver.connect(NonRegisteringDriv
er.java:361)
at java.sql.DriverManager.getConne
r***l
发帖数: 67
2
It's a security exception. The security manager on your machine does not allow
the Applet to access local IO. The end result is Applet will not make JDBC
connection.
Normally, no one tries to use Applet to insert data into database through JDBC
directly. It's not a good practice.

【在 c***a 的大作中提到】
: 我的一个JApplet再JCreator中运行非常正常,没有任何异常。
: 但是把该JApplet加入一个html文件
: 运行该html文件
: 再java控制台有如下错误提示:
: java.sq.SQLException:unable to connect to any hosts due to exception:
: java.security.AccessControlException:access denied(java.util.Property
: Permission file.encoding read)
: at com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
: at com.mysql.jdbc.Connection.(Connection.java:562)
: at com.mysql.jdbc.Connection.NonRegisteringDriver.connect(NonRegisteringDriv

c***a
发帖数: 251
3
fist of all, I really appreciated your reply.
Actually, I didn't do any insertion about the data to the database.
just some retrieval.
Can you give me some hints about how can I realize it?
Thank you.

It's a security exception. The security manager on your machine does not allow
the Applet to access local IO. The end result is Applet will not make JDBC
connection.
Normally, no one tries to use Applet to insert data into database through JDBC
directly. It's not a good practice.

【在 r***l 的大作中提到】
: It's a security exception. The security manager on your machine does not allow
: the Applet to access local IO. The end result is Applet will not make JDBC
: connection.
: Normally, no one tries to use Applet to insert data into database through JDBC
: directly. It's not a good practice.

d******p
发帖数: 24
4
If you want to access local database, write
a norml Java application. Otherwise, use some
server side techonology like Servlet, JSP to
retrieve the data and generate the result
html page at the server side.

【在 c***a 的大作中提到】
: fist of all, I really appreciated your reply.
: Actually, I didn't do any insertion about the data to the database.
: just some retrieval.
: Can you give me some hints about how can I realize it?
: Thank you.
:
: It's a security exception. The security manager on your machine does not allow
: the Applet to access local IO. The end result is Applet will not make JDBC
: connection.
: Normally, no one tries to use Applet to insert data into database through JDBC

c***a
发帖数: 251
5
Yes, just like what you had said. I want to be as a server to enable somebod
y else to visit me..
What kind of tech. I can use to achieve that?
JSP,Servlet.or JavaBean?
All transactions all happen to the applet, nothing to deal with the html files.

【在 d******p 的大作中提到】
: If you want to access local database, write
: a norml Java application. Otherwise, use some
: server side techonology like Servlet, JSP to
: retrieve the data and generate the result
: html page at the server side.

r***l
发帖数: 67
6
Before you implement anything, you have to make sure the requirements and then
pick the right technology.
It's a long story and I will try to make it short here. For presentation,
there are different technologies for you to use:
1. Java Swing Application
Good for internal use (intranet). You can access database and other resource
easily. WebStart can make it easier to manage and distribute.
2. Applet
Code is downloaded through the internet. It's running inside the java enabled
browser. The secur

【在 c***a 的大作中提到】
: Yes, just like what you had said. I want to be as a server to enable somebod
: y else to visit me..
: What kind of tech. I can use to achieve that?
: JSP,Servlet.or JavaBean?
: All transactions all happen to the applet, nothing to deal with the html files.

c***a
发帖数: 251
7
Thank you very much.
Because I had no data interaction with the webpage. I decide to use applet t
echnology to solve this.
Futhermore. I had built my quite complex GUI. I think it's hard to put all
that in a html file.
Now a problem came to me. I need to build something called javakey. It's
some kind of security machnism that enable my applet on the client side to
access the database on the server side?
Is it true?
kind regards.

【在 r***l 的大作中提到】
: Before you implement anything, you have to make sure the requirements and then
: pick the right technology.
: It's a long story and I will try to make it short here. For presentation,
: there are different technologies for you to use:
: 1. Java Swing Application
: Good for internal use (intranet). You can access database and other resource
: easily. WebStart can make it easier to manage and distribute.
: 2. Applet
: Code is downloaded through the internet. It's running inside the java enabled
: browser. The secur

r***l
发帖数: 67
8
Again, it is a bad bad practice to try to allow Applet access the database on
the serverside.
Applet is downloadable through the internet and it is intended to be runing
inside user's network. Applet author can not control his user's firewall and
network setting.
Why you need to use Applet? If the user is on the internet, then JSP/Servlet
is the way to go. If all the users are on the local intranet, Java Swing
application should be used.
If you really really want to use Applet for whatever reaso

【在 c***a 的大作中提到】
: Thank you very much.
: Because I had no data interaction with the webpage. I decide to use applet t
: echnology to solve this.
: Futhermore. I had built my quite complex GUI. I think it's hard to put all
: that in a html file.
: Now a problem came to me. I need to build something called javakey. It's
: some kind of security machnism that enable my applet on the client side to
: access the database on the server side?
: Is it true?
: kind regards.

r***l
发帖数: 67
9
Actually, there's another option. You can sign your applet. A digitally signed
applet is treated like local code. It might require you to get a certificate
from CA. Otherwise, even you sign your applet, no one will trust your
signature and your code.

on
to
machine.
u
t
and
presentation,

【在 r***l 的大作中提到】
: Again, it is a bad bad practice to try to allow Applet access the database on
: the serverside.
: Applet is downloadable through the internet and it is intended to be runing
: inside user's network. Applet author can not control his user's firewall and
: network setting.
: Why you need to use Applet? If the user is on the internet, then JSP/Servlet
: is the way to go. If all the users are on the local intranet, Java Swing
: application should be used.
: If you really really want to use Applet for whatever reaso

c***a
发帖数: 251
10
yes, that's the javakey what i had referred to.
I'll first use a certificate signture to solve it.
Because the java application is available, I don't need to do
a lot of modification to achieve that.
If time is available, I'll learn and try some other tech. like
JSP.
Thanks anyway. Rekal.

【在 r***l 的大作中提到】
: Actually, there's another option. You can sign your applet. A digitally signed
: applet is treated like local code. It might require you to get a certificate
: from CA. Otherwise, even you sign your applet, no one will trust your
: signature and your code.
:
: on
: to
: machine.
: u
: t

1 (共1页)
进入Java版参与讨论
相关主题
现在 Java Web 开发过时了么?新手求助applet问题
java后端开发Re: can Applet use JDBC?
各位大神帮看看[有包子]Re: Can I use JSP on server and use Applet as user interface on client
Re: 请教SWING的问题Java能帮我做这个project吗?
Read this about JApplet[转载] JSP access database的问题
suggestion needed for graphJSP/SERVLET里面如何实现弹出窗口(新短信)功能
【请教】怎么往一个applet里面填字符串?JSP程序中如何在客户端启动另外的JAR程序
one questionJ2EE和未来工作问题
相关话题的讨论汇总
话题: applet话题: use话题: java话题: access话题: database