SSLEXT With Struts 1.1. and Tiles

Struts 1.1 (with tiles)
Java 1.5
Tomcat 5.5.9
MySQL 5.0
I have downloaded the sslext.jar from sourcefourge, in an attempt to implement transparent switching betweek http and https action mappings.
I have followed the implementation guide here http://www.devarticles.com/c/a/Java/Securing-Struts-Applications/7/
Once I have implemented, built and deployed the application I get the following error:
TilesPlugin : Specified RequestProcessor not compatible with TilesRequestProcessorI have tracked this down to the following line in the struts-config.xml
<controller processorClass="org.apache.struts.action.SecureRequestProcessor"/>It seems that there is a compatability issue with the sslext SecureRequestProcessor class and implementing tiles.
Has anyone come accross this before? Is there a solution?
Thanks.

Any ideas anyone?
or has anyone a method of switching transparently between http and https using another method? perhaps a servlet filter?

Similar Messages

  • Clean URL in Struts and Tiles

    Hi,
    I was trying to implement an application which will have Clean URL. e.g. http://something/user/john in Struts. I mapped ActionServlet to / (and not *.do). Following is my web.xml entries:
    <servlet-mapping>
              <servlet-name>default</servlet-name>
              <url-pattern>*.css</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>default</servlet-name>
              <url-pattern>*.js</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>default</servlet-name>
              <url-pattern>*.png</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>default</servlet-name>
              <url-pattern>*.jpg</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
              <servlet-name>default</servlet-name>
              <url-pattern>*.jsp</url-pattern>
         </servlet-mapping>
         <!-- Default mapping to Struts action Servlet -->
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>/</url-pattern>
         </servlet-mapping>Hence for every URL entry like http://something/user my /user action config is called:
    <action path="/user"
                   type="myaction.UserAction">
                   <forward name="success" path="/User.jsp" />
                   <forward name="fail" path="/User.jsp" />
         </action>This works absolutely fine. But when I want to integrate tiles with this and change <forward> to:
    <forward name="success" path="/tiles.home" />It doesnt work. It tries to search tiles.home in struts-config.xml as an action. My tiles-config.xml is proper and I have an entry for tiles in my struts-config too.
    Has anybody ever tried to implement such an application with Clean URL and Tiles in Struts?

    Right so these where messages from the JSP compile or from the import process?

  • Struts and Tiles Problem:compiler error message

    I imported the application "tiles-documentation.war" from jakarta-struts-1.1 into the newly installed JDevloper(Version 9.0.5.2 Build 1618) and try to make it running.
    While with the former Jdeveloper 9.0.4 I can run it nicely(a few manual editing of some files, though), with this newer version I just can not proceed with the following error message.
    Project: D:\jdev\mywork\oc4j_startup\tiles_doc\tiles_doc.jpr
    D:\jakarta-struts-1.1\webapps\tiles-documentation\tutorial\common\menu.jsp
    Error: package and class have same name: tutorial.common._menu
    the same kind of message repeated many many times.
    It seems that I can not probe any more...
    Can someone help me out? Thanks in advance

    Right so these where messages from the JSP compile or from the import process?

  • Need a help with Struts Tiles dynamic menu

    Hello,
    I am started few days ago with Tiles, try to develop web application.
    Can anybody sugest very simple example with Tiles and menu.
    So my definition looks like this:
    tiles-def.xml
    <tiles-definitions>
    <definition name="MainDefinition" path="/layouts/myLayout.jsp">
    <put name="title" value="This is the title." />
    <put name="header" value="/tiles/header.jsp" />
    <put name="menu" value="/tiles/menu.jsp" />
    <put name="body" value="/tiles/body.jsp" />
    <put name="footer" value="This is the footer." />
    </definition>
    I am simple layout.
    I need to on menu click change body content, now i am doing it like this:
    index.jsp
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%String body = request.getParameter("body");%>
    <tiles:insert definition="MainDefinition" flush="true">
    <tiles:put name="body" type="string"> <%= body %> </tiles:put>
    </tiles:insert>
    But now body is a string how to make it open url?
    Maybe somebody have link to menu Tiles good examples.
    Thanks

    But here's some useful advice :P
    I'm going to assume that the other two people involved in this have a bit more experience, have them do most of the designing. Have them leave most of the easy stuff for you. You can then spend your time learning the minimum of what you need to know. And if you have problems, or don't understand things, ask your partners for help.
    And you'll want to set some spare time for you to all get together and do something fun so that you don't kill each other because of the stress :P
    I've had a lot of bad project experiences, fortunatly they where all just at school :P I blame myself, mainly because I didn't do the whole thing myself (mostly because I listened to people when they said that I shouldn't or couldn't do everything myself.) I'd like to say that it's mostly because of poor communication, and disorganization, but an awful lot of it had to do with the fact that I tend to be the only person with any work ethic what so ever.
    But whinning and repressed memories aside, good communication and organization help a lot. Come up with a good system with your team mates. And don't be afraid to ask questions. And don't worry about dividing up the work load equally. Just make sure you put in a good amount of effort, if not frightening amounts.
    If all of you are clueless, divide up the learning stuff between yourselves too.
    I have no experience with Struts. I've done a bit of stuff with XML, but nothing too complicated. The XML by itself tends to be extremely easy. What you plan on doing with it can vary (I don't like XML incidentally :P)
    Other then that, good luck.

  • Problem with Pop up windows and struts

    Hi
    I have problem in working with pop-up windows and struts.
    I have parent page which basically lists some data and has a button for adding new record. when I press that button a child windndow will be opened for data entry. The child window has submit button to save data.
    when I press the button for save, It will go to action class and saves it in a database and forwards a new page.
    but I do not want to forward any new page. If any exception is raised during database saving, a message should be showed in child window otherwise the child window should close and the parent window should get refreshed.
    Can any one write me how we can handle this in struts.
    Thanks in Advance,
    SR

    This has nothing to do with struts, you can do the same with some plain JavaScript. Do the following...
    1) On error, forward to a error page
    2) On success, forward to a temp.html page.
    The code in temp.html would be like this
    <html>
    <head><script>
    window.opener.reload();
    self.close();
    </script></head>
    <body>Closing...</body>
    </html>Cheers
    -P

  • Jdev9.0.3 JSP STRUTS ADF application problem with jdve10.1.3 and 10g IAS

    Hello, All,
    My current application is developed with jdev9.0.3 and deployed to OC4J 9.0.4 on ias, it works fine.
    Now I need to deploy it to our new 10g application server. the application run into the following error:
    NoClassDefFoundError: oracle/jdeveloper/html/HTMLElement
    at oracle.adf.controller.struts.util.ErrorReporting.addError(ErrorReporting.java:99)
    at oracle.adf.controller.struts.util.ErrorReporting.addError(ErrorReporting.java:94)
    Then I tried to migrate the application to jdev10.1.3 first, the code run into some red lines, e.g. <c:out .../> can't be within <c:set.../>, but it compiled ok and run fine within jdeveloper.
    But when I deployed the new .war file into the 10g server, now I run into different set of error(Please see belowe).
    Is there anything I need to do when I deploy a jdev903 application to 10g server, or migrating to jdev10.1.3?
    Any advice will be appreciated,
    Deborah
    java.lang.NoClassDefFoundError     at at oracle.adf.controller.v2.struts.lifecycle.StrutsPageLifecycleFactory.getDefaultInstance(StrutsPageLifecycleFactory.java:68)
    at org.apache.struts.config.impl.ModuleConfigImpl.freeze(ModuleConfigImpl.java:503)     
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
    ...

    Migrating ADF/Struts 10.1.2 to 10.1.3.
    http://radio.weblogs.com/0118231/2006/02/28.html#a665

  • Blank Page with JSF 1.1.01 RI and Tiles

    My web pages have been rendered without any problem using JSF 1.1 and Tiles with Weblogic 8.1 SP3. But it can't handle multiple forms within a page. So I upgraded JSF to version 1.1.01 RI. I only get blank pages since the upgrade.
    Does anybody have the same problem? Any help is appreciated.

    I have the same problem with Tomcat 5.5 and tried both 1.1.01 and 1.1.02. I used both JSF RI 1.0 and 1.1 with no problem on JSF with tiles, but because of the known bugs in 1.1 I had to use 1.1.01 or later which doesn't work nicely with tiles. Does anyone know how to fix this in Tomcat?

  • Add Image to Jasper Report with Struts 2 and Hibernate

    Hi I want to add image to jasper report[pdf] in the environment of Struts 2 framework and hibernate. I am trying
    this for last couple of days, but i am unable to get the work done. if any body know the steps to add image to
    jasper reports, please help me or if u have any tutorials please let me know. I am using iReport-nb-3.5.0 to generate jasper files.
    Thanks in advance

    Finally i found a way to add image to jasper report. It is pretty simple, just give the exact image location to the image expression. In your web application, the image location may vary so, dynamically set the image location from your model class. Also, make sure that your lib folder contains itext-1.3.1.jar. If your lib folder contains itext-1.3.1.jar and iText-2.1.3.jar u will get like: java.lang.NoSuchMethodError: com.lowagie.text.Image.plainWidth()F
    So remove the iText-2.1.3.jar and keep only itext-1.3.1.jar, try this will work

  • Using CSS for Struts JSP presentation using tiles

    hi all,
    i want to use CSS instead of table TRs ,TDs,TABLE in my jsps.
    can anyone help me how can i achieve that?
    i want to use css with struts presentation using tiles
    i couldn't find much information about using CSS for jsps on the web can anyone guide me with proper information in this regard?
    regards and thanks in advance

    Actually, I just realized it's the exact same syntax as regular html (which I was thinking, but for some reason it didn't work the night I posted):
    <head>
      <link rel="stylesheet" href="yourstylesheet.css"/>
    </head>I'm not sure why it didn't work for me the first time.
    theAmerican

  • Jsf and tiles

    hi all.
    i'm developing an application using jsf and tiles.
    i've some problem in the general layout page.
    how can I refer to images and files,if I don't know where the page will be used?
    with struts i've used <html:rewrite page=" ... " /> but it doesn't work with jsf.
    I only use the TilesServlet.
    any suggestion?
    i've also try to define the url like "/css/mycss.css" but in local dosn't work.
    thank a lot for any reply!

    hi all.
    i'm developing an application using jsf and tiles.
    i've some problem in the general layout page.
    how can I refer to images and files,if I don't know where the page will be used?
    with struts i've used <html:rewrite page=" ... " /> but it doesn't work with jsf.
    I only use the TilesServlet.
    any suggestion?
    i've also try to define the url like "/css/mycss.css" but in local dosn't work.
    thank a lot for any reply!

  • Problem with struts-faces.jar

    hi,
    My requirement is to migrate a struts application to jsf.
    I am using the struts-faces.jar and doing all the configurations as mentioned.I am getting the following error while calling the application itself..
    java.lang.ClassNotFoundException: org.apache.struts.faces.taglib.LifecycleListener
    I am using the following version:
    1)Tried both struts-faces-0.4 and 0.3(downloaded from http://archive.apache.org/dist/struts/struts-faces/)
    2)Tomcat 5.0
    3)jsf-(SUN)
    4)struts 1.1
    Please let me know if i am doing something wrong. and any ways to fix this.
    Regards,
    Mythili

    Given the new release of the JSF ri and api .jar
    files,
    will this .jar provided at the apache site work?
    http://archive.apache.org/dist/jakarta/struts/old/relea
    e/struts-faces/
    No, those JARs only work with the EA versions of JavaServer Faces.
    A nightly build of the struts-faces integration library, that works with the beta release, is available at:
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/
    and the corresponding source code is part of the Struts nightly build bundles in:
    http://cvs.apache.org/builds/jakarta-struts/nightly/src/
    in directory "contrib/struts-faces".
    This package is not yet ready to be released, but seems to work for me in all the cases where the old library worked before. (If you're migrating, note particularly some tweaks you need to add in the struts-config.xml file for the new version, documented in README.txt.) Work continues on the Tiles integration which feedback has indicated is really important to people.
    Developers who are building new components and renderers will be quite interested in the techniques used to make all the attributes of your own components value-binding-enalbled (like all the ones on the standard tags are). The source code for the <s:form> tag, plus the corresponding component and renderer, will be helpful in illustrating this.
    Craig McClanahan

  • [help!!!] el doesn't work with Struts

    When i tried to use jstl tag such as <c:out value="${1+2+3}"> with Struts, it doesn't work, plain text "${1+2+3}" was added to the response.
    When i copied my jsp with <c:out value="${1+2+3}"> to some other webapp, it worked perfectly, but when i dropped it into the simplest Struts-Blank, ${1+2+3} showed up instead of 6, what is the problem? thx in advance!

    Use this web.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"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
    <display-name>Struts Blank Application</display-name>
    <!-- Standard Action Servlet Configuration (with debugging) -->
    <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>
    <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>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- Session and access -->
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <jsp-config>
    <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    </jsp-config>
    </web-app>

  • Jhs10g subapplications with struts / uix

    I have a bit trouble with 2 subapplications (struts and uix) , if i use mvc i got errors in jboss so i use struts
    but now i have a problem how to put this in web.xml
    with mvc it was easy,
    I checked the new jhsdemo and tutorial2 doc
    but i don't get it working with 2 applications
    if i configure it for 1 it works fine
    can something show how it is done in web.xml 2 appl. struts/uix
    thanks edwin

    Now i got a new problem ( I now use only 1 application
    to make it less comlex)
    I made a directory basis in web dir.
    and changed in de application structure file
    the ui pages virtual directory from /uix/ to /basis/uix/
    and copied images / jheadstart and even cabo to the basis dir.
    the generator creates a new struts-config.xml
    and generates the uix views in web\basis\uix
    all goes well
    this is the web.xml
    <servlet>
    <servlet-name>sicmaStrutsController</servlet-name>
    <servlet-class>oracle.jheadstart.controller.struts.JhsActionServlet</servlet-class>
    <init-param>
    <param-name>config/basis</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>mapping</param-name>
    <param-value>oracle.jheadstart.controller.struts.config.JhsActionMapping</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    now i got the following error,
    500 Internal Server Error
    java.lang.NullPointerException
         oracle.cabo.servlet.xml.PageDescriptionCache oracle.jheadstart.view.uix.JhsUIXPageBroker.getPageDescriptionCache(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
              JhsUIXPageBroker.java:96
         oracle.cabo.servlet.PageDescription oracle.cabo.servlet.xml.UIXPageBroker.getPageDescription(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.PageRenderer oracle.cabo.servlet.AbstractPageBroker.getPageRenderer(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ResourceFilterChain.java:65
         void oracle.security.jazn.oc4j.JAZNFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
              JAZNFilter.java:283
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              EvermindFilterChain.java:16
         void oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
              CharacterEncodingFilter.java:174
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:556
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:209
         void org.apache.struts.action.RequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              RequestProcessor.java:1069
         void org.apache.struts.tiles.TilesRequestProcessor.doForward(java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              TilesRequestProcessor.java:274
         void org.apache.struts.action.RequestProcessor.processForwardConfig(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.config.ForwardConfig)
              RequestProcessor.java:455
         void org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.apache.struts.config.ForwardConfig)
              TilesRequestProcessor.java:320
         void org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              RequestProcessor.java:279
         void oracle.jheadstart.controller.struts.JhsRequestProcessor.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JhsRequestProcessor.java:588
         void org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              ActionServlet.java:1482
         void oracle.jheadstart.controller.struts.JhsActionServlet.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              JhsActionServlet.java:115
         void org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              ActionServlet.java:507
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ResourceFilterChain.java:65
         void oracle.security.jazn.oc4j.JAZNFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
              JAZNFilter.java:283
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              EvermindFilterChain.java:16
         void oracle.jheadstart.controller.CharacterEncodingFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
              CharacterEncodingFilter.java:174
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:556
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:797
         void java.lang.Thread.run()
              Thread.java:484
    if i change <param-name>config/basis</param-name> in web.xml to <param-name>config</param-name>
    it works
    but with 2 applications
    <servlet>
    <servlet-name>sicmaStrutsController</servlet-name>
    <servlet-class>oracle.jheadstart.controller.struts.JhsActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-basis-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>config/call</param-name>
    <param-value>/WEB-INF/struts-call-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>mapping</param-name>
    <param-value>oracle.jheadstart.controller.struts.config.JhsActionMapping</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    then gives the second appl. the same error as above

  • 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

  • How do i edit my billing info if my credit card associated with apple id expired and i have a duty to app store from the time when i had the old credit card?

    how do i edit my billing info if my credit card associated with apple id expired and i have a duty to app store from the time when i had the old credit card?
    so the thing is a few days ago i made an app store purchase and i didn't know i was running out of money on my credit card. i realized that only when i tried to purchase another item and it didn't work. nothing special til here. the problem is that meanwhile my credit card was replaced by a new one by the bank because the old one was soon expiring. So the data associated with the old credit card no longer exist.
    i tried to edit my billing info associated with my apple id in order to enter the new credit card data, but the system doesn't allow me to do that.
    so i can neither pay my purchase, nor edit my info, nor access app store anymore.
    what's next? any ideas? thanks

    Servers down wait till status is fixed to change or add your data http://www.apple.com/support/systemstatus/

Maybe you are looking for

  • Deploying Crystal Reports runtime using merge module failed

    Hi, I am having a problem when deploying Crystal Reports using merge module runtime, included into MS Visual Studio web setup project, when installing my *.msi with CR runtime on a completely clean PC (with only MS Windows installed). Error: Failed t

  • Java.io.NotSerializableException: oracle.jbo.uicli.binding.JUApplication

    Using lated 11g jdev from otn. Seeing repeatedly below exception in the trace. Can someone advise what is going wrong here? ####<Jan 4, 2011 3:16:37 PM PST> <Error> <Cluster> <usfsmda2.folsom.calwin.eds.com> <MDA2-Server01> <[ACTIVE] ExecuteThread: '

  • Error:JCA Binding execute of Reference operation 'writetoBAM' failed

    Hi All,          I have two different environment, On which BAM server is installed and configured on both. Both servers has same folder structure for Data Objects. I have created "abc" data object on server1. Implemented sensors in bpel. deployed re

  • Unhandled Active HTTP Connections

    Hello, We wrote a simple HTTP Load Test utility to stress the BEA Apps Servers. During the testing, our client load generator hung after 98% of 10,000 test records being processed (or approximately 50,000 web transactions)...basically waiting for the

  • Is possible to use one column in Excel file as parameter to retrieve data ?

    I'm newbie to WEB ADI is possible to use one column (or worksheet) in Excel file to enter data as parameters and use Web ADI to retrieve data ? In example - user paste in one column list of items ID's - then press a button and in another columns get