Share on Google+Share on Google+

Tariq Mehmood
Passing Parameters
1 Answer(s)      8 years ago
Posted in : JSP-Servlet

Ads

View Answers

November 15, 2008 at 12:02 AM


Hi friend,


Code to help in solving the problem :

"getData.jsp"
<HEAD>
<TITLE>first page...create session</TITLE>
</HEAD>
<BODY bgcolor="#6E6E6E">

// use POST method to avoid show data in url
<FORM NAME="form1" ACTION="nextPage.jsp" METHOD="POST">
<TABLE bgcolor="#D8D8D8">
<tr>
<td> Enter name </td>
<td><input type="text" name="txtName"></td>
</tr>
<tr>
<td> Enter Email id </td>
<td><input type="text" name="email"></td>
</tr>
<tr align="center"><td></td>
<td><INPUT TYPE="submit" VALUE="show"></td>
</FORM>


</TABLE>
</body>
</html>

"nextPage.jsp"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

</HEAD>

<BODY>
<%
if (request.getParameter("txtName") != null &&
request.getParameter("txtName") != null) {
if (!(request.getParameter("txtName").equals("")) &&
!(request.getParameter("txtName").equals(""))) {%>
<tr>
<td> Your name is </td>
<td><%=request.getParameter("txtName")%></td>
</tr>
<tr>
<td> Email id is </td>
<td><%=request.getParameter("email")%></td>
</tr>
<%}
}
%>
</BODY>
</HTML>

For more information on JSP visit to :

http://www.roseindia.net/jsp/

Thanks









