Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts Java struts variable valu
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


indu shekhar
Java struts variable valu
1 Answer(s)      5 years and 9 months ago
Posted in : Struts



Advertisement
View Answers

March 18, 2009 at 2:49 AM


Hi,
U can declare variables in java using scriptlets.
for example:
<%
int i=0;
String name="XYZ";
%>
If u want to fetch these values in action class then set these variables to session or request like
session.setAttribute("intvalue",i);
session.setAttribute("strvalue",name);

In action class get these values using getAttribute() method............


Related Tutorials/Questions & Answers:
Java struts variable valu - Struts
Java struts variable valu  Hii.. can u suggest me how to declare a variable in my jsp page and then fetching its value in the action class.. my requirement is to execute a block of code depending on the value of the variable
Java variable
Java variable   To what value is a variable of the String type automatically initialized
Advertisements
Converting jsp variable to java variable
Converting jsp variable to java variable  Hi how to convert java script variable to java variable on same jsp page
Java Final Variable
Java Final Variable  I have some confusion --Final variable has single copy for each object so can we access final variable through class name,or it is necessary to create object for accessing final variable
Store Variable in Java
Store Variable in Java  How to store Variables in Java?   public class DoubleTest { public static void main(String[] args) { double...(aDouble); // Outputs 7.21 } }   Variable in Java
array variable in a java program
array variable in a java program  How do i write a program that will prompt the user for a list of 5 prices, that cosist of the sum of all the prices, the average of the prices, and all prices that are higher than the calculated
Instance variable in java
Instance variable in java In this section you will learn about Instance variable in java. In java all variable must be declared before they are used... is one of the data type in java ,identifier is one of the name of the variable
Passing a java property to a javascript variable
Passing a java property to a javascript variable  i want to assign a java property to a js variable: action class: collegename have a property... prefix="s" uri="/struts-tags"%> <% response.setContentType("application
java Transient variable - Java Beginners
java Transient variable  Hi, What is the use of transient variables in java?  Hi friend, The transient is a keyword defined in the java programming language. Keywords are basically reserved words which have
How to define a constant variable in Java?
How to define a constant variable in Java?   Hi, How to define a constant variable in Java? thanks   HI, The Constants variables... once its declared. For more related to constant variable in java Thanks
Referance variable - Java Interview Questions
Referance variable  by using which reference variable we declare instance variable as local variable in java   Hi friend,Local variables... variable and parameter. When the method is called, the parameter slots are initialized
Static variable in java
Static variable in java. Static is a keyword in java used to create static methods, variable inside a class and static class. Static variable is also called class variable which belongs to class not to object. Static
Getting environment variable value from java
Getting environment variable value from java  Getting environment variable value from java
Using a variable filename - Java Beginners
Using a variable filename  Dear sir, my program a JFrame containes of 3 JTextFields and 2 different JButtons intend to sends data to 2 Input files... the buttons global variable and using the code e.getSource()== or by associating
Java Transient Variable
Java Transient Variables Before knowing the transient variable you should firs know about the Serialization in java. Serialization means making a object... mark that object as persistent. You can also say that the transient variable
Dynamic variable in java - Java Interview Questions
Dynamic variable in java  My interview asked what is dynamic variable in java and where we use them.   Hi Friend, The variables that are initialized at run time is called as dynamic variable.You can use it anywhere
convert javascript var to java variable - JSP-Servlet
convert javascript var to java variable  hi how to conver javascript var to java variable?  Hi Friend, We are providing you two ways: 1)a.jsp: function call(){ var name = "roseindia
create and use an array variable in a java program
create and use an array variable in a java program  how do i write a program that will prompt the user for a list of 5 prices, once the user has entered all values , your program should compute and display the following: The sum
Struts for Java
Struts for Java  What do you understand by Struts for Java? Where Struts for Java is used? Thanks   Hi, Struts for Java is programming framework. The Struts for Java is software development framework for creating
java struts DAO - Struts
java struts DAO  hai friends i have some doubt regarding the how to connect strutsDAO and action dispatch class please provide some example to explain this connectivity. THANKS IN ADVANCE
Java Struts - Struts
Java Struts  How we can create mvc architecture and its advantages?  Hi Friend, Please visit the following link: http://www.roseindia.net/struts/mvc-architecture.shtml Thanks
java - Struts
Java - Validating a form field in JSP using Struts  I need an example in Java struts that validates a form field in JSP
java struts error - Struts
java struts error   my jsp page is post the problem enter email              ... on struts visit to : http://www.roseindia.net/struts/ Thanks
count statement that saves results on a variable in a java bean
count statement that saves results on a variable in a java bean  Hello i want to ask you where is the problem and my programme give me only null returns ---> package javalab; import java.sql.*; public class History
count statement that saves results on a variable in a java bean
count statement that saves results on a variable in a java bean  Hello i want to ask you where is the problem and my programme give me only null returns ---> package javalab; import java.sql.*; public class History
Local Variable and Instant Variable
they compile fine. But in the case of local variable in Java, local variable in Java do...Local Variable and Instant Variable  difference between Local Variable and Instant Variable   Difference between local variable
Java - Struts
in DispatchAction in Struts. How can i pass the method name in "action" and how can i map at in struts-config.xml; when i follow some guidelines... more the one action button in the form using Java script. please give me
java - Struts
of the Application.  Hi friend, Struts is an open source framework... pattern. It uses and extends the Java Servlet API to encourage developers...://www.roseindia.net/struts/StrutsArchitecture.shtml
java file upload in struts - Struts
java file upload in struts  i need code for upload and download file using struts in flex.plese help me  Hi Friend, Please visit the following links: http://www.roseindia.net/struts/strutsfileupload.shtml http
java - Struts
java  what is the default Action class in struts
java - Struts
java  How To Connect oracle Database With Struts Project
Advertisements
 

 

 

DMCA.com