answersLogoWhite

0

How do youdeclare a variable in jsp?

User Avatar

Anonymous

16y ago
Updated: 8/17/2019

You declare a variable the same in a JSP as you do in a servlet. Let's say you want to declare a String variable called "foo" and you wanted to assign it a value of "bar." You would do this: String foo = "bar"; Of course, in a JSP, any Java code needs to be enclosed within <% and %>.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What are jsp actions?

JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. JSP Actions consist of a typical (XML-based) prefix of "jsp" followed by a colon, followed by the action name followed by one or more attribute parameters. There are six JSP Actions: &lt; jsp : include / &gt; &lt; jsp : forward / &gt; &lt; jsp : plugin / &gt; &lt; jsp : usebean / &gt; &lt; jsp : setProperty / &gt; &lt; jsp : getProperty / &gt;


What is the difference between variable declared inside the declaration part and variable declared in scriptlet part?

Variable declared inside declaration part is treated as a global variable, which means after translation of jsp file into servletthat variable will be declared outside the service method as an instance variablethe scope is available to the complete jspVariable declared inside a scriplet will be declared inside a service method as a local variable and the scope is with in the service method.


What is acronym of jsp?

JSP stands for Java Server Pages


How to Update data from jsp into database?

can i get update coding in jsp??


When was JSP Records created?

JSP Records was created in 1978.


What does jsp mean?

jsp means Java Server Pages.


What is full from JSP?

JSP stands for Java Server Pages


Which is the website for jsp tutorials?

There are many websites for JSP Tutorials. Just google with text as "JSP Tutorials" or click on the related links in this answer...


How do you connect jsp and HTML?

JSP and HTML are similar in some way or other. JSP is one which has work on Java Programming as well.


What are the Implicit object in JSP?

The implicit objects in a JSP page are:requestresponsepageContextsessionapplicationoutconfigpage


What does JSP stand for in JSP Corporation?

Japan Styrene Paper Corporation


Why can you make HTML and jsp pages?

You can make HTML pages and JSP pages for web attractiveness. JSP pages offer additions features to it.