| Applet using jdbc (ms sqlserver) |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- PAAppViewer3 (AppViewer3)?Hello,
Might anyone please kindly answer my question? Thank you very
much.
I can't read the result of performing bootstrapping in Amos 6.0.
In the Amos text output, on the left hand side, there are two
sections. The lower section is the result of performing bootstrap,
including estimates/bootstrap, estimates of bootstrap standard error,
estimates of bias-corrected percentile method.
However, I can't read any of them. Nothing shows up.
Also, I find this message,
Error number: 70
Source: PAAppViewer3 (AppViewer3)
Description: Permission denied
Call stack: frmMain hdoc_ onmouseover
How can I be able to read the result of performing bootstrapping in
Amos 6.0.?
Thank you very much and look forward to your kind reply.
Please take care
Best wishes to your life
Caroline
- 1
- Proposal. Sort should return a boolean.Here is an idea. I would like it if Collections. sort and Arrays.sort
would return a boolean. true means something actually changed. false
means the array was already in order.
Further there would be an additional boolean parameter to the sort to
say "items probably already in order". The sort would then do a quick
check to make sure the items were in order, and if so, bypass the full
sort.
This would be useful when you have to avoid needlessly calling
fireTableDataChanged after a sort.
It would also allow you to use sorts in an assert to ASSURE the data
are already sorted, and explode if they are not already sorted.
Since the sort is void now, all existing code would still work. You
would just have an additional method call with the optional boolean
parameter, or perhaps only in would get the boolean return.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
- 1
- how to do synchronization profiling and RepaintManager and performance issuesSome day ago I've posted about a problem with
javax.swing.SystemEventQueueUtilities.queueComponentWorkRequest
and some performance problem.
(http://groups.google.com/group/comp.lang.java.programmer/browse_frm/thread/afcd152d02c4d4cb/#)
My doubt is that the system spend too much time in symchronization
problems.
Someone suggested that it can be all the repaint stuff, but I've tried
to reduce it...(the paint component method in the reduced version is
something like
{ super.paintComponent..
draw an oval}
while in the complex versions is {
{ super.paintComponent..
draw 400 lines
draw 400 oval
}
and the first one takes the 20% of resources while the last the 40%
Moreover the time spent in the paint method is less and the repaint
manager should be decoubled from the component...
so how can I do a better profiling of the system?
I was thinking to override the repaint method and using directly the
invoke later paint..
but I'd like that the new method would be able to merge more call to
repaint in only one paint.. if the last paint hasnt stopped...
I hope that this info will sufficent, otherway askme
Thanks to all
Dimitri
- 1
- [ANN] SwingEmpire FormBuilder - New Preview 0.9.4
SwingEmpire FormBuilder helps in quickly building GUIs with JGoodies
Forms.
The new/updated features include:
* pluggable custom layout styles for grid elements and borders
* enhanced support of custom component factories
The preview is available at
http://www.swingempire.de/palace/FormBuilder
For your convenience a summary of "old" features
* rapid visual design of form-oriented GUIs
* targeted on JGoodies Forms
* re-usable layout data
* immediate preview in choosable LookAndFeels
* persisting layout data separated from application code
* persisting via standard XMLEncoder
* pluggable custom components
* pluggable persistence format
Test and (hopefully :-) enjoy - I'm eagerly awaiting your feedback.
Regards
Jeanette Winzenburg, Berlin
- 1
- change defaultsHi,
How do you change the default font for all components ( frame, label, etc )
in swing ?
regards
Johan
- 2
- -Xmx---m getting smaller and smallerHi,
I have Windows XP SP3 with 4GB memory (I know Windows only allows apps to use
about 3.25GB.) I have no applications running. I ran System Mechanic 7 to
defrag the memory with the result of the largest contiguous block of memory
being 2.74GB.
However, everytime I started Eclipse 3.3.2, the JRE 1.6.0_04 JVM terminated
with a -1 code. I started at -Xmx1024m and continually decremented until I
reached -Xmx600m when Eclipse started okay. This morning I was running
Eclipse with -Xmx900m okay.
The only changes I made were to (1) set the system variable JAVA_HOME to
reference JDK 1.6.0_04 and replaced java.exe, javaw.exe, javaws.exe in c:
\WINDOW\System32\ with the JRE 1.6.0_04 files. They were 1.4.2_07.
Does anyone have any idea why the JVM terminates because of not enough memory
when there is more than enough contiguous memory? This is really
frustrating.
Thank you,
Don
- 4
- Swing Worker Pause/ResumeHello all,
I am dealing with a class that extends SwingWorker and Inside that
class there is another class defined. I'll refer to the inside define
class as the "helper class" for sake of clarity.
What i am try to do is to pause/resume the class that extends
SwingWorker, when i used flags to do that it outputed errors from the
"helper class". These errors came from a method that fires Custom
Events and they were NullPointerExceptions. After the errors were
printed the classes continued executing.
How can i pause/resume successfully ?
Thanx in advance for any help :D
Ahmed Ashmawy
- 6
- debrisW a t c h o u t!
ALLIACNE ENTERPRSIE (A ETR)
Currnet Prcie: 0.80
Add this g e m to your w atch list, and w atch it tard closely!
Nwes Releaes!
Taeocrp announces breackrough in removing deadly l andmines.
Mill Valley, California August 25, 2006 - The Alliance Etnerprise Corpoartion announced today a breakthrough in developing an Areial Lnadmine Sysetm aimed at locating, detecting and mapping deadly landm ines.
TeaCorp's mission is to reclaim lands around the globe embedded with l andmines that victimize countries and their stakeholders.
More than 100 m i l l i o n landm ines in 83 countries are holding international communities and industries hostage, preventing the inv estment in and development of product ive lands and the re-building of infrastructure. A broad variety of landmine s have been scattered over pro ductive areas effectively crippling the eco nomy and disabling thousands of children and adults. There are no reliable records that accurately show where these d e v a s t a t i n g landmine s lie in wait for their v ictims.
With the present day c osts to clear a single land mine ranging between $1,000 to $1,500, solving the problem of de-mining lands will reach billions of dol lars. TaeCorp has developed a technology based, cos t effective solution to this problem using its three tiered approach to scanning, mapping and removing la ndmines. TaeCorp's System will provide many social and eco nomic benef its to countries and their industries including oil and gas, mining, agriculture, roads and infrastructure development.
About TaeCorp.
TaeCorp's vision is to be the recognized leader in providing Aeiral Deteciton Systmes including global de-mining, clearing a path to a safer planet for all humankind.
Here comes the big one!
All signs show that AET R is going to Explode!
Concl usion:
The examples above show the awesome, earning potential of little known companies that explode onto invesotr's radar screens; Many of you are already familiar with this. Is A ETR poised and positioned to do that for you? Then you may feel the time has come to act... And please watch this one trdae tomorrow! Go AE TR.
Pen ny sotcks are considered highly speculative and may be unsuitable for all but very aggressive investros. This prof ile is not in any way affil iated with the featured company. This report is for entertainment and advertising purposes only and should not be used as invesmtent advice. If you wish to stop future m a i lings, or if you feel you have been wrongfully placed in our membership, send a blank e m a i l with No Thanks in the subject to
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 10
- Little ProblemI have three numbers - 1, 2 & 3.
A randomly selected one of the three are stored in 'var1', and another
randomly selected one is in 'var2'.
How do I find out the number that is left over?
I tried a while loop but I couldn't get it to work...
TIA
- 10
- 11
- Update of JProgressBarHi,
in my program i use a JProgressBar. I know, that i have to use another
Thread for updating the progressbar.
But with the following code it isn't working. What's wrong?
public class Parser1CheckVisitor{
int iCount = 0;
JFrameJRespCheck m_JFrameJRespCheck;
ResponseFile m_ResponseFile;
public Object visit(ASTrecord node, Object data) {
if (data != null) {
m_JFrameJRespCheck.jProgressBarPanelStatus.setMinimum(0);
m_JFrameJRespCheck.jProgressBarPanelStatus.setMaximum(m_ResponseFile.
m_iCount);
makeProgressThread().start();
for (iCount = 0; iCount < m_ResponseFile.m_iCount; iCount++) {
m_ChipFile.readRecord(iCount + 1);
data = node.childrenAccept(this, data);
}
}
return "OK";
}
Thread makeProgressThread() {
return new Thread() {
public void run() {
while (iCount != m_ResponseFile.m_iCount) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {}
m_JFrameJRespCheck.jProgressBarPanelStatus.setValue iCount);
//System.out.println(iCount);
}
}
};
}
}
- 11
- sentmail problemhi
i am doing a project using JavaMail API with JSP and James server
i have implemented sendmail,compose. but i wanna know how can i
implement sentmail as it is seen in the real application.
I wanna know what can i should do to retrieve the mails sent from an
account using James
- 11
- Check class file for annotationDoes anyone know of a simple way to determine whether a marker
annotation is present in a given class file?
TIA
--
========================================================================
Ian Pilcher email***@***.com
========================================================================
- 16
- Something a bit goofy about Generics
Iterable<? extends JavaFileObject>
You'd think a JavaFileObject[] or a JavaFileObject... would fullfil
that requirement, but it doesn't. It fills it sufficiently to do a
for:each but not to satisfy this parameter.
That is like a piece of purple lint on a white sweater.
People say arrays and generics don't mix, but they damn well SHOULD.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
- 16
- JNI Trouble calling FindClass from Worker threadHello
I am able to get the class object when i call FindClass in the main
thread. Now when i spawn a worker thread and attempt the same call
after caching the JVM and creating a new Env . it fails and triggers an
exception on the Java side .
My code for a DLL looks like this
JMVM *jvm = NULL ;
..
DLLMain()
{
}
JNIEXPORT jint JNICALL Initialize
(JNIEnv *pEnv, jclass)
{
pEnv->GetJavaVM(&jvm);
ASSERT(jvm!=NULL);
jclass cls = pEnv->FindClass("demoflashplugin/views/Objfactory");
if(cls!=NULL)
AfxMessageBox("cls found");
AfxBeginThread(WindowThread , NULL);
}
UINT WindowThread(LPVOID p)
{
JNIEnv *env = NULL ;
jclass cclass ;
if(jvm!=NULL)
{
if (0==jvm->AttachCurrentThread((void**)&env,NULL))
{
if ((env)->ExceptionOccurred()) {
AfxMessageBox("Exception occured");
(env)->ExceptionDescribe() ;
}
if(env!=NULL)
{
AxMessageBox(getenv("CLASSPATH"));
cclass = env->FindClass(demoflashplugin/views/Objfactory");
if(cclass!=NULL)
{
AfxMessageBox("Class is not Null");
}
else
AfxMessageBox("Class is s Null");
}
else
{
AfxMessageBox("env is NULL ");
}
AfxMessageBox("Finished checking for string");
}
else
{
AfxMessageBox("JVM IS Null");
}
}
}
|
| Author |
Message |
Mika Myllyvirta

|
Posted: 2005-8-16 19:21:00 |
Top |
java-programmer, Applet using jdbc (ms sqlserver)
Hi,
After reading lots of docs, a got the impression that it is possible to
write an Java Applet, that uses jdbc to connect to MS SQLServer (Without
flushing all security permissions down to drain).
Here is what I've done:
1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
2. Downloaded the app from Microsoft's site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
3. Tried to compile.
I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Error establishing socket.
I have tested every possible error that I can find in MS's site. I have
tried to alter policies granting "permission java.net.SocketPermission",
with no luck. I think that before granting this permission, I also got
some security exceptions..
So here's my question: is it possible to create an applet (UnTrusted)
that uses SQL server, that can be run in browser, that doesn't need any
security alternations?
Best Regards,
Mika
|
| |
|
| |
 |
Joe Weinstein

|
Posted: 2005-8-16 23:55:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Mika Myllyvirta wrote:
> Hi,
>
> After reading lots of docs, a got the impression that it is possible to
> write an Java Applet, that uses jdbc to connect to MS SQLServer (Without
> flushing all security permissions down to drain).
>
> Here is what I've done:
>
> 1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
> 2. Downloaded the app from Microsoft's site:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
> 3. Tried to compile.
>
> I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]Error establishing socket.
>
> I have tested every possible error that I can find in MS's site. I have
> tried to alter policies granting "permission java.net.SocketPermission",
> with no luck. I think that before granting this permission, I also got
> some security exceptions..
>
> So here's my question: is it possible to create an applet (UnTrusted)
> that uses SQL server, that can be run in browser, that doesn't need any
> security alternations?
>
> Best Regards,
> Mika
Hi. The DBMS has to be running on the machine from which the applet was
downloaded. Is it?
Joe Weinstein at BEA Systems
|
| |
|
| |
 |
Mika Myllyvirta

|
Posted: 2005-8-17 13:23:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Joe,
The applet is not running on a same server with SQLServer, so this might
be the case (I'll test it a bit later). But, if I wanted the applet to
run from the web-server and connecting to another database-server, what
should I do? I don't want to alter security policies (because, clients
might not be able to do this, and for security reasons).
Could WebStart Application or Trusted applet connect to different db-server?
I doubt that db-applet's on the web are installed on a server which has
both web & sql backend installed on it.. Or I might be mistaken.
Thank you for your reply.
Best Regards,
Mika Myllyvirta
Joe Weinstein wrote:
>
>
> Mika Myllyvirta wrote:
>
>> Hi,
>>
>> After reading lots of docs, a got the impression that it is possible
>> to write an Java Applet, that uses jdbc to connect to MS SQLServer
>> (Without flushing all security permissions down to drain).
>>
>> Here is what I've done:
>>
>> 1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
>> 2. Downloaded the app from Microsoft's site:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
>> 3. Tried to compile.
>>
>> I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
>> JDBC]Error establishing socket.
>>
>> I have tested every possible error that I can find in MS's site. I
>> have tried to alter policies granting "permission
>> java.net.SocketPermission", with no luck. I think that before granting
>> this permission, I also got some security exceptions..
>>
>> So here's my question: is it possible to create an applet (UnTrusted)
>> that uses SQL server, that can be run in browser, that doesn't need
>> any security alternations?
>>
>> Best Regards,
>> Mika
>
>
> Hi. The DBMS has to be running on the machine from which the applet was
> downloaded. Is it?
> Joe Weinstein at BEA Systems
>
|
| |
|
| |
 |
