Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Reading Request Information

Reading Request Information Retrieving the data posted to a JSP file from HTML file Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his/her name, let's call

Tutorial Details:

it getname.htm. Here is the code of the html file:


Enter your name


 



Enter your name:






The target of form is "showname.jsp", which displays the name entered by the user. To retrieve the value entered by the user we uses the
request.getParameter("username");
code.
Here is the code of "showname.jsp" file:
<%@page contentType="text/html" %>



Welcome :  <%=request.getParameter("username")%>




Execute the example.
Download the code


 

Rate Tutorial:
http://www.roseindia.net/jsp/formdata.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Reading Request Information

View Tutorial:
Reading Request Information

Related Tutorials:

Building a bigger sandbox - JavaWorld - August 1998
Building a bigger sandbox - JavaWorld - August 1998
 
What's new in Java Servlet API 2.2? - JavaWorld October 1999
What's new in Java Servlet API 2.2? - JavaWorld October 1999
 
Add MP3 capabilities to Java Sound with SPI - JavaWorld November 2000
Add MP3 capabilities to Java Sound with SPI - JavaWorld November 2000
 
Tweak your IO performance for faster runtime - JavaWorld November 2000
Tweak your IO performance for faster runtime - JavaWorld November 2000
 
Untangle your servlet code with reflection - JavaWorld December 2000
Untangle your servlet code with reflection - JavaWorld December 2000
 
Servlets in Apache Tomcat and BEA Systems' WebLogic Server - JavaWorld February 2001
Servlets in Apache Tomcat and BEA Systems' WebLogic Server - JavaWorld February 2001
 
Deliver cellular messages with SMS - JavaWorld March 2001
Deliver cellular messages with SMS - JavaWorld March 2001
 
Manage distributed sessions - JavaWorld April 2001
Manage distributed sessions - JavaWorld April 2001
 
Untangle your servlet code with reflection
Untangle your servlet code with reflection
 
Create email-based apps with JAMES
Create email-based apps with JAMES
 
J2SE 1.4 breathes new life into the CORBA community, Part 4
J2SE 1.4 breathes new life into the CORBA community, Part 4
 
Isolate server includes' runtime context
Isolate server includes' runtime context
 
Excelling in Excel with Java
Excelling in Excel with Java
 
Tracing in a multithreaded, multiplatform environment
Tracing in a multithreaded, multiplatform environment In \"Use a consistent trace system for easier debugging,\" Scott Clee showed you how to trace and log from a custom class to provide a consistent tracing approach across your applications. This approa
 
Access Windows Performance Monitor counters from Java, Part 1
Access Windows Performance Monitor counters from Java, Part 1 Use a simple Java API to gather valuable performance statistics Summary Windows NT, 2000, 2003, and XP contain a utility called the Performance Monitor that provides a rich array of perform
 
Request bean ver. 1.5
Java bean allows you to proceed GET/POST requests to the specified host (cgi-script/servlet). So you can for example obtain contents of some page and use extracted information in your own jsp page.
 
Definition of Bioinformatics
Definition of Bioinformatics Definition of Bioinformatics About Bioinformatics In February 2001, the human genome was finally deciphered! In other words, scientists have succeeded in reading the chain of more than 3 billion base pairs that
 
Reading Request Information
Reading Request Information Retrieving the data posted to a JSP file from HTML file Now I will show you how to retrieve the data posted from a HTML file in a JSP page. Consider an html page that prompts the user to enter his/her name, let's call
 
Introduction to the JSP Java Server Pages
Introduction to the JSP Java Server Pages Welcome to JSP Section Introduction To JSP Java Server Pages or JSP for short is Sun's solution for developing dynamic web sites. JSP provide excellent server side scripting support for creating database
 
Reading Request Information
Reading Request Information Reading Request Information When an HTTP client such as web browser sends a request to a wen server, along with the request it also sends some HTTP variables like Remote address, Remote host, Content type etc. In some
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.