Solved

Retrieving data from remote server in an applet.

Posted on 2004-09-22
5
197 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count8 challlenge 13 86
Unable to open debugger port in Intellij idea 6 85
maven java path setting 5 50
Python Assistance 7 36
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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

762 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now