[STRUTS] Html:errors , little confused !?!

Hello
I've 2 login forms (UserForm, CompanyForm)
In the resource bundle I've setted the "header,footer,..."
errors.prefix=<li>
errors.suffix=</li>
errors.header=<h4><font color="red">Attenzione si sono commessi errori</font></h4><ul>
errors.footer=</ul>Now I want to display the appropriate error message under the specific form that have done the mistake. So the errors of the "UserForm" must be displayed in a place of my html and the "CompanyForm" in another place.
I try to put this under my UserForm
<html:errors property="usernameUser"/>
<html:errors property="passwordUser"/>and this under my CompanyForm
<html:errors property="usernameCompany"/>
<html:errors property="passwordCompany"/>this works wrong because if the user(or company) don't insert the username and the password the 2 html:errors display 2 times the "errors.header" key value of the resource bundle.
How can I display all the errors of a specific form in a unique "errors.header" (a unique html:errors tag)?
How can I solve this problem?
thanks in advance
SARA

Rather than the <html:errors> tag, try <html:messages>
<logic:messagesPresent>
<h4><font color="red"><bean:message key="errors.header"/></font></h4><ul>
<html:messages id="error" property="usernameUser">
   <bean:write name="error"/>
</html:messages>
<html:messages id="error" property="passwordUser">
   <bean:write name="error"/>
</html:messages>
</logic:messagesPresent>Yes the code is quite a bit longer, but I think it should work.
It also means you don't have to encode the html into the properties bundle.

