I have a shoppingcart-esque form that submits to an payment vendor (EG
paypal) so the user can pay for something I'm offering.
This form needs to contain a hidden element that specifies a URL that
the payment vendor will access after the user pays for it; hitting the
URL is supposed to let me know
http://struts.apache.org/2.0.14/docs/set.html
-Original Message-
From: Dominik Fischer [mailto:fische...@idowa.de]
Sent: Thursday, February 05, 2009 8:59 AM
To: user@struts.apache.org
Subject: Access Struts2 Action Properties - Noob
Hello folks,
how can i access a property (i.e. data)
Thank you,
that is a first help. But is there a possibility without using tags from
Struts? I don't know, i'm dreaming of things like
strutsActionSession.getAttribute("data"). Do you know something like
this?
Kawczynski, David schrieb:
> http://struts.apa
relevant in your action:
...
this.requestMap.put("data", this.data);
...
and all should be well.
-Original Message-----
From: Kawczynski, David
Sent: Thursday, February 05, 2009 11:06 AM
To: Struts Users Mailing List
Subject: RE: Access Struts2 Action Propert
lass?
Thanks,
-dave
-Original Message-
From: Dave Newton [mailto:newton.d...@yahoo.com]
Sent: Thursday, February 05, 2009 11:29 AM
To: Struts Users Mailing List
Subject: Re: [S2] Dynamic form variable names
Kawczynski, David wrote:
> I have a shoppingcart-esque form that submits to an payment
n;
//Then do something
}
return SKIP_BODY;
}
}
I think this will work, but is there a better and propere construct?
Kawczynski, David schrieb:
> You can have your actionsupport subclass implement the
> org.apache.struts2.interceptor.RequestAware interfac
I'm not doing to well with remembering the simple stuff, am I?
:)
Thanks!
-Original Message-
From: Dave Newton [mailto:newton.d...@yahoo.com]
Sent: Thursday, February 05, 2009 11:58 AM
To: Struts Users Mailing List
Subject: Re: [S2] Dynamic form variable names
Kawczynski, David
Correction: 2.4 container is needed for el scripting.
>> BTW, Dave Newton's suggestion of using ${ propertyname } is the way
to
>> go, assuming you're on a 2.3 servlet container. I completely
overlooked
>> the simple approach.
Notice: This e-mail message, together with any attachments, conta
I have a form that has an element.
When the upload exceeds that size, the input page is returned.
Log4j records show this log message:
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (xxx) exceeds the configured
maximum (yyy)
A
I'm pretty sure you can't prepopulate input tags whose type=file.
This is html4 and has nothing to do with struts.
-Original Message-
From: Greg Lindholm [mailto:glindh...@yahoo.com]
Sent: Wednesday, March 18, 2009 4:17 PM
To: user@struts.apache.org
Subject: Re: File upload, validation a
>From section 4.1 of RFC3696
The following characters are reserved in many URIs -- they must be
used for either their URI-intended purpose or must be encoded. Some
particular schemes may either broaden or relax these restrictions
(see the following sections for URLs applicable to "web p
I'm certainly no magician, but was still able to do this.
If your action depends on session info, implement SessionAware
and provide it with a Map of name-value pairs in the testcase.
If your action depends on request info, implement RequestAware
and provide it with a Map of name-value pairs i
Jumping in on this one a tad late, forgive me if this has been said:
I've found the main thing lost without mapping to a url of /* is the
niceties
afforded by struts2 - automatic formatting, javascript support, etc.
The core
functionality still exists, albeit stripped down.
You can get most of t
Retrieving from DB and outputting to HTTP:
Every time I've done this it has been without the use of struts. I use
a
servlet that looks for e request parameter storing an ID that resolves
to
the image in the DB. I lookup the image, set the response type for that
image, then output the bytes that
>> How can I use the popup window to call a div of the parent form
The window.open function returns a reference to the opened window.
You can change your
window.open (url... )
To read
var newWin = window.open(url... )
newWin.opener = window;
Then you'd have an "opener" attribute in your
Martin Gainty [mailto:mgai...@hotmail.com]
> Sent: Wednesday, June 03, 2009 3:51 PM
> To: Kawczynski, David
> Subject: RE: [S2] why is javascript executed before DOM is
> updated
>
> could you provide which technologies would be used ..i assume
> dojo?, links for coding,
; too limiting.
> >
> > Insofar as coding/configuration/working examples:
> > http://jqueryui.com/demos/dialog/
> > NOTE: specify the modal option
> > NOTE: bind inline code to the beforeclose event to populate the
> > target div with something obt
I was in the same boat...
One of my clients use apache httpd for all static content
and tomcat for all dynamic content... there are several
Struts2 jars that house css and js files. If you don't
map everything to the Struts2 filter your Struts2 app
won't be as full-featured as it could be. (
Take a look at Spring Security (formerly ACEGI).
http://static.springsource.org/spring-security/site/
> -Original Message-
> From: mathias-ewald [mailto:nitehoax...@gmx.net]
> Sent: Thursday, July 16, 2009 2:37 PM
> To: user@struts.apache.org
> Subject: Login with Struts2
>
>
> Hi,
>
Sitemesh doesn't build the entire page... it is a Filter that grabs the
response text (immediately before the servlet container sends it to the
client) and adds to it. Decorators contain what is added to the
response. I've found that if your decorators require a lot of run-time
logic then yes, it
Adding that to your action classes would help to eliminate user sessions
loosing state in between servletcontext restarts. Since action classes
will most likely contain several POJO-like properties which are set from
user input, it is not be a bad idea to add that variable to your
classes. It wou
This is off-topic, so here's a high-level explanation of serializing.
Imagine submitting a form, and in the middle of it being processed by
struts2 some administrator decided it's time to restart the
servletContext. What any decent appserver will do is serialize any
in-memory objects, so that w
Write a taglib or put a getCaptchaPublicKey() method in the
ActionForm, and use struts taglibs.
> -Original Message-
> From: laredotornado [mailto:laredotorn...@gmail.com]
> Sent: Monday, July 27, 2009 11:51 AM
> To: user@struts.apache.org
> Subject: Cleaner way to create this page?
>
>
Implement the requestAware interface to have access to a Map containing
request parameters as name-value pairs.
In terms of an html tag, use OGNL to get to the request parameters.
Especially the #request object. EG %{#request.someParam}
> -Original Message-
> From: Bhaarat Sharma [mailto:
Ajax call? ESP?
> -Original Message-
> From: Bhaarat Sharma [mailto:bhaara...@gmail.com]
> Sent: Tuesday, August 04, 2009 2:10 PM
> To: Struts Users Mailing List
> Subject: Re: equivalent of request.getParameter();
>
> Thanks.
> I have another question, which might be a little off top
I am using the datetimepicker on a form with client-side validation
enabled.
Form submissions with a blank datetime field should result in validation
being run against that field. This is not the case -- this field is
only
validated on the server. No other form field uses the dojo, and they
ar
I'm using struts 2.1.2, and the xhtml theme to render a form.
When client-side validaiton fails, an error message is placed above the
bad input fields.
Subsequent submission attempts result in new error messages being ADDED
to the UI, but the old messages are never removed.
I need to clear out prev
--- On Fri, 9/12/08, Kawczynski, David wrote:
> I'm using struts 2.1.2, and the xhtml theme to render a
> form. When client-side validaiton fails, an error message
> is placed above the bad input fields.
> Subsequent submission attempts result in new error messages
> being ADDE
I have a mature, home-grown database-backed authentication &
authorization framework.
It does not conform to JAAS or anything remotely similar.
I'd like to harness in a new struts2 site, because the core
functionality exists, it pre-populated, etc
At a very high level, would I be able to get some
I'm sorry, I should have been more specific with my original question.
I need to secure struts *.action URIs. Nothing else, be it by port,
directory mapping, or context name. Right now. You see, my app
supports
adding users and changing their roles via web UI (hence the DB). It
also supports
FYI, a theme can be specified in a tag or any of its form
elements via "theme=simple|xhtml|ajax" attribute. If you didn't specify one
it's using the xhtml theme.
Do your forms submit to the same event handler? It would be helpful if we
could see the struts.xml and the web pages that house
I've used with validation without errors.
I've never provided a value attribute in the tag.
I don't know about struts, but I think the tag ignores
value attributes.
What happens if you remove the value attribute?
-Original Message-
From: Earle Flynn [mailto:[EMAIL PROTECTED]
Sent:
I won't be too much help, as I've never had this problem. But sometimes a
second set of eyes helps you look at your stuff differently.
To that point: I wonder what the invalid value is.
Put a breakpoint in the ValidationInterceptor, ParamsInterceptor, and
FileUploadInterceptor, to see what inv
Your Action classes can add ActionMessages for a specific property, not
just GLOBAL_MESSAGES.
Then, display GLOBAL_MESSAGES at the top of the page, and field-specific
ones relative to the field.
(this will work in 1.3.8)
See
http://struts.apache.org/1.2.7/api/org/apache/struts/action/ActionMessa
ailures);
...
}
Your JSP page:
The following error(s) occurred:
-Original Message-
From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2008 12:13 PM
To: Struts Users Mailing List
Subject: Re:
How does your action class get populated with a User object (or whatever
it is that is saved incorrectly)?
Does Spring have any role in the creation of that object? If so, what
scope is that bean defined?
What's the value of the key for this object when it is saved
incorrectly?
-Original M
I think you want to use an includeParams="none" attribute in the s:url
tag
-Original Message-
From: col_chappy [mailto:[EMAIL PROTECTED]
Sent: Monday, October 13, 2008 10:07 AM
To: user@struts.apache.org
Subject: URL param included on all URL's
I'm developing a webapp with Struts 2.0.11
http://www.dreamincode.net/code/snippet132.htm
Scrollable is fine, but the jsp response will remain large. You way
want to consider using the displaytag to paginate the resultset.
-Original Message-
From: A. Lotfi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2008 3:30 PM
To: S
Try picking one of the suggestions from here:
http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_23
689617.html
-Original Message-
From: arunabh [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2008 10:13 AM
To: user@struts.apache.org
Subject: Want to make dropdow
for the problem .
With Regards
Arunabh
Kawczynski, David wrote:
>
> Try picking one of the suggestions from here:
>
http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_23
> 689617.html
>
> -Original Message-
> From: arunabh [mailto:[EMAIL PROT
I've seen that, and it had to do with the transition from https to http
resulting in discrete sessions.
-Original Message-
From: Peterson, Ryan [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2008 3:46 PM
To: user@struts.apache.org
Subject: Struts 2 session in Weblogic 10.0
Hi guy
You need to define a of type input for your action.
-Original Message-
From: 928572663 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2008 11:02 AM
To: Struts Users Mailing List
Subject: [s2] Problem getting basic server side field validation to work
I'm trying to do a very basic
Yes, in the event of server-sided validation failure the framework
returns the user to this "input" page
-Original Message-
From: 928572663 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2008 11:27 AM
To: Kawczynski, David
Cc: Struts Users Mailing List
Subject: Re: [s
when
the validation error occurred. So what is the best way to handle that?
Thanks,
John
Kawczynski, David wrote:
> Yes, in the event of server-sided validation failure the framework
> returns the user to this "input" page
>
> -Original Message-
> From:
, are there any
alternatives short of writing my own validation framework?
Thanks,
John
Kawczynski, David wrote:
> Either have lots of actions in your struts.xml, or use wildcard
mappings
> (http://struts.apache.org/2.0.11.2/docs/wildcard-mappings.html)
>
> -Original Mes
If the functionality provided by the 2 different classes is similar:
You could use a dispatchaction instead of two different Action
classes. Just give the submit buttons different values.
EG:
Public MyDispatchAction extends DispatchAction {
void dispatchMethod(mapping, form, reque
While it's dirty, you can use a scriptlet variable to specify the
dynamic value in a struts html tag.
<% Object isEditable = "false"; %>
It gets even dirtier when the variable you wish to expose already
exists in some scope. Hopefully you know the scope. Assuming it's
In the request scope:
1) How many classes? It depends on what your webapp does. You're the
Only one who can answer that.
2) Which and how many POJOS? See number one above.
3) I find it easiest to start with a prototype of the web application
and go backwards from there. Note data-driven fields. Note all forms.
igning the UI. like how many web pages will be
there? how they looks like and all,
for that which tool i go for like i can easily drag and drop and make a
prototype of web pages?
Do u have any Idea?
Thanks
Kawczynski, David wrote:
>
> 1) How many classes? It depends on what your webapp d
That validate="true" in the form field only serves to place a required
asterisk next to your field's label.
First, you will want to ensure you are not using a simple theme for
the form tag.
Next, you will want to use an tag in your page's head tags
Finally, you will need to have validation x
You can't nest taglibs.
Try using the el tags and using an expression in place of the
Nested bean:write taglib call.
-Original Message-
From: Russo, Joe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2008 11:52 AM
To: user@struts.apache.org
Subject: logic tag question
Hi,
I a
styleId="blah"
You have to provide the value; Struts won't generate one for you.
Not that I'm aware of, at least.
HTH,
-dave
-Original Message-
From: laredotornado [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 1:59 PM
To: user@struts.apache.org
Subject: How do I generate
-Original Message-
From: Fender963 [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2008 12:22 PM
To: user@struts.apache.org
Subject: Re: Populating textfield with dynamic string, stop expression
evaluation.
Shameless bump.
Any ideas?
Fender963 wrote:
>
> Hey All,
>
> I've t
I was mistaken...
If you wanted to render the exact text of
"${dont.evaluate}"
You'll have to do something closer to this:
Basic point is, place the escaped dynamic string in single quotes.
-Original Message-
From: Kawczynski, David
Sent: Monday, December 01, 2
Setting the form's attribute before forwarding usually works.
Your action will have to be declared with a scope appropriate for the config's
forward type.
(Example: forward type="redirect" and action scope="request" don't play well
together.)
What scope is the action declared as, and what type
http://www.eclipse.org/mail/
http://www.eclipse.org/articles/article.php?file=Article-Unleashing-the-
Power-of-Refactoring/index.html
> -Original Message-
> From: Alex Siman [mailto:aleksandr.si...@gmail.com]
> Sent: Friday, September 18, 2009 1:45 PM
> To: user@struts.apache.org
> Subj
Impressive; I didn't get that at all from the context of
their message. Do you read tarot cards, too? ;)
> -Original Message-
> From: Martin Gainty [mailto:mgai...@hotmail.com]
> Sent: Wednesday, September 30, 2009 9:25 AM
> To: Struts Users Mailing List
> Subject: RE: Wondering that
It looks like the help Paul gave was spot-on, and sufficient. If you have a
focused question on one aspect of your code, please post it here. If you want
someone to write or modify code for you, perhaps you should ask some
co-workers, classmates, or the person who originally wrote the code.
>
If you put "java" onto the value stack, and it
remains unchanged when you retrieve it from the
value stack, that's expected. If you want java
in bold tags, put it in bold tags.
Regarding the normal JSP behavior you cited:
that's a mystery. Scripting variables don't
magically just decide to
ore info is required:
What security schema is employed?
Is the included webpage in the same context as the including
webpage?
Does your webpage allow anonymous access? If not, does the
user's auth info match the included page's auth info?
> -Original Message-
> From: Ashish Kulkar
That is unreadable. What about this, it's much easier on the eyes:
(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d
From
http://www.regular-expressions.info/regexbuddy/datemmdd.html
>
> Greg Lindholm-2 wrote:
> >
> >
> >>
> >>
> (((0[13578])|(1[02]))[\/]((0[1-9])|([12
I'd love to be able to help but am confused with what you are having
trouble with. I think I heard something about wanting to modify the
action of a form based on the value selected in a drop-down. I also
heard something about forwarding to another jsp page. If you can
clarify your intent you ma
ction" to retrieve the data necessary to fill the drop down
list and not to code the form's behavior after submitting it.
Hope that my point is clearer this time, I'll be really grateful
if someone got a clue to all this headache :(((
Regards,
Hanen
this state of seeing
> illogical
> things made me wonder how come that no body has encountered
> such problem
> before and how were they submitting their dynamic drop down lists
> classicaly).
>
> Regards,
> Hanen
>
> On Tue, Nov 10, 2009 at 3:59 PM, Kawczynski, Da
Use javascript to get a reference to the form, and call its submit
method.
EG
function submit() {
document.getElementById("form").submit() return false;
}
click me
> -Original Message-
> From: fea jabi [mailto:zy...@hotmail.com]
> Sent: Thursday, November 12, 20
If a requires authentication, don't render it until the
user is logged in.
If you are worried about the user's session timing out before
the form is submitted, implement some sort of javascript timer
that (after a period equal to a session timeout), pops up a
modal login form. Successfully su
The code examples pasted confuse me; I don't know what are you
trying to accomplish. Please pick one:
1. You have a where the user provides data. You wish to
relay that data to a Struts action class.
2. You have data supplied by the server. You wish to include
that data in a hyperlink
For this example pretend your field "firstname" has a max length of 15:
> -Original Message-
> From: RogerV [mailto:roger.var...@googlemail.com]
> Sent: Monday, November 16, 2009 10:29 AM
> To: user@struts.apache.org
> Subject: OGNL expression help
>
>
> Could someone show me the corr
How about this kludge:
the filter checks session isNew()
and checks the referring domain -- if it's null or
not your own domain, send them to the login screen.
Otherwise send them to the session timeout screen.
> -Original Message-
> From: Himstedt, Maik (EXTERN: T-Systems on)
> [mail
An easy alternative is to have a "processing" page meta-refresh to a struts
action that checks the status of the long-running process(es).
While the processing is still continuing, send the resonse back to the same
"processing" page.
When the processing is complete, send the response to a "comple
Sounds like a lot of work that hyperlinks w/ diverging URIs or
querystrings can accomplish, IMHO.
But to answer your question:
The action-form associated with this action will need a property
named "joe".
The jsp page's buttons need a name of "joe", and a value
of whatever you want render
If you're using S2's form taglibs to construct the select list, I don't
think you will find the level of control needed for this. Not unless
you know how to do that with a single css style element. If you do,
specify that style class as the attribute.
If you're not trying to do this, your onl
Being a fan of the KISS policy... I played around with
this but didn't have the time to figure it out, so I
made the URL spat out by struts2 points to a servlet
instead of struts2.
(Note that my web.xml has struts2 configured to listen
for *.action rather then slash-star)
Good luck & please
Is the scope of the corresponding action-form "session"?
> -Original Message-
> From: Hanen Ben Rhouma [mailto:hanen...@gmail.com]
> Sent: Wednesday, January 06, 2010 5:26 AM
> To: Struts Users Mailing List
> Subject: Why optionscollection doesn't persist the clicked value
>
> Hello,
>
To further clarify:
Is the optionscollection inside an element?
Is the scope of the corresponding action-form "session"?
> -Original Message-
> From: Kawczynski, David
> Sent: Wednesday, January 06, 2010 9:46 AM
> To: Struts Users Mailing List
> Subject:
ist
> Subject: Re: Why optionscollection doesn't persist the clicked value
>
> Yes it is.
>
> On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
> david_kawczyn...@merck.com> wrote:
>
> > To further clarify:
> > Is the optionscollection inside an e
; results but blank default value shown on both of them while I
> need to keep
> the first selected value shown to the user.
>
> On Wed, Jan 6, 2010 at 5:21 PM, Kawczynski, David <
> david_kawczyn...@merck.com> wrote:
>
> > That's odd.
> >
> > If you
ot;onchange" javascript method so it reloads the
> first collection
> and execute the action just by selecting one value.
>
>
> On Wed, Jan 6, 2010 at 6:02 PM, Kawczynski, David <
> david_kawczyn...@merck.com> wrote:
>
> > Does the second element's opt
I have used SiteMesh to decorate static content served
up by the app server. If the static content is served
up by apache (or some other httpd server) you're out of
luck.
> -Original Message-
> From: Philipp Leusmann [mailto:philipp.leusm...@rwth-aachen.de]
> Sent: Thursday, January 21
>
> David,
>
> did you use plain sitemesh or the struts-sitemesh plugin?
>
> Philipp
>
> Am 21.01.2010 um 17:50 schrieb Kawczynski, David:
>
> > I have used SiteMesh to decorate static content served
> > up by the app server. If the static content is serv
emplate, as well.
>
> I thought, maybe struts and sitemesh could decorate static
> pages using the default action to resolve the stack
>
> Philipp
>
> Am 21.01.2010 um 18:01 schrieb Kawczynski, David:
>
> > Plain sitemesh, with it's own filter in web.xml
>
How do you have struts mapped in web.xml? If it is mapped to /*
no you don't. If it is mapped to *.action, add another mapping
for /staticHTML/*
> -Original Message-
> From: Philipp Leusmann [mailto:philipp.leusm...@rwth-aachen.de]
> Sent: Thursday, January 21, 2010 2:42 PM
> To: Str
I don't think it is wise to instruct newbies to use scriptles,
especially in SiteMesh decorators. The decorator.xml file should
instruct SiteMesh to use different decorators for different paths.
Newbies need to get started off on the right foot, and not with bad
practices.
Other then that it's pr
This sounds more like a usability issue or an html
layout issue rather then a Struts issue.
I'd consider doing something to address the usability
rather then trying to use a horizontal scroll.
If the data in the select list can't be condensed,
maybe it shouldn't be in a select.
> -Or
Extend ActionSupport or one of its subclasses, override the
prepare( ) method, to call your customized method, then call
super.prepare( ).
> -Original Message-
> From: jayakumar ala [mailto:alajay...@gmail.com]
> Sent: Thursday, April 01, 2010 2:05 PM
> To: Struts Users Mailing List
> Su
Same name bundle, same name message key, different messages...
Sounds like the wrong group list. Try a general java list.
Or a technical design list.
I'd say use different named bundles, the same message key, & different
messages?
> -Original Message-
> From: Zaheer Mohammad [mailto:z
86 matches
Mail list logo