Weird JDBC - Works only for 6 ResultSets - Extremely Urgent !!!
Hey there ! This is seriously an urgent issue .
I can get succesful results for only 6 columns.
When I attempt to get another Column( anything > 6),I obtain java.lang.ArrayIndexOutOfBoundsException error.
DB :- Oracle 8.7
JDBC :- CLASSPATH=%JAVA_HOME%\lib\tools.jar;
C:\Program Files\Apache Tomcat 4.0\lib\classes12.zip;
C:\Program Files\Apache Tomcat 4.0\lib\ojdbc14_g.jar;
C:\Program Files\Apache Tomcat 4.0\lib\ocrs12.zip;
Please help, guru`s !!!
Attached is my code :-
innerRset = statement.executeQuery("SELECT HBR_TEST_END_TIME,HBR_LOT_NUMBER,HBR_TEST_HEAD,HBR_DUT_SITE, HBR_BIN1, HBR_BIN2, HBR_BIN3 FROM TRDB_HBR WHERE HBR_TEST_END_TIME =TO_DATE('" + newDate +"', 'yyyy-mm-dd HH24:mi:ss')");
while (innerRset.next())
String[] columnsHBR = new String[6];
columnsHBR[0] = innerRset.getString(1);
columnsHBR[1] = innerRset.getString(2);
columnsHBR[2] = innerRset.getString(3);
columnsHBR[3] = innerRset.getString(4);
columnsHBR[4] = innerRset.getString(5);
columnsHBR[5] = innerRset.getString(6); //Works fine till here !
columnsHBR[6] = innerRset.getString(7);// Generates the error if I try the 7th`
vector.add(columnsHBR);
/* Print HBR Results */
Enumeration enum3 = vector.elements();
while (enum3.hasMoreElements())
System.out.println("Printing Vector Results");
String[] columns3 = (String[]) enum3.nextElement();
out.println(columns3[0] + columns3[1] + columns3[2] + columns3[3] + columns3[4] + columns3[5] + "<BR>\n");
} // close HBR
Okay !
The error of java.lang.ArrayIndexOutOfBoundsException is Not there anymore !
NOW, I can print more than 7 columns of values.
BUT, it prints only to Console.
I try printing to browser, it does NOT display.
Console output :-
Printing HBR Results
T5696810052000-09-09 04:54:00.02000-09-08 19:38:35.0VN8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
T5696810052000-09-09 10:37:49.02000-09-09 10:37:44.0CX8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
T5696810052000-09-09 15:02:32.02000-09-09 10:37:44.0CX8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
T5696810052000-09-09 15:04:09.02000-09-09 10:37:44.0CX8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
Code :-
/* Start of TRDB HBR query */
System.out.println("I am gonna execute Query HBR");
innerRset = statement.executeQuery("SELECT HBR_TEST_END_TIME, HBR_LOT_NUMBER, HBR_TEST_HEAD, HBR_DUT_SITE, HBR_BIN1, HBR_BIN2, HBR_BIN3 FROM TRDB_HBR WHERE HBR_TEST_END_TIME =TO_DATE('" + newDate +"', 'yyyy-mm-dd HH24:mi:ss')");
//Query is SELECT HBR_TEST_END_TIME, HBR_LOT_NUMBER, HBR_TEST_HEAD, HBR_DUT_SITE, HBR_BIN1, HBR_BIN2, HBR_BIN3, HBR_BIN4, HBR_BIN5, HBR_BIN6, HBR_BIN7, HBR_BIN8 FROM TRDB_HBR WHERE HBR_TEST_END_TIME =TO_DATE('" + newDate +"', 'yyyy-mm-dd HH24:mi:ss')");
while (innerRset.next())
System.out.println("I am in innerRset of HBR");
String[] columnsHBR = new String[13];
columnsHBR[0] = innerRset.getString(1);
columnsHBR[1] = innerRset.getString(2);
columnsHBR[2] = innerRset.getString(3);
columnsHBR[3] = innerRset.getString(4);
columnsHBR[4] = innerRset.getString(5);
columnsHBR[5] = innerRset.getString(6);
columnsHBR[6] = innerRset.getString(7);
//columnsHBR[7] = innerRset.getString(8);
//columnsHBR[8] = innerRset.getString(9);
//columnsHBR[9] = innerRset.getString(10);
//columnsHBR[10] = innerRset.getString(11);
//columnsHBR[11] = innerRset.getString(12);
vector.add(columnsHBR);
// Check No. of Rows in Vector
int z = (vector).size();
out.println("<BR>*******************************Element Position in HBR Array =" + z+"******************<BR>");
/* Print HBR Results */
Enumeration enum3 = vector.elements();
while (enum3.hasMoreElements())
System.out.println("Printing HBR Results");
String[] columns3 = (String[]) enum3.nextElement();
//HERE IS THE PROBLEM !!!!!!!!!!!!!!!!!!
out.println(" HBR results are as follows :- " + columns3[0] + columns3[1] + columns3[2] + columns3[3] + columns3[4] + columns3[5] + columns3[6] +"<BR>\n");
//PROBLEM ENDS HERE !!!!!!!!!!!!!!!!!!
System.out.println(" I am Printing HBR Results ");
System.out.println("Finish printing HBR Results");
} // close HBR
outerRset.close();
innerRset.close();
/* End of TRDB HBR query */
Similar Messages
-
Master Page: Alternatives (Subform Set) works only for the first page
Hi everybody!
I have bumped into a very weird problem with ADOBE Forms:
When I create an 'Alternative' in a Context area and then place it on a Master Page, it works only for the first page. On the rest of pages it always show the 'TRUE' subform, regardless of the condition (which is not changed, of course). Absolutely the same Alternative works perfectly in a Content area for all pages.
Has anybody seen something like this? Any ideas why?
Thank you!This happens because of the processing of the form.
You can see this here:
LiveCycle ES2 * Adobe LiveCycle Designer ES2
You have to put a own variable, which is set with the value you want in the very beginning.
I know, it is not that logical in the first moment, but it makes sense.
Regards
Florian
PS: This space SAP Interactive Forms by Adobe is the correct for questions like that -
A couple of days ago, I connected to the Internet as usual & opened Firefox, only to be greeted by an almost blank screen with a Google-type search box in the middle & this message from McAfee:
"Your default search settings have changed. This may pose a security risk. Would you like to restore them to McAfee Secure Search to provide a safer searching experience?"
instead of my usual home page (BT Yahoo). I naturally clicked on the "Yes" option in the message, but rather than restoring my BT Yahoo home page, all that did was to insert the McAfee logo to the left of the search box in the top right-hand corner of the screen. The first time it happened, I had to search for the BT Yahoo page & then followed the standard procedure for setting it again as my home page. It worked only for that session: each time I shut down Firefox or restarted my computer after that, all I got was the blank "search page" & restoring the previous session was the only way to get back to BY Yahoo. How on earth do I make the home page setting permanent?
As far as I'm aware, I have done nothing to alter my search settings. However, I am anything but computer-literate, so I may have done/pressed something without realising it, but trying to understand what is now happening is far beyond my limited IT skills.See McAfee support to find out how to disable that McAfee feature - that isn't part of the normal Firefox installation.
-
Flash Player works only for Local Admins
Hi!
We have about 40 computers in our organisation with the same problem: Since few weeks the Adobe Flash Player (ActiveX) works only, when the user has administrative privileges. If a normal user wants to watch youtube-films or other flash objects, there will only appear a message that (a new) Adobe flash player must be installed to view the content (or so). It looks like there is no Adobe Flash player installed. But if the user is a local admin, everything works fine - on the same computer.
Under Software Adobe Flash Player is displayed as installed.
We have WinXP Professional SP2/SP3 32bit running on 4-year-old Maxdata computers. And few new computers (also WinXP Professional SP2/SP3 32bit)
Confusing: There are few computers where flash works for everyone! It seems, that especially the computers that are new don't have this problem.
I've tested everything: Using the MSI-file, using the EXE-file. Uninstalling the MSI, uninstalling the EXE. Using Version 14, 16 and now 26. Uninstalling everything by the offical Adobe flash player uninstaller. Installing the software as administrator, installing the software via GPO. I've deleted system32/macromed/flash. I've used Microsoft subinacl - with the offical adobe reset_fp10.cmd. I edited system32/macromed/flash so that everybody has write rights on this folder.
But nothing works. It's always the same: Videos in the IE are only shown for admins.
And now, I've no idea, what else I could do?!
Anyone else?
Greetings from Germany
PeterPat, is this the one?
http://forums.adobe.com/thread/729200?tstart=0
eidnolb -
JSP - useBean tag works only for first request
hey why donnu change the scope to PAGE, give a try.........
Vishal Vishnoi wrote:
> Using Weblogic 5.1 I am trying to work with a simple example of a JSP
> page which has got a usebean tag. The tag is
>
> <jsp:useBean id="resourceTypes" type="java.util.ArrayList"
> scope="request" />
>
> * This works only the first time I load the page.
>
> If I try to load the page again. I get the following error
>
> javax.servlet.ServletException: Could not find bean 'resourceTypes',
> type 'java.
> util.ArrayList' in scope
>
> --Vishal
-
ResultSets works only for 6 ... Extremely Urgent !!
Hey there ! This is seriously an urgent issue .
I can get succesful results for only 6 columns.
When I attempt to get another Column( anything > 6),I obtain java.lang.ArrayIndexOutOfBoundsException error.
Guys,I suspect its becoz of vector.
Actually, this is my 3rd query and hence, after each query I push the ResultsSets into an array, then push into vector.
I query 15, 5, and 12 columns respectively in my SQLs.
Could it possibly be caused becoz I am pushing array`s of different size to the vector ?
DB :- Oracle 8.7
JDBC :- CLASSPATH=%JAVA_HOME%\lib\tools.jar;
C:\Program Files\Apache Tomcat 4.0\lib\classes12.zip;
C:\Program Files\Apache Tomcat 4.0\lib\ojdbc14_g.jar;
C:\Program Files\Apache Tomcat 4.0\lib\ocrs12.zip;
Please help, guru`s !!!
Let me know , if my entire (short piece) of code it necessary !
Attached is my code which generates the java.lang.ArrayIndexOutOfBoundsException error.:-
innerRset = statement.executeQuery("SELECT HBR_TEST_END_TIME,HBR_LOT_NUMBER,HBR_TEST_HEAD,HBR_DUT_SITE, HBR_BIN1, HBR_BIN2, HBR_BIN3 FROM TRDB_HBR WHERE HBR_TEST_END_TIME =TO_DATE('" + newDate +"', 'yyyy-mm-dd HH24:mi:ss')");
while (innerRset.next())
String[] columnsHBR = new String[6];
columnsHBR[0] = innerRset.getString(1);
columnsHBR[1] = innerRset.getString(2);
columnsHBR[2] = innerRset.getString(3);
columnsHBR[3] = innerRset.getString(4);
columnsHBR[4] = innerRset.getString(5);
columnsHBR[5] = innerRset.getString(6); //Works fine till here !
columnsHBR[6] = innerRset.getString(7);// Generates the error if I try the 7th`
vector.add(columnsHBR);
/* Print HBR Results */
Enumeration enum3 = vector.elements();
while (enum3.hasMoreElements())
System.out.println("Printing Vector Results");
String[] columns3 = (String[]) enum3.nextElement();
out.println(columns3[0] + columns3[1] + columns3[2] + columns3[3] + columns3[4] + columns3[5] + "<BR>\n");
} // close HBROkay !
The error of java.lang.ArrayIndexOutOfBoundsException is Not there anymore !
NOW, I can print more than 7 columns of values.
BUT, it prints only to Console.
I try printing to browser, it does NOT display.
Console output :-
Printing HBR Results
T5696810052000-09-09 04:54:00.02000-09-08 19:38:35.0VN8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
T5696810052000-09-09 10:37:49.02000-09-09 10:37:44.0CX8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
T5696810052000-09-09 15:02:32.02000-09-09 10:37:44.0CX8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
T5696810052000-09-09 15:04:09.02000-09-09 10:37:44.0CX8AS32B30May200 SC5
04062CFNR2 T569681005 J27F<BR>
Printing HBR Results
Code :-
/* Start of TRDB HBR query */
System.out.println("I am gonna execute Query HBR");
System.out.println(" New date is " + newDate );
innerRset = statement.executeQuery("SELECT HBR_TEST_END_TIME,HBR_LOT_NUMBER,HBR_TEST_HEAD,HBR_DUT_SITE, HBR_BIN1, HBR_BIN2, HBR_BIN3, HBR_BIN4, HBR_BIN5 FROM TRDB_HBR WHERE HBR_TEST_END_TIME =TO_DATE('" + newDate +"', 'yyyy-mm-dd HH24:mi:ss')");
while (innerRset.next())
System.out.println("I am in innerRset of HBR");
String[] columnsHBR = new String[9];
columnsHBR[0] = innerRset.getString(1);
columnsHBR[1] = innerRset.getString(2);
columnsHBR[2] = innerRset.getString(3);
columnsHBR[3] = innerRset.getString(4);
columnsHBR[4] = innerRset.getString(5);
columnsHBR[5] = innerRset.getString(6);
columnsHBR[6] = innerRset.getString(7);
columnsHBR[7] = innerRset.getString(8);
vector.add(columnsHBR);
// Check No. of Rows in Vector
int z = (vector).size();
out.println("<BR>*******************************Element Position in HBR Array =" + z+"******************<BR>");
/* Print HBR Results */
Enumeration enum3 = vector.elements();
while (enum3.hasMoreElements())
System.out.println("Printing HBR Results");
String[] columns3 = (String[]) enum3.nextElement();
System.out.println(columns3[0] + columns3[1] + columns3[2] + columns3[3] + columns3[4] + columns3[5] + columns3[6] + columns3[7] + "<BR>\n");
System.out.println("Gonna print HBR punye query");
/* // Alternative print method
for (int i=0; i < columnsHBR.length; i++)
columnsHBR= innerRset.getString(i+1);
System.out.println("Finish printing HBR Results");
} // close HBR
outerRset.close();
innerRset.close();
/* End of TRDB HBR query */ -
Mini DisplayPort stopped working only for DVI connection
I have been using my iMac with an external 22" Samsung display, using a MiniDP>DVI adapter. Yesterday I disconnected this configuration in order to connect the iMac to a 46" TV to watch a film, using a MiniDP>HDMI cable. Worked OK. When I reconnected the iMac to the 22" display using the same MiniDP>DVI adapter, the iMac wouldn't do the work anymore, as if I hadn't connected the MiniDP>DVI adapter at all.
I have already tried the following steps:
1. Tested reconnecting the 46" TV and even the 22" external display using MiniDP>HDMI cable: it works (so it seems that the MiniDP port on the iMac is functional);
2. Tested using the MiniDP>DVI adapter in a different iMac with the same 22" display, worked ok (so the problem is neither in the MiniDP>DVI adapter or the 22" display);
The only thing I can think of is that the MiniDP port broke in a way that it can only let HDMI signal out, but not DVI signal. Weird, isn't it? Anybody has any clue on a way to fix it without sending the iMac to tech support? Could it be a software/OS problem?
Thanks in advance.
PS.: you may be asking yourself why won't I connect the iMac to the 22" display using the MiniDP>HDMI cable, since it works; the problem is, with HDMI the image looks crappy, the colors are washed out, fonts are hard to read. I have searched for this problem on the web and the Apple Support Communities, it seems to be a common complaint and without solution. So, in order to have a perfect image on my external display again, I must make it work through the DVI port.Reset SMC and PRAM
Intel-based Macs: Resetting the System Management Controller (SMC)
About NVRAM and PRAM
If you boot up with on the DP monitor connected does anything show on the monitor?
Last
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
SQLLDR -- WHEN works only for the first INTO table
I tries to load 2 table from one data file.
SQLloader loads only the first table in the control file.
If I switch the INTO sequence it then load the other table that now its the first in the control file.
It works fine if I split the control into 2 controls that loads the table from
the same data file.
Is this a bug or am I forces to load it as two parts?
-------------------------- control file ----------------------
LOAD DATA
INFILE 'test.xml' "STR '\n<ENDREC/>\n'"
INTO TABLE MSDESTINATIONXML
APPEND
WHEN typeid = "D"
FIELDS TERMINATED BY '^'
typeid FILLER char(1),
ID char(255),
letterid char(255),
left char(2000) TERMINATED BY '\n<ENDROW/>\n')
INTO TABLE MSLETTERXML
APPEND
WHEN typeid <> "D"
FIELDS TERMINATED BY '^'
typeid FILLER char(1),
ID char(255),
bundleid char(255),
left char(4000) TERMINATED BY '\n<ENDROW/>\n',
right char(4000) TERMINATED BY '\n<ENDROW/>\n')
---------------------------- end control file ----------------------------------This happens because of the processing of the form.
You can see this here:
LiveCycle ES2 * Adobe LiveCycle Designer ES2
You have to put a own variable, which is set with the value you want in the very beginning.
I know, it is not that logical in the first moment, but it makes sense.
Regards
Florian
PS: This space SAP Interactive Forms by Adobe is the correct for questions like that -
Scrrensaver works only for 2 minutes, then screen stays black
Hi,
I have screensavers that are made for 10.4 which I am running; I have a new iMac and transferred settings over from 'old mac' which was running 10.3.
My screen saver (even when reinstalled again) only works for about 2 minutes, then the screen fades to black for as long as the computer is on. Any clues as to remedy this so that I can enjoy my screen saver vs. staring at a black screen?
Thank you.Check your Energy Saver preference for when the display is put to sleep - it is a different setting than when the Screen Saver starts.
-
Crystal Reports works only for superusers
Only superusers can execute previously created Crystal Reports. If the user tries to run a report as a regular user it gets this message:
Only super users are allowed access to this function.
Is this a limitation of the free Crystal Reports for SBO? I haven't found any documentation about it.
Thanks for prompt replay
Andres
Edited by: A Castri on Apr 20, 2009 6:30 PMHi Bisal,
Thanks a lot for your response. Unfortunately, it didn't work either.
1.Check under crystal report administration whether user have access to reports or not.
Yes he has access to reports (Crystal Administrations - Manage Users).
2. Is your report is private or public
We have tried with private and public reports. However, he can't even get the list of reports (that is when he gets the error message -Only super users are allowed access to this function-).
3. Is your user have professional license applied to it or not
He has a professional license assigned to him.
4. Does he or she have enough authorization to view report
Yes, he has Full Authorization to everything.
Thanks,
Andres -
Can a CR work only for one aggregation level and not other ?
Hi Experts,
I have a real time infocube (RTIC) over which there is a multiprovider, on top of which I have built 2 aggregation levels.
There are sequence of 2 characteristic relationships (CR's based on exit class) defined for the same RTIC.
Is it possible that the CR's be functional for one aggregation level and not in case of second aggregation level ?
Thanks and Regards,
PankajAdditionally let me explain the scenario in more detail:
The difference between 2 mentioned aggr levels is that of 0CALMONTH which is checked in second aggr level.
0CALMONTH is assigned as target char in first CR, hence both the CRu2019s work for input ready report built on first aggregation level and do not function with input ready report built over second aggregation level.
Therefore I wish to skip the complete execution of CRu2019s for I-R reports based on 2nd aggregation level.
As CR of type with derivation is functional only if the target char selected is not present in the aggregation level.
Please let me know if any more details are required.
Thanks,
Pankaj -
File Association: "Change All" working only for recommended programs
Hello,
I am having problems with the "Change All" function in the Finder. I only seem to be able to make a change to a program which is already recommended in the drop-down menu. If I use "Other..." and select the program and then select "Change All", it automatically reverts back to the Default setting.
As a concrete example:
I want to open all .tiff files with Acrobat Pro 7.0, the default setting is Preview. If I select Acrobat and click on Change all, I get the standard verification dialogue. However as soon as I confirm, the drop down menu switches back to Preview. Instead, if I select Photoshop (which is already in the drop down menue) I can make the change without problems.
I tried to restart and I even manually edited the "launch services" plist file - changing to Photoshop works after restart, changing to Acrobat is ignored.
File vault is off. Repairing permissions was also without success.
Would anyone have an idea how to fix this?
Best regards,
Mark
System: Powerbook G4 Aluminium / OSX 10.4.11Unfortunately, there isn't always a way around this. PDF files are an excellent example. A PDF file created by Adobe has a Creator of CARO and a Type of PDF_. Preview has a different Type and Creator code for PDF files created with it.
So what happens is when you assign (say the Adobe Reader) to Adobe PDF files, it associates them with those based on Adobe's Type and Creator codes. That usually means PDF files created with Preview will still open in Preview.
If you associate Preview PDFs with the Adobe Reader, then the OS breaks the link to the Adobe Type/Creator codes. Now Preview PDF files will open in the Adobe Reader. But since the Adobe created PDFs are no longer linked to the Reader, the OS opens them in the nearest default program, which is Preview.
You end up with an unwanted one-or-the-other problem. -
Valuechange listener works only for some components in page
This is a portion of XHTML, which is that included into the page. It hash 2 <h:selectOneRadio> which have the same listener, but only in the first case the method is called right after user changes value of radio. In the second case its triggered only when submiting the form.
*<h:selectOneRadio id="workType"*
*valueChangeListener="#{orderingPage.valueChanged}"*
*value="#{orderingPage.ordering.orderedObject.workType}"*
*layout="pageDirection">*
*<f:selectItem itemLabel="#{enums['WorkType.scan']}" itemValue="SCAN" />*
*<f:selectItem itemLabel="#{enums['WorkType.filmcopy']}"*
*itemValue="FILMCOPY" />*
*<f:selectItem itemLabel="#{enums['WorkType.papercopy']}"*
*itemValue="PAPERCOPY" />*
*<f:selectItem itemLabel="#{enums['WorkType.print']}" itemValue="PRINT" />*
*<f:selectItem itemLabel="#{enums['WorkType.readerPrinter']}"*
*itemValue="READER_PRINTER" />*
*<f:selectItem itemLabel="#{enums['WorkType.photo']}" itemValue="PHOTO" />*
*<f:ajax*
*render="scanTypesGrid copyFormatGrid copyColorGrid deliveryTypeGrid" />*
*</h:selectOneRadio>*
*<h:panelGroup id="copyFormatGrid">*
*<h:selectOneRadio layout="pageDirection"*
*value="#{orderingPage.ordering.orderedObject.copyFormat}"*
*valueChangeListener="#{orderingPage.valueChanged}"*
*rendered="#{(orderingPage.ordering.orderedObject.workType == 'PAPERCOPY') or (orderingPage.ordering.orderedObject.workType == 'PRINT')}">*
*<f:selectItem itemLabel="#{enums['PaperCopyFormat.a0']}" itemValue="A0" />*
*<f:selectItem itemLabel="#{enums['PaperCopyFormat.a1']}" itemValue="A1" />*
*<f:selectItem itemLabel="#{enums['PaperCopyFormat.a2']}" itemValue="A2" />*
*<f:selectItem itemLabel="#{enums['PaperCopyFormat.a3']}" itemValue="A3" />*
*<f:selectItem itemLabel="#{enums['PaperCopyFormat.a4']}" itemValue="A4" />*
*</h:selectOneRadio>*
Can't see anything, why also the 2nd should not be working fine. Generally in this page i have some listeners working, some not, don't know why.
thanks for help!
PS: I use primefaces 2.2.1 and jsf-api 2.1.2
Edited by: 851668 on 17.11.2011 08:06
Edited by: 851668 on 17.11.2011 08:08Note that the first has an f:ajax attached to it and the second does not.
-
Autoupdate working only for Flash 15 (not upgrading to 16)
Windows 7 and 8.1
IE, Firefox
15.0.0.246
We're trying to setup Flash to autoupdate in our IT environment. It currently autoupdates to 15.0.0.246. I'm assuming it should autoupdate to the latest version available, 16.0.0.235 but it's not. Is this intended by Adobe? Otherwise, there are no errors; the autoupdate process is only updating to 15.0.0.246 (previous version we had was 15.0.0.223).Please check out the Flash Player system administration guide. It's going to depend on how you distributed Flash Player to your network, and what settings you included in the mms.cfg. If someone pushed out our MSI installers via AD/SCUP/etc and had planned handle future updates themselves, they may have disabled automatic updates via the mms.cfg.
The guide has the appropriate file locations and flags to check for. Also, if you're using custom mms.cfg options to customize the update behavior on your network, try putting any mms.cfg files under both Windows\System\Macromed\Flash and Windows\SYSWOW64/Macromed/Flash directories (this shouldn't actually be required but you may be running into a bug that we've fixed recently) just to see if that works for you. It won't hurt anything.
Details on all of the appropriate paths and stuff are in the guide:
Adobe Flash Player Administration Guide for Flash Player | Adobe Developer Connection
If you don't make any headway, please send me a copy of your install log. Feel free to PM me with it if you don't want it public, and I'll see if I can get some useful feedback for you. -
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
Maybe you are looking for
-
Unabl eto share Internet connection through Airport
I have a new Samsung wave S8500. I'm trying to access the internet connection shared by my mac on the airport, everytime i try to connect to my mac through the Wi-Fi on my phone, it doesn't connect. I put a 40 bit WEP Key length on the sharing option
-
Unable to Sign In - Username not found or password incorrect
Ok....don't get it. Just got the ATV2 today. However, everytime I try to setup home sharing...I put in my itunes iD and password (same that I used to setup home sharing in Itunes) I get the error message that username is not found or password is in i
-
UI shell task list: Showing a tree hierarchy in Regional Area
Hi, We have a requirement where we want a tree to be displayed in the menu model as task list links and clicking on any node in the tree should open up a task flow in the local area. Given below is one example, in the task list in the UI shell (Regio
-
Are there any apps that make it now possible to scroll with Mountain Lion ?
I just gave up on a project that required me to be able to scroll through a Senate bill. I'll probably go back, but it just shouldn't be so difficult, so painful. and I'm not talking about the bill's language. No, it's just Apple's decision to do awa
-
Canvas verticalScrollPosition not setting?
I have a canvas that is dynamically populated with other display objects. when those items are complete I want to set the verticalScrollPosition for that canvas to be a certain value but it's not taking. No errors, it just does not happen.