Solved

Retrieving data from remote server in an applet.

Posted on 2004-09-22
5
201 Views
Last Modified: 2010-03-31
I am new to java programming, and I want to make sure I am going in the right direction before spending time on this project.


I have to upload an applet onto a server that I have no control over.
  * No way to change this

That applet needs to connect to a remote server (which I do have control over) and retrieve data from a MSSQL Server database on it.

I was thinking about putting a servlet on the db server that connects to the database and then connecting to that servlet from the applet.

Am I going in the right direction, or is there a better way to do this?

Thanks,
Dan
0
Comment
Question by:_DanElliott
  • 3
  • 2
5 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 12122324
> I have to upload an applet onto a server that I have no control over.
>   * No way to change this

What exactly do you mean here? You mean putting the applet class file onto a server that you do not have control over? Can you be more specific?

0
 
LVL 2

Author Comment

by:_DanElliott
ID: 12122469
Yes, I have to put the class file on someone else's server.  The applet will be served up to a web browser from that server.  I cannot change anything on that server (settings, security, drivers, etc.).
0
 
LVL 35

Expert Comment

by:girionis
ID: 12122597
Does this server have FTP? Do you want to do it programmatically?
0
 
LVL 2

Author Comment

by:_DanElliott
ID: 12122691
I can put the file there with no problems (there is a web interface designed specifically for that purpose).  Maybe i should have left that part out of the original question.  My concern is how to get the data from the database server.
0
 
LVL 35

Accepted Solution

by:
girionis earned 200 total points
ID: 12122903
Open a database conenction from the applet to the server. You will need to sign the applet or chaneg the java.policy file if the db server and the web server are in different computers. For more info on database stuff have a look here: http://java.sun.com/docs/books/tutorial/jdbc/
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Eclipse Java import and method not resolved 4 81
junit example issue 2 27
Netbeans and org.apache.commons.lang3 issue 3 27
Html split(text) 2 31
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question