Results 1 to 20 of 20
Thread: Applet & sql
- 08-25-2009, 04:32 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
Applet & sql
I almost killed by applet, why there are so many limitation of applet compare to the java application?
I stuck with the applet which able to retrieve the info from sql that i already done in the java application.Is there any security matter that need to take note while connect the java applet and sql...
:confused:
- 08-25-2009, 04:45 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Not the exact solution for you, but just work around there. So you can have an idea.
http://tecfa.unige.ch/guides/java/st...ineApplet.java
- 08-25-2009, 04:34 PM #3
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
is it a must to sign the applet to enable the permision so that the applet able to retrieve the sql information????
- 08-25-2009, 08:04 PM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Yes. Perhaps you should consider not using Applets for whatever it is that you are doing.
- 08-26-2009, 03:00 AM #5
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
Sorry for being so stupid.:( Then is there any alternate way that can redirect the sql output to applet?bcos other then retrieve data, i need to process some kind of calculation to get result,I already write the code in applet.
- 08-26-2009, 08:58 AM #6
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Perhaps you should create a web application instead using JAVA EE technologies.
- 08-26-2009, 10:54 AM #7
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
Wat do you mean by web application?any simple example for reference??thanks
- 08-26-2009, 11:54 AM #8
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Google is your friend here. A simple application involving Servlets and perhaps JSPs served by a Web container.
- 08-26-2009, 12:41 PM #9
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Basically we have two types of applications. Web applications and desktop/windows applications. And many more categorization as well. Actually based on different pros/cons we came across with these types. As the name implies to you, to deal with the web. You can use large number of technologies to work on with the web. JSP one of them related with Java.
- 08-27-2009, 01:35 PM #10
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
I really new to all these, :( all are the term that i cant relly understand,actually we doing a group project, my friend able to retrieve the information from SQL thru the jsp and display with tomcat.but i need to do some processing of the data retrievied,so now the problem is how to transfer the data from jsp to applet?help.....
- 08-27-2009, 01:45 PM #11
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Don't retrieve data from the database inside a JSP. Do it in a separate Java class. Use the JSP for presentation only.
Why do you need to send the data to an Applet? Why not just display the data on a JSP?
- 08-27-2009, 01:49 PM #12
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
Actually for my project right, instead of display a raw data extract from database, i need to do some calculation and display the final result,like example i retrieve population information from the database, user insert some parameter and the process the data and display the result.I dun really good in explaining hope you understand wat i mean..:)
- 08-27-2009, 02:04 PM #13
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Right then so you need the following:
1.) A class (or layer) that gets data from the database.
2.) A JSP where you display the data from the database and allow the user to enter additional information before submitting to a servlet.
3.) A servlet that receives all the information entered by the user.
4.) A class that has methods for doing the calculations. This class can call methods from the data retrieving class if it needs to.
5.) Another JSP for displaying the results of the calculations.
- 08-27-2009, 02:10 PM #14
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
why should use a servlet?and the calculation methods is it can jus write in java application and call the application to process the data?And a class to get the database,what is the class means??heehee sorry really got no idea integrate things of different platform.
- 08-27-2009, 02:39 PM #15
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Let's take a few steps back? Why did you have an applet in first place? Do you want your application to run on a web browser or as a normal Java application?
- 08-27-2009, 02:43 PM #16
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
I create a website which contain some application for the user to process some data that retreive from my database and return the result for user to do some analysis
sorry to trouble you, really appreciate that!!!
- 08-27-2009, 03:02 PM #17
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
So if you are creating a website using Java technologies then one approach is to go the route I suggested above. Just follow those steps.
The reason why you need a servlet is bacause the user has to enter the values on a form in a web page and submit it to the server where you can process the values.
The class that gets database values is a standalone class which knows nothing about JSPs or applets. All it knows is how to get data from a database and return it as an object or a list of objects.
The idea is to separate the parts of the application that perform different tasks so that they become easier to develop and test.
- 08-27-2009, 04:05 PM #18
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
so is tat means i can sent the data back to server and process it, eg a user sent " 1,2,3,4,and 5" to the server,thare is a class that will receive the data 1,2,3,4,5 and do addition and return 15 to the user?sorry i only know how to explain in a stupid way.
And if you dun mind how to sent the data to the class to process?
is it javascript?
- 08-27-2009, 04:24 PM #19
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Yes, just read through the steps I posted in reply #13 and follow them.
P.S You need to get hold of a good web programming tutorial. Sun's Java EE tutorial is nice.
- 08-27-2009, 04:28 PM #20
Member
- Join Date
- Aug 2009
- Posts
- 18
- Rep Power
- 0
Similar Threads
-
3D Applet
By DzzD in forum Java AppletsReplies: 1Last Post: 03-30-2009, 11:20 PM -
Calling another applet on click of button in one applet
By niteshwar.bhardwaj in forum Java 2DReplies: 1Last Post: 02-19-2009, 12:54 PM -
Need with an applet
By maggie_2 in forum Java AppletsReplies: 6Last Post: 09-21-2008, 08:07 PM -
First Applet HELP????
By nvidia in forum New To JavaReplies: 0Last Post: 08-13-2007, 10:11 PM -
Applet, To center text and To open I engage in a dialog in an Applet
By Marcus in forum Java AppletsReplies: 4Last Post: 06-08-2007, 06:15 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks