struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Seel <geo...@foto.co.uk>
Subject Re: Redirected to index.jsp unexpectedly
Date Tue, 24 Sep 2002 14:34:41 GMT
Joe

Thanks for suggestions. Have put sys-outs into TopLevelAction and even
logs and a sys-out into a version of ActionServlet but don't see
anything in logs. Using Sun RI 1.3.1, which I thought was Tomcat based,
expected to find output in catalina.<date>.log. Anyone know where log
stuff should be appearing?

In message <FF657657D9572E4880D73B644ACE91D87F4635@plsrv07.corp.againtec
h.com>, Joe Barefoot <Joe.Barefoot@motiva.com> writes
>First, I'm pretty sure the path in your action attribute in the <html:form> tag

>needs to be prefixed with a '/' :
>
><html:form action="/TopLevelDone.do">
>
>I'd change that just for a sanity check, though it doesn't appear to be your 
>problem.  Throw some sys-outs or something into your TopLevelAction in a couple 
>of places (right before it returns the ActionForward would be a good one) just 
>to make sure it's not barfing on something.  
>
>One possibility:  If you have 'index.jsp' set as your web app.'s exception page 
>in your web.xml, and your action is throwing an exception, then you'll end up 
>there.  Double-check that the (possible) exception isn't getting dumped into 
>Strut's log4j log or something like that.
>
>
>peace,
>Joe
>
>
>
>
>> -----Original Message-----
>> From: Geoff Seel [mailto:geoffs@foto.co.uk]
>> Sent: Monday, September 23, 2002 11:02 AM
>> To: struts-user@jakarta.apache.org
>> Subject: Redirected to index.jsp unexpectedly
>> 
>> 
>> I am trying to evaluate Struts for a client and have tried to build an
>> example from the basic struts-blank.war.I am clearly making a stupid
>> error but cannot find anything similar in the mailing 
>> archives so would
>> appreciate help for a newbie.
>> 
>> My first jsp (TopLevel.jsp) contains the following:
>> 
>> <html:form action="TopLevelDone.do">
>> Menu:      <html:select property="menu">
>>              <html:option value="AC">Add Calendar</html:option>
>>              <html:option value="AH">Add Holiday</html:option>
>>              <html:option value="RC">Remove Calendar</html:option>
>>              <html:option value="RH">Remove Holiday</html:option>
>>              <html:option value="LC">List Calendars</html:option>
>>              <html:option value="LH">List Holidays</html:option>
>>              <html:option value="HD">Holiday Dates</html:option>
>>            </html:select><br>
>>            <html:submit value="Enter"/>
>> </html:form>
>> 
>> My struts-config.xml contains the following
>> 
>>        <action path="/TopLevelDone" 
>>                type="actions.TopLevelAction"
>>                name="TopLevelForm"
>>                scope="request"
>>                input="/TopLevel.jsp">
>>          <forward name="addCalendar" path="/AddCalendar.jsp"/>
>>          <forward name="failure" path="/TopLevel.jsp"/>
>>        </action>
>> 
>> I have a TopLevelAction.class in the actions package that 
>> just pulls in
>> the value of menu and redirects according to its value.
>> 
>> When I run the jsp and enter a value I get redirected back to 
>> index.jsp
>> with '?menu=AC&submit=Enter' appended.
>> If I change the action attribute in html:form to rubbish it says it
>> can't find the action so it must be getting that far. There 
>> are no error
>> messages in the logs I can access (running it on Sun Reference
>> Implementation J2EE 1.3.1).
>> -- 
>> Geoff Seel                              Voice:  +44 (0)20-8296-0684
>> Financial Object Toolkits Ltd.          Mobile: 0797-688-0668
>> 54, Berrylands Road,                    Fax:    +44 (0)870-054-7931
>> Surbiton,                               e-mail: info@foto.co.uk
>> Surrey KT5 8PD                          WWW:    www.foto.co.uk 
>> United Kingdom
>> 
>> --
>> 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>
>

-- 
Geoff Seel                              Voice:  +44 (0)20-8296-0684
Financial Object Toolkits Ltd.          Mobile: 0797-688-0668
54, Berrylands Road,                    Fax:    +44 (0)870-054-7931
Surbiton,                               e-mail: info@foto.co.uk
Surrey KT5 8PD                          WWW:    www.foto.co.uk 
United Kingdom

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message