Hi Iwao, I can confirm that your test project works as expected. Thank you so far.
Unfortunately, I have not yet any clue about what might cause the problem. The web.xml configuration is almost identical. I'm using JSP tag files for layout composition, but I changed your example and included a tag file and it's still working… My application runs on Google App Engine, but since there is Jetty running in the background, too, I don't know why this would be the issue. Any more ideas? -Moritz Am 23.02.2012 um 16:33 schrieb Iwao AVE!: > jsessionid is added by the container when the index.jsp is rendered. > But it should not be in the form action, I think. > > I built a simple webapp for the test. > The date input is filled correctly on Tomcat 7.0.25 and Jetty 6.1.26. > And here's the form rendered for the first access. > > <form id="noteEntry" action="/stripes-test/app/note" method="post"> > <!-- Thu Feb 23 17:59:04 JST 2012 --> > <input id="date" name="date" value="23.02.2012" type="text" /> > > Note that there is no 'jsessionid' in the action attribute. > It's hard to guess what modifies your form action, though (extension? > filter?). > > So, I pushed the webapp to github. > You might be able to find the problem by modifying it incrementally. > https://github.com/harawata/stripes-test/tree/gmane-13304 > > To run it... > 1. download the zip archive from the above page ('ZIP' button) and extract it. > 2. execute mvn jetty:run (or mvn > org.mortbay.jetty:maven-jetty-plugin:run) in that directory. > 3. open http://localhost:8080/stripes-test/ in browser. > > Hope this helps, > Iwao > > 2012/2/23 Moritz Petersen <[email protected]>: >> Hi Iwao, >> >> I'm using 1.5.6 from Maven Central. As far as I know (but I'll double >> check later), that the jsessionid is already in the URL when >> redirecting from the index.jsp page. >> >> -Moritz >> >> On Thu, Feb 23, 2012 at 9:30 AM, Iwao AVE! <[email protected]> wrote: >>> Hi Moritz, >>> >>> Which version of Stripes do you use? >>> It may be related to the 'jsessionid' in URL added only on the first >>> access and it reminds me of an old issue fixed a long time ago. >>> >>> // Iwao >>> >>> 2012/2/23 Moritz Petersen <[email protected]>: >>>> Just to emphasize my point: it *does* work indeed *except* when I >>>> launch the application for the first time after rebooting the server. >>>> >>>> On 23.02.2012, at 07:40, Ankur Sharda <[email protected]> wrote: >>>> >>>> Hi Moritz, >>>> >>>> Now I understand your problem. That does sound strange. It's probably >>>> best I let someone else answer, since I will only be guessing about >>>> the reasons. >>>> >>>> Ankur >>>> >>>> On Thu, Feb 23, 2012 at 2:21 PM, Moritz Petersen >>>> <[email protected]> wrote: >>>>> >>>>> Hi Ankur, >>>>> >>>>> I'm just surprised, that the text field is populated when I hit reload. >>>>> Somehow I had expected that if the text field name matches an action bean >>>>> property that it will be populated automatically - or it would be >>>>> populated never, except if I submit the form with errors… >>>>> >>>>> I did not configure the population strategy, so I assume >>>>> DefaultPopulationStrategy will be effective. The documentation reads: "If >>>>> there is no value in the request then an ActionBean bound to the current >>>>> form will be looked for". That's the part I don't understand, because I >>>>> assumed that the action bean would be used to populate the text field. >>>>> >>>>> -Moritz >>>>> >>>>> Am 23.02.2012 um 04:59 schrieb Ankur Sharda: >>>>> >>>>>> Hi Moritz, >>>>>> >>>>>> What is the behaviour you want. Do you want the date to be displayed in >>>>>> the text field, if so you just have to do <s:text id="date" >>>>>> name="date" formatPattern="dd.MM.yyyy" value="${actionBean.date}" /> >>>>>> >>>>>> But I suspect you already know that, and are asking about something else? >>>>>> >>>>>> >>>>>> >>>>>> On Thu, Feb 23, 2012 at 5:26 AM, Moritz Petersen >>>>>> <[email protected]> wrote: >>>>>> Hello, >>>>>> >>>>>> I found a strange bug in my application and I'm not sure what the root >>>>>> cause could be. >>>>>> >>>>>> There is an index.jsp file, which redirects to my action bean: >>>>>> >>>>>> <c:redirect url="/app/note" /> >>>>>> >>>>>> The Stripes Dispatcher Servlet is mapped to /app/* (from web.xml): >>>>>> >>>>>> <servlet-mapping> >>>>>> <servlet-name>DispatcherServlet</servlet-name> >>>>>> <url-pattern>/app/*</url-pattern> >>>>>> </servlet-mapping> >>>>>> >>>>>> So, I believe with this redirect, the action bean should be called: >>>>>> >>>>>> @UrlBinding( "/app/note/{$event}/{note.meetingId}/{note.id}" ) >>>>>> public class NoteActionBean extends AbstractActionBean { >>>>>> private Date date; >>>>>> >>>>>> @DefaultHandler >>>>>> public Resolution create() { >>>>>> // set the date to new Date() >>>>>> // return ForwardResolution to "note.jsp" >>>>>> } >>>>>> >>>>>> // getter and setter >>>>>> ... >>>>>> } >>>>>> >>>>>> The note.jsp page itself displays the form: >>>>>> >>>>>> <s:form beanclass="NoteActionBean" method="post" id="noteEntry"> >>>>>> <!-- ${actionBean.date} --> >>>>>> <s:text id="date" name="date" formatPattern="dd.MM.yyyy" /> >>>>>> ... >>>>>> >>>>>> >>>>>> But the rendered HTML is: >>>>>> >>>>>> <form id="noteEntry" action="/app/note;jsessionid=h100dcmd5xs8" >>>>>> method="post"> >>>>>> <!-- Wed Feb 22 21:20:24 UTC 2012 --> >>>>>> <input id="date" name="date" type="text" /> >>>>>> ... >>>>>> >>>>>> >>>>>> So, there is no date in the text field. But in the comment before it is! >>>>>> And when debugging, I found out that the method getDate() is not called >>>>>> from the text field. >>>>>> >>>>>> On the other hand, when I reload the page (without doing anything else) >>>>>> the field shows the date correctly. >>>>>> >>>>>> I'm a bit lost here. What am I doing wrong? >>>>>> >>>>>> Any suggestions are highly appreciated. Thank you. >>>>>> >>>>>> Moritz. >>>>>> ------------------------------------------------------------------------------ >>>>>> Virtualization & Cloud Management Using Capacity Planning >>>>>> Cloud computing makes use of virtualization - but cloud computing >>>>>> also focuses on allowing computing to be delivered as a service. >>>>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >>>>>> _______________________________________________ >>>>>> Stripes-users mailing list >>>>>> [email protected] >>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Ankur Sharda >>>>>> E: [email protected] >>>>>> M: 0421 311 106 >>>>>> ------------------------------------------------------------------------------ >>>>>> Virtualization & Cloud Management Using Capacity Planning >>>>>> Cloud computing makes use of virtualization - but cloud computing >>>>>> also focuses on allowing computing to be delivered as a service. >>>>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________ >>>>>> Stripes-users mailing list >>>>>> [email protected] >>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Virtualization & Cloud Management Using Capacity Planning >>>>> Cloud computing makes use of virtualization - but cloud computing >>>>> also focuses on allowing computing to be delivered as a service. >>>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >>>>> _______________________________________________ >>>>> Stripes-users mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>>> >>>> >>>> >>>> >>>> -- >>>> Ankur Sharda >>>> E: [email protected] >>>> M: 0421 311 106 >>>> >>>> ------------------------------------------------------------------------------ >>>> Virtualization & Cloud Management Using Capacity Planning >>>> Cloud computing makes use of virtualization - but cloud computing >>>> also focuses on allowing computing to be delivered as a service. >>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >>>> >>>> _______________________________________________ >>>> Stripes-users mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>>> >>>> ------------------------------------------------------------------------------ >>>> Virtualization & Cloud Management Using Capacity Planning >>>> Cloud computing makes use of virtualization - but cloud computing >>>> also focuses on allowing computing to be delivered as a service. >>>> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >>>> _______________________________________________ >>>> Stripes-users mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/stripes-users >>> >>> ------------------------------------------------------------------------------ >>> Virtualization & Cloud Management Using Capacity Planning >>> Cloud computing makes use of virtualization - but cloud computing >>> also focuses on allowing computing to be delivered as a service. >>> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >>> _______________________________________________ >>> Stripes-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/stripes-users >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> Stripes-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/stripes-users > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Stripes-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