Thomas Hawtin

|
Posted: 2005-8-17 14:06:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Mika Myllyvirta wrote:
>
> The applet is not running on a same server with SQLServer, so this might
> be the case (I'll test it a bit later). But, if I wanted the applet to
> run from the web-server and connecting to another database-server, what
> should I do? I don't want to alter security policies (because, clients
> might not be able to do this, and for security reasons).
You can use a simple proxy to forward connection to the relevant port.
If you're using Linux/BSD then iptables/ipchains/ipfw will do it nicely.
Or a router could do it.
Of course then you have the problem that your database is exposed, but
that's unavoidable with such a 2-tier system.
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
|
| |
|
| |
 |
Mika Myllyvirta

|
Posted: 2005-8-22 13:56:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Thomas,
I think that I might use this kind of solution for our dbapplet.
Thanks for the reply,
Mika
Thomas Hawtin wrote:
> Mika Myllyvirta wrote:
>
>>
>> The applet is not running on a same server with SQLServer, so this
>> might be the case (I'll test it a bit later). But, if I wanted the
>> applet to run from the web-server and connecting to another
>> database-server, what should I do? I don't want to alter security
>> policies (because, clients might not be able to do this, and for
>> security reasons).
>
>
> You can use a simple proxy to forward connection to the relevant port.
> If you're using Linux/BSD then iptables/ipchains/ipfw will do it nicely.
> Or a router could do it.
>
> Of course then you have the problem that your database is exposed, but
> that's unavoidable with such a 2-tier system.
>
> Tom Hawtin
|
| |
|
| |
 |
Frank Brouwer

|
Posted: 2005-8-23 22:07:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Mika,
As far as I know it is impossible to use jdbc from an applet. This is
because of the security implementation in applets where it is not possible
to use system resources. If you want to use applets to communicate with a
database you wil have to put a server between the two (that's better any
way), where the applets communicates to the server and the server to the
database and the same route back.
Hope it helps....
Regards,
Frank Brouwer
"Mika Myllyvirta" <email***@***.com> wrote in
message news:p_jMe.132$email***@***.com...
> Hi,
>
> After reading lots of docs, a got the impression that it is possible to
> write an Java Applet, that uses jdbc to connect to MS SQLServer (Without
> flushing all security permissions down to drain).
>
> Here is what I've done:
>
> 1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
> 2. Downloaded the app from Microsoft's site:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
> 3. Tried to compile.
>
> I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC]Error establishing socket.
>
> I have tested every possible error that I can find in MS's site. I have
> tried to alter policies granting "permission java.net.SocketPermission",
> with no luck. I think that before granting this permission, I also got
> some security exceptions..
>
> So here's my question: is it possible to create an applet (UnTrusted) that
> uses SQL server, that can be run in browser, that doesn't need any
> security alternations?
>
> Best Regards,
> Mika
|
| |
|
| |
 |
Mika Myllyvirta

|
Posted: 2005-8-24 13:11:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Frank,
I managed to create an applet that uses
net.sourceforge.jtds.jdbc.Driver. It works fine communicating with MS
Sql Server. Now I am trying to create reports for the applet. I found
Crystal Clear report engine (pure java), that hopefully solves our
reporting issues.
Not sure if Crystal Reports would be better, but I'll test the CC first.
Best Regards,
Mika Myllyvirta
Frank Brouwer wrote:
> Hi Mika,
>
> As far as I know it is impossible to use jdbc from an applet. This is
> because of the security implementation in applets where it is not possible
> to use system resources. If you want to use applets to communicate with a
> database you wil have to put a server between the two (that's better any
> way), where the applets communicates to the server and the server to the
> database and the same route back.
>
> Hope it helps....
>
> Regards,
> Frank Brouwer
>
> "Mika Myllyvirta" <email***@***.com> wrote in
> message news:p_jMe.132$email***@***.com...
>
>>Hi,
>>
>>After reading lots of docs, a got the impression that it is possible to
>>write an Java Applet, that uses jdbc to connect to MS SQLServer (Without
>>flushing all security permissions down to drain).
>>
>>Here is what I've done:
>>
>>1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
>>2. Downloaded the app from Microsoft's site:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
>>3. Tried to compile.
>>
>>I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
>>JDBC]Error establishing socket.
>>
>>I have tested every possible error that I can find in MS's site. I have
>>tried to alter policies granting "permission java.net.SocketPermission",
>>with no luck. I think that before granting this permission, I also got
>>some security exceptions..
>>
>>So here's my question: is it possible to create an applet (UnTrusted) that
>>uses SQL server, that can be run in browser, that doesn't need any
>>security alternations?
>>
>>Best Regards,
>>Mika
>
>
>
|
| |
|
| |
 |
