Author Login
Post Reply
user Digest 29 Jul 2008 14:11:06 -0000 Issue 8166
Topics (messages 189413 through 189426):
Re: Struts 2 select tag
189413 by: Pawe³ Wielgus
Re: [s2] using ognl for iterator value
189414 by: Pawe³ Wielgus
Re: possibly strange namespace use case
189415 by: Jeromy Evans
Re: There is no Action mapped for namespace / and action name ...
189416 by: Pauli Savolainen
189423 by: John Moose
Re: Implement header issue
189417 by: lei.java.gmail.com
Re: [S2] Form doesn't redirect
189418 by: Milan Milanovic
Re: <s:a dojo-anchor, usage of notifyTopics, can't change returned data
189419 by: holod
struts record output and entry
189420 by: cpanon
Is this a wart on the framework?
189421 by: stanlick
189422 by: Musachy Barroso
Check if object in list (s:iterator additional constraint)
189424 by: netslow
Re: Background Threads
189425 by: Frank W. Zammetti
189426 by: dave.smith
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_189413.ezm (zipped)Hi,
insert <s:property value="project.info"/> instead select tag, it might
give You some more info.
Best greetings,
Pawel Wielgus.
On 28/07/2008, Deepika Appana <deepika.appana@(protected):
> Hi,
>
> I am a newbie to struts 2. I have a question about the struts 2 select tag.
>
> When I try to use a property defined in package.properties for the "list",
> For Eg:
>
> <s:select label="Names" list="project.names"/>
>
> (project.names is defined in the package.properties)
> i get an exception that states that the project.names is not a enumeration
> or map. I am wondering why it does not evaluate to the list that I have
> defined in the properties file.
>
> Thanks,
>
> D
>

Attachment:
user_189414.ezm (zipped)Hi,
have You tried <s:property value="myMethod('string')"/>?
Best gretings,
Pawel Wielgus.
On 28/07/2008, James Carr <james.r.carr@(protected):
> I have a method that takes a string arg and returns a list. the object
> is accessible from the action.
>
> how can I pass a value accessible on my page to the method and use the
> result in an iterator?
>
> thanks,
> james
>
> On 7/28/08, dynamicd <dhaval.parekh@(protected):
>>
>> Hi,
>>
>> I am new to Struts2 and I am having a problem displaying content with IE.
>> It
>> works fine in Firefox.
>> I am using Struts2, Acegi for login, Hibernate for ORM and struts2 ajax
>> tags
>> for display
>>
>> I have a parent tabbed panel and a child tabbed panel.
>> Once I login everything works fine however after a few clicks around I get
>> the following error.
>>
>> Error loading
>> '/Dashboard/ViewOMTable.action?dojo.preventCache=1217258686015' (200 OK)
>>
>> I am not sure why it is working when I log in and not after a few clicks.
>> Again it works as expected in Firefox.
>>
>> Myjsp looks like this
>>
>> Parent tab has the following tab
>>
>> <authz:authorize ifAnyGranted="ROLE_ADMINISTRATOR"> /** this is for the
>> Acegi stuff */
>> <s:url id="listOM" value="/Dashboard/ViewManagedEntities.action" />
>> <s:div
>> id="OM"
>> label ="Operations Manager"
>> theme="ajax"
>> href="%{listOM}"
>> autoStart="false"
>> refreshOnShow="true"
>> errorText="Unable to retrieve data!">
>> </s:div>
>> </authz:authorize>
>>
>> This will get the child jsp which is below which is also tabbed panel
>>
>>
>> <s:head theme="ajax" debug="true"/>
>> <s:div id="OMpage">
>> <s:tabbedPanel id="insideOMTab" selectedTab="allOM">
>>
>> <s:url id="allOM" action="ViewOMTable.action" />
>> <s:div
>> id="allOM"
>> label ="LIST"
>> theme="ajax"
>> href="%{allOM}"
>> autoStart= "false"
>> refreshOnShow="true"
>> >
>> </s:div>
>>
>>
>> <s:url id="addOM" action="showaddOMform" />
>> <s:div
>> id="addOM"
>> label ="ADD"
>> theme="ajax"
>> href="%{addOM}"
>> autoStart= "false"
>> refreshOnShow="true"
>> >
>> </s:div>
>>
>> </s:tabbedPanel>
>>
>> </s:div>
>>
>>
>> Any help is greatly appreciated
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Strtus2-tags-IE-issue-error-loading-page-200-ok-tp18691505p18691505.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189415.ezm (zipped)Andy Law wrote:
>
> e.g.
> /foo/Action1.action runs action1 passing in 'foo' and /bar/Action1.action
> runs the same action passing in 'bar'.
>
>
> How should I code/configure/build this kind of thing.
>
>
In Struts 2.0.x, you may be able to use wildcards in the namespace
depending on how many variations you need.
http://struts.apache.org/2.0.11.2/docs/wildcard-mappings.html
In Struts 2.0.x, you may also be able to use the RestfulActionMapper to
pass simple properties to your action through the path.
http://struts.apache.org/2.0.11.2/docs/restfulactionmapper.html
Use it with a CompositeActionMapper.
In Struts 2.1.x, use the NamedVariablePatternMatcher to pass parameters
through the namespace, as described in this thread:
http://www.nabble.com/REST-plugin-URL-syntax-td17855192i20.html
It can be used without the REST plugin/conventions.
regards,
Jeromy Evans

