assignment of variables

assignment of variables

View Answers

November 10, 2008 at 4:10 AM

Hi friend,


if you want to pass something from the client (javaScript) to the server (java), you have to submit a form, or use a the name/value query string.

your first should look something like:

<form action="loginPage.jsp">
Enter you value here: <input type="text" name="_value" value="">
Then click the button to Check <input type="Submit" value="Click Me">
</form>

you use that to transfer (or pass if you want) the string value of the _value variable to the loginPage.jsp page on the server.

The loginPage,jsp should something like this:
<%
String value = request.getParameter( "_value" ); // get the parameter passed from the client

WebValidiator webValidiator = new WebValidiator(); // create a validator object

// do validation
if( webValidiator.validate( value ) )
{
response.writeln( value + " is a valid value" );
}
else
{
response.writeln( value + " is not a valid value" );
}
%>

----------------------------

Read for more information.

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

Thanks









Related Tutorials/Questions & Answers:
Assignment of variables - JSP-Servlet
Assignment of variables  How to assign a javascript variable value to a java string variable. .... var strName="Tarunkanti Kar"; .... ... I want to access the script variable in java variable please give
assignment of variables - JSP-Servlet
assignment of variables  How to assign a javascript variable value to a java string variable. .... var strName="Tarunkanti Kar"; .... ... I want to access the script variable in java variable please give
Advertisements
Java assignment of variables - JSP-Servlet
Java assignment of variables   .... var strName="Tarunkanti Kar"; .... ... I want to access the script variable in java variable please give the code
Assignment
Assignment  any one can help with a java assignment
assignment
as a constant. (1 mark) ii. Identify and list all the instance variables and the class... variables of the object Sphere. (2 marks) iv. Name the data field in class Circle
Variables
Variables  What are the difference between Static variables, instance variables and local variables
Assignment problem
Assignment problem  hello, I am designing a program partaining job assingment using hungarian algorithm,but i am totally confused, please help me out
my assignment
...this is my assignment....plz
Programming Assignment
Programming Assignment  Hey there, We were given an assignment to write a program to read 10 student marks from the keyboard without using an Array (only using switch statements, if statements or loops). As each mark is input
Assignment
assignment
assignment
assignment in OOP1
assignment in OOP1  Filename: CharCount.java Instructions:ADS_TO_REPLACE_1 Ask a user to input a string Program should determine the number... - 0ADS_TO_REPLACE_4 B ? 0 G ? 1 L ? 0 Q ? 0 V - 0 C ? 0 H ? 0 M ? 2 R ? 3 W - 0
ModuleNotFoundError: No module named 'assignment'
ModuleNotFoundError: No module named 'assignment'  Hi, My Python... 'assignment' How to remove the ModuleNotFoundError: No module named 'assignment' error? Thanks   Hi, In your python environment you
getting variables
getting variables   how to get variables from servlet program to webservice program
Assignment Operators in java 7
to the variable by using any assignment operator. Your variables are placed...Assignment Operators in java 7 In this section you will learn about the Assignment Operators. This is one type of operators. Assignment Operators
Environment variables
Environment variables  How to set Environment Variables in JAVA 6 n Tomcat 6 CLASSPATH, JAVA_HOME, PATH, & CATALINA variables plzzz plzz help me
Flex Variables
with it. Variables are used to store values for the application. In flex, var statement... is assigned a value using assignment operator (=). myVar = 10; Declaration and assignment of the variable can be done simultaneously
Java with OOP assignment (Eclipse)
Java with OOP assignment (Eclipse)  How do i control the length of characters in an input? E.g.: Enter your name > Hi * Name too short
Variables in Java
Variables       Data... variables)ADS_TO_REPLACE_1 Java Primitive Data Types Data Type... variables. A variable refers to the memory location that holds values like: numbers
java assignment - Java Beginners
java assignment  I got assignment in "design a vehicle class hierarchy in java,write a test program to demonstrate polymorphism".please send me the necessary codings and algorithm.  Hi Friend, Try the following code
Simple Assignment Operator
Simple Assignment Operator       Assignment operator... lying to the left side of the assignment operator. But, If the value already
Assignment Question on java programming
Assignment Question on java programming  Can somone help me on this . Thx You are required to write a complete Java program for a simple grading system. At the beginning of the system, you need to input number of students
Urgent programming assignment
Urgent programming assignment   Hi, I am an Indian student in USA.I have been able to write all the java codes successfully , however this one is giving me tremors.Any help would be highly appreciated.I am attaching
Java - Declaring variables in for loops
Java - Declaring variables in for loops  Java - Declaring variables in for loops
instance variables - Java Beginners
instance variables  instance variables
Assignment operator in java
Assignment operator in java Assignment operator is very common to almost all... the value to the variable lying on the left side. Java assignment operator... to be assigned to the variable to the left side. Assignment operator is also used
Variables In Java
This tutorial demonstrates you about the variables and their types in java
transient variables in java
transient variables in java  hello, What are transient variables in java?   hii,ADS_TO_REPLACE_1 Transient variables are variable that cannot be serialized
Java Substituting Variables
Java Substituting Variables  Java Substituting Variables
Static & Instance variables in java
Static & Instance variables in java  What are the Difference between Static & Instance variables in java
What are local variables?
What are local variables?   hi, What are local variables? thanks... a block of syntax like methods. Local variables should be initialised before accessing them. For details related to Local Variables
ModuleNotFoundError: No module named 'distributions-udacity-assignment'
ModuleNotFoundError: No module named 'distributions-udacity-assignment' ...: ModuleNotFoundError: No module named 'distributions-udacity-assignment' How to remove the ModuleNotFoundError: No module named 'distributions-udacity-assignment'
ModuleNotFoundError: No module named 'django-assignment-desk'
ModuleNotFoundError: No module named 'django-assignment-desk'  Hi...: No module named 'django-assignment-desk' How to remove the ModuleNotFoundError: No module named 'django-assignment-desk' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-assignment-desk'
ModuleNotFoundError: No module named 'django-assignment-desk'  Hi...: No module named 'django-assignment-desk' How to remove the ModuleNotFoundError: No module named 'django-assignment-desk' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-assignment-desk'
ModuleNotFoundError: No module named 'django-assignment-desk'  Hi...: No module named 'django-assignment-desk' How to remove the ModuleNotFoundError: No module named 'django-assignment-desk' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-assignment-desk'
ModuleNotFoundError: No module named 'django-assignment-desk'  Hi...: No module named 'django-assignment-desk' How to remove the ModuleNotFoundError: No module named 'django-assignment-desk' error? Thanks   Hi
ModuleNotFoundError: No module named 'odoo9-addon-openeducat-assignment'
ModuleNotFoundError: No module named 'odoo9-addon-openeducat-assignment' ...: ModuleNotFoundError: No module named 'odoo9-addon-openeducat-assignment' How to remove the ModuleNotFoundError: No module named 'odoo9-addon-openeducat-assignment'
ModuleNotFoundError: No module named 'acs_examine_student_assignment'
ModuleNotFoundError: No module named 'acs_examine_student_assignment' ...: No module named 'acs_examine_student_assignment' How to remove the ModuleNotFoundError: No module named 'acs_examine_student_assignment' error
ModuleNotFoundError: No module named 'distributions-udacity-assignment'
ModuleNotFoundError: No module named 'distributions-udacity-assignment' ...: ModuleNotFoundError: No module named 'distributions-udacity-assignment' How to remove the ModuleNotFoundError: No module named 'distributions-udacity-assignment'
ModuleNotFoundError: No module named 'django-assignment-desk'
ModuleNotFoundError: No module named 'django-assignment-desk'  Hi...: No module named 'django-assignment-desk' How to remove the ModuleNotFoundError: No module named 'django-assignment-desk' error? Thanks   Hi
ModuleNotFoundError: No module named 'keystone-json-assignment'
ModuleNotFoundError: No module named 'keystone-json-assignment'  Hi...: No module named 'keystone-json-assignment' How to remove the ModuleNotFoundError: No module named 'keystone-json-assignment' error? Thanks  
What are instance variables?
What are instance variables?   Hi, What are instance variables... for these non-static variables so we can say that these are related to objects (instances of the class).Hence these variables are also known as instance variables
Variables in Java
Variables in Java       In this section, you will learn about Java variables... is stored when a program executes. The Java contains the following types of variables
What is JavaScript Variables ?
What is JavaScript Variables ?  Hi, My question is that What is Variable in JavaScript Programming Language. How to declare variables in JavaScript Program. Thanks, (adsbygoogle = window.adsbygoogle || []).push
Variables in Smarty
Variables in Smarty Templates Engine for PHP Smarty Template variables... file variablesADS_TO_REPLACE_2 Smarty Variables can be declared as: {$new..._TO_REPLACE_13 You can use smarty associative array variables as well as indexed arrays
session variables server side
session variables server side  how to hold session variable for server side..?   request.getSession().setAttribute("wellSelection", uid
JavaScript Variables
JavaScript Variables: Variables are like containers, which contains a value. In JavaScript variables dependent on the value, not on the datatype that means variables are of  dynamic typing. Variable names are case-sensitive
interface variables - Java Beginners
interface variables  why interface variables are final? explain me with good program example?? i knw why the variable is static but,i dont knw why it is final by default? thanks in advance
java protected variables
java protected variables   Can we inherit the Java Protected variable..?   of course you can. But I think what you mean is "override"? Is tha so? There are some restriction

Ads