Luke Webber

|
Posted: 2005-8-24 13:51:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Mika Myllyvirta wrote:
> Hi Frank,
>
> I managed to create an applet that uses
> net.sourceforge.jtds.jdbc.Driver. It works fine communicating with MS
> Sql Server. Now I am trying to create reports for the applet. I found
> Crystal Clear report engine (pure java), that hopefully solves our
> reporting issues.
>
> Not sure if Crystal Reports would be better, but I'll test the CC first.
Ugh. Crystal Reports is very well named. It's incredibly fragile. Oh,
and it needs to be installed on the client (Windows only!) system.
Forgedabahtit.
You might consider Jasper Reports, though.
Luke
|
| |
|
| |
 |
Mika Myllyvirta

|
Posted: 2005-8-24 17:20:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Luke,
Thank you for suggesting Jasper Reports.
I have been testing Jasper Reports. Have anybody added JR to an applet?
Some help would be needed here..
I've created a report file with iReport-tool. Added these jar's for
JasperReports:
commons-beanutils.jar
commons-beanutils-bean-collections.jar
commons-beanutils-core.jar
commons-collections-3.1.jar
commons-digester-1.7.jar
commons-logging.jar
commons-logging-api.jar
commons-jasperreports-1.0.0.jar
commons-jasperreports-1.0.0-applet.jar
Trying to view the report:
try{
JasperViewer jv = new JasperViewer("test.jrxml",true);
} catch (Exception e){ e.printStackTrace(); } }
I get the following:
24.8.2005 12:17:20 org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.ClassCastException
at
net.sf.jasperreports.engine.xml.JRPrintElementFactory.createObject(JRPrintElementFactory.java:62)
What might be the problem? Have anybody created a tutorial/example
applet about reporting from an applet? somebody?
Best Regards,
Mika Myllyvirta
Luke Webber wrote:
> Mika Myllyvirta wrote:
>
>> Hi Frank,
>>
>> I managed to create an applet that uses
>> net.sourceforge.jtds.jdbc.Driver. It works fine communicating with MS
>> Sql Server. Now I am trying to create reports for the applet. I found
>> Crystal Clear report engine (pure java), that hopefully solves our
>> reporting issues.
>>
>> Not sure if Crystal Reports would be better, but I'll test the CC first.
>
>
> Ugh. Crystal Reports is very well named. It's incredibly fragile. Oh,
> and it needs to be installed on the client (Windows only!) system.
> Forgedabahtit.
>
> You might consider Jasper Reports, though.
>
> Luke
|
| |
|
| |
 |
