I thought I posted this to the list, but I didn't.  Here is my reply to
Pankaj Chopra:

>I have found the problem with the "String index out of range: -1"
problem.  
>Somehow an empty "firstpos"/"lastpos" prefixed variable gets evaluated.

>This is because only nulls are checked instead of also checking for
zero-
>length strings.  If the following correction is made to the source, and

>then recompiled, the problem goes away.
>
>In the org/dbforms/Table.java file:
>
>In the method getFieldValuesFromPositionAsHt(String position):
>
>Change 'if (position == null)' to 
>       'if (position == null || position.trim().length() == 0)'
>
>I tried generating a patch for this file, but CVS for Win32 isn't 
>cooperating right now.  Sorry.

Bradley M. Handy
Programmer/Analyst
Spring Arbor University

mailto:[EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of John
Gagon
Sent: July 22, 2002 12:07
To: [EMAIL PROTECTED]
Subject: [dbforms] java.lang.StringIndexOutOfBoundsException: String
index out of range: -1


From: "Pankaj Chopra" <[EMAIL PROTECTED]>
org.apache.jsp.contactus_0005flist_0005fand_0005fsingle$jsp._jspService(
cont
actus_0005flist_0005fand_0005fsingle$jsp.java:103)

The generated servlet code that the container creates proves very useful
at
times. Often, I look at code surrounding it and look at the comments
(often
tells what lines of the jsp are being generated) and then look for
fields or
dbforms tags that are suspect around the line numbers. (both of the
servlet
and the jsp page)

Can you list the jsp source to contactus_list_and_single.jsp and perhaps
also lines say of 100-105 of the servlet (which is found in the work
directory in tomcat which it appears you are using)

It is often considered bad practice to put numbers in the names of
fields.
Try taking out the numbers. There could be parsing going on (so often
the
case when substring() presents itself) that is not counting on numbers
in
names of fields.







-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to