Hello Dave.
Yes. That helps! Now the JSP always get good data..
But what does that mean?
How can I find out what's going on?
Do I have to keep the filter mapped?
Dave Newton wrote:
One thing I've done when weird things are happening
for no apparent reason is include the context cleanup
filter; you can always see if that helps; map it
before the struts dispatcher.
<filter>
<filter-name>contextCleanup</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ActionContextCleanUp
</filter-class>
</filter>
d.
--- Roberto Nunnari <[EMAIL PROTECTED]> wrote:
Hello list.
Going on with investigation on this strange
misbehaviour, I found
out that when the JSP page gets good data, in the
value stack
I see:
key:
com.opensymphony.xwork2.dispatcher.HttpServletRequest
value:
[EMAIL PROTECTED]
while when I get no data I see:
key:
com.opensymphony.xwork2.dispatcher.HttpServletRequest
value: uri: /iopinion_hibernate00/storySearch.action
somehow, I believe the interceptor stack is wrong..
maybe
is my filter configuration?? I have added a filter
in an attempt
to use 'open session on view pattern' for use with
hibernate.
I believe that may be causing prolems, as I remember
if the
order was different the application would not work..
Should I use an interceptor instead?
Here's a snipset from my web.xml
*************************
<filter>
<filter-name>HibernateFilter</filter-name>
<filter-class>com.foo.HibernateSessionRequestFilter</filter-class>
</filter>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>HibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
*************************
Can any kind soul help me, please?
Thank you.
--
Robi
Roberto Nunnari wrote:
Hello.
I have an action with a getter for a List.
In the execute method of the action I can verify
the list is not empty.
But in the jsp view, at times it reports an empty
list.
the action:
public class StorySearch extends ActionSupport {
private List<Story> stories = null;
...
public String execute() throws Exception {
...
stories = dataManager.searchStories(...);
for (Story story : stories) {
System.out.println(" "+story.getId());
}
return SUCCESS;
}
public List getStories() {
return stories;
}
the JSP:
<c:url var="storyURL" value="/StoryView.action"/>
<display:table name="${stories}"
requestURI="storySearch.action">
<display:column property="id"
href="${storyURL}" paramId="id"/>
<display:column property="title"/>
<display:column property="text"/>
<display:column property="link"
autolink="true"/>
<display:column property="accessCount"
sortable="true"/>
<display:column property="creationDate"
sortable="true"/>
<display:caption>This is the table
caption</display:caption>
</display:table>
Any hints?
Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
____________________________________________________________________________________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Roberto Nunnari
Servizi Informatici SUPSI-DTI
SUPSI-DTI - Via Cantonale - 6928 Manno - Switzerland
email: mailto:[EMAIL PROTECTED]
tel: +41-58-6666561
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]