Frank Brouwer

|
Posted: 2005-8-24 20:12:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Mika,
Ah, I asume your not running the applet in a browser then.
For a reporter in Java you might also consider Esspress Reports from
Quadbase, it's pure java and you can integrate it fully into your
application. We use it for 3 years now with our product Trimergo.
Look at: http://www.quadbase.com/
--
Regards,
Frank Brouwer
_________________________________________________
Trimergo BV
Project Manufacturing Software
Amersfoortseweg 15 C
7313 AB Apeldoorn, Netherlands
Telefoon: +31 55 - 577 7373
Telefax: + 31 55 - 577 7370
www.trimergo.com
"Mika Myllyvirta" <email***@***.com> wrote in
message news:TjTOe.21$email***@***.com...
> Hi Frank,
>
> I managed to create an applet that uses net.sourceforge.jtds.jdbc.Driver.
> It works fine communicating with MS Sql Server. Now I am trying to create
> reports for the applet. I found Crystal Clear report engine (pure java),
> that hopefully solves our reporting issues.
>
> Not sure if Crystal Reports would be better, but I'll test the CC first.
>
> Best Regards,
> Mika Myllyvirta
>
> Frank Brouwer wrote:
>> Hi Mika,
>>
>> As far as I know it is impossible to use jdbc from an applet. This is
>> because of the security implementation in applets where it is not
>> possible to use system resources. If you want to use applets to
>> communicate with a database you wil have to put a server between the two
>> (that's better any way), where the applets communicates to the server and
>> the server to the database and the same route back.
>>
>> Hope it helps....
>>
>> Regards,
>> Frank Brouwer
>>
>> "Mika Myllyvirta" <email***@***.com> wrote in
>> message news:p_jMe.132$email***@***.com...
>>
>>>Hi,
>>>
>>>After reading lots of docs, a got the impression that it is possible to
>>>write an Java Applet, that uses jdbc to connect to MS SQLServer (Without
>>>flushing all security permissions down to drain).
>>>
>>>Here is what I've done:
>>>
>>>1. Downloaded the Microsoft JDBC driver for SQL Server 2000 SP 3.
>>>2. Downloaded the app from Microsoft's site:
>>> http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
>>>3. Tried to compile.
>>>
>>>I get the java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
>>>JDBC]Error establishing socket.
>>>
>>>I have tested every possible error that I can find in MS's site. I have
>>>tried to alter policies granting "permission java.net.SocketPermission",
>>>with no luck. I think that before granting this permission, I also got
>>>some security exceptions..
>>>
>>>So here's my question: is it possible to create an applet (UnTrusted)
>>>that uses SQL server, that can be run in browser, that doesn't need any
>>>security alternations?
>>>
>>>Best Regards,
>>>Mika
>>
>>
|
| |
|
| |
 |
