Home Answers Viewqa JSP-Servlet how to initialise variables in jsp?

 
 


jagadeswar
how to initialise variables in jsp?
1 Answer(s)      2 years and 4 months ago
Posted in : JSP-Servlet

 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 Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.