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

Ads









Related Tutorials/Questions & Answers:
how to initialise variables in jsp?
JSP1
Advertisements
JSP2
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file
ModuleNotFoundError: No module named 'jspp'
ModuleNotFoundError: No module named 'JSPy'
how to write jsps and databasetables,umldiagrams in fuelmanagement system project
Variables
How do I set environment variables from Java?
How do servlets work? Instantiation, session variables and multithreading
JSPs : Declarations
versions of servlets and JSPs?
PHP related - how to explot a string with commas and store into two different variables?
Environment variables
JSPs : Directives
Kotlin Variables
What is JavaScript Variables ?
Design, develop and test JSPs
Variables in Java
session variables server side
Java - Declaring variables in for loops
Variables In Java
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 Substituting Variables
Static & Instance variables in java
What are local variables?

Ads