Related Tutorials/Questions & Answers:
Passing Parameters - JSP-Servlet
Passing Parameters  Hi I have to pass parameter like such scenario. Please help me on emergent bases. I will be grateful. First Page... to forward the parameters through click of button **/ On this page I have
passing parameters - JSP-Servlet
passing parameters  hi this is my jsp page Reserved By: Conference Hall No: Select Hall Numbers
Advertisements
Passing parameters in JSP using forward.
Passing parameters in JSP using forward.  If a page is forwarded to another page using jsp:forward, is it necessary that the page should be already............   Pass Parameters using jsp:forward
Passing parameters to XSLT style sheets
Passing parameters to XSLT style sheets       Passing parameters to XSLT style sheets... display, The xml and xsl is passed as parameters to the function '
Passing Parameters in jsp
Passing Parameters in jsp       This section illustrates you how to pass parameters in jsp. JSP can... file. We are passing the parameters using the tag <jsp:param> which contain
Passing Parameters using <jsp: param>
Passing Parameters using <jsp: param>          Request parameters can...; In this example we are passing a parameters to a file by using <jsp
Passing Parameters to Another JSP Page
Passing Parameters to Another JSP Page      By using the include action we can pass the parameters to another jsp page. We can do this by doing using the <jsp:param>. This tag is used
the number of parameters
the number of parameters  How do I find out the number of parameters passed into function
Passing variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
In and Out parameters - SQL
In and Out parameters  What are in and out parameters in stored... no's and get output using parameters in MySql  Hi Friend, Stored Procedures are basically used for passing values and receiving values.It is having three
SQL IN Parameters
SQL IN Parameters       A parameter is a placeholder that accept a user-defined value, whenever... This Example shows you how to use in type parameters. The Tutorial illustrates
named parameters vs postional parameters - Hibernate
named parameters vs postional parameters  hi,Can you please explain why we i should go for particular parameters or positional parameter... regards, somasekhar
Argument Passing
Passing Argument in Java  hi this is my code class Test { void meth(int i, int j) { i *= 2; j /= 2; System.out.println("a=" +i); System.out.println("b=" +j); } } public
measuring Qos parameters
measuring Qos parameters   Hi, is there a tool for measuring the quality of service (Qos) of an web services. Thanks
Access web.xml init parameters
Access web.xml init parameters  How to access web.xml init parameters from java code
measuring Qos parameters
measuring Qos parameters   Hi, is there a tool for measuring the quality of service (Qos) of an web services. Thanks
Passing Arguments. - Java Beginners
Passing Arguments.  Hi, im new in doing this passing arguments and calling methods. Can you please see that y im not getting the answer... should set both its local parameters to zero - ie zero all entries in the array
JSP-parameters possible ways
JSP-parameters possible ways  In a JSP program called books.jsp, the Java code out.print(request.getParameter(‚??number‚??)); displays ‚??1111111‚??. What are the ways for the parameter number to have got its value
JSP-parameters possible ways
JSP-parameters possible ways  In a JSP program called books.jsp, the Java code out.print(request.getParameter(‚??number‚??)); displays ‚??1111111‚??. What are the ways for the parameter number to have got its value
Applet Tag Parameters,Applet Tag in HTML
it, by defining the parameters. The two steps of passing parameters... that the parameter names are case-sensitive when passing parameters to applets. Moreover all... <APPLET> Tag Parameters: The <PARAM> Tag
parameters - JSP-Servlet
example with sending parameters with hyperlibk in srevlets to jsp.. Thanqs advnce
&lt;APPLET&gt; Tag Parameters: The &lt;PARAM&gt; Tag
it, by defining the parameters. The two steps of passing parameters... that the parameter names are case-sensitive when passing parameters to applets. Moreover all... <APPLET> Tag Parameters: The <PARAM> Tag
how to debug parameters in the hibernate query
how to debug parameters in the hibernate query  how to debug parameters in the hibernate query
Passing array element
Passing array element  What about passing an element of an array? If I have array of objects and pass functionA(arr[2]); Then functionA() will get arr[2] as a value type or a reference type
Java parameter passing
Java parameter passing  What type of parameter passing does Java support
Objective C Message Passing
Objective C Message Passing  What exactly a message passing means in Objective C? and how can i pass a message to a method
Reference passing in java
Reference passing in java  plz tell me wat d meaning of refernce in java? for example : Class M(){ N n; } Class N(){ } wats dis meaning
passing values on button click
passing values on button click  Please help me to solve this issue.I want to pass a value assigned to button to another view upon button click in xcode
Explain the parameters of Font class constructor.
Explain the parameters of Font class constructor.  Explain the parameters of Font class constructor.   Java Font class: Font(String name... and point size. Parameters: name - the font name. This can be a logical font name
supplying values to in parameters of stored procedure in ms sql and displaying out parameters
supplying values to in parameters of stored procedure in ms sql and displaying out parameters  I have to execute following procedure ALTER PROCEDURE [dbo].[get_date] @codeId int, @vardate as datetime OUTPUT AS SELECT
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
Tutorials   
Java Spring Hibernate Struts Training fat image from db fat image from db fat image from db fat image from db unable to get value returned from javascript variable in page How to change image size before adding to mysql using jsp Design a registration.jsp page with input for user registration details Cart Quantity jsp servlet coding issue servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? image pdf marking pdf marking Multiple image upload using JSP Read code from excel sheet and upload into database using JSP Student java about search engine Convert BLOB to PDF and save it to a location how to copy files from remote to local machine using SFTP SSL in java? Like Team viewer Socket and Servert -Jsp how to copy files from remote location to local using java? How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java how to create SOAP based web service in java? how to fetch data from mysql database table and draw a bar chart on that data using in jsp how to create users in LDAP using java? how to authenticate user using TIVOLI api in java? how to create users using IBM Tivoi API in jsp/servelet? Java/J2ee Please explain this code as many packages and classes are unknown to me .! how to download the uploaded folder files using jsp Login Query image is display from path of mysql database please reply the code to store dynamic fields in database? Reloading issue in jsp How to get Button Id ? calling one jap page from another jsp page login login Problem to get connection from DAO class to JDBC Page Loading Time Fix table's column's name row(1st row of the table) so that it does not move up when the table is scrolled up to view more rows below Sending hidden values

Ads

 
Advertisement null

Ads