Hi Jonny,
I have id properties on actions all over my application.
I also have several actions that do a redirect to id. I think there's
something wrong with either your environment or your action that's causing
the issue.
What exactly happens when it doesn't work?
Mark
The guy who wrote the
On 7/30/07 2:06 AM, Grish [EMAIL PROTECTED] wrote:
I tried taking a modified version of the Struts 2 + Spring 2 + JPA + AJAX
tutorial that I've done and integrated it with Sitemesh.
I realized that if i have div tags with the ajax theme, Sitemesh will
decorate that area so I will end up
I've just pushed the 0.1 release of the Groovy Works plugin out the door.
The Groovy Works plugin enables dynamic compilation of Struts Actions
written in Groovy, as well as integration with Spring's scripting support.
Using this plugin you can start your Struts application with mvn jetty:run
and
On 6/27/07 10:24 AM, Toni Lyytikäinen [EMAIL PROTECTED] wrote:
Or better yet, create a Login interceptor or Login filter that checks the
session and redirects to login page if the required key is not there. Make
package(s) of the actions you want to expose to authenticated users only and
put
On 6/25/07 7:19 PM, Mark Menard [EMAIL PROTECTED] wrote:
I have an action with a property of type BigDecimal, that is initialized, so
it has a value:
Public class myAction {
BigDecimal myBigDecimal = new BigDecimal (1.1);
...
}
I have a form with the following:
s:textfield name
I have an action with a property of type BigDecimal, that is initialized, so
it has a value:
Public class myAction {
BigDecimal myBigDecimal = new BigDecimal (1.1);
...
}
I have a form with the following:
s:textfield name=myBigDecimal /
The issue is if I blank out the value,
On 6/21/07 1:47 PM, Gabriel Belingueres [EMAIL PROTECTED] wrote:
Hi,
I need to implement a wizard that collects data in several forms,
which fields are stored in a single session scoped object.
The problem is I didn't found any working example of using
ScopeInterceptor. Even this
Thanks,
Mark
--
Mark Menard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I have an action that has a property of type Person, which is an interface.
How can I tell Struts what implementation class to instantiate to satisfy a
null property?
I've read the Type Conversion page at:
http://struts.apache.org/2.x/docs/type-conversion.html
I don't quite see how this is
On 4/24/07 8:49 AM, Shahak Nagiel [EMAIL PROTECTED] wrote:
Others can chime in as well, but from my experience in the past,
container-managed authentication is a little too rigid and doesn't offer
anywhere near the flexibility of a custom-brewed authentication/authorization
scheme. That's
On 4/23/07 2:36 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi all,
I try to insert my AuthentificatedInterceptor in the stack, but now
nothing works.
Hi Michaël,
I just did this last week. I didn't use a LoginAction though. I did all the
work in the interceptor, with a backing service
Hi Alexis,
On 4/23/07 5:16 AM, Alexis Pigeon [EMAIL PROTECTED] wrote:
Just as a follow-up, you may have missed my message asking for the
updated version of your conversation scope interceptor.
I'm sorry, quite busy the last few weeks. I have attached my latest version
to the WW-1514 ticket.
a bunch of simple text fields,
and the action then uses all of these to populate the pieces of the
various beans that make up Payment Bean.
You could but it is cumbersome and error prone in my opinion.
Mark
--
Mark Menard
Business: http://www.vitarara.net/
Personal: http://www.vitarara.org
On 4/23/07 5:37 PM, chengas123 [EMAIL PROTECTED] wrote:
I am using the iterator tag as follows:
s:iterator value=orders status=status id=order
tr
tds:property value=orderid //td
tds:property value=orderDate //td
tds:property
.
Mark
--
Mark Menard
Business: http://www.vitarara.net/
Personal: http://www.vitarara.org/
Mark's Struts 2 Cookbook: http://www.vitarara.org/cms/struts_2_cookbook
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
On 4/19/07 12:48 PM, Skip Hollowell [EMAIL PROTECTED] wrote:
I am not sure if this is possible, but can I access a bean within a
bean, and grab fields from it within my jsp?
Yes, you can, and I do it all the time. Sometimes with multiple levels of
nesting (ie: order - order line item - order
On 4/20/07 3:56 PM, Dmitriy Kuznetsov [EMAIL PROTECTED] wrote:
struts
package name=testMe extends=struts-default
interceptors
interceptor name=voidInt
class=myinterceptor.VoidInterceptor /
/interceptors
action name=action-intercepted class=SimpleAction
On 4/18/07 4:10 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
How could I do ?
Parent action:
Public abstract class MyParentAction extends ActionSupport {
public String execute () throws Exception {
// do your security stuff.
String result = this.myExecute ();
//
On 4/18/07 11:11 AM, Mark Menard [EMAIL PROTECTED] wrote:
Now, with that example shown, I wouldn't use it. Look at an interceptor to
do this. I'm working on exactly this right now, a login interceptor. Stay
tuned for a write up when I get done.
As promised here's a fairly complete write up
I've written up two new Struts 2 tutorials:
Post and Redirect in Struts 2
http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect
Creating a Login Interceptor in Struts 2
http://www.vitarara.org/cms/struts_2_cookbook/creating_a_login_interceptor
Take care,
Mark
--
Mark Menard
Business
On 4/17/07 10:20 AM, nicolas de loof [EMAIL PROTECTED] wrote:
In struts2, AFAIK I can use any POJO as controler. Can I use my (maybe
adapted) RegistrationService as a Controller by simply changing to a
statefull model (user to register is not a method parameter anymore but a
bean property) ?
On 4/10/07 3:00 AM, Alexis Pigeon [EMAIL PROTECTED] wrote:
Hi all,
My application uses a bean to store a collection of values to display
in a select input. Since the generation of this collection is
time-consuming, I set this bean to a session scope, and using the
following code :
in
On 4/5/07 1:34 PM, Felipe Rodrigues [EMAIL PROTECTED] wrote:
%{test['AnyString'].att} prints nothing and finally
I've used this technique to access the properties of entities stored in a
Map. (http://www.vitarara.org/cms/node/81) Are you sure that the att
attribute has something in it?
Mark
On 4/3/07 7:46 PM, tom tom [EMAIL PROTECTED] wrote:
We can have one ActionForm with session scope shared
across many action classes. (which I believe as a nice
feature). How can I achieve such a thing in S2, In
S2's way if we have this POJO as a Action attribute,
what is it's scope?
At
On 3/13/07 3:45 AM, Martin Fanta [EMAIL PROTECTED] wrote:
I have a jsp with this body:
s:form action=Process
s:iterator value=dates status=day
s:textfield label=%{top} labelposition=left
name=days[%{#day.index}]/
/s:iterator
s:submit/
/s:form
It is meant to display a label and an
On 3/12/07 1:53 PM, Paul Saumets [EMAIL PROTECTED] wrote:
In your struts.properties file declare the following line:
struts.ui.theme=simple
then just wrap whatever you'd like around your input tags.
That to me is a hammer-like solution. This will change all of his forms to
use the simple
I have made a lot of progress this weekend on getting Groovy actions working
with Spring's scripting support. The Spring guys have resolved a great
number of issues with the scripting support in Spring 2.0.3.
My goals have been to allow a development style that uses Groovy, and the
scripting
On 3/11/07 1:17 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- Mark Menard [EMAIL PROTECTED] wrote:
Take a look: http://www.vitarara.org/cms/groovyworks
Is this primarily a classloader for Groovy actions so
you don't need to define them in an applicationContext
config?
Yes, because Spring
On 3/11/07 1:20 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- Mark Menard [EMAIL PROTECTED] wrote:
[GroovyWorks]
Oops, also wanted to ask [OT] about mixing Groovy/Java
actions; I'm assuming that it only does something
special if it's a .groovy action and does normal
Spring stuff otherwise
On 3/11/07 2:49 PM, Ian Roughley [EMAIL PROTECTED] wrote:
No - what I said was that I would be surprised if the s:form s2 tag
DOES NOT generate a HTML form tag. This was in response to your
comment Also, is counter-intuitive for html users that a s:form
actually renders a table, instead of
Hi Tim,
On 2/26/07 5:26 PM, Tim Azzopardi [EMAIL PROTECTED] wrote:
(I'm using a heaviliy modified xhtml theme that required me to use explicit
tr tags in case anybody is wondering)
First take a look at http://www.vitarara.org/cms/node/85 and see if that
might eliminate the need for you to do
I got an integration testing setup working last night with Maven 2, Struts
2, Spring and Hibernate JPA. I did a write up:
http://www.vitarara.org/cms/node/107
This took me a while to figure out, but it's very nice to be able to test my
actions all the way through my service and data layer
On 2/28/07 11:06 AM, John Trollinger [EMAIL PROTECTED] wrote:
I am trying to use struts 2 and can not figure out how to do the following
that I could in struts 1.3
logic:iterate name=person property=addresses id=address
indexId=ctr
html:text name=address property=addrLineOne indexed=true /
On 2/23/07 8:22 PM, Ted Husted [EMAIL PROTECTED] wrote:
The Apache Struts group is pleased to announce that Struts 2.0.6 is
available as a General Availability release. The GA designation is
our highest quality grade.
Congratulations to all! I have been happily using S2 since 2.0.1. It's been
On 2/23/07 7:31 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- bob [EMAIL PROTECTED] wrote:
For instance, if my domain object is Customer, what
would be the consequences and benefits of using
modelDriven with a getModel() that returns an
instance of Customer, versus having a getCustomer()
I have spent the last week working on integrating Struts 2 and Groovy. I
started writing my actions in Groovy last week. This is great, but I want to
eliminate the compile restart cycle for general editing and debugging.
My first attempt was to extend the Struts 2 Spring plugin, to use a
On 2/24/07 3:41 PM, Dave Newton [EMAIL PROTECTED] wrote:
Isn't that an issue with *any* session-based
methodology?
Absolutely. It just amazes me how many people still run into it and are
baffled by the strange behavior.
Mark
On 2/24/07 10:23 AM, Mark Menard [EMAIL PROTECTED] wrote:
At this point I have scripted actions and service beans in Groovy, with
automatic reloading working. (http://www.vitarara.org/cms/node/98)
A brief update. I have this working in a simple environment. I tried adding
Spring declarative
On 2/14/07 9:46 AM, Ian Roughley [EMAIL PROTECTED] wrote:
I remember seeing Groovy support on a blog for WebWork a while back. I
think the implementation was a new ActionProxy, so the groovy actions
could be scripted dynamically at run time and the page only needed to be
refreshed. For some
On 2/14/07 10:03 AM, Dave Newton [EMAIL PROTECTED] wrote:
You can configure Spring2 beans to do this via the
lang:groovy.../ element.
It's not clear to me if you can configure it so the
Groovy action can be hot-compiled w/ a standard
bean.../ element but w/ a combination of refs or
I've recently started using Groovy in my Struts 2 project to write my
actions. After some experience with it, I've written up a blog entry with
some quick examples.
http://www.vitarara.org/cms/node/95
Mark
-
To unsubscribe,
On 2/13/07 12:54 PM, Don Brown [EMAIL PROTECTED] wrote:
Very cool. Please add a link in our Struts 2 wiki [1] to it for
future reference.
Done. I also added some of the other writeups I've done.
Mark
-
To unsubscribe,
On 2/13/07 3:21 PM, Dave Newton [EMAIL PROTECTED] wrote:
Can Interceptors be Spring Beans (without hackery)?
Yes, just wire it up in your application context. I use to inject a service
bean into an interceptor that handles retrieving user menu's based on role.
Mark
On 2/13/07 3:22 PM, Ian Roughley [EMAIL PROTECTED] wrote:
Very cool. If only Groovy supported annotations so that the
configuration didn't need to be in the struts.xml file (but it looks
like annotation support is starting).
Ian,
From your lips to G_d's ears. I can't wait for annotations.
Having recently dug into creating UI tags in Struts 2 I wrote up a quick
overview:
http://www.vitarara.org/cms/node/86
Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 12/7/06 8:02 AM, Dave Newton [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
The general feeling is that we are very close, and some of us are
thinking that a GA would make a nice Chrismas present, but only if
it's actually up to production
On 12/5/06 12:25 PM, Mark Shifman [EMAIL PROTECTED] wrote:
2. The textfield seems to get a String[] rather than a String and I
don't have any idea how to do it differently.
I don¹t know if you can do this because I've never really worked with Struts
1. Can you make the Map in your form a
On 12/5/06 11:29 AM, walidito [EMAIL PROTECTED] wrote:
Hi, I have a problem with aligning my form's fields to the right using struts
2.
Here is my code :
s:textfield label=%{getText('username')} name=username/
s:password label=%{getText('password')} name=password /
I have tried
On 12/2/06 10:45 AM, fahlen [EMAIL PROTECTED] wrote:
Hi Mark,
I've tried this now, but I'm unable to access the data from the JSP. In the
struts.xml configuration file, the action involved is configured this way:
action name=Search_* method={1} class=crosseyed.Search
. Thoughts?
Now, to resume a thread from earlier this week.
On 12/1/06 1:53 PM, Don Brown [EMAIL PROTECTED] wrote:
On 12/1/06, Mark Menard [EMAIL PROTECTED] wrote:
In a related vein I would like to add some default properties to the UI
tags. Currently I'm passing these things into my template
On 12/1/06 3:21 AM, Don Brown [EMAIL PROTECTED] wrote:
On 8/30/06, Mark Menard [EMAIL PROTECTED] wrote:
Is this following possible?
s:bean name=java.util.HashMap id=qTableLayout
/s:bean
s:push value=#qTableLayout
s:param name=tablecolspan value=%{4} /
s:param name
On 12/1/06 10:51 AM, Juan Espinosa [EMAIL PROTECTED] wrote:
All that is working ok but i cant get the validation working because every
customer has its validation logic, i want to know if there is a way to
validate this object programaticaly-..i dont want to create an action
for every
On 12/1/06 12:01 PM, Don Brown [EMAIL PROTECTED] wrote:
Well, I had some free time (holding my new son to let mom get some
sleep) and figured everyone deserved at least a reply. Yay for
GMail's search.
Anyways, cool, thanks for the update. I don't know of a better tag,
but we are always
After extending the xhtml theme to handle multi-column layouts I wrote up a
tutorial covering how I did it, and a sample project illustrating it. Anyone
interested in extending the S2 GUI tags might find this helpful. There were
several things that I stumbled on in the process, so you can learn
On 11/30/06 4:40 PM, walidito [EMAIL PROTECTED] wrote:
Quick caveat, I haven't used the methodology, but I might start now.
and I don't understand this stuff :
in struts.xml
action name=Login_* method={1} class=tutorial.Login
the tutorial says :
The method={1} attribute is replaced with
and elegant. Almost too much so. It eluded me
for a while, but now I'm really starting to get it, and it's good.
Mark
--
Mark Menard
personal: http://www.vitarara.org/
business: http://www.vitarara.net/
-
To unsubscribe, e-mail: [EMAIL
On 11/30/06 7:45 PM, Christopher Schultz [EMAIL PROTECTED]
wrote:
Mark Menard wrote:
public String getDataRetrievedFromSessionBean () {
return this.dataRetrievedFromSessionBean;
}
Sorry for poking my nose in, but wouldn't this be horrendously
non-threadsafe?
No problem. If your
On 11/29/06 12:44 AM, Tarek Nabil [EMAIL PROTECTED] wrote:
One of the problems with Struts was that if you had a page that requires
some setup and this page submits to an Action, then you would not be
able to set validate to true on that action because if validation
problems occur then Struts
On 11/28/06 4:04 PM, Juan Espinosa [EMAIL PROTECTED] wrote:
I want to know if render of buttons tables forms and other tags are based on
this templates..and how i could change it
Hi Juan,
The rendering of the buttons is based on the theme template. The templates
can be found in the Struts
On 11/28/06 4:06 PM, Mark Menard [EMAIL PROTECTED] wrote:
On 11/28/06 4:04 PM, Juan Espinosa [EMAIL PROTECTED] wrote:
I want to know if render of buttons tables forms and other tags are based on
this templates..and how i could change it
Hi Juan,
The rendering of the buttons is based
Is this method supposed to be called once per lifecycle of the Interceptor?
Or do I have to accommodate it being called multiple times?
Thanks,
Mark
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
I've tried to set up a new project using the struts2 mvn archetype, but to
no avail.
[INFO]
[ERROR] BUILD ERROR
[INFO]
[INFO] Failed to resolve
On 11/16/06 11:03 PM, Wendy Smoak [EMAIL PROTECTED] wrote:
On 11/16/06, Mark Menard [EMAIL PROTECTED] wrote:
I've tried to set up a new project using the struts2 mvn archetype, but to
no avail.
What did you type?
mvn archetype:create -DgroupId=tutorial -DartifactId=tutorial
On 11/16/06 12:51 PM, Mark Menard [EMAIL PROTECTED] wrote:
Is this method supposed to be called once per lifecycle of the Interceptor?
Or do I have to accommodate it being called multiple times?
I updated to the latest svn of S2 and this seems to be fixed.
Mark
I have a need to implement a multi-page wizard. My thought has been to use
the ModelDriven method, and put the model into the user's session and
restore it when they come back to the action. Seems simple, but there's
always a catch.
The catch is what if the user opens two conversations, say in
On 11/10/06 6:46 PM, Don Brown [EMAIL PROTECTED] wrote:
I believe that any unknown result parameters are automatically used as
request parameters for the redirect. Then, use an ognl expression for
your param value and provide a getter on your action for the value.
Hi Don,
Do you have an
Is there a way to dynamically parameterize a redirect result based on an
http request parameter that you have used in the action your are redirecting
from?
In other words I'm doing some work in an action that is based on an ID that
was passed into it from the HTML form. I need to do some work,
On 11/7/06 9:07 AM, Wesley Wannemacher [EMAIL PROTECTED] wrote:
[question]
Below, I have copy/pasted the Source for the Action as well as my
struts.xml file (actually another file that is included from the
struts.xml file). Are there any glaring errors that I am simply missing?
[/question]
Is it possible to access the body of an s:component tag, like so?
s:component template=mytemplateMy Body/s:component
I'd like to be able to get at the My Body string in the tag. Is this
possible? How would I refer to it?
Alternatively could I do something like this:
s:components:url
I'd just like to be sure that I'm on the right path. I did my first update
action that is operating on a List of objects similar to the example from
the Showcase. Difference is I can't recreate them, like the Showcase does.
So, I got my List of objects from the database, then threw them into a
I need to access the HttpServletRequest from an Interceptor. I'm using:
HttpServletRequest request = ServletActionContext.getRequest ();
Is that the correct way to get it? It works, but I'm not sure that's how I
should be doing it.
Thanks,
Mark
On 11/2/06 8:50 AM, Bruno Melloni [EMAIL PROTECTED] wrote:
I can't wait to start using Struts 2.0. The only thing holding me back
is Struts 2.0 default use of Spring 1.x instead of the current Spring
2.0. I know it is supposed to work with Spring 2.0 just fine, but
call me paranoid... I'll
I was working on a custom interceptor that would use the init() method to
configure itself. After some analysis I realized that the init() method was
being called multiple times per action invocation. So, I made a very simple
interceptor to test to make sure I wasn¹t crazy about this.
package
On 10/29/06 11:45 AM, Mark Menard [EMAIL PROTECTED] wrote:
Here's the log output:
11:35:40,557 INFO [STDOUT] 11:35:40,557 INFO [XmlConfigurationProvider]
Parsing configuration file [struts-default.xml]
11:35:40,664 INFO [STDOUT] 11:35:40,664 INFO [XmlConfigurationProvider]
Parsing
On 10/29/06 4:21 PM, Don Brown [EMAIL PROTECTED] wrote:
Ok, I should have fixed the configuration files reloading too many
times. Unfortunately, if you use the action tag, they will still
reload, as that tag doesn't fully use the ActionContext instance from
the request (where the flag to not
On 10/26/06 5:06 PM, Jim Reynolds [EMAIL PROTECTED] wrote:
From reading about Struts2, I can see that it is a marriage of Struts
1.x and WebWork. Now WebWork actually consisted of 2 frameworks from
my understanding. WebWork framework for Web and underneath that was
XWork framework. Also,
On 10/19/06 10:11 PM, Ted Husted [EMAIL PROTECTED] wrote:
On 10/19/06, Mark Menard [EMAIL PROTECTED] wrote:
I'm still curious as to what was causing the NPE with the s:action tag. I
have read the Webwork in Action book and I think I'm using it correctly.
Just in case this is an issue, I
On 10/18/06 11:17 PM, Ted Husted [EMAIL PROTECTED] wrote:
(ActionComponent.java:137)
is
writer.flush();
which implies a problem with the result rather than the action.
Does the exception go away if executeResult is false?
Hi Ted,
I removed executeResult from the s:action tag and
I have worked around this issue, but moving the generation of the menu to an
interceptor. (It makes sense since every page in the application will have a
menu.)
I'm still curious as to what was causing the NPE with the s:action tag. I
have read the Webwork in Action book and I think I'm using it
I have an action /quadran/menu/menu.action that I can go to directly. I want
to include this in my site wide template using s:action. I've put the
following in my JSP to include the action:
s:action name=menu namespace=/menu executeResult=true /
This throws the following exception:
On 10/18/06 8:16 PM, Ted Husted [EMAIL PROTECTED] wrote:
If you are using the Menu action site-wide, you might want to put it
in the default empty namespace, which is always checked, so you
would not need to specify the namespace.
* http://cwiki.apache.org/WW/namespace-configuration.html
with the framework I read WebWork in Action. Struts 2
is a derivative of WebWork 2, so the book applies very well to the current
Struts 2.
Personally I would recommend a very long look at Struts 2. It's a very nice
framework.
Take care,
Mark
--
Mark Menard
Business: http://www.vitarara.net/
Personal: http
On 10/5/06 10:20 AM, Bruno Melloni [EMAIL PROTECTED] wrote:
- Struts 2.0 is out, but from what I read it is quite different from
1.x, and makes me doubt that it would be compatible with something that
was built for 1.2.9. I also heard that it still has a few bugs...
normal for a software
On 10/5/06 10:59 AM, Bruno Melloni [EMAIL PROTECTED] wrote:
So, although I suspect that the answer is yes, I am afraid that the
question remains: Are Struts 2.0 and Spring 2.0 compatible?
I'm using Spring 2 and Struts 2 currently. They seem to work together fine.
The Spring team has worked to
Is this following possible?
s:bean name=java.util.HashMap id=qTableLayout
/s:bean
s:push value=#qTableLayout
s:param name=tablecolspan value=%{4} /
s:param name=currentColumnCount value=%{0} /
/s:push
If it isn't how do you change the value of something on the value stack once
you are
I'm trying to make a new theme, and would like to pass some parameters to
the s:form tag. Is this possible using the s:param tag? I've tried it,
but it doesn't seem to be working.
If s:form doesn't support s:param is there another means of
parameterizing the form?
Thanks,
Mark
--
Mark Menard
is simple pages or bits of code generated so I'm not sure if
this can be done with Velocity, Freemarker, etc...
You could take a look at Sitemesh. Very easy to set up. To my mind it was
much easier than Tiles, and doesn't intrude on your application environment
as much.
Mark
--
Mark Menard
Business
87 matches
Mail list logo