Results 1 to 4 of 4

Thread: getting info from wep pages?

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    getting info from wep pages?

    Can anyone explain the typical process used to get user defined data from a web page? I was thinking that an applet is normally used to extract data via the applets parameters which are populated with values from web pages controls.
    Ive been programming stand alone java applications for awhile and i would like to start understanding the web side of Java. Thanks in advance

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    There's a method of Applet that retrieves a parameter. And you could use JSP or PHP or similar to write those params. So the user has a form, hits submit and gets sent to a page where PHP writes those values into params.
    At it's simplest:

    file1.htm:
    Code:
    ...
    <form method="get" action="file2.php">
    <input type="text" name="box" />
    <input type="submit" value="Hit me!" />
    </form>
    ...
    file2.php:
    Code:
    ...
    <applet code="MyApplet.class" width="200" height="100">
    <param name="box" value="<?php echo $HTTP_GET_VARS[box]; ?>" />
    </applet>
    ...
    Of course this requires a web server where PHP can run.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    You read my mind CornedBee. Now if i may pick your brain for a few. . In the line
    Code:
    <param name="box" value="<?php echo $HTTP_GET_VARS[box]; ?>" />
    could the php code inside be written in pearl or some other code?

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Yeah. I mean, you'd need other ways of actually writing the code of course, but you could write it in mod_perl, ASP, JSP, or generate the whole page via CGI.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width