Hello, I'd to test the StrutsTestCase's version for Struts2 [1] but I have not
found any example. There are plenty of examples for Struts1, however.
Any idea how to use it?
Regards,
/Enric
ps. I have found examples of testing Struts2 with JWebUnit, but what I want is
to test the controller.
hi,
i have attached the configbrowser plugin and is not able to trace it.the
screen shots are as follows:
http://www.nabble.com/file/p22009471/configbrowser1.gif
http://www.nabble.com/file/p22009471/configbrowser2.gif
http://www.nabble.com/file/p22009471/configbrowser3.gif
Musachy Barroso w
The only thing that you need to configure with Struts 2 is to apply the Struts
2 Filter to the /dwr/* URL. On the JSP I also use a modified version of the
WebWorks script so your JSP looks like this:
DWRActionUtil.execute ({ action: 'action',
method: 'save',
You can ignore the exception(yeah I know it smells to the moon), or
increase the log level for the ObjectFactory, it is a bug in Struts
which was re-introduced in 2.1.6 (/facepalm)
https://issues.apache.org/struts/browse/WW-1714
musachy
On Fri, Feb 13, 2009 at 5:16 PM, Phan, Hienthuc T
wrote:
>
I followed the example, added the getter/setter for the properties in
the Action but got the following error message. Did I miss anything
else?
2009-02-13 14:06:48,322 ERROR [com.opensymphony.xwork2.ObjectFactory]
Unable to set parameter [plannedSampleGroupId] in result of type
[org.apache.str
Thanks Nestor, this looks interesting. What would the JSP that used this
action look like? Is any special config required in the struts.xml?
nestorjb wrote:
>
> I basically created a DWRAction class based on the one that WebWorks used
> and I use it extensively on my Struts 2 applications:
>
2009/2/13 Security Management :
> Thanks, the invocation.invoke() will execute all the following interceptors,
> and render the view, then I can close the transaction and session?
Yes, but remember about correct order of your custom interceptor stack.
Regards
--
Lukasz
http://www.lenart.org.pl
Thanks, the invocation.invoke() will execute all the following interceptors,
and render the view, then I can close the transaction and session?
-Original Message-
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com]
Sent: Friday, February 13, 2009 4:00 PM
To: Struts Users Mailing Li
2009/2/13 Security Management :
> I'm using Hibernate, and am going to create an interceptor to run before the
> Action to open a session and start a transaction.
>
> After the view is rendered, I want to commit the transaction.
>
> This will result in 1 transaction per request, how can I do the se
I'm using Hibernate, and am going to create an interceptor to run before the
Action to open a session and start a transaction.
After the view is rendered, I want to commit the transaction.
This will result in 1 transaction per request, how can I do the second
(after) interceptor?
That's pretty neat.
musachy
On Fri, Feb 13, 2009 at 2:02 PM, Néstor Boscán wrote:
> I basically created a DWRAction class based on the one that WebWorks used
> and I use it extensively on my Struts 2 applications:
>
> import com.opensymphony.xwork2.ActionProxy;
>
> import com.opensymphony.xwork2
I basically created a DWRAction class based on the one that WebWorks used
and I use it extensively on my Struts 2 applications:
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.ActionProxyFactory;
import java.util.Map;
import javax.servlet.ServletContext;
import javax.s
I'm not real sure what you have in mind here, but this works very nicely:
...
request for www.//blah-fred fires the fred() method and
request for www.//blah-barney fires the barney method
Peace,
Scott
On Fri, Feb 13, 2009 at 10:40 AM, Daniel Ruan wrote:
> Is it p
If that doesn't work out of the box, then rewriting the Prototype
example would be the easiest way to go, all you need to do is figure
out how to make an ajax request with DWR and change this function:
function validate() {
var url = '${url}';
new Ajax.Request(
url,
{
Thanks Musachy, I found that page during my searching. I have the DWR plugin
set up and included, and I've verified that the server side object exposure
works using the DWR test page.
What I'm not seeing is how the validator.doPost() method gets called from
the JSP when using the plugin (assumin
It seems like it is not a list but a proxy to it
"org.apache.openjpa.util.java$util$ArrayList$proxy" which could be the
root of the problem.
musachy
On Fri, Feb 13, 2009 at 12:00 PM, Adam Hardy
wrote:
> I have a situation where OGNL seems to be misinterpreting the class of the
> HTTP parameter p
I have a situation where OGNL seems to be misinterpreting the class of the HTTP
parameter property it is setting during the ParameterInterceptor call.
As you can see from the exception message, the object is an ArrayList and
certainly not a Set which OGNL thinks it is. I have double, triple and
You can re-implement that example using DWR as you mentioned, or use
the built in support for DWR in the DWR plugin, for which there are
some examples around:
http://www.javaworld.com/javaworld/jw-10-2008/jw-10-struts2validation.html?page=5
musachy
On Fri, Feb 13, 2009 at 11:42 AM, lllewell wro
Greetings all -
I inherited a struts2 webapp that is using the "simple" theme all the way
through. I'd like to add some Ajax validation to one of the pages using
DWR. I'm interested in doing this without DOJO (theme="ajax").
I see an example of how to do Prototype validation without DOJO her
Is it possible to write an Action Interceptor, which can set the method to
invoke on the fly, depending on certain runtime variables?
I can get the ActionProxy from ActionInvocation, but the proxy provides only
a getter getMethod() not a setter. Any ideas?
Thanks,
Daniel
Thanks fr the link Musachy, yes going to that link does'nt show anything at
the JBoss server console and the IE says:
HTTP Status 404 - There is no Action mapped for action name truts2.
Musachy Barroso wrote:
>
> and going to /truts2/reportIndex1.action doesn't show anything? Add
> the config
Add the config browser to your app and check what urls it is mapping:
http://struts.apache.org/2.x/docs/config-browser-plugin.html
musachy
On Fri, Feb 13, 2009 at 11:31 AM, Ratheesh Kumar K
wrote:
>
> Thanks for your reply.
> I was not fortunate enough to get it run by your reply. can you give a
Thanks for your reply.
I was not fortunate enough to get it run by your reply. can you give a bit
more help to me.
I hav changed the class name to start with capital letter.
Now the struts.xml looks like as follows:
http://struts.apache.org/dtds/struts-2.1.dtd";>
and going to /truts2/reportIndex1.action doesn't show anything? Add
the config browser to your app and check what urls it is mapping:
http://struts.apache.org/2.x/docs/config-browser-plugin.html
musachy
On Fri, Feb 13, 2009 at 11:28 AM, SanJ.SANJAY wrote:
>
> No, I removed as it was creating iss
No, I removed as it was creating issues with actionPackages params I guess.
Musachy Barroso wrote:
>
> Do you have the Codebehind plugin in the classpath?
>
> musachy
>
> On Fri, Feb 13, 2009 at 11:10 AM, SanJ.SANJAY wrote:
>>
>> Here
>>
>> struts.xml:
>>
>>
>>
>>
>>
Do you have the Codebehind plugin in the classpath?
musachy
On Fri, Feb 13, 2009 at 11:10 AM, SanJ.SANJAY wrote:
>
> Here
>
> struts.xml:
>
>
>
>
>/jsp/report.jsp
>
>
>
>
>
> web.xml:
>
>
>struts2
>
>
Here
struts.xml:
/jsp/report.jsp
web.xml:
struts2
org.apache.struts2.dispatcher.FilterDispatcher
actionPackages
com.cec.truts2
I have the same configuration for struts.xml
mgainty wrote:
>
>
> Here is a typical Struts configuration from WEB-INF/web.xml which maps any
> references to struts
> to org.apache.struts2.dispatcher.FilterDispatcher
>
>
> struts
> /*
>
>
> struts
>
Here is a typical Struts configuration from WEB-INF/web.xml which maps any
references to struts
to org.apache.struts2.dispatcher.FilterDispatcher
struts
/*
struts
org.apache.struts2.dispatcher.FilterDispatcher
actionPackages
Ok thanks Dave, I have run standalone S2 from the SampleApplication that
comes with the source code and which runs fine. Yes, I have the devMode
turned on and tried removing it and it gave the same error.
Also am not using any logging of XWorks yet.
In my current application(existing S1), the PAT
Ok thanks Dave, I have run standalone S2 from the SampleApplication that
comes with the source code and which runs fine. Yes, I have the devMode
turned on and tried removing it and it gave the same error.
Also am not using any logging of XWorks yet.
In my current application(existing S1), the PAT
Dave, you are right
> ...
>
> That's not much to go on.
>
> Dave
Here a small example.
FORM:
ACTION:
private TipoHistorico tipoHistorico;
public String doCrud() throws Exception {
if (getAcao().equalsIgnoreCase("Inserir")){
try {
tipoHis
Hi,
i don't know what exactly You are trying to achieve,
but i will try to help.
First You can't assign struts tag to script variable, those are
dofferent worlds, so it will never work.
Second, struts tag is just a representation of html
input type text.
And last, maybe You are trying to assing th
Also, check for libraries that you're referencing. You might be having the
same libraries with different versions (libx-1.0 and libx-1.1) lying around
your build path.
Eduardo Dela Rosa
On Fri, Feb 13, 2009 at 3:21 PM, Narasimha Raju Naidu
wrote:
> Hi to all,
>
> I am new to MyEclipse I
Ahh...right.
Assuming that you are using simple theme as default, You will need to
extract fielderror.ftl from the struts2 jar, modify it to suit the way
you want it, and then add it to your applicaiton.
Instructions here - http://struts.apache.org/2.0.14/docs/template-loading.html
The other opti
35 matches
Mail list logo