Jon -
It looks from tracing your stack trace through the source code that you
might be using a nightly build from sometime after 1.1b2 was released. i'm
not sure which day you created it.
It looks like what's happening is that the code is choking where Struts is
attempting to determine which module/web application is being requested.
Eddie Bush submitted a patch to the nightly build to address this on
October 29th. I believe the specific issue is that struts searched for a
"/" character in the in the request URI - and this didn't play nice when
used with Cactus.
Here is a link to the particular patch Eddie commited:
http://cvs.apache.org/viewcvs/jakarta-struts/src/share/org/apache/struts/util/RequestUtils.java?rev=1.65&content-type=text/vnd.viewcvs-markup
As happens with these things, RequestUtils has been further refactored so that in the
current nightly build it looks considerably different.
My advice would be to use a different version of Struts. I believe the version of
strutstestcase you are using was tested with struts 1.1b2 - can you
go back to that version? If not, I'd consider getting a more recent nightly build.
"Jon.Ridgway" <[EMAIL PROTECTED]> on 11/12/2002 07:52:15 AM
Please respond to "Struts Users Mailing List"
<[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc: (bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject: StrutsTestCase configuration
Hi All
I'm having some problems with the StrutsTestCase. I believe it is
configured
OK and all appropriate JARS (cactus etc) added to my WEB-INF/lib dir. The
test runs but always throws the exception shown below:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1525)
at
org.apache.struts.util.RequestUtils.selectApplication(RequestUtils.java:1462
)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1290)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:502)
at
servletunit.struts.CactusStrutsTestCase.actionPerform(CactusStrutsTestCase.j
ava:307)
at
com.willhill.jackpot.portal.SaveCustomerActionTest.testSuccessfulRegistratio
n(SaveCustomerActionTest.java:40)
etc...
Any idea what might be missing from my configuration?
Jon Ridgway
-----Original Message-----
From: Xavier Combelle [mailto:xcombelle@;kaptech.com]
Sent: 12 November 2002 12:45
To: Struts Users Mailing List
Subject: RE: From old JSP and Servlets to STRUTS
I think that all the complex traitment on objects returned by logic
should be simplified by the Action layer so the jsp work only with
'trivial'
beans.
Xavier
> -----Message d'origine-----
> De : Fernando Hernandez [mailto:fernando@;bit-bang.com]
> Envoyé : lundi 12 novembre 2001 13:13
> À : STRUTS Mailing-List
> Objet : From old JSP and Servlets to STRUTS
>
>
> Hi,
>
> I am student doing an intership and i just started to learn about Struts
> because I'm currently transforming a J2EE web application composed by
> servlets and old-java-embedded-JSPs so it can adopt Model 2.
>
> To acomplish this i found that using Struts is the prefect
> answer. To reach
> my goal, at first I thought that maybe the best way to do it was to first
> address the interface by taking out all the Java embedded in all the
JSPs,
> and change it with Struts, JSTL, custom made taglibs. After doing this, i
> was going then to think about the Model and the framework itself...
>
> But i have found that to take out the embedded java from the JSP has been
> very difficult, since the objects(I'd like to say JavaBeans, bur they 're
> not exactly that, and actually that is part of the problem) which were
> sended from the logic to the presentation were very complex in nature and
> the content an not be presented just by using the strut's, JSTL or many
> other libraries i have looked exhaustively.
>
> So, should i leave some Java embedded in the JSPs?
> If the answer to the previous question is "yes", should I maybe put the
> embedded Java into custom tag libraries made by me? or maybe use
> includes or
> imports?
>
>
> I please ask your help on this since I'm running out of time.
>
> Thanks from Madrid.
>
>
> Fernando Hernandez.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>
The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated.
--
To unsubscribe, e-mail: <
mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@;jakarta.apache.org>
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>