Similar Messages

  • Struts - /html:errors

    Hi
    I am using normal validation provided in the struts framework ! Like using validate function in ActionForm class.
    and when any error occurs the error clause is taken from .properties and displayed on the webpage, with some proper formatting.
    What i want is instead of displayin on screen i want an alertbox to popup!
    Thank you in Advance,
    Ganesh
    Hyderabad

    i am using the following format to display errors in applicationresources.properties
    errors.header=<UL>
    errors.prefix=<LI>
    errors.suffix=</LI>
    errors.footer=</UL>its displaying fine on HTML page but i want a popup i am doing so by ...
    <script language="javascript">
                var errors = '<html:errors/>';
                if(errors != '')
                      alert(errors);
            </script>
            <html:errors/>when i do popup its not formatting the output ! if i include "\n" it not getting popped up!
    I tried but not getting ....
    help me ! thanks in advance !

  • html:errors don't show in a single line

    I use Struts <html:errors>
    <html:text property="test" /><html:errors name="test"/>
    when errors is not empty,it will show error information.But what puzzled with me is that I find the show of <html:errors property="test"/> occupy three lines,not a single line.
    My application.properties file:
    errors.footer=
    errors.header=
    errors.test.required=This is a test
    I want to show "This is a test" in only one single line,but in fact it shows three lines,like follows:
    null
    This is a test
    null
    If I modify the content of application.properties file:
    errors.test.required=This is a test
    It still show three lines,like follows:
    blank line
    This is a test
    blank line
    I want to show it in a single line without header and footer,anybody knows how to do it?

    Hi,
    in Struts <html:errors/> will show errors in a listed manner.
    so in ur properties file u have to specify ur errors within<li></li> tag and u have to add the additional valuee for header and footer.
    Try this
    errors.header=<UL>
    errors.footer=</UL>
    errors.test.required=<li>This is a test</li>You can decorate this using html tags in Porperty file.
    p(`)(`)ja.

  • Struts 1.1 html:error

    My resource file name is: application_en_US.properties
    This file is placed under /WEB-INF/classes/resources/application_en_US.properties
    In JSP file, I have a form, where I want to check, wether the userName field is null or not. If it is NULL, i want to display a message. But I m getting the following message, when the field is empty.
    ???en_US.error.login.username.null???
    JSP form looks like this:
    <form action="login">
      <td>Username</td>
      <td><html:text property="userName" size="16" maxlength="16"/></td>
      <td><html:errors property="userName"/></td>
    </form>
    In struts-config, login.do action looks like this:
    <form-beans>
    <form-bean name="actionBean" type="xxx.xxx.ActionForm" />  </form-beans>
    <action path="/login"
               type="xxx.xxx.LoginAction"
               name="actionBean"
               validate="true"
               input="/index.jsp">
    <forward name="success" path="/welcome.jsp"/>
    </action>
    <message-resources parameter="resources.application_en_US"  null="false"/>.....
    In xxx.xxx.ActionForm.java the code looks like:
    public class ActionForm extends ValidatorForm{
    setters and getters are defined here
       public ActionErrors validate(ActionMapping mapping,
                                     HttpServletRequest request) {
            ActionErrors errors = new ActionErrors();
            if (userName == null || userName.trim().equals("")) {
                errors.add("userName", new ActionError  ("error.login.username.null"));
            return errors;
    In application_en_US.properties file:
    error.login.username.null=User name required
    I hope this details are enough. Please give me a solution. it's urgent.
    Thank you.

    You extended the wrong form class. You could not extend the ValidatorForm if you have tried to implement the validator method yourself. If you want to extend the ValidatorForm then you need to remove the Validator() method from the form bean class since the ValidatorForm is designed for validation based on validation.xml and validation-rules.xml. So you need to specify the url validation.xml and validation-rules in the struts-config.xml and the correponding plugin as well. Also you need to specify the validation rules in validation.xml and define the corresponding message in the resource file.
    If you do want to implement the validator method yourself, instead of extending the ValidtorForm, you need to extend the ActionForm class, everything will be fine.
    By the way you can not name your form bean class by ActionForm, you can only extends ActionForm.

  • Help! Problem with Struts tag html:errors/

    Hi everybody,
    In my JSP page called addUser.jsp, i have the different Struts Tag
    <html:errors/>
    <html:form action="/addUser" focus="firstName">
    </html:form>
    I have of course the ApplicationResources.properties file with differents Struts properties:
    errors.footer=</ul><hr>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.ioException=I/O exception rendering error messages: {0}
    and an other one:
    error.fieldsNeeded=<font color="#FF0000">Some fields are missing.</font>
    when I call the addUser form, my JSP page display:
    null Some fields are missing. null
    Have u any suggestion about my prob?
    tx a lot
    s.

    Hi,
    can u post the java code where u are actually adding the error to the action errors. may be there is something wrong with that. I dont see any problem with the jsp or the applicationsResources.properties.
    Thanks
    Latha

  • Hi, i am a littl confused as I logged into creative cloud and bough the in design plan for a year but i cant seem to donwload it... there is a window that pops up and it says its downloading but its taking forever? any advice?

    hi, i am a littl confused as I logged into creative cloud and bough the in design plan for a year but i cant seem to donwload it... there is a window that pops up and it says its downloading but its taking forever? any advice?

    Hi Dima,
    Please refer to the help documents below:
    Troubleshoot Creative Cloud download and install issues
    Error downloading, installing, or updating Creative Cloud applications
    Regards,
    Sheena

  • Struts Html tag problem in Weblogic 8.1

    Hi
    I am using weblogic8.1 Application server
    I have written a simple web application in struts that accepts
    username and password in "login.jsp" and corresponding "bean" ActionForm
    for the same.
    Below are my application source files......
    login.jsp
    <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:html>
    <head>Struts Test</head>
    <body bgcolor="#E6F1FC">
    <html:form action="login.do">
    <table>
    <tr>
    <td><html:text property="uname" value=" "/></td>
    <td><html:submit>SUBMIT</html:submit></td>
    </tr>
    </table>
    </html:form>
    </body>
    </html:html>
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
    Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    </web-app>
    struts-config.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="LoginFrom" type="com.nit.StrutsEx.LoginFrom"/>
    </form-beans>
    <action-mappings>
    <action path="/login" type="com.nit.StrutsEx.LoginAction" name="LoginFrom" validate="false"
    input="/login.jsp">
    <forward name="success" path="/success.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="ApplicationResource" null="false"/>
    </struts-config>
    ActionForm
    package com.nit.StrutsEx;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.*;
    import javax.servlet.*;
    import java.io.*;
    public class LoginForm extends ActionForm
    private String uname=null;
    public void setUname(String uname){
    this.uname=uname;
    public String getUname(){
    return this.uname;
    public void reset(ActionMapping am, HttpServletRequest req) {
    this.uname=null;
    public ActionErrors validate(ActionMapping am,HttpServletRequest req)
    System.out.println("I am in Validate");
    return null;
    ActionServlet
    package com.nit.StrutsEx;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.*;
    import java.io.*;
    public class LoginAction extends Action
    public ActionForward execute(
    ActionMapping am,
    ActionForm af,
    HttpServletRequest req,
    HttpServletResponse res) throws ServletException , IOException
    return am.findForward("success");
    My application runs well under tomcat but when i deploy it on Weblogic 8.1 it gives following error
    Compilation of 'E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java' failed:
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:151: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 4:
    <html:html>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:168: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 8:
    <html:form action="login.do">
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:203: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 13:
    <td><html:submit>SUBMIT</html:submit></td>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:216: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 13:
    <td><html:submit>SUBMIT</html:submit></td>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:226: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 16:
    </html:form>
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:235: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 18:
    </html:html>
    Full compiler error(s):
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:151: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 4]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:168: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int1 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 8]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:203: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int2 == BodyTag.EVAL_BODY_BUFFERED) { //[ /login.jsp; Line: 13]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:216: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int2 == BodyTag.EVAL_BODY_BUFFERED) out = pageContext.popBody(); //[ /login.jsp; Line: 13]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:226: cannot resolve symbol
    symbol : method doAfterBody ()
    location: class org.apache.struts.taglib.html.FormTag
    } while (_html_form0.doAfterBody() == IterationTag.EVAL_BODY_AGAIN); //[ /login.jsp; Line: 16]
    ^
    E:\bea\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_stest_stest\jsp_servlet\__login.java:235: cannot resolve symbol
    symbol : method doAfterBody ()
    location: class org.apache.struts.taglib.html.HtmlTag
    } while (_html_html0.doAfterBody() == IterationTag.EVAL_BODY_AGAIN); //[ /login.jsp; Line: 18]
    ^
    6 errors
    Wed Jul 25 17:06:07 GMT+05:30 2007
    Please reply the solution

    I don't know about that, but I am using MyFaces and tomahawk with WLS8.1 sp5 jdk1.4.2_05 and it works fine.
    I do remember getting such an error when I moved from Sun RI to MyFaces and all I can recall is that it was a commons library mismatch problem or some classpath problem...

  • Wls 8.1 sp2: weblogic.jspc complains about struts-html tags

              Hi,
              I am trying to compile jsps with weblogic.jspc, which use struts' html tags. However,
              the compilation fails with the following message:
              [java] Translation of /views/viewPageBody.jsp failed: (line 3): Error in using
              tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag'
              has no setter method corresponding to TLD declared attribute 'server', (JSP 1.1
              spec, 5.4.1)
              I opened the BaseTag class from the struts jar and found the setter exists for
              the attribute 'server' of html tld. So does the property 'server'. The property
              'server' is a string and the parameter in the setter is a string. I read about
              the jspc errors in wls 8.1 about the setter parameter being of different type
              than the property. However, that is not the case here. I tried using both Sun's
              and BEA's jdk. None of them help. Btw, there is another attribute mentioned in
              the html tld, which is 'target'. The compiler doesn't complain yet about this.:(
              Also, I happened to compile other apps which have struts logic tags.
              My environment:
              OS: Win2k sp3
              WLS: 8.1 sp2
              JDK: Sun's 1.4.2 sp4 / Bea's 1.4.1 sp5 (tried both)
              Ant: 1.5.3 (I had an issue earlier with ant until I found that Bea officially
              without any mention supports only ant 1.5.3.)
              I would appreciate any help in this regard.
              Thanks,
              Abbas
              

              What version of Struts are you trying to use?
              Are you certain you're not encountering a different instance of that class in
              an unexpected location in your classpath?
              "Abbas" <[email protected]> wrote:
              >
              >Hi,
              >I am trying to compile jsps with weblogic.jspc, which use struts' html
              >tags. However,
              >the compilation fails with the following message:
              >
              >[java] Translation of /views/viewPageBody.jsp failed: (line 3): Error
              >in using
              >tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.BaseTag'
              >has no setter method corresponding to TLD declared attribute 'server',
              >(JSP 1.1
              >spec, 5.4.1)
              >
              >I opened the BaseTag class from the struts jar and found the setter exists
              >for
              >the attribute 'server' of html tld. So does the property 'server'. The
              >property
              >'server' is a string and the parameter in the setter is a string. I read
              >about
              >the jspc errors in wls 8.1 about the setter parameter being of different
              >type
              >than the property. However, that is not the case here. I tried using
              >both Sun's
              >and BEA's jdk. None of them help. Btw, there is another attribute mentioned
              >in
              >the html tld, which is 'target'. The compiler doesn't complain yet about
              >this.:(
              >Also, I happened to compile other apps which have struts logic tags.
              >
              >
              >My environment:
              >OS: Win2k sp3
              >WLS: 8.1 sp2
              >JDK: Sun's 1.4.2 sp4 / Bea's 1.4.1 sp5 (tried both)
              >Ant: 1.5.3 (I had an issue earlier with ant until I found that Bea officially
              >without any mention supports only ant 1.5.3.)
              >
              >I would appreciate any help in this regard.
              >
              >Thanks,
              >
              >Abbas
              

  • PDK-Struts Application requires pdkstruts.jar & pdk-struts-html.tld

    Hi All,
    Scenario is this, that I've created a pdk-struts application via JDeveloper with normal struts taglibs, and deployed it to Oracle Portal 10.1.4. default-action tags specified action.do is working fine and displays the welcome page within portlet region but after clicking any button within that welcome page opens a new browser page within same window and the URL pattern changes too.
    I want this to be executed within portlet region.
    Another problem is this, when I tried to use pdk-struts-html.tld within application;
    first warning within JDeveloper is this; Metadata Namespace for pdk-struts-html is not loaded, all entries are fine, and within Portal after successful deployment it gives an error (500 Server Listener Error) on viewing that portlet body.
    I want these issues to be resolved as soon as possible.
    Or if anybody knows about pdkstruts.jar and pdk-struts-html.tld with latest versions, plz do tell me the site-url to download these things.
    Plz help me out about these issues.
    Thanks in advance.

    Look in the Building Struts Portlets with Oracle Jdevelper section of the Oracle Application Server Portal Developers Guide. You need additional jar files besides the pdkstruts one. Also, look in the server logs to see more detailed messages about why it failed, it will help you debug.

  • html:errors question

    I have a JSP file,and I use <html:errors> in this page,but it raise error,my code is follows:
    <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="html" %>
    <html>
    <head>
    <link rel="stylesheet" href="style.css" type="text/css">
    </head>
    <html:errors/>
    <html:form method="post" action="log.do">
    <html:text property="abc" /><html:errors property="abc"/>
    </html:form> and my Form is follows:
    public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();       
    if(abc!=null && abc.length()>0){
       errors.add("abc",new ActionError(" error.abc.required"));
    return errors;
    } When I run it,it raise following error:
    org.apache.jasper.JasperException: /index.jsp(8,15) Attribute property invalid for tag errors according to TLD
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java :802)
    org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:2149)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1565)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java :510)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I have looked up <html:errors> API,I find it have property attribute:
    property Name of the property for which error messages should be displayed. If not specified, all error messages (regardless of property) are displayed. (RT EXPR)
    Why raise above error when I use <html:errors property="abc"/> ? How to do with it?
    Thanks in advance!

    Maybe this piece of code might help you
    <tr>
    <td align="center"><logic:messagesPresent>
    <html:messages id="error">
    <span id="error"><li><%=error%></li></span>
    </html:messages>
    </logic:messagesPresent>
    <span id="error"><c:out value="${errorsNolog}"/></span>
    </td>
    </tr>

  • Org.apache.jasper.JasperException: File "/WEB-INF/struts-html.tld" not foun

    hi
    i have developed small stuts sample using eclipse.When i tried to run the sample its giving following error..
    org.apache.jasper.JasperException: File "/WEB-INF/struts-html.tld" not found
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
         org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:160)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
         org.apache.jasper.compiler.Parser.parse(Parser.java:127)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    But i ahve placed the tld files inside WEB-INF.
    please anybosy help me why i am getting this error?
    regards
    shruthi

    Hello,
    Were you able to find out the cause of the problem you were having with the "/WEB-INF/struts-html.tld" error?
    I'm stuck for a while on this problem, your input would help a great deal.
    Thanks,
    -Rick

  • Struts html:form vs form

    Hi,
    I'm trying to get form validation working in struts but am running into a bit of difficulty. I have a couple of questions:
    1) When an ActionError is returned - does the input form have to have used <html:form> tags for the errors to be shown. The reason i ask is because at the moment i am using the original <form> tags and when the request is returned to the input page there is just a blank page - i though this might be because i am not using the specialised struts html tags? This leads nicely on to my 2nd question... :o)
    2)Now the reason i am not using these tags is because when i try and create a form using these tags the text input areas/buttons etc do not appear - here is my code:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
      <head>
        <title>iQ Holiday Entitlement Calculator</title>
      </head>
      <body>
        <p><html:errors property="date"/></p>
        <html:form action="/iq/hr/holiday/calculate" name="calculatorForm" type="iq.hr.holiday.calculator.forms.CalculatorForm" >
          <table width="45%" border="0">
            <tr>
              <td>Day: <html:text property="day" /></td>
            </tr>
            <tr>
              <td>Month: <html:text property="month" /></td>
            </tr>
            <tr>
              <td>Year: <html:text property="year" /></td>
            </tr>
            <tr>
              <td colspan="2" align="center"><html:submit styleClass="button" value="Go"/></td>
            </tr>
          <table>
        </html:form>
      </body>
    </html:html>The text literals "Day:", "Month:", "Year:" appear but no text field with which to enter the text!
    I would very much appreciate any help anyone can offer!
    Many thanks

    <%@ page contentType="text/html; charset=iso-8859-1"
    language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld"
    prefix="html" %>
    <html:html>
    <head>
    <title>iQ Holiday Entitlement Calculator</title>
    </head>
    <body>
    <p><html:errors property="date"/></p>
    <html:form action="/iq/hr/holiday/calculate"
    te" name="calculatorForm"
    type="iq.hr.holiday.calculator.forms.CalculatorForm"
    >
    <table width="45%" border="0">
    <tr>
    <td>Day: <html:text property="day" /></td>...
    </tr>
    <table>
    </html:form>
    </body>
    </html:html>try:
    1.check your Action to see if the forward is ok (I think that your forward=... is not reachable if you have some errors)
    2.delete property="date" from <html:errors.../>
    3.close <table>tag
    4.delete <html:html> and </html:html> from your code
    5.maybe you have some errors in your and you have errorPage=""

  • Depoly struts example error

    Hi
    I'm trying to deploy struts example. The example works fine in Tomcat 5.
    when depolying in weblogic 8, it has the following error
    <Sep 8, 2005 9:39:24 PM EDT> <Error> <HTTP> <BEA-101020>
    <[ServletContext(id=4609270,name=struts-tutorial,context-path=/s
    truts-tutorial)] Servlet failed with Exception
    weblogic.servlet.jsp.JspException: (line 2): Error in using tag library
    uri='/tags/struts-html' prefix='html': The Tag cl
    ass 'org.apache.struts.taglib.html.FormTag' has no setter method
    corresponding to TLD declared attribute 'disabled', (JSP
    1.1 spec, 5.4.1)
    at
    weblogic.servlet.jsp.StandardTagLib.tld_jspException(StandardTagLib.java:123
    5)
    at
    weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1363)
    at
    weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
    at
    weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
    at
    weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
    at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
    at
    weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
    at
    weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
    at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
    at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
    at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
    at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
    at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
    at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
    at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
    at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
    at
    weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:367)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:223)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:172)
    at
    weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:51
    8)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :362)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :446)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    at
    weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
    l.java:301)
    at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
    54)
    at
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso
    r.java:259)
    at
    org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(Requ
    estProcessor.java:992)
    at
    org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(
    TilesRequestProcessor.java:341)
    at
    org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.ja
    va:551)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
    tStubImpl.java:971)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :402)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :305)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
    ebAppServletContext.java:6350)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:317)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:3635)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    I've copied all *.jar from example\lib to weblogic\common\lib, including xml
    parser.
    Can any one tell me how to deal with it?
    Thanks lots in advance
    John Woo
    Toronto

    Hi
    What is the Service Pack you are using in weblogic 8.1?that's WebLogic Server 8.1 SP2
    Could you send me the test case which you developed to my mail id?it's downloaded from
    http://struts.apache.org/download.cgi
    version 1.2.7, unzip the source version, get strut-blank.war.
    then via weblogic console, copy the war-file to newly created folder
    struts-tutorial and deploy it, testing it via
    http://localhost:7001/struts-tutorial/
    the error message in the browser is
    /pages/Welcome.jsp(2): Error in using tag library
    uri='http://jakarta.apache.org/struts/tags-html' prefix='html': The Tag
    class 'org.apache.struts.taglib.html.FormTag' has no setter method
    corresponding to TLD declared attribute 'name', (JSP 1.1 spec, 5.4.1)
    probably occurred due to an error in /pages/Welcome.jsp line 2:
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
    PS
    I found (in the internet) many people having similar problem, when using
    WL5, WL6, struts 1.1, struts 1.2+
    John woo
    Toronto

  • Struts html tag

    hi
    i have table in each row there is radio button.when i click a radio button it should redirect to another page and the sametime it has to retrieve the row value of selected radio button
    please can any one help me in this.i am using struts.i am new to struts

    <html:form action="somename" ondbclick="check()">why do you plan to check it on double clicking the html form? what if the user doesn't do a double click?!
    Maybe you could check it on the "onblur " event for the textbox. ->
    <html:text property="username" onblur="javascript:check();"/>If you are unsure about how to work on the javascript function (because I didnt exactly understand your query :) ) then just to get you started...
    function check()
             if(document.forms["0"].username.value == "")
                 alert("Empty textbox!");
             //put code for checking spaces
    }but do a little googling for the rest..
    And if I have entirely misread your query, then please clarify...

  • HTML error message

    I'm creating a simple web server. It works fine. When I open Firefox and connect and try to upload a file that doesn't exist, the program crashes. How do I get it direct to an HTML error page and continue running instead of crashing?

    How are you even writing this program? Have you ever written a program before? What is the purpose of this server -- why not just set up an existing server?
    You're asking very broad question. It's not like I can show you a single line of code that handles it all for you.
    In any event, read the exceptions you got. They provide helpful information. If you don't understand the message, then post it here (cut and paste it completely -- don't paraphrase it) and ask about the part that confuses you.

Maybe you are looking for

  • Stability of Removable Media support in Linux?

    Hey all, I'd previously thought support for removable media in linux was very good, and everthing I've used has been detected and mounted correctly and such, however I have experienced some corruption on them, especially on my microSD, as I've recent

  • Embedding video in an embeded SWF

    Hello people. I'm building a site with a flip book component. The book is a movie and then I load the pages via an XML file. The pages are SWF files. You can see the book at http://www.thiez.com/evf/main.htm Now, If I add a video on a particular page

  • Calling applet in JSP

    i have already made an applet code for my program....now i want to make it flexible by using JSP... Should i write the code from scratch (for JSP)....or is there some way i can call the applet from JSP ... Please suggest.

  • Consolidation of legal entities defined as co code

    we have two codes in SAP ECC 6 both are separate legal entities.Co Code A owns 80% of shares of Co Code B what should be the structure from consolidation point of View i.e parent subsidary relationship how would this be presented in SAP for consolida

  • Illustrator CC 17.1.0 won't start on Mavericks 10.9.1

    No plugin installed. Tried deleting the preferences several times. Installed latest wacom driver. Reinstalled two times Illustrator. Signed in and out of Creative Cloud. Verdana and Tahoma are installed. Tried this solution without sucess. Here is th