Attachment:
user_189416.ezm (zipped)Hi,
I am having exactly the same problem. I was using Struts 2.1.1,
switched to struts 2.1.2 (including the restful and codebehind
plugins) and started to get this 'no action found' error. I am quite
confident that I did not do anything that should've resulted in this.
Of course I cannot be 100% sure, because I did goof around with my
code a bit, but I checked and rechecked and rerechecked everthing
twice and couldn't find a reason for this behaviour.
John's web.xml and the stacktrace are identical to mine. I don't
declare any namespaces in my struts.xml packages nor in the login form
from which I try to invoke the login action <s:form
action="/login/execute" method="post">. (Also tried with an
exclamation mark i.e. login!execute) I have a LoginAction.java with an
execute method in the pacakge defined in the web.xml's actionPackages
init parameter. At least this declaration used to send the control to
the LoginAction's execute method. Doesn't do anymore.
I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
include a tiles main layout which in turn includes sub-layouts (such
as the login form). I don't know if this has anything got to do with
the problem I'm having.
So, is a result of something I did wrong or could it be something else?
Thank you
Pauli Savolainen
2008/7/28 Paul Benedict <pbenedict@(protected)>:
> What's the correct way of writing a good 404 or action not found page? Does
> s2 have something like a fallback action if nothing can be found?
>
> Paul
>
> On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <newton.dave@(protected):
>
>> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week or so
>> ago that I haven't had time to re-visit--so it actually could be the web.xml
>> (specifically the dispatcher being used) and I may have put my foot in my
>> mouth (again).
>>
>> Somebody followed up saying the original FilterDispatcher worked, though,
>> so maybe not. Hrm.
>>
>> Dave
>>
>> --- On Mon, 7/28/08, John Moose <jgmoose@(protected):
>> > and I probably should have included this as well:
>> >
>> > Struts Problem Report
>> >
>> > Struts has detected an unhandled exception:
>> > *Messages*:
>> > There is no Action mapped for namespace / and action name
>> > dashbd.
>> > ------------------------------
>> > Stacktraces *There is no Action mapped for namespace / and
>> > action name
>> > dashbd. - [unknown location]*
>> >
>> >
>> >
>>
com.opensymphony.xwork2.DefaultActionProxy.prepare (
DefaultActionProxy.java:177)
>> >
>> >
>>
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy (
DefaultActionProxyFactory.java:59)
>> >
>> >
>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>> >
>> >
>>
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:439)
>> >
>> >
>>
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:395)
>> >
>> >
>>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:186)
>> >
>> >
>>
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:157)
>> >
>> >
>>
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:214)
>> >
>> >
>>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
>> >
>> >
>>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
>> >
>> >
>>
org.apache.catalina.core.StandardContextValve.invokeInternal (
StandardContextValve.java:198)
>> >
>> >
>>
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:152)
>> >
>> >
>>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
>> >
>> >
>>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
>> >
>> >
>>
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:137)
>> >
>> >
>>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
>> >
>> >
>>
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:118)
>> >
>> >
>>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:102)
>> >
>> >
>>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
>> >
>> >
>>
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:109)
>> >
>> >
>>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
>> >
>> >
>>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
>> >
>> >
org.apache.catalina.core.ContainerBase.invoke (
ContainerBase.java:929)
>> >
>> >
org.apache.coyote.tomcat5.CoyoteAdapter.service (
CoyoteAdapter.java:160)
>> >
>> >
>>
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:799)
>> >
>> >
>>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>> >
>> >
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>> >
>> >
>>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>> >
java.lang.Thread.run (
Thread.java:595)
>> >
>> >
>> >
>> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>> > <jgmoose@(protected):
>> >
>> > > Hi Dave,
>> > >
>> > > I have the following snippet of DashbdController class
>> > that I am expecting
>> > > to hit with the following URL:
>> > >
>> > > http:/localhost:8080/Dashbd
>> > >
>> > > <---SNIPPET
>> > >
>> > > package com.myeclipse.ozone;
>> > >
>> > > import
java.util.Collection;
>> > >
>> > > import com.myeclipse.hibernate.*;
>> > >
>> > > import
org.hibernate.HibernateException;
>> > > import
org.hibernate.Session;
>> > > import
org.hibernate.cfg.Configuration;
>> > >
>> > > import
org.apache.struts2.config.Result;
>> > > import
org.apache.struts2.config.Results;
>> > > import
>> >
org.apache.struts2.dispatcher.ServletActionRedirectResult;
>> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>> > > import org.apache.struts2.rest.HttpHeaders;
>> > >
>> > > import
com.opensymphony.xwork2.ModelDriven;
>> > > import
com.opensymphony.xwork2.Validateable;
>> > > import
com.opensymphony.xwork2.ValidationAwareSupport;
>> > >
>> > >
>> > > @Results({
>> > > @Result(name="success",
>> > type=ServletActionRedirectResult.class,
>> > > value="dashbd")
>> > > })
>> > >
>> > > public class DashbdController extends
>> > ValidationAwareSupport implements
>> > > ModelDriven<Object>, Validateable{
>> > >
>> > > //private static Gadget transientGadget = new
>> > Gadget();
>> > >
>> > > //String id;
>> > > int id;
>> > >
>> > > private static int dashboardId;
>> > >
>> > > private Collection<Dashbd>
>> > dashboardList;
>> > > private Collection<Dashbd> model;
>> > > private Collection<DashbdType>
>> > dashboardTypeList;
>> > >
>> > > private DashbdService dashboardService = new
>> > DashbdService(); // where
>> > > the DAOs live
>> > >
>> > >
>> > > /*
>> > >
>> >
>> ****************************************************************************************
>> > > * DASHBOARDS
>> > > */
>> > >
>> > > //
>> > > // GET .../dashbd get all
>> > dashboards in table
>> > > //
>> > > public HttpHeaders index() {
>> > > dashboardList = dashboardService.getAll();
>> > > return new
>> > DefaultHttpHeaders("index") // dashbd-index.jsp
>> > > .disableCaching();
>> > > }
>> > >
>> > >
>> > > and etc. ....
>> > >
>> > > ...END SNIPPET >
>> > >
>> > > There are more methods in this calss of course, but
>> > all I'm trying to do
>> > > initially is hit the index() action with the URL above
>> > ?!?
>> > >
>> > > the index.jsp is really simple:
>> > >
>> > > <% response.sendRedirect("dashbd"); %>
>> > >
>> > >
>> > > this same scheme works perfectly with another RESTful
>> > app service and fir
>> > > the life of me, I can't find any
>> > >
>> > >
>> > >
>> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>> > <newton.dave@(protected):
>> > >
>> > >> The web.xml doesn't have anything to do with
>> > the error message; it thinks
>> > >> there isn't an action configured at the URL
>> > you're requesting.
>> > >>
>> > >> Impossible to help without more information.
>> > >>
>> > >> Dave
>> > >>
>> > >> --- On Mon, 7/28/08, John Moose
>> > <jgmoose@(protected):
>> > >>
>> > >> > From: John Moose <jgmoose@(protected)>
>> > >> > Subject: There is no Action mapped for
>> > namespace / and action name ...
>> > >> > To: "Struts Users Mailing List"
>> > <user@(protected)>
>> > >> > Date: Monday, July 28, 2008, 3:58 PM
>> > >> > I know what you're thinking... web.xml
>> > has no action
>> > >> > mapping, but it does!
>> > >> >
>> > >> >
>> > >> > <?xml version="1.0"
>> > >> > encoding="UTF-8"?>
>> > >> > <web-app version="2.5"
>> > >> >
>> > xmlns="http://java.sun.com/xml/ns/javaee"
>> > >> >
>> > >> >
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > >> >
>> > >> >
>> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> > >> >
>> > >> >
>> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>> > >> >
>> > >> > <display-name>Struts 2 RESTful
>> > Ozone
>> > >> > Services</display-name>
>> > >> >
>> > >> > <!-- Filters -->
>> > >> > <filter>
>> > >> >
>> > <filter-name>action2</filter-name>
>> > >> >
>> > >> >
>> > >>
>> >
>> <filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>> > >> > <init-param>
>> > >> >
>> > >> >
>> > <param-name>actionPackages</param-name>
>> > >> >
>> > >> >
>> > <param-value>com.myeclipse.ozone</param-value>
>> > >> > </init-param>
>> > >> > <init-param>
>> > >> >
>> > >> >
>> > <param-name>struts.devMode</param-name>
>> > >> >
>> > <param-value>true</param-value>
>> > >> > </init-param>
>> > >> > </filter>
>> > >> >
>> > >> > <filter-mapping>
>> > >> >
>> > <filter-name>action2</filter-name>
>> > >> >
>> > <url-pattern>/*</url-pattern>
>> > >> > </filter-mapping>
>> > >> >
>> > >> > <welcome-file-list>
>> > >> >
>> > <welcome-file>index.jsp</welcome-file>
>> > >> > </welcome-file-list>
>> > >> > </web-app>
>> > >> >
>> > >> >
>> > >> >
>> > >> > This file works well with another Struts2.1.3
>> > app. Can
>> > >> > someone help me
>> > >> > understand where to look for the cause of
>> > this???
>> > >> >
>> > >> > Thanks folks
>> > >>
>> > >>
>> > ---------------------------------------------------------------------
>> > >> To unsubscribe, e-mail:
>> > user-unsubscribe@(protected)
>> > >> For additional commands, e-mail:
>> > user-help@(protected)
>> > >>
>> > >>
>> > >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>

Attachment:
user_189423.ezm (zipped)A very wierd situation...I have two projects in the Eclipse workspace --
Tagging and Dashbd They both use the REST plugin and follow the naming
conventions, etc. Tagging will build, re-deploy and run perfectly. When I
close that project and open Dashbd, build, re-deploy and run I get the
Action mapping failure as described. Both projects have source files in the
"com.myeclipse.ozone" package name(space). Is it possible that there is some
very persistent caching going on ??? like over multiple starts and re-starts
of Tomcat? just a WAG...
-John
On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
savolainen.pauli@(protected):
> Hi,
>
> I am having exactly the same problem. I was using Struts 2.1.1,
> switched to struts 2.1.2 (including the restful and codebehind
> plugins) and started to get this 'no action found' error. I am quite
> confident that I did not do anything that should've resulted in this.
> Of course I cannot be 100% sure, because I did goof around with my
> code a bit, but I checked and rechecked and rerechecked everthing
> twice and couldn't find a reason for this behaviour.
>
> John's web.xml and the stacktrace are identical to mine. I don't
> declare any namespaces in my struts.xml packages nor in the login form
> from which I try to invoke the login action <s:form
> action="/login/execute" method="post">. (Also tried with an
> exclamation mark i.e. login!execute) I have a LoginAction.java with an
> execute method in the pacakge defined in the web.xml's actionPackages
> init parameter. At least this declaration used to send the control to
> the LoginAction's execute method. Doesn't do anymore.
>
> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
> include a tiles main layout which in turn includes sub-layouts (such
> as the login form). I don't know if this has anything got to do with
> the problem I'm having.
>
> So, is a result of something I did wrong or could it be something else?
>
> Thank you
>
> Pauli Savolainen
>
> 2008/7/28 Paul Benedict <pbenedict@(protected)>:
> > What's the correct way of writing a good 404 or action not found page?
> Does
> > s2 have something like a fallback action if nothing can be found?
> >
> > Paul
> >
> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <newton.dave@(protected)>
> wrote:
> >
> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week or
> so
> >> ago that I haven't had time to re-visit--so it actually could be the
> web.xml
> >> (specifically the dispatcher being used) and I may have put my foot in
> my
> >> mouth (again).
> >>
> >> Somebody followed up saying the original FilterDispatcher worked,
> though,
> >> so maybe not. Hrm.
> >>
> >> Dave
> >>
> >> --- On Mon, 7/28/08, John Moose <jgmoose@(protected):
> >> > and I probably should have included this as well:
> >> >
> >> > Struts Problem Report
> >> >
> >> > Struts has detected an unhandled exception:
> >> > *Messages*:
> >> > There is no Action mapped for namespace / and action name
> >> > dashbd.
> >> > ------------------------------
> >> > Stacktraces *There is no Action mapped for namespace / and
> >> > action name
> >> > dashbd. - [unknown location]*
> >> >
> >> >
> >> >
> >>
>
com.opensymphony.xwork2.DefaultActionProxy.prepare (
DefaultActionProxy.java:177)
> >> >
> >> >
> >>
>
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy (
DefaultActionProxyFactory.java:59)
> >> >
> >> >
> >>
> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
> >> >
> >> >
> >>
>
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:439)
> >> >
> >> >
> >>
>
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:395)
> >> >
> >> >
> >>
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:186)
> >> >
> >> >
> >>
>
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:157)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:214)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardContextValve.invokeInternal (
StandardContextValve.java:198)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:152)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:137)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
> >> >
> >> >
> >>
>
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:118)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:102)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:109)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardValveContext.invokeNext (
StandardValveContext.java:104)
> >> >
> >> >
> >>
>
org.apache.catalina.core.StandardPipeline.invoke (
StandardPipeline.java:520)
> >> >
> >> >
org.apache.catalina.core.ContainerBase.invoke (
ContainerBase.java:929)
> >> >
> >> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service (
CoyoteAdapter.java:160)
> >> >
> >> >
> >>
>
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:799)
> >> >
> >> >
> >>
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >> >
> >> >
> >>
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >> >
> >> >
> >>
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >> >
java.lang.Thread.run (
Thread.java:595)
> >> >
> >> >
> >> >
> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
> >> > <jgmoose@(protected):
> >> >
> >> > > Hi Dave,
> >> > >
> >> > > I have the following snippet of DashbdController class
> >> > that I am expecting
> >> > > to hit with the following URL:
> >> > >
> >> > > http:/localhost:8080/Dashbd
> >> > >
> >> > > <---SNIPPET
> >> > >
> >> > > package com.myeclipse.ozone;
> >> > >
> >> > > import
java.util.Collection;
> >> > >
> >> > > import com.myeclipse.hibernate.*;
> >> > >
> >> > > import
org.hibernate.HibernateException;
> >> > > import
org.hibernate.Session;
> >> > > import
org.hibernate.cfg.Configuration;
> >> > >
> >> > > import
org.apache.struts2.config.Result;
> >> > > import
org.apache.struts2.config.Results;
> >> > > import
> >> >
org.apache.struts2.dispatcher.ServletActionRedirectResult;
> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
> >> > > import org.apache.struts2.rest.HttpHeaders;
> >> > >
> >> > > import
com.opensymphony.xwork2.ModelDriven;
> >> > > import
com.opensymphony.xwork2.Validateable;
> >> > > import
com.opensymphony.xwork2.ValidationAwareSupport;
> >> > >
> >> > >
> >> > > @Results({
> >> > > @Result(name="success",
> >> > type=ServletActionRedirectResult.class,
> >> > > value="dashbd")
> >> > > })
> >> > >
> >> > > public class DashbdController extends
> >> > ValidationAwareSupport implements
> >> > > ModelDriven<Object>, Validateable{
> >> > >
> >> > > //private static Gadget transientGadget = new
> >> > Gadget();
> >> > >
> >> > > //String id;
> >> > > int id;
> >> > >
> >> > > private static int dashboardId;
> >> > >
> >> > > private Collection<Dashbd>
> >> > dashboardList;
> >> > > private Collection<Dashbd> model;
> >> > > private Collection<DashbdType>
> >> > dashboardTypeList;
> >> > >
> >> > > private DashbdService dashboardService = new
> >> > DashbdService(); // where
> >> > > the DAOs live
> >> > >
> >> > >
> >> > > /*
> >> > >
> >> >
> >>
> ****************************************************************************************
> >> > > * DASHBOARDS
> >> > > */
> >> > >
> >> > > //
> >> > > // GET .../dashbd get all
> >> > dashboards in table
> >> > > //
> >> > > public HttpHeaders index() {
> >> > > dashboardList = dashboardService.getAll();
> >> > > return new
> >> > DefaultHttpHeaders("index") // dashbd-index.jsp
> >> > > .disableCaching();
> >> > > }
> >> > >
> >> > >
> >> > > and etc. ....
> >> > >
> >> > > ...END SNIPPET >
> >> > >
> >> > > There are more methods in this calss of course, but
> >> > all I'm trying to do
> >> > > initially is hit the index() action with the URL above
> >> > ?!?
> >> > >
> >> > > the index.jsp is really simple:
> >> > >
> >> > > <% response.sendRedirect("dashbd"); %>
> >> > >
> >> > >
> >> > > this same scheme works perfectly with another RESTful
> >> > app service and fir
> >> > > the life of me, I can't find any
> >> > >
> >> > >
> >> > >
> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
> >> > <newton.dave@(protected):
> >> > >
> >> > >> The web.xml doesn't have anything to do with
> >> > the error message; it thinks
> >> > >> there isn't an action configured at the URL
> >> > you're requesting.
> >> > >>
> >> > >> Impossible to help without more information.
> >> > >>
> >> > >> Dave
> >> > >>
> >> > >> --- On Mon, 7/28/08, John Moose
> >> > <jgmoose@(protected):
> >> > >>
> >> > >> > From: John Moose <jgmoose@(protected)>
> >> > >> > Subject: There is no Action mapped for
> >> > namespace / and action name ...
> >> > >> > To: "Struts Users Mailing List"
> >> > <user@(protected)>
> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
> >> > >> > I know what you're thinking... web.xml
> >> > has no action
> >> > >> > mapping, but it does!
> >> > >> >
> >> > >> >
> >> > >> > <?xml version="1.0"
> >> > >> > encoding="UTF-8"?>
> >> > >> > <web-app version="2.5"
> >> > >> >
> >> > xmlns="http://java.sun.com/xml/ns/javaee"
> >> > >> >
> >> > >> >
> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> > >> >
> >> > >> >
> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >> > >> >
> >> > >> >
> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> >> > >> >
> >> > >> > <display-name>Struts 2 RESTful
> >> > Ozone
> >> > >> > Services</display-name>
> >> > >> >
> >> > >> > <!-- Filters -->
> >> > >> > <filter>
> >> > >> >
> >> > <filter-name>action2</filter-name>
> >> > >> >
> >> > >> >
> >> > >>
> >> >
> >>
> <filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >> > >> > <init-param>
> >> > >> >
> >> > >> >
> >> > <param-name>actionPackages</param-name>
> >> > >> >
> >> > >> >
> >> > <param-value>com.myeclipse.ozone</param-value>
> >> > >> > </init-param>
> >> > >> > <init-param>
> >> > >> >
> >> > >> >
> >> > <param-name>struts.devMode</param-name>
> >> > >> >
> >> > <param-value>true</param-value>
> >> > >> > </init-param>
> >> > >> > </filter>
> >> > >> >
> >> > >> > <filter-mapping>
> >> > >> >
> >> > <filter-name>action2</filter-name>
> >> > >> >
> >> > <url-pattern>/*</url-pattern>
> >> > >> > </filter-mapping>
> >> > >> >
> >> > >> > <welcome-file-list>
> >> > >> >
> >> > <welcome-file>index.jsp</welcome-file>
> >> > >> > </welcome-file-list>
> >> > >> > </web-app>
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > This file works well with another Struts2.1.3
> >> > app. Can
> >> > >> > someone help me
> >> > >> > understand where to look for the cause of
> >> > this???
> >> > >> >
> >> > >> > Thanks folks
> >> > >>
> >> > >>
> >> > ---------------------------------------------------------------------
> >> > >> To unsubscribe, e-mail:
> >> > user-unsubscribe@(protected)
> >> > >> For additional commands, e-mail:
> >> > user-help@(protected)
> >> > >>
> >> > >>
> >> > >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189417.ezm (zipped)Hi,
The header in my app shows different resources based on the language
parameter. It needs to be insert to each page. There are two appoaches in my
mind.
1. Use s:include tag. In this case, lots of data need passing to it using
<s:param.../> tag, e.g., images, text, ....
2. Use s:action tag. In this case, all data can be stored in a Java class
and loaded into the header via the action class.
I'd like to know if there is a better way to implement it and which one of
the above two is more reasonable.
Thanks.

Attachment:
user_189418.ezm (zipped)
Hi Dave,
thank you on Ajax reference. I know basically Ajax and I'm using it in my
applications for simple updating of data. I just forgot to remove
theme="ajax" from submit button and that was the problem, as I said so.
--
Regards, Milan
newton.dave wrote:
>
> --- On Mon, 7/28/08, Milan Milanovic <milanmilanovich@(protected):
>> well I don't understand what is the problem, I use ajax
>> for my first form, but not to second which should redirect?
>
> ...
>
> Not reloading the entire page is one of the main points of Ajax.
>
> If you want to reload the entire page (like with a redirect) and you're
> not handling that yourself in JavaScript I don't really see the point (in
> general; there are exceptions).
>
> You may want to read up on Ajax fundamentals; JJG's article is one of the
> more popular ones, even though people have been doing it for a decade+
> now.
>
> http://www.adaptivepath.com/ideas/essays/archives/000385.php
>
> The Wikipedia article gives a shorter, higher-level overview. The second
> sentence may be informative:
>
> "With Ajax, web applications can retrieve data from the server
> asynchronously in the background without interfering with the display and
> behavior of the existing page."
>
> http://en.wikipedia.org/wiki/AJAX
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189419.ezm (zipped)
Thanks newton.dave , I've spent some time experimenting with <s:a/> tag
attributes.
Now, I have problem with notifyTopics.
Please, see my function:
1.
dojo.event.topic.subscribe("/afterDeleteLaw", function(data, request,
widget){
//data : text returned from request(the html) It is my json
//request: XMLHttpRequest object
//widget: widget that published the topic
var _mydata = eval("(" + data +")");
alert('_mydata.resultOfAction.resultType [' +
_mydata.resultOfAction.resultType +']');//I want it!
//data = _mydata.resultOfAction.resultType; doesn't help
for(var i=0; i< _mydata.resultOfAction.resultType.length; i++){ //doesn't
help
data[i] = _mydata.resultOfAction.resultType.getChatAt(i);
}
alert('data new value =' + data);//good value, but <s:a/> outputs previous
value - plain json
});
I've parsed income JSON, got object field value and changed value of data
parameter,
but output is the same: plain json. Seems like data value hasn't been
changed.
Can you tell me please, what's wrong?
2. On this forum I found JS api to work with autocompleter
(<s:autocompleter/>):
var auto = dojo.widget.byId("autoForumThreads");
//selected key
var key = auto.comboBoxSelectionValue.value;
//selected value
var value = auto.comboBoxValue.value;
//text entered by user
var text = auto.textInputNode.value
Where can I find the same api, but for <s:a/> widget? I've googled alot, but
I didn't find anything.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189420.ezm (zipped)Hello
I am having a difficult time designing and implementing an interaction of displaying and accepting user input of multiple records at once. I can create a collection of records, but records are complex, composed of other objects that are themselves composed of text strings that I want rendered as either simple html input boxes, checkboxes or radio. I have a sense that I need to use the iterate to get iterate over the total collection, but how do I record by record render the html input elements. Furthermore what do these look like to the action that will receive the post? A simpler version of this is being done on shopping carts a checkbox on each line, but that may be hard coded. Is the way I need it even possible with struts 1.1?

Attachment:
user_189421.ezm (zipped)
I have been away from Struts 2 for many months and was prompted with this
question yesterday:
Why does this code throw a null pointer exception?
<s:url action="employeeAction_subsetByDepartment">
<s:param id="department" value="%{#attr.currRow.department}"/>
</s:url>
After jacking around with it for nearly an hour I realized that id should be
name! It seems the adjoining tags were using the id attribute and this
developer had applied common sense and used id here as well. Now I realize
the JSTL/OGNL debate has caused much consternation among developers and I
have sort of gotten over that whole mess. But this tipped my scale! What
gives with the Struts 2 tag library? Seriously, step outside yourself and
think about it before you answer. Is this a wart on the framework?
Peace,
Scott
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189422.ezm (zipped)We have been trying to remove unused params from the tags, and make
them consistent (like adding a 'var' attribute to 'url' tag, and
deprecating 'id'), in this case, the 'id' attribute should be removed.
All it takes is to add an annotation to the tag class.
musachy
On Tue, Jul 29, 2008 at 8:43 AM, stanlick <stanlick@(protected):
>
> I have been away from Struts 2 for many months and was prompted with this
> question yesterday:
>
> Why does this code throw a null pointer exception?
>
> <s:url action="employeeAction_subsetByDepartment">
> <s:param id="department" value="%{#attr.currRow.department}"/>
> </s:url>
>
> After jacking around with it for nearly an hour I realized that id should be
> name! It seems the adjoining tags were using the id attribute and this
> developer had applied common sense and used id here as well. Now I realize
> the JSTL/OGNL debate has caused much consternation among developers and I
> have sort of gotten over that whole mess. But this tipped my scale! What
> gives with the Struts 2 tag library? Seriously, step outside yourself and
> think about it before you answer. Is this a wart on the framework?
>
> Peace,
> Scott
> --
> View this message in context: http://www.nabble.com/Is-this-a-wart-on-the-framework--tp18711301p18711301.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_189424.ezm (zipped)
I hello experts. I'm quite new in struts2, and I have a question.
I have an action ShowReports which returns two lists of reports: reports and
badReports.
I would like to show these reports bud I need also check if current report
belongs to badReports list, and if it does notify user about it. What is the
best way to do that?
I want something like that:
<table>
<tr><td>Name</td><td>Title</td></tr>
<s:iterator value="reports">
<s:if test="!(report in badReports)">
<tr>
<td><s:property value="name"/></td>
<td><s:property value="title"/></td>
</tr>
</s:if>
<s:else>
<tr>
<td>bad report!</td>
<td>bad report!</td>
</tr>
</s:else>
</s:iterator>
</table>
The question is how to check the condition?
Thanks for any advice.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189425.ezm (zipped)Is it still the case, given the JDK 1.5 concurrency stuff, that you are
still not technically allowed to spawn threads in a J2EE container (per
spec guidelines)? Did the latest J2EE spec loosen that restriction maybe?
Ignoring for the moment the fact that we all do it and have been for a
long time :)
I've said for a lone time that there are some problems that can't really
be solved any other way, so whether you're *supposed* to do it or not is
irrelevant, you just have to be careful and be aware of the gotchas to
watch out for, as Jeremy points out.
Frank
--
Frank W. Zammetti
Author of "Practical DWR 2 Projects"
and "Practical JavaScript, DOM Scripting and Ajax Projects"
and "Practical Ajax Projects With Java Technology"
for info: apress.com/book/search?searchterm=zammetti&act=search
Java Web Parts - javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
My "look ma, I have a blog too!" blog: zammetti.com/blog
On Tue, July 29, 2008 1:09 am, Jeromy Evans wrote:
>
> If you're using Java 1.5+, the standard concurrent package provides
> everything you need.
>
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html#package_description
>
> There should be several tutorial available for it and it's well with
> understanding the various approaches. Prior to Java 1.5 there is a
> library available that the concurrent package was derived from (I forget
> the name).
>
> Important: If you're creating your own threads within a container, it's
> essential that you guarantee that the threads and their resources are
> properly released. Failing to do so will prevent the container from
> undeploying your application or shutting down cleanly. One technique to
> assist with this is create your ExecutorService within a
> ServletContextListener that uses the shutdown method to shutdown the
> threads and release all resources. Another approach is to use a library
> that provides this level of integration already (such as is available in
> one of the Spring packages I believe).
>
> regards,
> Jeromy Evans
>
> Reginald.Javier@(protected):
>> Hi Dave,
>>
>> You can just create any class that extends the Thread object or
>> implements the runnable interface. The required method, run(), should
>> abstract what u want to do, (connect to the 3rd party server).
>> Instantiate that class then call its start() method from the Struts
>> action that should trigger it. Your action should finish safely without
>> waiting for that thread to finish. Note: this is just a bare
>> implementation, you might want to consider using thread pooling to
>> manage your resources. What exactly do you intend to do? Will you wait
>> for a response from your HTTPS server?
>>
>> Reginald Javier
>> Software Engineer II, Strategic Customer Solutions Implementation
>> T: +632-859-5442
>> -----Original Message-----
>> From: dave.smith [mailto:germ32@(protected)]
>> Sent: Monday, July 28, 2008 11:45 PM
>> To: user@(protected)
>> Subject: Re: Background Threads
>>
>>
>> I forgot to mention that I am using Struts 1.1.
>>
>>
>> dave.smith wrote:
>>
>>> I have a function that POSTs data to a third party HTTPS server: void
>>> postData(String sURL, String sData);
>>>
>>> I need to call this function as a background thread from an Action
>>> class,
>>> so that the user doesn't have to wait on the connection to establish.
>>> How
>>> can I safely call this function so that it becomes a background thread?
>>>
>>> Thanks,
>>> Dave
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Background-Threads-tp18691709p18691741.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com
>> Version: 8.0.138 / Virus Database: 270.5.6/1578 - Release Date:
>> 28/07/2008 5:13 PM
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_189426.ezm (zipped)
Thanks for the replies.
I am using Java 1.5, so I'll definitely look into java.util.concurrent.
I do not care about the response from the server, but just about posting the
data to the HTTPS server.
Thanks,
Dave
Jeromy Evans - Blue Sky Minds wrote:
>
>
> If you're using Java 1.5+, the standard concurrent package provides
> everything you need.
>
> http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html#package_description
>
> There should be several tutorial available for it and it's well with
> understanding the various approaches. Prior to Java 1.5 there is a
> library available that the concurrent package was derived from (I forget
> the name).
>
> Important: If you're creating your own threads within a container, it's
> essential that you guarantee that the threads and their resources are
> properly released. Failing to do so will prevent the container from
> undeploying your application or shutting down cleanly. One technique to
> assist with this is create your ExecutorService within a
> ServletContextListener that uses the shutdown method to shutdown the
> threads and release all resources. Another approach is to use a library
> that provides this level of integration already (such as is available in
> one of the Spring packages I believe).
>
> regards,
> Jeromy Evans
>
> Reginald.Javier@(protected):
>> Hi Dave,
>>
>> You can just create any class that extends the Thread object or
>> implements the runnable interface. The required method, run(), should
>> abstract what u want to do, (connect to the 3rd party server).
>> Instantiate that class then call its start() method from the Struts
>> action that should trigger it. Your action should finish safely without
>> waiting for that thread to finish. Note: this is just a bare
>> implementation, you might want to consider using thread pooling to manage
>> your resources. What exactly do you intend to do? Will you wait for a
>> response from your HTTPS server?
>>
>> Reginald Javier
>> Software Engineer II, Strategic Customer Solutions Implementation
>> T: +632-859-5442
>> -----Original Message-----
>> From: dave.smith [mailto:germ32@(protected)]
>> Sent: Monday, July 28, 2008 11:45 PM
>> To: user@(protected)
>> Subject: Re: Background Threads
>>
>>
>> I forgot to mention that I am using Struts 1.1.
>>
>>
>> dave.smith wrote:
>>
>>> I have a function that POSTs data to a third party HTTPS server: void
>>> postData(String sURL, String sData);
>>>
>>> I need to call this function as a background thread from an Action
>>> class,
>>> so that the user doesn't have to wait on the connection to establish.
>>> How
>>> can I safely call this function so that it becomes a background thread?
>>>
>>> Thanks,
>>> Dave
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Background-Threads-tp18691709p18691741.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com
>> Version: 8.0.138 / Virus Database: 270.5.6/1578 - Release Date:
>> 28/07/2008 5:13 PM
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.