It's possible that you might not fully understand my suggestion.
 
If you take in information from an applet and use JDBC and SQL to store the data in a database, the JSP can read the information from the database. The applet and JSP do not communicate directly.
 
In the case of a username and password applet :
 
The user enters the username and password into the applet and clicks OK. The applet creates a connection to the database and uses an SQL statement to update (or check) the username and password fields of the database. The JSP page is then invoked and reads the information from the database.
 
I can give you some working examples, but I am at work right now and it's a bit difficult. If you need them I can send them later.
 
Barry Scott
IJava UK
----- Original Message -----
Sent: Friday, November 19, 1999 10:19 AM
Subject: Applet to JSP comms

Hi ...
 
    Thanks alot for your response.
    Just take a simple example of validating the username and passwd.
    Right i will right a bean program which will validate the username from the
    database .
    I will include this in my JSP file ok.
    I want to accept the data from an applet and send this to JSP ok.
 
    I tried this method.
    I opened URL with JSP file path as an argument.
    I opend URLConnection and wrote iside this using java.util.Properties class.
 
    Well i crosscheked that the values are written properly.
    When i am using the "request.getParameter()" inside the JSP its not working.
 
    IN a book "Java Servlet Prog.." by Jason hunter he gave a similar type of example
    but with servlets...
 
    Please help me in this regard,
    A small example will be very useful .
    Thanks in Advance.
   
- Surya
 
----- Original Message -----
Sent: Friday, November 19, 1999 2:55 PM
Subject: Re: Hello.... Applet to JSP comms

No this won't work.
You are actually opening a connection to the JSP file and not the JSP object itself.
If you want to update table info the best way I can think of is to run a small DB or text data source on the server, update it from the applet using JDBC. Then when you load the JSP it can get it's data from the updated data source.
 
If you need any further help (NO PROBLEM) please specify 'Applet to JSP comms' in the subject line.
 
Barry Scott
IJava UK
----- Original Message -----
Sent: Friday, November 19, 1999 6:51 AM
Subject: Hello....

HI everyone..
 
    I am trying for an Applet to JSP communication means sending parameters from Applet to JSP.
 
    The proceure what i am doing is like this.
   
        OPenning the URL of JSP from which getting the OpenConnection .
        After that opening a new DataOutputStream to write into that.
        And trying to get the parameters in JSP !!
    But its not working,
    Its getting a "null" value !!
 
    Hey can anyone please help in this regard,
    Is this is the right way of doing the things????
    Well i can always use  http://localhost:8080/servlet-path?a=....
 
    But if i want to update a table or insert data into a table then this seams to bit ackward...
    Can anyone suggest a better way of doing the things.
 
    Thanks in Advance..
    Expecting an early reply...
 
 
- Surya
   
 

Reply via email to