how to initialise variables in jsp?

how to initialise variables in jsp?

 1. what is the problem in the folloing
    jsp


    <%@ page
    import="net.viralpatel.struts.helloworld.form.LoginForm"
    %> <%@ page language="java"
    contentType="text/html;
    charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD
    HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib
    uri="/WEB-INF/struts-html.tld"
    prefix="html"%> <%@taglib
    uri="/WEB-INF/struts-bean.tld"
    prefix="bean" %>

    <html:html> <head> <meta
    http-equiv="Content-Type"
    content="text/html;
    charset=ISO-8859-1"> <title>Login
    page</title> </head> <body> <%
    if(!(loginForm.getUsername().equals("admin"))){
        %> <bean:message
    key="error.username"/> <%} %>
    <%if(!(loginForm.getPassword().equals("admin123"))){
        %>  <bean:message
    key="error.password"/>  <%} %>
    <bean:message/>


    </body> </html:html>
View Answers

January 22, 2011 at 5:35 PM

Hello Friend,

Please visit the following link:

http://www.roseindia.net/struts/struts-login-form.shtml

Thanks









Related Tutorials/Questions & Answers:
how to initialise variables in jsp?
JSP1
Advertisements
JSP2
ModuleNotFoundError: No module named 'jspp'
ModuleNotFoundError: No module named 'JSPy'
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file
how to write jsps and databasetables,umldiagrams in fuelmanagement system project
Variables
Array ---- Re-initialise
How can we register the variables into a session?
Protect JSPs from direct access
how to get javascript variables into jsp - JSP-Servlet
JSPs : Declarations
versions of servlets and JSPs?
How do I set environment variables from Java?
How do servlets work? Instantiation, session variables and multithreading
initialise array by reading from file - Java Beginners
How to implement session variables - JSP-Servlet
getting variables
PHP related - how to explot a string with commas and store into two different variables?
Environment variables
JSPs : Directives
JavaScript Variables
Kotlin Variables
Design, develop and test JSPs
servlet n jsps - Java Beginners
What is JavaScript Variables ?
Variables in Java
session variables server side
Java - Declaring variables in for loops
instance variables - Java Beginners
Variables In Java
transient variables in java
Java Substituting Variables
ModuleNotFoundError: No module named 'mdx-variables'
ModuleNotFoundError: No module named 'mdx-variables'
ModuleNotFoundError: No module named 'pytest-variables'
ModuleNotFoundError: No module named 'sensitive-variables'
ModuleNotFoundError: No module named 'static_variables'
Java Variables - Java Beginners
Java Variables - Java Beginners
Static & Instance variables in java
PHP Working with Variables Tutorial
What are local variables?
PHP Variables between Scripts
What are instance variables?
variables are **called instance variables because they are created** whenever an object of the class is instantiated.
set cookieless session variables in jsp
PHP Variables Using Arithmetic Operators

Ads