Struts configuration

Does anyone have experience using Struts 1.1 with oc4j. I have successfully created an application, but I am having problems defining my ApplicationResources in the struts-config.xml. Everything works fine if I define them in the web.xml, but when I try to create <message-resources> elements it does not appear to be picking up my property files.
Any thoughts would be greatly appreciated.
Jason

Hi Jason,
You can take a look at the sample application downloadable at http://otn.oracle.com/sample_code/products/jdev/jsp/SimpleStrutsApp.zip
We have developed several applications using Struts 1.1b2 and deployed them to OC4J. It works very well.
If you are using JDeveloper 9.0.3, it would be easier since the software has Struts support features.
Wade.

Similar Messages

  • Struts Support: "Cannot  parse the struts configuration file" when using the Struts Portlet Wizard

    I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
    168 and Struts Support" patch.
    I select the struts module successfully "struts-example" and am prompted for the
    location of name mangled configuration file (i.e "struts-config.xml" for struts-example
    becomes "jpf-struts-config-struts-example.xml").
    As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
    "Cannot parse the struts configuration file."
    Given that this is a file supplied with the struts distro and that I can deploy
    the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
    with my attempt to use the Struts Portlet.
    Can anyone please help?
    Thanks,
    --Andy Hull

    I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
    168 and Struts Support" patch.
    I select the struts module successfully "struts-example" and am prompted for the
    location of name mangled configuration file (i.e "struts-config.xml" for struts-example
    becomes "jpf-struts-config-struts-example.xml").
    As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
    "Cannot parse the struts configuration file."
    Given that this is a file supplied with the struts distro and that I can deploy
    the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
    with my attempt to use the Struts Portlet.
    Can anyone please help?
    Thanks,
    --Andy Hull

  • "Cannot  parse the struts configuration file" when using the Struts Portlet Wizard

    I'm currently trying to deploy the struts webapp from Struts 1.1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard.
    I select the struts module successfully and am prompted for the
    location of configuration file.
    As soon as I hit next, I am prompted with a dialog informing "Cannot parse the
    struts configuration file."
    I have 't started my server.
    Thanks
    Kicha

    I'm currently trying to deploy the struts webapp from Struts 1.1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard.
    I select the struts module successfully and am prompted for the
    location of configuration file.
    As soon as I hit next, I am prompted with a dialog informing "Cannot parse the
    struts configuration file."
    I have 't started my server.
    Thanks
    Kicha

  • Need help on struts configuration with ColdFusion 10 using IIS

    We need help on struts configuration with ColdFusion 10 using IIS.
    Earlier we were using ColdFusion 8 with IIS 6 for one of our application.  This application internally calls struts. After upgrading to ColdFusion 10 struts calls are not loading. We get 404 error.
    In ColdFusion 8 struts were configured using  actions extension .do in IIS from this file-
    C:\ColdFusion8\runtime\lib\wsconfig\jrun_iis6.dll.
    But in ColdFusion 10 this file is not present as ColdFusion 10 uses Tomcat in place of Jrun.
    Also there is no information in ColdFusion log file.

    Duane wrote:
    doctormirabilis, Welcome to the discussion area!
    1) how can i configure the time capsule in order to operate as a remote base station synchronizing with the relay using the ethernet port?
    Configure the Time Capsule to act as a bridge (not distributing IP addresses). Also configure the Time Capsule to create an 802.11n wireless network with a unique network name (SSID). That's it.
    2) how can i avoid that my powerbook while accessing my wireless network does connect through the relay station instead of using the time capsule?
    Configure the Time Capsule to use a different network name than the WDS link between the 2 AirPort Express (AX). Configure the PowerBook to use the Time Capsule network.
    There are 2 pieces of information that you should be aware of...
    (1) None of the PowerBooks are capable of 802.11n.
    (2) The WDS link cuts your available bandwidth in half. So the wireless link to your neighbor's has a maximum potential of 27 Mbps.
    Let's for a minute assume that you have a Mac compatible with 802.11n. In your configuration the time you could take advantage of the 802.11n speed is when the Mac is sending/recieving data directly from/to the Time Capsule.
    There would be NO speed increase in Internet access. The speed of Internet access is going to be controlled by the slowest link in the path to the Internet. That is probably the connection to the ISP. The next slowest path is the WDS link to your neighbor's.
    Duane,
    I am in a similar situation, sharing internet with my neighbor. Do you think it would be plausible to hook up a vonage phone adapter to time capsule's ethernet port if time capsule is bridging from my neighbor's router in the configuration you have described? A check of my upload speed shows 1.67Mbps (powerbookG4 w/ airport extreme). Vonage reccommends 90kbps minimum upload speed. Am I going to lose some speed putting the Vonag adapter behind time capsule?
    Thank you

  • 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.

  • How to  configure  for struts-config.xml

    Hi
    I am having a JSp which is Mapped to anothr action through the registration.The registartion is mapped to action
    <%@ page contentType="text/html;charset=UTF-8" %>
    <%@ page import="org.apache.struts.validator.ValidatorPlugIn" session="true" %>
    <%@ page import="org.apache.struts.Globals" %>
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <html:html locale="true">
    <head>
    <title><bean:message key="index.title"/></title>
    <html:base/>
    </head>
    <body bgcolor="white">
    <logic:notPresent name="<%= Globals.MESSAGES_KEY %>" >
      <font color="red">
        ERROR:  Application resources not loaded -- check servlet container
        logs for error messages.
      </font>
    </logic:notPresent>
    <%-- :TODO: Need code to do this with moudles
    <logic:notPresent name="<%= ValidatorPlugIn.VALIDATOR_KEY %>" >
      <font color="red">
        ERROR:  Validator resources not loaded -- check Commons Logging
        logs for error messages.
      </font>
    </logic:notPresent>
    --%>
    <h3><bean:message key="registrationForm.title"/>1222AAAAAAAAAAAAA</h3>
    <ul>
      <li><html:link action="Test.jsp">Test212121.jsp</html:link >
       <li><html:link action="/registration"><bean:message key="registrationForm.title"/></html:link></li>
       <%System.out.println("hellooooooooooooo");%>
       <!-- :TODO: Should have a non-JaveScript message-by-field example -->
       <li>
          <html:link action="/jsRegistration"><bean:message key="jsRegistrationForm.title"/></html:link> -
          <bean:message key="jsRegistrationForm.description"/>
       </li>
       <li>
          <html:link action="/multiRegistration"><bean:message key="multiRegistrationForm.title"/></html:link> -
          <bean:message key="multiRegistrationForm.description"/>
       </li>
    </ul>
    <a href="registration.jsp">Registration Test</a>
    <p> </p>
    <h3><bean:message key="typeForm.title"/></h3>
    <ul>
       <li>
          <html:link action="/type"><bean:message key="typeForm.title"/></html:link> -
          <bean:message key="typeForm.description"/>
       </li>
       <li>
          <html:link action="/editJsType"><bean:message key="jsTypeForm.title"/></html:link> -
          <bean:message key="jsTypeForm.description"/>
       </li>
    </ul>
    <p> </p>
    <h3>Change Language | Changez Le Langage</h3>
    <ul>
       <li><html:link action="/locale?language=en">English | Anglais</html:link></li>
       <li>
          <html:link action="/locale?language=fr">French | Francais</html:link> -
          <bean:message key="localeForm.fr"/>
       </li>
       <li>
          <html:link action="/locale?language=fr&country=CA">French Canadian | Francais Canadien</html:link> -
          <bean:message key="localeForm.frCA"/>
       </li>
       <li>
          <html:link action="/locale?language=ja" useLocalEncoding="true">Japanese | Japonais</html:link> -
          <bean:message key="localeForm.ja"/>
       </li>
    </ul>
    <p> </p>
    ==============struts-config.xml=================\<?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!--============================================== Form Bean Definitions -->
    <form-beans>
    <!-- Registration form bean -->
    <form-bean name="registrationForm" type="validator.RegistrationForm" />
    <!-- Multi-Part Registration form bean -->
    <form-bean name="multiRegistrationForm" type="validator.RegistrationForm" />
    <!-- Type form bean -->
    <form-bean name="typeForm" type="validator.TypeForm" />
    <!-- JavaScript Type form bean -->
    <form-bean name="jsTypeForm" type="validator.TypeForm" />
    </form-beans>
    <!-- ======================================== Global Forward Definitions -->
    <global-forwards>
    <forward name="home" path="/index.jsp" />
    </global-forwards>
    <!-- ========================================= Action Mapping Definitions -->
    <action-mappings>
    <action path="/welcome" forward="/index.jsp" />
    <!-- Registration Action
         -->
    <forward name="registration" path="/registration.do" /> //// ==========>here it is mapped
         <action path="/registration" forward="/registration.jsp" />
         <action path="/registration-submit" type="validator.RegistrationAction" name="registrationForm" scope="request" validate="true" input="input">
    <forward name="input" path="/registration.do" />
    <forward name="success" path="/index.jsp" />
    </action>
         <action path="/jsRegistration" forward="/jsRegistration.jsp" />
    <!-- Multi-Part Registration Action -->
    <action path="/multiRegistration" forward="/multiRegistration1.jsp" />
    <action path="/multiRegistration-submit" type="validator.MultiRegistrationAction" name="multiRegistrationForm" scope="request" validate="false">
    <forward name="success" path="/welcome.do" />
    <forward name="input1" path="/multiRegistration1.jsp" />
    <forward name="input2" path="/multiRegistration2.jsp" />
    </action>
    <!-- Type Action -->
    <action path="/type" forward="/type.jsp" />
    <action path="/type-submit" type="validator.TypeAction" name="typeForm" scope="request" validate="true" input="input">
    <forward name="input" path="/type.do" />
    <forward name="success" path="/welcome.do" />
    </action>
    <!-- JavaScript Type Action -->
    <action path="/editJsType" type="validator.EditTypeAction" scope="request" validate="false">
    <forward name="success" path="/jsType.do" />
    </action>
    <action path="/jsType" forward="/jsType.jsp" />
    <action path="/jsType-submit" type="validator.TypeAction" name="jsTypeForm" scope="request" validate="true" input="input">
    <forward name="input" path="/editJsType-submit.do?typeForm.reset=false" />
    <forward name="success" path="/welcome.do" />
    </action>
    <!-- Locale Action -->
    <action path="/locale" type="validator.LocaleAction" name="localeForm" scope="request">
    <forward name="success" path="/welcome.do" />
    </action>
    </action-mappings>
    <!-- ============================================= Controller Definition -->
    <controller inputForward="true" />
    <!-- ===================================== Message Resources Definitions -->
    <message-resources parameter="validator.MessageResources" />
    <!-- ============================================ Plug Ins Configuration -->
    <!--
    Add multiple validator resource files by setting the pathnames property
    with a comma delimitted list of resource files to load.
    -->
    <plug-in className="validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validator/validation.xml" />
    <set-property property="stopOnFirstError" value="true" />
    </plug-in>
    </struts-config>
    <html:img page="/struts-power.gif" altKey="index.powered"/>
    </body>
    </html:html>

    Hey,
    U can do it the way u want. Use DispatchAction Class instead of Action Class. Just go through the documentation for this. If u still have problem let me know.
    Thanks
    KM
    Hi,
    I am new to struts and when i am doing my application i find some >>difficulty i.e,
    I have two buttons on a jsp page Save,Delete.when I click on >>save ,saveAction must be called.if we click delete deleteAction to be >>called.
    for this how can I configure in struts-config.xml file. and how it >>knows which button has been clicked.
    Can any one please guid me.
    Thanks

  • Error regarding to the configuration of "Data Source" in Struts-config.xml

    Hi,
    Any 1 just help me out. I am using NetBeans 4.1 bundeled with Sun App server 8.1. Now I wanted to make the database connectivity with the front -end using"Data-source" tag in the struts-config.xml file . I am using the Oracle 9i as database.But I am not able to do it , it's showing me again and again error.I got realy fed up with this. I have checked the code as well as the the struts-config.xml file syntaxes with many other books and online resources, I couldn't find any sort of anomaly over here.So some 1 plzz help me regarding this as early as possible.I am attaching the Struts-config .xml file code as well as the error messaage over here.
    Struts-config.xml file code is...
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!-- ============================================ Data Source Configuration -->
    <data-sources>
    <data-source type="org.apache.commons.dbcp.BasicDataSource" key="RoseKey">
    <set-property
    property="driverClassName"
    value="oracle.jdbc.driver.OracleDriver" />
    <set-property
    property="url"
    value="jdbc:oracle:thin://10.31.8.49:1521:USGFS" />
    <set-property
    property="username"
    value="EPTP2DEV" />
    <set-property
    property="password"
    value="EPTP2DEV" />
    <set-property
    property="maxActive"
    value="10" />
    <set-property
    property="maxWait"
    value="5000" />
    <set-property
    property="defaultAutoCommit"
    value="false" />
    <set-property
    property="defaultReadOnly"
    value="false" />
    <!--set-property
    property="validationQuery"
    value="SELECT COUNT(*) FROM address" /-->
    </data-source>
    </data-sources>
    <!-- ======================================== Form Bean Definitions -->
    <form-beans>
    <form-bean
    name="AddressForm"
    type="app.AddressForm"/>
    <form-bean
    name="DVDForm"
    type="app.DVD"/>
    </form-beans>
    <!-- =================================== Global Forward Definitions -->
    <!--global-forwards>
    <forward
    name="logoff"
    path="/Logoff.do"/>
    <forward
    name="logon"
    path="/Logon.do"/>
    <forward
    name="welcome"
    path="/Welcome.do"/>
    </global-forwards-->
    <!--global-forward>
    <forward
    name="Address1"
    path="/pages/Address.jsp"/>
    </global-forward-->
    <!-- =================================== Action Mapping Definitions -->
    <action-mappings>
    <!--action
    path="/Welcome"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/Welcome.jsp"/>
    <action
    path="/Logon"
    type="org.apache.struts.actions.ForwardAction"
    parameter="/pages/Logon.jsp"/-->
    <action
    path="/Address"
    type="app.AddressAction"
    name="AddressForm"
    scope="request"
    validate="true"
    input="/pages/Address.jsp">
    <forward
    name="success"
    path="/pages/success.jsp"/>
    </action>
    <action
    path="/TestAction"
    type="app.TestAction">
    <forward
    name="testAction"
    path="/pages/TestAction.jsp"/>
    </action>
    <action
    path="/TestDVD"
    type="app.DVDAction"
    name="DVDForm">
    <forward
    name="testDVD"
    path="/pages/Movie.jsp"/>
    </action>
    <action
    path="/DataSource"
    type="app.TestDataSource">
    <forward
    name="joy"
    path="/pages/joy.jsp"/>
    </action>
    </action-mappings>
    <message-resources parameter="resources.ApplicationResources"/>
    </struts-config>
    And the error I am getting in the Server console is ..
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
    at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:261)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1093)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:931)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4183)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4536)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:827)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:147)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:809)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1279)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1006)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:160)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:238)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:918)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:905)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:427)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:139)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:288)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:155)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:258)
    at com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.java:87)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:361)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:396)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:702)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:302)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:357)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:272)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
    at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
    ... 92 more
    AND..
    javax.servlet.UnavailableException: Initializing application data source RoseKey
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:261)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1093)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:931)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4183)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4536)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:827)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:125)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:147)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:809)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1279)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1006)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:160)
    at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:238)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:918)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:905)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:427)
    at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:139)
    at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:288)
    at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:155)
    at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:258)
    at com.sun.enterprise.deployment.phasing.StartPhase.runPhase(StartPhase.java:87)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:361)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.start(PEDeploymentService.java:396)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.start(ApplicationsConfigMBean.java:702)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:302)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:357)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:272)
    at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:38)
    at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:92)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:69)
    at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Plz some1 help me as soon as possible with some ideas so that I can resolve the issue.

    Hi Amit Garg,
    <data-sources>
    <data-source type = "org.apache.commons.dbcp.BasicDataSource" key = "DBA">
    </data-source>
    <data-sources>
    <data-source type = "org.apache.commons.dbcp.BasicDataSource" key = "AISDEV">
    </data-source>
    </data-sources>
    u just configure ur struts-config.xml file in the above manner and use the following steps in ur action servlet to retrive the DataSource object
    getDatasource(request,"DBA") for accessing first datasource
    getDatasource(request,"AISDEV") for accessing second datasource.
    byeeeeee

  • Why dynamic table creation with struts working only for JDK1.3.1_02 version

    Row
    import java.util.Vector;
    public class Row
    private static int colsize;
    private Column[] columns;
    public void setColumns(Column[] columns)
    System.out.println("SetColumns");
    this.columns = columns;
    public void setColumn(int i, Column column)
         System.out.println("setting"+ i+"th column"+column);
    public Column[] getColumns()
    return null;
    public Column getColumns(int i)
    System.out.println("Column"+i);
    System.out.println("Colsize"+colsize);
    if(columns == null)
    columns= new Column[colsize];
    if(columns[i] == null)
    columns[i] = new Column();
    return columns;
    public int getColsize()
         return colsize;
    public static void setColsize(int size)
         colsize = size;
    Column:
    public class Column
    private String value;
    public void setValue(String value)
    System.out.println("Value="+value);
    this.value = value;
    public String getValue()
    return value;
    ApplicationResources:
    button.cancel=Cancel
    button.confirm=Confirm
    button.reset=Reset
    button.save=Save
    database.load=Cannot load database from {0}
    error.database.missing=<li>User database is missing, cannot validate logon credentials</li>
    error.fromAddress.format=<li>Invalid format for From Address</li>
    error.fromAddress.required=<li>From Address is required</li>
    error.fullName.required=<li>Full Name is required</li>
    error.host.required=<li>Mail Server is required</li>
    error.noSubscription=<li>No Subscription bean in user session</li>
    error.password.required=<li>Password is required</li>
    error.password2.required=<li>Confirmation password is required</li>
    error.password.match=<li>Password and confirmation password must match</li>
    error.password.mismatch=<li>Invalid username and/or password, please try again</li>
    error.replyToAddress.format=<li>Invalid format for Reply To Address</li>
    error.transaction.token=<li>Cannot submit this form out of order</li>
    error.type.invalid=<li>Server Type must be 'imap' or 'pop3'</li>
    error.type.required=<li>Server Type is required</li>
    error.username.required=<li>Username is required</li>
    error.username.unique=<li>That username is already in use - please select another</li>
    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}
    heading.autoConnect=Auto
    heading.subscriptions=Current Subscriptions
    heading.host=Host Name
    heading.user=User Name
    heading.type=Server Type
    heading.action=Action
    index.heading=MailReader Demonstration Application Options
    index.logon=Log on to the MailReader Demonstration Application
    index.registration=Register with the MailReader Demonstration Application
    index.title=MailReader Demonstration Application (Struts 1.0-b1)
    index.tour=A Walking Tour of the Example Application
    linkSubscription.io=I/O Error: {0}
    linkSubscription.noSubscription=No subscription under attribute {0}
    linkUser.io=I/O Error: {0}
    linkUser.noUser=No user under attribute {0}
    logon.title=MailReader Demonstration Application - Logon
    mainMenu.heading=Main Menu Options for
    mainMenu.logoff=Log off MailReader Demonstration Application
    mainMenu.registration=Edit your user registration profile
    mainMenu.title=MailReader Demonstration Application - Main Menu
    option.imap=IMAP Protocol
    option.pop3=POP3 Protocol
    prompt.autoConnect=Auto Connect:
    prompt.fromAddress=From Address:
    prompt.fullName=Full Name:
    prompt.mailHostname=Mail Server:
    prompt.mailPassword=Mail Password:
    prompt.mailServerType=Server Type:
    prompt.mailUsername=Mail Username:
    prompt.password=Password:
    prompt.password2=(Repeat) Password:
    prompt.replyToAddress=Reply To Address:
    prompt.username=Username:
    registration.addSubscription=Add
    registration.deleteSubscription=Delete
    registration.editSubscription=Edit
    registration.title.create=Register for the MailReader Demostration Application
    registration.title.edit=Edit Registration for the MailReader Demonstration Application
    subscription.title.create=Create New Mail Subscription
    subscription.title.delete=Delete Existing Mail Subscription
    subscription.title.edit=Edit Existing Mail Subscription
    LogonForm
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class LogonForm extends ActionForm
    private String username;
    private String password;
    private String errors;
    public String getUsername()
    return username;
    public void setUsername(String username)
    this.username = username;
    public void setPassword(String password)
    this.password = password;
    public String getPassword()
    return password;
    public String getErrors()
         return errors;
    public void setErrors(String errors)
         this.errors = errors;
    public ActionErrors validate(ActionMapping mapping,
    HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if ((username == null) || (username.length() < 1))
    errors.add("username", new ActionError("error.username.required"));
    if ((password == null) || (password.length() < 1))
    errors.add("password", new ActionError("error.password.required"));
    return errors;
    TableForm
    import org.apache.struts.action.ActionForm;
    import java.util.Vector;
    public class TableForm extends ActionForm
    private static int rowsize;
    private Row[] rows;
    public Row getRows(int i)
    System.out.println("Row"+i);
    System.out.println("Rowsize"+rowsize);
    if(rows == null)
    rows = new Row[rowsize];
    if(rows[i] == null)
    rows[i] = new Row();
    return rows[i];
    public Row[] getRows()
         return null;
    public void setRows(Row[] rows)
         System.out.println("SetRows");
         // this.rows=rows;
    public static void setRowsize(int size)
         rowsize = size;
    public int getRowSize()
         return rowsize;
    LogonAction
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Locale;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    import org.apache.struts.util.MessageResources;
    public class LogonAction extends Action
    public ActionForward execute(ActionMapping mapping,
                        ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
         throws IOException, ServletException {
    LogonForm logonForm = (LogonForm) form;
    System.out.println(logonForm);
    System.out.println(logonForm.getUsername());
    System.out.println(logonForm.getPassword());
    if(logonForm.getUsername().equals("test") && logonForm.getPassword().equals("test"))
    //TableForm tform = new TableForm();
    //tform.setRowsize(2);
    //tform.getRows(0).setColsize(2);
    //tform.getRows(1).setColsize(2);
    //request.getSession().setAttribute("tableForm",tform);
         System.out.println("Table Form setRowSize");
    TableForm.setRowsize(2);
         System.out.println("Table Form set ColSize");
    Row.setColsize(2);
         System.out.println("Returning success");
    return mapping.findForward("success");
    else
              ActionErrors errors = new ActionErrors();
              errors.add("password",
    new ActionError("error.password.mismatch"));
    saveErrors(request, errors);
    //logonForm.setErrors("LoginError");
    return mapping.findForward("failure");
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <!--
    This is the Struts configuration file for the example application,
    using the proposed new syntax.
    NOTE: You would only flesh out the details in the "form-bean"
    declarations if you had a generator tool that used them to create
    the corresponding Java classes for you. Otherwise, you would
    need only the "form-bean" element itself, with the corresponding
    "name" and "type" attributes.
    -->
    <struts-config>
    <form-beans>
    <!-- Logon form bean -->
    <form-bean name="logonForm"
    type="LogonForm"/>
    <form-bean name="tableForm"
    type="TableForm"/>
    <form-bean name="profileForm"
    type="ProfileForm"/>
    </form-beans>
    <global-forwards>
    <forward name="success" path="/Profile.jsp"/>
    </global-forwards>
    <!-- ========== Action Mapping Definitions ============================== -->
    <action-mappings>
    <!-- Edit user registration -->
    <action path="/logon"
    type="LogonAction"
    name="logonForm"
    scope="request"
    validate="false"
    input="/Test.jsp">
    <forward name="success" path="/Table.jsp"/>
    <forward name="failure" path="/Test.jsp"/>
    </action>
    <action path="/table"
    type="TableAction"
    name="tableForm"
    scope="request"
    validate="false">
    <forward name="success" path="/Bean.jsp"/>
    <forward name="failure" path="/Table.jsp"/>
    </action>
    <action path="/profile"
    type="ProfileAction"
    name="profileForm"
    scope="request"
    validate="false"
    parameter="method">
    <forward name="edit" path="/EditProfile.jsp"/>
    <forward name="show" path="/Profile.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Test.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/logon" >
    <center>
    <table>
    <tr>
    <td> Username </td>
    <td> <html:text property="username" size="16" maxlength="16"/> </td>
    <td> <html:errors property="username" /> </td>
    </tr>
    <tr>
    <td> Password </td>
    <td> <html:password property="password" size="16" maxlength="16"
    redisplay="false"/> </td>
    <td><html:errors property="password" /> </td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>
    Table.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/table" >
    <center>
    <table>
    <tr>
    <td> <html:text property="rows[0].columns[0].value" /> </td>
    <td> <html:text property="rows[0].columns[1].value" /></td>
    </tr>
    <tr>
    <td> <html:text property="rows[1].columns[0].value" /> </td>
    <td> <html:text property="rows[1].columns[1].value" /></td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>

    The above application runs only with JDK1.3.1_02 and not with any other version. This application is creating dynamic table using struts.
    Can anybody help me on the same
    also appending web.xml contents:
    <?xml version="1.0" ?>
    <!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>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--Welcome file list starts here -->
    <welcome-file-list>
    <welcome-file>
    /test.jsp
    </welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <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-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    validate-rules.xml
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
    This file contains the default Struts Validator pluggable validator
    definitions. It should be placed somewhere under /WEB-INF and
    referenced in the struts-config.xml under the plug-in element
    for the ValidatorPlugIn.
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    These are the default error messages associated with
    each validator defined in this file. They should be
    added to your projects ApplicationResources.properties
    file or you can associate new ones by modifying the
    pluggable validators msg attributes in this file.
    # Struts Validator Error Messages
    errors.required={0} is required.
    errors.minlength={0} can not be less than {1} characters.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.invalid={0} is invalid.
    errors.byte={0} must be a byte.
    errors.short={0} must be a short.
    errors.integer={0} must be an integer.
    errors.long={0} must be a long.
    errors.float={0} must be a float.
    errors.double={0} must be a double.
    errors.date={0} is not a date.
    errors.range={0} is not in the range {1} through {2}.
    errors.creditcard={0} is an invalid credit card number.
    errors.email={0} is an invalid e-mail address.
    -->
    <form-validation>
    <global>
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    <javascript><![CDATA[
    function validateRequired(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oRequired = new required();
    for (x in oRequired) {
         var field = form[oRequired[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'file' ||
    field.type == 'select-one' ||
    field.type == 'radio' ||
    field.type == 'password') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (trim(value).length == 0) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oRequired[x][1];
         isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    ]]>
    </javascript>
    </validator>
    <validator name="requiredif"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequiredIf"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    </validator>
    <validator name="minlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMinLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.minlength">
    <javascript><![CDATA[
    function validateMinLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMinLength = new minlength();
    for (x in oMinLength) {
    var field = form[oMinLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMin = parseInt(oMinLength[x][2]("minlength"));
    if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMinLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="maxlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMaxLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.maxlength">
    <javascript><![CDATA[
    function validateMaxLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMaxLength = new maxlength();
    for (x in oMaxLength) {
    var field = form[oMaxLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMax = parseInt(oMaxLength[x][2]("maxlength"));
    if (field.value.length > iMax) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMaxLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="mask"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMask"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.invalid">
    <javascript><![CDATA[
    function validateMask(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMasked = new mask();
    for (x in oMasked) {
    var field = form[oMasked[x][0]];
    if ((field.type == 'text' ||
    field.type == 'textarea') &&
    (field.value.length > 0)) {
    if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMasked[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    function matchPattern(value, mask) {
    return mask.exec(value);
    }]]>
    </javascript>
    </validator>
    <validator name="byte"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateByte"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.byte"
    jsFunctionName="ByteValidations">
    <javascript><![CDATA[
    function validateByte(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oByte = new ByteValidations();
    for (x in oByte) {
         var field = form[oByte[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
                                  field.type == 'radio') {
                                  var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oByte[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="short"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateShort"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.short"
    jsFunctionName="ShortValidations">
    <javascript><![CDATA[
    function validateShort(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oShort = new ShortValidations();
    for (x in oShort) {
         var field = form[oShort[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oShort[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="integer"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateInteger"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.integer"
    jsFunctionName="IntegerValidations">
    <javascript><![CDATA[
    function validateInteger(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oInteger = new IntegerValidations();
    for (x in oInteger) {
         var field = form[oInteger[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                  if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
         focusField = field;
                                  fields[i++] = oInteger[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oInteger[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    function isAllDigits(argvalue) {
    argvalue = argvalue.toString();
    var validChars = "0123456789";
    var startFrom = 0;
    if (argvalue.substring(0, 2) == "0x") {
    validChars = "0123456789abcdefABCDEF";
    startFrom = 2;
    } else if (argvalue.charAt(0) == "0") {
    validChars = "01234567";
    startFrom = 1;
    } else if (argvalue.charAt(0) == "-") {
    startFrom = 1;
    for (var n = startFrom; n < argvalue.length; n++) {
    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
    return true;
    }]]>
    </javascript>
    </validator>
    <validator name="long"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateLong"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.long"/>
    <validator name="float"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateFloat"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.float"
    jsFunctionName="FloatValidations">
    <javascript><![CDATA[
    function validateFloat(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oFloat = new FloatValidations();
    for (x in oFloat) {
         var field = form[oFloat[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
         var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    // remove '.' before checking digits
    var tempArray = value.split('.');
    var joinedString= tempArray.join('');
    if (!isAllDigits(joinedString)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    } else {
         var iValue = parseFloat(value);
         if (isNaN(iValue)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oFloat[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="double"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDouble"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.double"/>
    <validator name="date"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDate"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.date"
    jsFunctionName="DateValidations">
    <javascript><![CDATA[
    function validateDate(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oDate = new DateValidations();
    for (x in oDate) {
    var value = form[oDate[x][0]].value;
    var datePattern = oDate[x][2]("datePatternStrict");
    if ((form[oDate[x][0]].type == 'text' ||
    form[oDate[x][0]].type == 'textarea') &&
    (value.length > 0) &&
    (datePattern.length > 0)) {
    var MONTH = "MM";
    var DAY = "dd";
    var YEAR = "yyyy";
    var orderMonth = datePattern.indexOf(MONTH);
    var orderDay = datePattern.indexOf(DAY);
    var orderYear = datePattern.indexOf(YEAR);
    if ((orderDay < orderYear && orderDay > orderMonth)) {
    var iDelim1 = orderMonth + MONTH.length;
    var iDelim2 = orderDay + DAY.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderDay && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderDay) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[2], matched[1], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
    var iDelim1 = orderDay + DAY.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[1], matched[2], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
    var iDelim1 = orderYear + YEAR.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
    } else if (iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
    } else {
    dateRegexp = new Reg

  • Opening a New page on click of a link in Struts PDK portlet

    Hi All,
    Please help me to sort out my issue..
    I created a portlet(say P1) using struts Portlet.That portlet is added to a portal page..which has some other portlets already(p2,p3,p4)...So my portal page has 4 portlets p1,p2,p3,p4..In Portlet P1 There is JSP which has a link inside...When i click on the link..I need to open a new JSP page with some prepopulated data inside it..Now the problem is..it is opening a page with data..but in the new page i am seeing all the remaining portlets as well..P1(with new data),P2,P3,P4 portlet..
    But i need to see only the JSP page with my new content..please help me with this..
    Here is the code...what i have written
    INDEX.JSP
    <%@ page contentType="text/html; charset=windows-1252"
    import="java.io.File, java.io.FilenameFilter"
    %>
    <%@ taglib uri="/WEB-INF/tlds/struts/pdk-struts-html.tld" prefix="html" %>
    <html>
    <head>
    <title>
    Struts Sample Portlet - Hello World...
    </title>
    <body>
    <html:link action="/sayActionHello" target="_blank">My Link</html:link>
    </body></html>
    ACTION CLASS
    public class SayHelloAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    System.out.println("Inside execute ................................");
    PortletRenderRequest pReq = (PortletRenderRequest)
         request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    ProviderSession pSession = pReq.getSession();
    if(null != pSession){
         System.out.println("Inside---pSession...........................");
         pSession.setAttribute("sample","Sample Data for Testing");
    return mapping.findForward("success");
    Provider.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>samstruts</name>
    <title>samstruts</title>
    <description>sample struts Portlet Description</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
    <defaultAction>/sayHello.do</defaultAction>
    </showPage>
    </renderer>
    </portlet>
    </provider>
    Strutss-config
    PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <action-mappings>
    <action path="/sayHello" scope="session" type="com.up.tey.SayHelloAction">
    <forward name="success" path="/jsp/index.jsp"/>
    </action>
    <action path="/sayActionHello" scope="session" type="com.u p.tey.SayHelloAction1" input="/htdocs/jsps/index.jsp">
    <forward name="success" path="/jsps/indexsample.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Indexsample.jsp
    <%@ page contentType="text/html; charset=windows-1252"
    import="java.io.File, java.io.FilenameFilter"
    %>
    <%@ taglib uri="/WEB-INF/tlds/struts/pdk-struts-html.tld" prefix="html" %>
    <html>
    <head>
    <title>
    Struts Sample Portlet - Hello World...
    </title>
    <body>
    <h1>HELLO WORLD Sample using Struts !!!!!!<%=session.getAttribute("sample")%></h1>
    </body></html>
    In new window i am cing Indexsample.jsp inside my P1 portlet..But the remaining 3 portlets(p2,p3,p4) are also there..Which i dont want..Please Help..this is really very urgent for me..

    HI
    i am also facing same problem with session but in simple portlet with ajax implementation.
    i am setting session in portlet jsp with following code using oracle application server portal 10g.
    (here portlet jsp means which is included from portlet.)
    session.setAttribute("map",map);(here session is implicit object )
    i want to call ajax jsp from portlet jsp with below code.(i.e setting session in portlet jsp and accessing in ajax jsp)
    var url = "<%=renderRequest.getContextPath()%>/AjaxProcessRequest.jsp?q=" + random;
    var pars = '&namespace=<portlet:namespace/>' +'&imagesPath=' + '<%=imagesPath%>';
    var myAjax = new Ajax.Updater(
    {success: 'emailbody'},
    url,
    method: 'get',
    parameters: pars,
    onFailure: reportError,
    evalScripts: true
    i am accessing map object from session in my AjaxProcessRequest.jsp as shown in below code.
    Map map=(Map)session.getAttribute("map"); (here session is implicit object )
    here map object is getting null from session.
    Please help on this if u know about this session.
    Regards
    Raju

  • Hello Word Struts 2.0 Application not working in JDeveloper 10.1.3.2

    Dear All,
    I have created Hello Word Application in Struts 2.0 in JDeveloper. It gives following Exception:
    java.net.ProtocolException: Server redirected too many times (20)
         at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
         at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
         at org.apache.commons.digester.Digester.resolveEntity(Digester.java:1617)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:533)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:491)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:302)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
         at org.apache.commons.digester.Digester.parse(Digester.java:1745)
         at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:745)
         at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:686)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:353)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2361)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4810)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4734)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4922)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1134)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:738)
         at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
         at com.evermind.server.Application.getHttpApplication(Application.java:571)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1973)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.getHttpApplication(HttpSite.java:1925)
         at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:424)
         at com.evermind.server.http.HttpRequestHandler.resolveApplication(HttpRequestHandler.java:392)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:433)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    Aug 3, 2010 5:17:29 PM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
    INFO: Parsing configuration file [struts-default.xml]
    Please give your inputs as early as possible.
    Thanks & Regards

    Dear John,
    Yes, Jdev 10.X only support Struts 1.0 but i have configure Struts 2.0 supported all Lib files in JDev and also please find entries of Struts-config.xml and web.xml file below:
    Struts-config.xml :_
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts-config>
    <message-resources parameter="view.ApplicationResources"/>
    <!--constant name="struts.enable.DynamicMethodInvocation" value="false"/>
    <constant name="struts.devMode" value="false"/>
    <constant name="struts.custom.i18n.resources" value="ApplicationResources"/-->
    <package name="default" extends="struts-default" namespace="/">
    <action name="login" class="net.viralpatel.struts2.LoginAction">
    <result name="success">Welcome.jsp</result>
    <result name="error">Login.jsp</result>
    </action>
    </package>
    </struts-config>
    And Web.xml file :_
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <description>Empty web.xml file for Web Application</description>
    <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>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>
    org.apache.struts2.dispatcher.FilterDispatcher
    </filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <welcome-file-list>
    <welcome-file>Login.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    Also as par your last reply, eventhough i got the same exception.
    Please give your inputs and let me know if you want more information.
    Thanks,

  • ERROR while devevloping a struts application

    I am new to struts and trying to develop a simplem applicationusing struts,during which i am gettin an expextion of this sort.I have already placed both struts-core 2.2.1 and xcore 2.2.1 in WEB-INF/lib folder.please help
    SEVERE: Exception starting filter struts2
    java.lang.NoClassDefFoundError: org/apache/struts/action/Action
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1960)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:933)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1405)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
         at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:149)
         at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:107)
         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:410)
         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:479)
         at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
         at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
         at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
         at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
         at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
         at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
         at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
         at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
         at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
         at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
         at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3666)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4258)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:980)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:943)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1203)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

    I was able to rectify that error by placing the struts-core-1.3.10.jarinto the WEB-INf/lib folder.
    But now i am gettin an exception durin the run time
    java.lang.NoSuchMethodException: manipulation.AdditionAction.execute()
         java.lang.Class.getMethod(Unknown Source)
         org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.getActionMethod(AnnotationValidationInterceptor.java:75)
         org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:47)
         com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
         com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
         com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
         com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
         com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
         org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
         org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
    my jsp pages are:
    addition.jsp:
    <%@taglib uri="/struts-tags" prefix="html" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Sample Application</title>
    </head>
    <body>
    <html:form action="Add">
    <html:textfield name="number1" label="Number1" />
    <html:textfield name="number2" label="Number2" />
    <html:submit value="Add" />
    </html:form>
    </body>
    </html>
    success.jsp:
    <html>
    <head>
    <title>Sample Struts Display Name</title>
    </head>
    <body>
    <table width="80%" border="0">
    <tr>
    <td>Addition: <%= request.getAttribute("sum") %> !!</td>
    </tr>
    </table>
    </body>
    </html>
    struts-config.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <form-beans>
    <form-bean name="Addform" type="manipulation.Addform"/>
    </form-beans>
    <global-exceptions>
    </global-exceptions>
    <global-forwards>
    <forward name="welcome" path="/Welcome.do"/>
    </global-forwards>
    <action-mappings>
    <action name="Add" class="manipulation.AdditionAction">
    <forward name="success" path="/success.jsp" />
    <forward name="failure" path="/failure.jsp" />
    </action>
    <action path="/Welcome" forward="/welcomeStruts.jsp"/>
    </action-mappings>
    </struts-config>
    Addform.java:
    package manipulation;
    public class Addform extends org.apache.struts.action.ActionForm
         private int number1;
         private int number2;
         private int sum;
         public Addform()
    }public String getSum()
         return("Result:"+sum);
              }public void setSum(int no1,int no2)
         this.number1=no1;
         this.number2=no2;
         sum=no1+no2;
    } public int getnumber1() {
    return number1;
    } public void setNumber1(int number) {
    this.number1 = number;
    } public int getnumber2 (){
    return number2;
    } public void setNumber2(int number) {
    this.number2= number;
    AdditionAction.java:
    package manipulation;
    import java.io.IOException;
    import javax.servlet.ServletException;
    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 class AdditionAction extends org.apache.struts.action.Action
         private static final String SUCCESS = "success";
    public ActionForward execute(ActionMapping mapping,ActionForm form,
    HttpServletRequest request, HttpServletResponse response)throws Exception {
         int no1=0;
         int no2=0;
    if ( form != null )
    // Use the NameForm to get the request parameters
    Addform formadd = (Addform) form;
    no1 =formadd.getnumber1() ;
    no2=formadd.getnumber2();
    // if no mane supplied Set the target to failure
    request.setAttribute("number1", no1);
    request.setAttribute("number2", no2);
              return (mapping.findForward(SUCCESS));
    please help...
    }

  • 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...

  • Error 404: No target servlet configured for uri: +websphere 6.0

    My server is running properly, but I got Error 404: No target servlet configured for uri: error while launching my project on web sphere 6.0
    see my web.xml and strut-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    id="WebApp_ID"
    version="2.4"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>supportPortalWeb</display-name>
    <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/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>OrganizationDataServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.OrganizationDataServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>OrderProcessingServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ordermgmt.OrderProcessingServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>OrganizationValidationServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.OrganizationValidationServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProductValidationServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ProductValidationServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProductGradeServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ProductGradeServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>action_tmp</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>3</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrganizationDataServlet</servlet-name>
    <url-pattern>/servlet/OrganizationDataServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrderProcessingServlet</servlet-name>
    <url-pattern>/servlet/OrderProcessingServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrganizationValidationServlet</servlet-name>
    <url-pattern>/servlet/OrganizationValidationServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProductValidationServlet</servlet-name>
    <url-pattern>/servlet/ProductValidationServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProductGradeServlet</servlet-name>
    <url-pattern>/servlet/ProductGradeServlet</url-pattern>
    </servlet-mapping>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring-config/spring-config.xml</param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <jsp-config>
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <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-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/epc.tld</taglib-uri>
    <taglib-location>/WEB-INF/supportportal.tld</taglib-location>
    </taglib>
    </jsp-config>
    <resource-ref>
    <res-ref-name>jdbc/SupportPortalDataSource</res-ref-name>
    <res-type>java.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    <!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>
         <!-- Data Sources -->
         <data-sources />
         <!-- Form Beans -->
         <form-beans>
              <form-bean name="signOnHandlerForm" type="com.harcourt.supportportal.struts.signon.actionform.SignOnHandlerForm" />
              <form-bean name="signOffHandlerForm" type="com.harcourt.supportportal.struts.signon.actionform.SignOffHandlerForm" />
              <form-bean name="updatePersonForm" type="com.harcourt.supportportal.struts.sample.actionform.UpdatePersonForm" />
              <form-bean name="searchPersonsForm" type="com.harcourt.supportportal.struts.sample.actionform.SearchPersonsForm" />
              <form-bean name="updateProductForm" type="com.harcourt.supportportal.struts.product.actionform.UpdateProductForm"/>
              <form-bean name="searchProductsForm" type="com.harcourt.supportportal.struts.product.actionform.SearchProductsForm"/>
              <form-bean name="searchOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.SearchOrganizationForm"/>
              <form-bean name="updateOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.UpdateOrganizationForm"/>
              <form-bean name="exportOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.ExportOrganizationForm"/>
              <form-bean name="exportProductForm" type="com.harcourt.supportportal.struts.product.actionform.ExportProductForm"/>           
         </form-beans>
         <!-- Global Exceptions -->
         <global-exceptions />
         <!-- Global Forwards -->
         <!-- Action Mappings -->
         <action-mappings type="org.apache.struts.config.SecureActionConfig">
              <action
                   path="/start"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="loginRendererDef"/>
    <!--          <action -->
    <!--               path="/product"-->
    <!--               type="org.apache.struts.actions.ForwardAction"-->
    <!--               parameter="productInputDef"/>-->
              <action path="/product" type="org.springframework.web.struts.DelegatingActionProxy"
                        name="updateProductForm" parameter="method" scope="request" validate="false">
                   <forward name="success" path="productInputDef"/>
                   <forward name="failure" path="productInputDef"/>
              </action>
    <!--          <action -->
    <!--               path="/organization"-->
    <!--               type="org.apache.struts.actions.ForwardAction"-->
    <!--               parameter="organizationIndexDef"/>-->
              <action
                   path="/report"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="reportIndexDef"/>
              <action
                   path="/user"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="userIndexDef"/>
              <action path="/login" type="org.springframework.web.struts.DelegatingActionProxy" name="signOnHandlerForm" scope="request" input="loginRendererDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />
              <forward name="failure" path="loginRendererDef" />
    </action>
    <!-- sample -->
         <action path="/updatePerson" type="org.springframework.web.struts.DelegatingActionProxy" name="updatePersonForm" scope="request" input="productInputDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="personIndexDef" />
              <forward name="failure" path="personInputDef" />
    </action>
         <action path="/searchPersons"
                   type="org.springframework.web.struts.DelegatingActionProxy"
                   name="searchPersonsForm"
                   scope="request"
                   parameter="method"
                   validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="personIndexDef" />          
              <forward name="failure" path="loginRendererDef" />
    </action>
         <!-- end sample -->
         <action path="/updateProduct" type="org.springframework.web.struts.DelegatingActionProxy"
                   name="updateProductForm" parameter="method" scope="request" input="productInputDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />          
              <forward name="failure" path="/product.do?method=createOrUpdateProduct" />
    </action>
    <action path="/deleteProduct" type="org.springframework.web.struts.DelegatingActionProxy"
                   name="updateProductForm" parameter="method" scope="request" validate="false">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />          
              <forward name="failure" path="/product.do?method=createOrUpdateProduct" />
    </action>
    <action path="/searchProducts"
                   type="org.springframework.web.struts.DelegatingActionProxy"
                   name="searchProductsForm"
                   scope="request"
                   parameter="method"
                   validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="productSearchDef" />
              <forward name="failure" path="loginLandingDef"/>
    </action>
    <action path="/loadProducts" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchProductsForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="productIndexDef"/>
         <forward name="failure" path="userIndexDef"/>
    </action>
    <action path="/exportProduct" type="org.springframework.web.struts.DelegatingActionProxy"
              name="exportProductForm" parameter="method" scope="request" validate="true">
              <forward name="failure" path="loginLandingDef" />
    </action>
    <!-- Organization Actions -->
    <action path="/searchOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchOrganizationForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="orgSearchDef"></forward>
         <forward name="failure" path="loginLandingDef"/>
         </action>
    <action path="/organization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="updateOrganizationForm" parameter="method" scope="request" validate="false">
         <set-property property="secure" value="false"/>
              <forward name="success" path="orgInputDef" />          
              <forward name="failure" path="loginLandingDef" />
    </action>
    <action path="/loadOrganizations" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchOrganizationForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="orgIndexDef" />          
              <forward name="failure" path="loginLandingDef" />
    </action>
    <action path="/updateOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="updateOrganizationForm" parameter="method" scope="request" input="orgInputDef" validate="true">
                   <forward name="success" path="/loadOrganizations.do?method=loadOrganizations"></forward>
                   <forward name="failure" path="/organization.do?method=createOrUpdateOrganization"/>               
              </action>
              <action path="/exportOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="exportOrganizationForm" parameter="method" scope="request" >
              <forward name="failure" path="loginLandingDef" />
    </action>
         </action-mappings>
         <!-- Register Support Portal RequestProcessor -->
         <controller>
              <set-property property="processorClass" value="com.harcourt.supportportal.struts.common.action.SupportPortalRequestProcessor" />
         </controller>
         <!-- Message Resources -->
         <message-resources parameter="com.harcourt.supportportal.resources.ApplicationResources" />
         <!-- tiles plugin -->
    <plug-in className="com.harcourt.supportportal.tiles.SupportPortalSecureTilesPlugin">
         <set-property property="definitions-config" value="/WEB-INF/tiles-def/tiles-defs.xml" />
         <set-property property="httpPort" value="80"/>
    <set-property property="httpsPort" value="80"/>      
    <set-property property="enable" value="false"/>      
    <set-property property="addSession" value="false"/>      
    </plug-in>
         <!-- spring plugin -->
         <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
         <set-property property="contextConfigLocation" value="/WEB-INF/spring-config/spring-config.xml"/>
         </plug-in>
    </struts-config>

    If your EAR has actually started, try this:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/xrun_jvm_sendredirect.html
    If you are not on z/OS, the link is actually under server->server infrastructure->Java and process management->environment entries
    for setting the property

  • Struts servlet failed to load on application startup

    I am having problems deploying a struts application on WebLogic 8.1 SP3. I get the following error on startup.
    Call com.manu.cro.online.ui.KarmaActionServlet.addMapping(ActionMapping[path=/routingPost, type=com.manu.cro.online.ui.routing.RoutingPostAction])
    Pop org.apache.struts.action.ActionMapping
    register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/C:/CVS_Source/NCRO/lib/GUI/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd'
    register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/C:/CVS_Source/NCRO/lib/GUI/struts.jar!/org/apache/struts/resources/web-app_2_2.dtd'
    register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/C:/CVS_Source/NCRO/lib/GUI/struts.jar!/org/apache/struts/resources/web-app_2_3.dtd'
    resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd')
    Resolving to alternate DTD 'jar:file:/C:/CVS_Source/NCRO/lib/GUI/struts.jar!/org/apache/struts/resources/web-app_2_2.dtd'
    Call com.manu.cro.online.ui.KarmaActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String)
    <Jul 18, 2007 9:13:39 AM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "cro".
    javax.servlet.ServletException
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:909)
         at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:873)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:812)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3226)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)
         at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:694)
         at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
         at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
         at weblogic.Server.main(Server.java:32)
    Any reason why my action servlet is not loading? Any help will be appreciated.
    My web.xml file looks like the 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/j2ee/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- Action Servlet Configuration -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>com.manu.cro.online.ui.KarmaActionServlet</servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>com.manu.cro.online.ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- The Usual Welcome File List -->
    <welcome-file-list>
    <welcome-file>jsp/online/Logon.jsp</welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <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-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/croUtils.tld</taglib-uri>
    <taglib-location>/WEB-INF/croUtils.tld</taglib-location>
    </taglib>
    </web-app>
    Thanks.
    gtata

    This problem has been resolved. It was a classpath issue.

  • Java.lang.ClassCastException in simple struts application. please help me!

    I have a simple struts application, it only have a login form. however, it's alway throw java.lang.ClassCastException when I submit the form. Here is full stack trace:
    14-03-2007 17:04:50 org.apache.struts.chain.ComposableRequestProcessor init
    INFO: Initializing composable request processor for module prefix ''
    14-03-2007 17:04:50 org.apache.struts.chain.commands.servlet.CreateAction getAction
    INFO: Initialize action of type: ndlinh.struts.lab.RegistrationForm
    14-03-2007 17:04:50 org.apache.struts.chain.commands.AbstractExceptionHandler execute
    WARNING: Unhandled exception
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         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(Thread.java:595)
    14-03-2007 17:04:50 org.apache.struts.chain.commands.ExceptionCatcher postprocess
    WARNING: Exception from exceptionCommand 'servlet-exception'
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         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(Thread.java:595)
    Here is my code:
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class RegistrationForm extends ActionForm {
         private String userid = null;
         private String password = null;
         private String password2 = null;
         public RegistrationForm() {
              System.out.println("************ Registration Form created *************");
          * @return the password
         public String getPassword() {
              return password;
          * @param password the password to set
         public void setPassword(String password) {
              this.password = password;       
          * @return the password2
         public String getPassword2() {
              return password2;
          * @param password2 the password2 to set
         public void setPassword2(String password2) {
              this.password2 = password2;
          * @return the userid
         public String getUserid() {
              return userid;
          * @param userid the userid to set
         public void setUserid(String userid) {
              this.userid = userid;
         public void reset(ActionMapping arg0, HttpServletRequest arg1) {
              userid = "";
              password = "";
              password2 = "";
    package ndlinh.struts.lab;
    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 RegistrationAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
                                             HttpServletRequest request, HttpServletResponse response)
              try {
                   System.out.println("*******************" + actionForm.toString() + "*******************");
                   RegistrationForm form = (RegistrationForm)actionForm;     
                   String username = form.getUserid();
                   String password = form.getPassword();
                   System.out.println(username);
                   // simple login checking.
                   // if userid equals password, user can login to system
                   if ( username.equalsIgnoreCase(password)) {
                        return mapping.findForward("success");
                   } else {
                        return mapping.findForward("failure");
              } catch (Exception e) {
                   e.printStackTrace();
                   return mapping.findForward("failure");
    }registration.jsp
    <%@ 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" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
         <html:form action="/register">
              Username: <html:text property="userid" /> <br />
              Password: <html:password property="password" /> <br />
              Re-type: <html:password property="password2" />
              <html:submit value="Register" />
         </html:form>
    </body>
    </html>struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!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="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationForm"
                   name="registrationForm"
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.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>
    </web-app>System information:
    Tomcat 5.5.20
    Struts 1.3.5
    JDK1.5.08

    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!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="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationAction" // action class
                   name="registrationForm" // form bean name
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>HTH

Maybe you are looking for

  • Getting "java.lang.NullPointerException" error message when trying to run an OATS OpenScript file from Eclipse to Create a record in Oracle EBS

    Hello, I'm trying to run a simple OpenScript script in Eclipse that creates a record (a Supplier in this case) in Oracle E-Business Suite. So I copied the the script file from OpenScript and created it as a Class in Eclipse.  Then I created a main cl

  • Peer to Peer Airplay w Apple TV and iPhone?

    I want to do peer to peer screen sharing from my iphone 5 (ios 8.1) to my new Apple TV (model A1469, 7.0.1 (6912) software). We don't have WIFI in the office and that's why I want to do peer to peer.  I can't get my phone to find the Apple TV when I

  • Yes I am trying to edit one of my webpages with Dreamweaver

    Yes I am trying to edit one of my one colum, head footer, for my website and I am not cerrtain how to align the object I pasted in here. Could you align this so I can type next to the object I put there. thank you here is it is dont laugh to hard. ht

  • Context independant condition

    Hi everyone, I've got the next question: when I create a condition on a table in ODI and want to use a user defined procedure/function created in the database I have to use a qualifier (schemaname) in front of the procedure/function (E.g. TEST.ISDATE

  • Can't turn off webcam

    Hello, I have Creative Video Blaster WebCam 5 and it has been working just fine until now. The green led is on all the time and programs like Skype etc. say that the camera is in use by another program although there is no other program active. I hav