Results 1 to 4 of 4
  1. #1
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    157
    Rep Power
    5

    Default can i get the reuested values from a html page into a java string variable

    hi all
    can i get the reuested values from a html page into a java string variable.
    <html>
    <body>
    <form action="">
    First name:
    <input type="text" name="firstname" />
    <br />
    Last name:
    <input type="text" name="lastname" /><br>
    <input type="submit" />
    </form>
    </html>
    on the submitting the page i need a Sting which handle the vale how this is possible with out webserver

    means when a reuest is send to the server String name=(String)request.getparameter("firstname"); will get the firstname value
    witha simple html page subition i want a java class get the value in the firstname ,if that is not possible then how the same is done by the webserver
    please help me

  2. #2
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    Do you mean the html page submission hits a desktop/standalone java application?? If so, probably impossible.
    Swastik

  3. #3
    javastuden's Avatar
    javastuden is offline Senior Member
    Join Date
    Nov 2009
    Posts
    157
    Rep Power
    5

    Default

    thnak for your reply,
    But take the example of the jboss server in that the value will be taken from the html page then in the servlet code we write extends HttpServlet so that the HttpServlet will handle the values from the html page i think so what is in that HttpServlet to take the value from the html page

    please clarify my doubt
    thank you

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    It doesn't take any value from the page.
    By the time it gets to the server it is a string, that has passed over the net.
    By the time it gets to the servlet it is a Request object.

    What are you looking for?

Similar Threads

  1. Help in reading values from html form in java
    By ichkoguy in forum Advanced Java
    Replies: 7
    Last Post: 03-16-2009, 07:45 AM
  2. Need to display the jsp variable(String) into html?
    By Arivudai Nambi in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-25-2009, 05:44 PM
  3. Error while parsing html page in java on linux
    By rdhaware in forum Advanced Java
    Replies: 1
    Last Post: 02-20-2009, 02:20 AM
  4. to retrieve multiple values from html page through jsp
    By raghu9198 in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 02-17-2009, 02:43 PM
  5. Include Java file in HTML Page
    By kathyc in forum New To Java
    Replies: 2
    Last Post: 03-07-2008, 03:51 AM

Posting Permissions

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