Thread: doubt

doubt

From
pavi thra
Date:
dear sir,
 
how can i run jdbc in applet. it compiled correctly. but in runnig it gives security error.how can i overcome
 
plz sir reply immediately sir
 


Yahoo! FareChase - Search multiple travel sites in one click.

Re: doubt

From
"Kevin Grittner"
Date:
Java takes a pretty conservative approach to security.  An applet
is only allowed to connect back to the server from which it was
loaded.  The database must be on the same computer as the web
app, or you must use tunnelling software.

Without more information I can't be sure that this is your issue,
but it seems likely.

-Kevin


>>> pavi thra <paveek@yahoo.com>  >>>

how can i run jdbc in applet. it compiled correctly. but in runnig it
gives security error.how can i overcome


Re: doubt

From
Achilleus Mantzios
Date:
O Kevin Grittner έγραψε στις Nov 5, 2005 :

> Java takes a pretty conservative approach to security.  An applet
> is only allowed to connect back to the server from which it was
> loaded.  The database must be on the same computer as the web
> app, or you must use tunnelling software.
>
> Without more information I can't be sure that this is your issue,
> but it seems likely.
>
> -Kevin
>
>
> >>> pavi thra <paveek@yahoo.com>  >>>
>
> how can i run jdbc in applet. it compiled correctly. but in runnig it
> gives security error.how can i overcome

If security is an issue, you can always sign your applet.

http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/jarsigner.html
and
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/keytool.html
are your friends.

Also check that postgresql.jar is in your CLASSPATH as in :

<applet name="PhotoJApplet"

archive="../SMA_APPLETS.jar,../commons-httpclient-2.0.2.jar,../commons-codec-1.3.jar,../commons-logging.jar,../
crewapp,../postgresql.jar"
                code="com.gatewaynet.web.applets.PhotoJApplet.class"
                MAYSCRIPT
                width="800"
                height="300">
.......
<PARAM NAME="cookiename" VALUE="JSESSIONID">
<PARAM NAME="cookievalue" VALUE="<%=session.getId()%>">
<PARAM NAME="cookiehost" VALUE="<%=request.getServerName()%>">
<PARAM NAME="cookiepath" VALUE="<%=request.getContextPath()%>">
.......
</applet>


>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

--
-Achilleus