Thomas Hawtin

|
Posted: 2005-8-24 20:56:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Frank Brouwer wrote:
>
> Ah, I asume your not running the applet in a browser then.
Many (most) JDBC drivers are 'pure java' and requires no extra
permissions than connecting a TCP socket to the database server. So
putting the web and database servers on the same machine (or at least
same IP address) will allow an applet to use JDBC directly. In fact, I
believe the source for java.sql.DriverManager talks about applets directly.
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
|
| |
|
| |
 |
Mika Myllyvirta

|
Posted: 2005-8-25 12:57:00 |
Top |
java-programmer >> Applet using jdbc (ms sqlserver)
Hi Frank,
I'll test the Quadbase Reports also. I never realized that there are so
many different pure Java reporting engines in the market.. Probably I
should have googled before asking.. :) Anyway Thank You for telling me
about another solution for our reporting needs!
As Thomas stated in his above message, it is possible to use
sql-database in an applet (even untrusted!), least in my experience. I
have been developing for Java some years ago, but now just reacently I
came back to the Java community and you'll never know how much I have
forgot about Java.. And how much Java and Java related tools have
evolved in a few years!
Thanks to everybody for your help.
Best Regards,
Mika Myllyvirta
Frank Brouwer wrote:
> Hi Mika,
>
> Ah, I asume your not running the applet in a browser then.
>
> For a reporter in Java you might also consider Esspress Reports from
> Quadbase, it's pure java and you can integrate it fully into your
> application. We use it for 3 years now with our product Trimergo.
>
> Look at: http://www.quadbase.com/
>
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Reflection and access to type parameter?Given the SSCCE below, the need to pass A.class and B.class in
lines 25 and 25 seems redundant. However, I can find nothing in
the language that would let that be done in the constructor,
between lines 18 and 19. The obvious would be
Class<T> x = T.class;
but that of course does not work. Is there any bridge at all
between reflection and generics? I suspect the answer is no
and the code below is the best that can be done, but I'm
not sure.
1 import java.lang.reflect.Method;
2 public class TestEnums
3 {
4 public static enum A
5 {
6 V1,
7 V2;
8 }
9 public static enum B
10 {
11 X1,
12 X2,
13 X3;
14 }
15 public static class C<T extends Enum<?>>
16 {
17 public C(Class<T> x) throws Exception
18 {
19 T[] eVal = x.getEnumConstants();
20 for (Enum<?> v : eVal) System.out.println(v.toString());
21 }
22 }
23 public static void main(String[] args) throws Exception
24 {
25 C<A> ca = new C<A>(A.class);
26 C<B> cb = new C<B>(B.class);
27 }
28 }
- 2
- Printing EPS (embedded postscript) from Java.
Hello all,
I need to print .eps (also called .epsf, .epi, .epsi) from inside a
java program. My target platforms are windows and mac-- although
windows is first.
The new 1.4 printing API has aupport for printing normal postscript
but does not have .eps support.
I've been looking around the internet to see what solutions people
have come up with and unfortonately I didn't get what I would call a
solid answer by doing this....
I looked at the source of two open source programs the support .eps.
They both have origianal source but esstenially did it almost exactly
the same way. They took the .ps file the the standard Java classes
generated and just stuck an .eps header on it. They then stick the .ps
inside a box as required. They then searched the .ps file for commands
that are illegal in the .eps and if they are there they just die.
I've got some serious problems with this:
(1) It assumes that the Sun classes are going to generate a .ps that
is easily converted to an eps. Maybe they do now but what about future
versions of Java?
(2) It makes big assumptions about future .ps and .eps formats.
(3) It stinks of just being a hack. Does anyone really know this is
going to work all the time and on all platforms?
Does anyone have any experience with making .eps from Java that has
any sugestions? I want to translate my Garphics2D objects to .eps. I
want the .eps to be accepted by major publishing programs on windows and
mac.
Thanks
Glen Pepicelli,
http://www.glenp.net
(reply to group)
- 3
- Clients are bad ?Hello John Bailo , You say :
" Open source is just about old style client software
catching of to the Web economy "
You obviously don't believe that yourself ,
otherwise you'd be using Google ... Not Moz .
- 4
- Problem in connecting to a proxyHi,
i need to see if a user enters the correct username/password to
authenticate to a proxy. My problem is... through the following code,
i am
able to connect to a proxy with even invalid username/passwords.
Suppose
if the valid username and password to a proxy is test/test , i am able
to connect to the proxy using x/x . the response code returned is
always 200. Please advice..
################################
public static boolean isValidProxyAccount(String proxyServer,String
proxyPort,String proxyLogin,String proxyPassword) throws IOException
{
String go_url = new String ("http://www.google.com/");
boolean VALID_STATUS = true;
try{
URL url = new URL(go_url);
System.getProperties().put("proxySet",
"true");
System.getProperties().put("http.proxyHost", proxyServer);
System.getProperties().put("http.proxyPort", proxyPort);
HttpURLConnection con = (HttpURLConnection)
url.openConnection();
Base64Encoder b1 = new
Base64Encoder(proxyLogin+":"+proxyPassword);
con.setAllowUserInteraction(true);
String enStrProxy = "Basic "+ b1.processString();
con.setRequestProperty("Proxy-Authorization", enStrProxy);
int code = con.getResponseCode();
String retMsg = con.getResponseMessage();
System.out.println("code::"+code);
System.out.println("retMsg::"+retMsg);
System.getProperties().put("proxySet", "false");
System.getProperties().remove("http.proxyHost");
System.getProperties().remove("http.proxyPort");
con.disconnect();
if (code != 200){
VALID_STATUS = false;
throw new IOException("Failed to connect to CCO: "+retMsg);
}
}catch (Exception ex){
System.out.println(ex.getMessage());
throw new IOException(ex.getMessage());
}//catch
return VALID_STATUS;
}
- 5
- JavaHelp and root nodehi,
Simplifying i have a java help set as this
ROOT -> C
-> B -> b1
-> b2
-> b3
->C
I can set B as current visualized node with these instructions:
helpBroker =(DefaultHelpBroker)coreHelpSet.createHelpBroker();
helpBroker.setCurrentID(B);
my problem is that i'd like to hide the other nodes setting B as tree
root node so that i could only see B and its children b1,b2,b3.
This is because entire help set is recovered from a big manual
describing a lot of applications and i'd like to show only one referred
by node B avoiding to show others that couldn't be installed.
Can you help me?
thanks
- 6
- JTable(A few more queries )I had a couple of more queries -
1) how to prevent swapping of the columns as in, by default the columns
in the JTable are not fixed in terms of their placement. They can be
very well swapped with one another. I want to prevent this.
2) Also after feeding the JTable with the data in database, i want to
be keep one row always empty so that a row can be inserted. It's like
we have in MS-Access.
hope i was clear in explaining the query properly.
Thanx,
Ankur
- 7
- looking for a Java decompilerHello!
Is there a good byte-code de-compiler in the ports? It does not
need to be fancy/GUI -- just a straghtforward .class->.java utility.
Thanks for any pointers. Thanks!
-mi
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 8
- Riddle me thisOn Mon, 07 Nov 2005 11:35:27 GMT, "Sharp Tool"
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :
>All these distribution dont include negative numbers?
A normal is clustered about a mean, nominally 0, with symmetric tails
left and right.
Poisson is a distribution of positive numbers.
Just what do these numbers measure?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 9
- how to mail a form in JSPhi this is ravin. i m a last year IT student and i am doing my project
at a govt. organization. i have to do one thing in my project that:
> there is a feedback form which is to be filled by any user.
> it is having four fields.
1) name
2) tel.no
3) e-mail address
4) comments
> i simply have to mail this fields to the org.'s mail address when user hits submit button. there is nothing to do with this fields.
please send releated help as early as possible.
- 10
- Programatically deducing VARCHAR2 length?Hi,
I'm using WebLogic 5.1 sp12 and Oracle 8.1.7 with JDBC 1.2 drivers.
I was wondering, if I know that a column is a vARCHAR2 column, how
could i deduce the maximum length of that column, short of repeatedly
inserting larger and larger strings until I genertae an exception. I
know with SQL*Plus I can describe the table and find out lengths that
way, but I was hoping for a more general automated method.
Thanks for any help anyone can provide - Dave
- 11
- 12
- Java Training QuestionI am an unemployed web developer with php, perl, and asp programming
experience and in order to be able to widen my job search I am considering
getting some formal training in Java. I am looking for training
recommendations in order to be able to do Java web development. Also will
this training be appealing to prospective employers or just a waste of my
time and money. Any feedback I get will be greatly appreciated.
- 13
- Asking help for a java io problemHello, guys! I have a problem running the following code with eclipse
showing that:
java.io.IOException: Stream closed
at sun.nio.cs.StreamDecoder.ensureOpen(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at HtmlFileParser.parseHtmlDoc(HtmlFileParser.java:32)
at HtmlFileParser.main(HtmlFileParser.java:52)
//code here:
try{
FileInputStream fin = new FileInputStream("test.html");
InputStreamReader fr = new InputStreamReader(fin);
for(i=0; i<2048; i++) buf[i] = '0';
fr.read(buf, 0, 2048); //problem here (line 32)
FileWriter fw = new FileWriter("bufWriteTest.txt");
fw.write(buf);
fw.flush();
}
catch(FileNotFoundException e) {
e.printStackTrace();
}
catch(IOException e) {
e.printStackTrace();
}
There are no syntax erro in the above code, it just dosen't work,
please help me finding out what the problem is, thank you.
- 14
- EMPTY_SET.iterator() and generics
In the old days, before generics, I wrote
private SortedSet onhand;
Iterator getInventoryIterator() {
return (onhand == null ? Collections.EMPTY_SET ? onhand)
.iterator();
}
... the idea being to create the SortedSet only if there are
actually some Inventory objects to store in it, and to return
a suitable Iterator whether or not the SortedSet exists.
Now, in an effort to leave prehistory behind me and adopt
generics with all their benefits, I change the SortedSet to a
SortedSet<Inventory> and change the return type of the method
to Iterator<Inventory> -- but how do I rewrite the guts of the
method to get the compiler to understand that all is well? The
problem seems to be that Collections.EMPTY_SET.iterator() returns
an Iterator<Object>, and the compiler complains when I try to
return this in place of the desired Iterator<Inventory>. I've
tried a few variations, but have only succeeded in moving the
warning message around, not in eliminating it:
return (onhand == null
? (Set<Inventory>)Collections.EMPTY_SET : onhand)
.iterator();
return (Iterator<Inventory>)
(onhand == null ? Collections.EMPTY_SET ? onhand)
.iterator();
This seems like a lot of trouble to take over the empty set,
but there ought to be *some* clean way to do it. Ideas?
--
Eric Sosman
email***@***.com
- 15
|
|
|