Question on Struts

Hi,
I am fairly new to struts and couldn't find the appropriate message board to post the question. I am trying to run the basic register username example. I am using lite WebServer as my server. When i am trying to view my register.jsp page in the browser, i get this error
javax.servlet.ServletException: Provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
this line in my register.jsp page
<%@ taglib uri="/web-inf/struts-form.tld" prefix="form" %>
is trying to call some other class which it can't find. Can anyone tell me wut am doing wrong or where i can ask my question
Thanks

Hi,
what version of java are u using, there is some parser jar file missing,
send empty email to
[email protected]
for subscribing to struts forum

Similar Messages

  • Question with Struts ActionServlet

    Hi,everybody.
    I have written a simple application using Struts.The program is used to validate a user who login to the system.I have added all *.jar library file of Struts 1.2.6 to the Tomcat project,But after I accessed to Login page,enter username and password,and then click "Login" button,It popup the following exception:
    Error loading WebappClassLoader
    delegate: false
    repositories:
    /WEB-INF/classes/
    ----------> Parent Classloader:
    org.apache.catalina.loader.StandardClassLoader@fe315d
    org.apache.struts.action.ActionServlet
    java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1034)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)
    and the web.xml file is list as following:
    <?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>
    <!-- Action Servlet Configuration -->
    <servlet>
    <servlet-name>actionServlet</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>actionServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- The Welcome File List -->
    <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    struts-config.xml is listed as following:
    <?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="formBean1" type="classmate.UserForm"/>
         </form-beans>
         <global-forwards>
              <forward name="failed" path="/error.jsp"/>
              <forward name="successed" path="/right.jsp"/>
         </global-forwards>
         <action-mappings>
              <action path="/login" type="classmate.LoginAction" name="formBean1" scope="request" input="/login.jsp" />
              <action path="/regist" forward="/regist.jsp"/>
         </action-mappings>
    </struts-config>
    if anybody can help me to resovle this question? Please Reply .
    Besides this,I also have another question I want to ask,it is that how to install Struts plugin to Eclipse,I have tried to unziped the download EasyStruts plugin to the Eclipse plugins directory,but after click Window->Preference ,I have not found the EasyStruts item in the left of the pop-up panel,the Eclipse version is 3.1.2 and have installed lomboz in it.if anybody have practice in such installation? Please response to help me.
    Thank you and Regards.

    Hi,
    Thank you for response.I have modified the program as what you told me.it can startup now,But it suspended at LoginAction,the running message is printed as following:
    LoginAction.execute(ActionMapping, ActionForm, HttpServletRequest, HttpServletResponse) line: 18
    RequestProcessor.processActionPerform(HttpServletRequest, HttpServletResponse, Action, ActionForm, ActionMapping) line: 419
    RequestProcessor.process(HttpServletRequest, HttpServletResponse) line: 224
    ActionServlet.process(HttpServletRequest, HttpServletResponse) line: 1192
    ActionServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 709
    when I click on the information "RequestProcessor.processActionPerform",it popup a message that show "Source not found ,The jar file Struts.jar has no source attachment",Does it need to attach the source of struts.jar?
    I list the LoginAction.java as following:
    package classmate;
    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;
    public final class LoginAction extends Action{ 
    public ActionForward execute(
         ActionMapping mapping,
         ActionForm form,
         HttpServletRequest request,
         HttpServletResponse response) throws Exception {
         UserForm userform = (UserForm) form;
         String name = userform.getName();
         String psw = userform.getPsw();
         if("jenny".equals(name) && "hi".equals(psw)){
              UserLoginLog ul = new UserLoginLog();
              ul.save(name,psw);
              return mapping.findForward("successed");     
         }else{
              return mapping.findForward("failed");
    as I debuged the program,the breakpoint line "UserForm userform = (UserForm) form; "
    and the UseForm.java is listed as following:
    package classmate;
    import org.apache.struts.action.ActionForm;
    public class UserForm extends ActionForm{ 
         private static final long serialVersionUID = 1L;
         private String name = null;     
         private String psw = null;     
         public UserForm(){}
         public void setName(String name) {
              this.name = name;
         public String getName() {
              return name;
         public void setPsw(String psw) {
              this.psw = psw;
         public String getPsw() {
              return psw;
    and I have written the web.xml and struts-config.xml in above message.
    how can I run through the breakpoint line so that I can access the ActionForm's Data? if anybody can tell me how to resovle it ,Please reply to help me. Thanks you.
    Message was edited by:
    Devemor

  • Question about struts

    HI
    i just ask,
    if i want to connect struts using Mysql. apart from web.xml and struts-config.xml
    any other xml file i have to configure.
    pls any one can guide me.

    This is not the right forum to ask this question.
    Anyway if you use tomcat then you can provide the connection settings in the context.xml file under the META-INF directory of your application.
    For more information refer to
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
    (Presuming you are using tomcat for deployment of your web-app)

  • Basic question about Struts

    Hello,
    I am going through the struts sample application (struts-example.war) and I am trying to understand the firtst global forward. Here it is:
        <forward   name="logoff"               path="/logoff.do"/>How does the application knows that "logoff.do" is mapped to the logon.jsp page?
    Can anyone answer this question please?
    Thanks in advance,
    Julien.

    Thanks for your reply ADCWorks,
    What I don't understand is that I have disabled the local forward for the logoff action (the struts-config.xml is included here). How does Struts know that the logoff.do is mapped to logon.jsp? I doubt it is hard-coded in the servlet...
    <?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">
    <!--
         This is the Struts configuration file for the example application,
         using the proposed new syntax.
    -->
    <struts-config>
    <!-- ========== Data Source Configuration =============================== -->
    <!--
    <data-sources>
       <data-source>
         <set-property property="autoCommit"
                          value="false"/>
         <set-property property="description"
                          value="Example Data Source Configuration"/>
         <set-property property="driverClass"
                          value="org.postgresql.Driver"/>
         <set-property property="maxCount"
                          value="4"/>
         <set-property property="minCount"
                          value="2"/>
         <set-property property="password"
                          value="mypassword"/>
         <set-property property="url"
                          value="jdbc:postgresql://localhost/mydatabase"/>
         <set-property property="user"
                          value="myusername"/>
       </data-source>
    </data-sources>
    -->
      <!-- ========== Form Bean Definitions =================================== -->
      <form-beans>
        <!-- Logon form bean -->
        <form-bean       name="logonForm"
                         type="org.apache.struts.validator.DynaValidatorForm">
          <form-property name="username" type="java.lang.String"/>
          <form-property name="password" type="java.lang.String"/>
        </form-bean>
        <!-- Registration form bean -->
        <form-bean      name="registrationForm"
                        type="org.apache.struts.webapp.example.RegistrationForm"/>
        <!-- Subscription form bean -->
        <form-bean      name="subscriptionForm"
                        type="org.apache.struts.webapp.example.SubscriptionForm"/>
      </form-beans>
      <!-- ========== Global Forward Definitions ============================== -->
      <global-forwards>
        <forward   name="logoff"               path="/logoff.do"/>
        <forward   name="logon"                path="/logon.jsp"/>
        <forward   name="registration"         path="/registration.jsp"/>
        <forward   name="success"              path="/mainMenu.jsp"/>
      </global-forwards>
      <!-- ========== Action Mapping Definitions ============================== -->
      <action-mappings>
        <!-- Edit user registration -->
        <action    path="/editRegistration"
                   type="org.apache.struts.webapp.example.EditRegistrationAction"
              attribute="registrationForm"
                  scope="request"
               validate="false">
          <forward name="success"              path="/registration.jsp"/>
        </action>
        <!-- Edit mail subscription -->
        <action    path="/editSubscription"
                   type="org.apache.struts.webapp.example.EditSubscriptionAction"
              attribute="subscriptionForm"
                  scope="request"
               validate="false">
          <forward name="failure"              path="/mainMenu.jsp"/>
          <forward name="success"              path="/subscription.jsp"/>
        </action>
        <!-- Process a user logoff -->
        <action    path="/logoff"
                   type="org.apache.struts.webapp.example.LogoffAction">
          <!--forward name="success"              path="/index.jsp"/-->
        </action>
        <!-- Process a user logon -->
        <action    path="/logon"
                   type="org.apache.struts.webapp.example.LogonAction"
                   name="logonForm"
                  scope="session"
                  input="logon">
          <exception
                    key="expired.password"
                   type="org.apache.struts.webapp.example.ExpiredPasswordException"
                   path="/changePassword.jsp"/>
        </action>
        <!-- Save user registration -->
        <action    path="/saveRegistration"
                   type="org.apache.struts.webapp.example.SaveRegistrationAction"
                   name="registrationForm"
                  scope="request"
                  input="registration"/>
        <!-- Save mail subscription -->
        <action    path="/saveSubscription"
                   type="org.apache.struts.webapp.example.SaveSubscriptionAction"
                   name="subscriptionForm"
                  scope="request"
                  input="subscription">
          <forward name="subscription"    path="/subscription.jsp"/>
          <forward name="success"         path="/editRegistration.do?action=Edit"/>
        </action>
        <!-- Display the "walking tour" documentation -->
        <action    path="/tour"
                forward="/tour.htm">
        </action>
      </action-mappings>
      <!-- ========== Controller Configuration ================================ -->
      <controller>
        <!-- The "input" parameter on "action" elements is the name of a
             local or global "forward" rather than a module-relative path -->
        <set-property property="inputForward" value="true"/>
      </controller>
      <!-- ========== Message Resources Definitions =========================== -->
      <message-resources
        parameter="org.apache.struts.webapp.example.ApplicationResources"/>
      <message-resources
        parameter="org.apache.struts.webapp.example.AlternateApplicationResources"
        key="alternate">
      </message-resources>
      <!-- ========== Plug Ins Configuration ================================== -->
      <plug-in className="org.apache.struts.plugins.ModuleConfigVerifier"/>
      <plug-in className="org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn">
        <set-property property="pathname" value="/WEB-INF/database.xml"/>
      </plug-in>
      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames"
                         value="/WEB-INF/validator-rules.xml,
                                /WEB-INF/validation.xml"/>
      </plug-in>
    </struts-config>

  • Question in Struts internaitonalization application

    Hi ,everybody.
    I created a Tomcat project with Struts 1.2.6 architecture,I applied the characteristic of Struts,the web.xml is listed as following:
    <?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>
    <!-- Action Servlet Configuration -->
    <servlet>
    <servlet-name>actionServlet</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    <init-param param-name="config" param-value="/WEB-INF/struts-config.xml"></init-param>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>actionServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- The Welcome File List -->
    <welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>
    <taglib taglib-uri="/WEB-INF/struts-bean.tld" taglib-location="/WEB-INF/struts-bean.tld"></taglib>
    <taglib taglib-uri="/WEB-INF/struts-html.tld" taglib-location="/WEB-INF/struts-html.tld"></taglib>
    <taglib taglib-uri="/WEB-INF/struts-logic.tld" taglib-location="/WEB-INF/struts-logic.tld"></taglib>
    </web-app>
    but when I start the Tomcat server,it showed the following exception:
    java.lang.IllegalArgumentException: Can't convert argument: null
         at org.apache.tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.java:975)
         at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:522)
         at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)
         at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
    Parse error in application web.xml file at jndi:/localhost/EWeb_5_1_Login/WEB-INF/web.xml
    java.lang.IllegalArgumentException: Can't convert argument: null
         at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2725)
         at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2751)
         at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1060)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    I have checked it serveral times,but I don't know what error in the program.Can anybody reply your solution for it?
    Thanks you.
    Message was edited by:
    Devemor

    Hi,
    What version of struts do you use?
    Prior to version 1.1, uri must include library versions, for example:
    <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic-1.0" prefix="logic" %> Maybe it was a problem, but it seems like you haven't placed TLD files to WEB-INF directory:
    struts-bean-el.tld
    struts-html-el.tld
    struts-logic-el.tld
    Then, declare TLDs in web.xml config file:
    <!-- tag libs -->
      <taglib>
        <taglib-uri>struts/bean-el</taglib-uri>
        <taglib-location>/WEB-INF/struts-bean-el.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>struts/html-el</taglib-uri>
        <taglib-location>/WEB-INF/struts-html-el.tld</taglib-location>
      </taglib>
      <taglib>
        <taglib-uri>struts/logic-el</taglib-uri>
        <taglib-location>/WEB-INF/struts-logic-el.tld</taglib-location>
      </taglib>Please, pay attention to taglib-uri declaration, so:
    <%@ taglib uri="struts/logic-el" prefix="logic" %> Regards
    Edited by: comanche_ on Jun 15, 2008 4:32 AM

  • Question about struts inside javascript variable

    Hi, actually i'm using a struts + javascript to create HTML code that i use inside a popup window...
    My (working) code is:
              idoc="";
              /* var cols = parent.document.getElementById('rowA').getElementsByTagName('THEAD')[0].getElementsByTagName('TH'); */
              var idoc='<html:form styleId="InsertNewItem" action="/nw/insertnewitem.do?target='+parent.newPop.action+'">';
              idoc+='<TABLE><TBODY>';
              var hiddenForm = getParentObj('hidden_data_form');
              var cols = hiddenForm.getElementsByTagName('INPUT');
              var test;
              test="cippa";
              for(k = 0; k < cols.length; k++) {     
                   if(cols[k].id.substring(0,3) == "hh_")
                        idoc += "<TR><TD>";
                        idoc += cols[k].id.substring(3);
                        idoc += "</TD><TD>";
                        idoc += '<html:text property="'+cols[k].id+'" value=""/>';
                        idoc += "</TD></TR>";
              idoc+='</TBODY></TABLE>';
              idoc+='</html:form>';
              var towr = document.getElementById("subwin_body");
              towr.innerHTML = idoc;
    The problem is when i try to add a <html:select> to the code, more precisely i added just before the end of the table these lines:
              idoc += "<TR><TD>Ditta:";
              idoc += "</TD><TD>";
              idoc += '<html:select property="ditta_id">';
              idoc += '<html:options collection="sel_ditta_list" labelProperty="label" property="value"/>';
              idoc += '</html:select>';
              idoc += "</TD></TR>";          
    ... but i cannot get it to work because struts seems to make some mistake with quotes and in javascript console window i get this error:
    Error: unterminated string literal
    File source: http://localhost:8180/nw/jsp/insertNewItemOperatore.jsp
    Row: 121, Column: 10
    Source Code:
    idoc += '<option value="1">1</option>
    (note the missing ending single-quote)
    I can't understand why because with <html:text> field the same "trick" works fine... any ideas?
    Thanks in advance
    Luca
    Message was edited by:
    spallared

    can you post all of your source code for the .jsp and then try running the page and once it fails do a View Source and then paste in all the generated code so that we can look at that as well.
    i'm not totally positive but i have a pretty good feeling what is going wrong. the struts optionsCollection tag will render a bunch of <option> elements but print a newline after each one, which means you probably end up with something like
    var whatever = '<option ...>.........<option>
    <option ...>.........<option>
    <option ...>.........<option>
    <option ...>.........<option>';
    correct? if so, that is not valid javascript.
    Message was edited by:
    den2681

  • Question about Struts and ActionForm

    Hi,
    I've a LoginForm class that extends ActionForm and the login.jsp page accepts 2 fields - "username" and "password" and there are corresponding setters and getters in LoginForm.java. As part of moving this to container managed security (using login modules), I want to change the field names to j_username and j_security. I made the change to the login.jsp page and also to the getters and setters (made them getJ_username, getJ_password) but I keep getting the "getter is not defined" struts related error. any thoughts?

    You would need to follow naming convention. It should be
    userName,
    I never tried with underscore, try j_userName (caps N). I don't think it will work.

  • JSF initialization question (Former Struts coder...)

    We've been a Struts shop for quite a while, however our latest applications will be done in JSF (Spring, Hibernate, and JSF actually...)
    We use j_security_check for container managed authentication. Typically what would happen is a struts action called Init.do will be called (via the welcome file list in web.xml) when the web app is first used. This action (session scoped Action Class) takes the userid and password from the j_security_check process, and stick it to a UserManager class that we have. The Init.do action will in turn "call" another action called defaultHome.do
    This all happens even before the very first page, home.jsp is rendered. So I guess in a sense, this is all initialization code.
    I am looking to do something something similar in JSF (...or Spring) but I am completely lost! :-(
    So something like this:
    1) j_security_check
    2) Some type of initialization process that takes the userid and password, run queries on the DB, get groups, preferences, currencies, etc, and stick the information (or class) into the session. (Session scoped bean?)
    3) home.jsp can then be displayed.
    So basically #2 is what I am lost at.
    Any help is much appreciated. I feel beyond this, I can take it and run. It's just that this part has me lost!!!
    Thanks!!!
    Nick

    If you have access to HttpSession, you can just create a bean yourself and put it in there with the managed bean name as key.
    Besides, you can also consider to do the j_security_check login using JSF+Spring: [http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/]. This way you can just do it "the usual JSF way" in the managed bean action method.

  • Question about struts-config.xml

    Hi,
    In the struts-config.xml,
    What is the difference about "redirect="true" and redirect="false" ?
    thanks,
    happybaobao

    Hello,
    redirect = truemeans that the ActionForward () statement in your execute method of the Action class will perform a response.sendRedirect. You can see that the URL is getting altered in the clients browser
    redirect = false means the vice-versa.
    I would recommend that you go through the Struts official site and see the DTD specifications in the URL
    http://struts.apache.org/dtds/struts-config_1_2.dtd
    for more details.
    Thanks and regards,
    Pazhanikanthan. P

  • A question for struts configuration

    i has developed a struts-based web application. The web server is tomcat.
    when the tomcat console starts, some tip info will display, like as:
    New org.apache.struts.action.ActionMapping
    Set org.apache.struts.action.ActionMapping properties
    New org.apache.struts.action.ActionForward
    Set org.apache.struts.action.ActionForward properties
    Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
    ...it's bored . How can i set some switch or parameter to prevent it?
    best regard.

    up.

  • Design question -using struts

    have String array's which have values in them.
    dbValues[]
    newValues[]
    Have an object Customer which is the row obj in a table in jsp page. This row obj basically has
    dbValues[0] , newValues[0] ...... etc.
    In Prepare Action.
    Creating the list of Customer obj's that is put in the form-bean.
    struts-config.
    <form-bean name="Form" type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">
    <form-property name="custs" type="java.util.ArrayList"/>
    </form-bean>
    jsp:
    the customers are shown in the jsp in a table.
    I have to check if it's new customer then have to ask user if they want to put dbValues in the newValues. If the user presses 'yes' then have to put the dbValues in newValues and then create the rowObjects(i.e Customer Objects) and display them in jsp.
    Not sure how to do this. Before asking the user if they want to replace newValues, the rowsObjects are created. somehow have to create new rowObjects again. Using LookupDispatchAction. when the user presses 'yes' how is the user values 'yes' will be passed as i am using LookupDispatchAction which method gets executed?
    How to do this? Thanks.

    I am giving how to work with LookDispatchAction.
    It gives the solution for ur problem.
    ->firtst it get the value from the button.
    -> That value is used to identify the key from the resource bundle.
    ->That key is used to get the method name from getKeyMethodMap()of
    lookdispatchaction.
    that's why we say that it looks in reverse manner.
    What I said above is theretical.
    From this u can understood how to do it.
    Cheers
    Sudha.

  • Simple questions on Struts --

    a) How do you partition validation logic.
    b) How do you design an Action Form(i.e., what logic belongs in that class)?
    c) What is the best way to approach error handing in Struts
    d) What were the hurdles you faced in adopting Struts
    e) What belongs in the model, the action, the view?

    a) How do you partition validation logic.Not sure what you mean by partition it. There are validation mechanisms that use Javascript for client side validation and Java for server side validation (you can use both, either or none). The action will still call the validate method for a form, and you can validate however you want in that method.
    b) How do you design an Action Form(i.e., what logic
    belongs in that class)?The action form generally is a bean to hold field data, with 2 methods: reset and validate. You reset things to whatever initial state in the reset method, which could involve database queries or whatever you want. You validate data in the validate method (the bean fields are set by that time) and you return errors or not if there are or are not errors to return.
    c) What is the best way to approach error handing in
    StrutsThe validate method of the bean returns an object containing errors, if any. There is a tag library that will display them automatically. Most Struts samples and tutorials go thru this stuff early on.
    d) What were the hurdles you faced in adopting StrutsNot many, aside learning to set things up and how the config files work. Once you understand that, it's all fairly easy. The only problem I had was trying to create a wizard-like (multi-page) form set, but that wasn't that hard in the end.
    I think you'd be better served by getting a book or tutorial on Struts.

  • Question about Struts and ActionForward

    Hi all.
    I'm having a problem regarding the use of DataAction and DataPage
    Imagine this scenario:
    1 - I have a simple web application. Its context root is http://host:port/. This web application has one jsp page called page1.jsp.
    2 - On struts configuration, I drop a DataAction called action1 and a DataPage called page1, wich holds page1.jsp, into the diagram, and link the DataAction to the DataPage using a Forward.
    3 - I start the application by clicking on the DataAction action1.
    4 - The application shows page1.jsp in the browser, because of the forward component that links de DataAction to the DataPage, but on the address bar of the browser the url is: http://host:port/action1.do. Here is the problem. I expected that I should see http://host:port/page1.do.
    5 - Because of this problem, if I refresh the page using the browser, the DataAction is executed again, but it can't. I thought the forward mechanism between a DataAction and a DataPage would cause some kind of url redirection to the browser.
    I'm using Internet Explorer to do these tests.
    Do you guys know how can I solve this problem?

    Hi fred... thanks for your post....
    Well, I'm in trouble then......
    I know that JHeadStart has the capability to detect if user have used the back or forward buttons from the browser......... If I could detect when the refresh command is used, it would solve the problem.
    I'm used to create DataAction to call some common methods from the ApplicationModule, so I can centralize code by providing different forwards to many DataPages.
    Does anyone have a best practice on how to use DataActions in conjunction with DataPages?
    Regards.

  • Question on struts page design

    Hi,
    I am a newbie to struts. I have something like this:
    -2 dropdown lists:
    college:[college list]
    school:[school list]
    -search results: once college and its scholl are selected, its departments will be displayed at the bottom of the page. The results may displyed across sevaral pages if number of depts is huge, users can
    get more results using next/previous links.
    How should I design this page? Should I use frames, or use tables to do
    this? As for two dropdown lists (criteria), shouls I write oneactionForm or two?
    And how many actionForms should I write for two dropdown lists?
    one or two?
    Thanks,

    You would have 2 drop down list..possibly a submit button. Once form submitted, your formaction can check both dropdown lists. Depends on how u stored your data, I usually stored them in an arraylist of beans then assign that bean to a session. In your jsp you can use the display tag to display the resutls. It also includes that nice next/prev page for you. Hope that helps.

  • Strut Question

    I have a question about struts. I know Strut is good framework for designing a large website. It has a lot of classes that help to design well scaled websites. What about performance? Does it slow the processing of request. if speed is the main issue is it good idea to use strut?if website needs to handle about 200,000
    request per hour would you advice to use strut?

    You may get more responses in this forum but I thought I'd pass along a struts specific resource that you could also try.
    A good source of help on Struts specific questions is the Struts user mailing list at Apache ... it's filled with helpful people, and the archives are a gold mine of good advice. To subscribe, send an empty message to <[email protected]>.

Maybe you are looking for