Hi,
Does Struts1 provide an example anywhere of how to use Servlet Filter to
access the struts config?
Thanks,
Paul
-Original Message-
From: Strachan, Paul [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 July 2007 3:47 PM
To: user@struts.apache.org
Subject: [s1] security filter for
Hi,
For security/authorisation we use a servlet filter which checks the url
against our security database. We've recently upgraded to Struts 1.2.9
and tried using EventDispatchAction, but the problem is the filter does
not know which event to secure against (as the event name is arbitory
value
It should work OK if you're using the
http://struts.apache.org/tags-html-el taglib.
-Original Message-
From: Lim Hock-Chai [mailto:[EMAIL PROTECTED]
Sent: Friday, 16 March 2007 4:08 AM
To: Struts Users Mailing List
Subject: RE: Re: EL expression in html:form action
I'm pretty sure that c
I resolved this myself by simply overriding the set(String, Object)
method in my form, to ignore certain request parameter names that are
not of type String in my LazyValidatorForm.
From: Strachan, Paul
Sent: Saturday, 10 March 2007 4:51 PM
To: user
Hi,
struts 1.2.9
beanutils 1.7.0
I receive a 500 'org.apache.commons.beanutils.ConversionException' originating
from the RequestProcessor.processPopulate() displayed on the web page.
I can usually make this type of error occur by "hacking" the http parameters,
e.g. specifiying a request parame
?
Thanks,
Paul
-Original Message-
From: Michael Jouravlev [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 27 February 2007 10:53 AM
To: Struts Users Mailing List
Subject: Re: [DESIGN] struts dialog / wizard
On 2/25/07, Strachan, Paul <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'
Hi,
I realise this is probably not a struts problem and I feel a bit silly posting
this question but here goes:
I'm using html:button with EventDispatchAction but my button properties do not
appear in the request - the html source fragment goes something like:
function doEdit(id) {
docu
Hi,
I'm looking at implementing a struts wizard flow (of about 12 pages) into my
struts-1.2.9 application. The struts dialogue project seems to be along the
lines of what I need (pattern-wise). I have some extra quirements such as:
1. A progress menu (synch with the wizard)
2. Some pages hav
I can't see "q1Choice" defined in your tiles, it looks like you have
defined the attribute only on request scope.
"header","contact","footer" are tiles attributes - just comment out the
and you might be OK.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thur
you have to use a valid url with an anchoryour browser cannot make a new
HTTP request to a Tile. what were you expecting the link to contain?
From: Pierre Thibaudeau [mailto:[EMAIL PROTECTED]
Sent: Wed 2/7/2007 10:40 AM
To: Struts Users Mailing List
Subject:
Hi,
I usually access my cached droplist data directly from the jsp - eg have placed
a bean called "ReferenceDataCache" on application scope with getter methods. In
jsp I can simply call:
I also try to keep my struts forms only containing properties for the http
posted data.
The co
What vaildator method - If you have 2 forms, why not just have 2
validator form definitions (one for each form). Or is it you actually
have one form where for one mapping the field is mandatory, and the
other mapping the field is optional, and you wish to validate in both
actions?
Some solutions
try:
&
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wed 1/31/2007 2:58 PM
To: user@struts.apache.org
Subject: Struts 1.3.5 - Validate for "&" in mask validator
Hi,
Maybe this is more of a Regular Expressions question than struts, but please
h
Hi,
Can you be more specific regarding the data you are losing on validation?
e.g.
1. request attributes
when a new request is sent from the browser, the validation may occur before
you have an opportunity to add further request attributes - in this case you
should validate in your action c
From: Mallik [mailto:[EMAIL PROTECTED]
Sent: Tue 12/12/2006 4:53 PM
To: user@struts.apache.org
Subject: external javascript file linking problem?
Hi friends
i am converting a project into struts
i want to use my javascript(js) calender file in strtus
applicat
I'm using struts 1.2.9 but your case seems pretty standard.
1. yes, you should include the form name in your mapping
2. if necessary, in your action access the "id" from either the request or the
form
3. get your data and populate the form
4. do not create form beans yourself
If you still have
a) The displayTag library can sort for you
b) you can only pass one parameter using html:link (unless you use a Map)
c) if "function" is a Dispatch method you could use javascript onclick event
handler to submit to the "sort" method, passing the sortOrder parameter - then
toggle it in your action
ist
Subject: Re: Struts1: CHALLENGE "Indexed Properties can not be used with FORMS
on REQUEST scope!" TRUE or NOT TRUE?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul,
Strachan, Paul wrote:
>> Have you tried calling yourFormBean.get("yourArrayList") an
2006 3:24 AM
To: Struts Users Mailing List
Subject: Re: Struts1: CHALLENGE "Indexed Properties can not be used with FORMS
on REQUEST scope!" TRUE or NOT TRUE?
-----BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul,
Strachan, Paul wrote:
> Chris, In my DynForm I'm actually using a jav
there a recommended solution?
From: Strachan, Paul [mailto:[EMAIL PROTECTED]
Sent: Sat 9/12/2006 2:54 AM
To: Struts Users Mailing List
Subject: RE: Struts1: CHALLENGE "Indexed Properties can not be used with FORMS
on REQUEST scope!" TRUE or NOT TRUE?
Ch
UEST scope!" TRUE or NOT TRUE?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul,
Strachan, Paul wrote:
> A request scoped "out of the box" DynaValidatorForm is also unable to
> handle indexed properties e.g. throws IndexOutOfBoundsException in
> DynaActionForm.get(string, int)
Hi,
I've only recently started putting my forms on request scope, and encountered
this issue with DynaValidatorForm.
A request scoped "out of the box" DynaValidatorForm is also unable to handle
indexed properties e.g. throws IndexOutOfBoundsException in
DynaActionForm.get(string, int) - I gu
HTH
-Original Message-
From: Adam Gordon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 5 December 2006 10:20 AM
To: user@struts.apache.org
Subject: SimpleMenuItem and tiles/putList
We have a home grown menu system we're using to display our web app's
try something like:
...
-Original Message-
From: Gundersen, Richard [mailto:[EMAIL PROTECTED]
Sent: Monday, 4 December 2006 11:00 PM
To: user@struts.apache.org
Subject: Map backed properties
Hi
I've been happily working with map based properties in my forms for a
while now, but I
Hi,
According the struts documentation the default implementation of reset()
does nothing, so calling super() will have no effect. When you override
a method it is up to you to call super() or not, in this case I do not
believe it is required.
You only need to reset form elements that DO NOT sub
what is the trouble?...all looks good to me
do you need to include:
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" ?
From: Java Programmer [mailto:[EMAIL PROTECTED]
Sent: Thu 23/11/2006 12:07 AM
To: user@struts.apache.org
Subject: Tiles & menus
Hi,
what exact value did you enter with the date pattern MM/dd/yy?
I dont like datePatternStrict because you have to enter the leading zero for dd
and MM; and the year should format according to java.text.SimpleDateFormat
rules.
I use dd/MM/ (not strict) and the user can type the full yea
You could also try define a second form and use javascript to post
parameters using onclick event...maybe something like:
function submitForm2() {
self.document.Action2Form.variable.value=self.document.Action1Form.varia
ble.value;
self.document.Action2Form.submit();
}
then...
Hi,
I have a JSP that submits to /actionA which forwards to tileA. I now want that
JSP to alternatively submit to /actionB which forwards to tileB.
Now both /actionA and /actionB execute the same action code, and return the
same forward name. So in my struts-config its really easy to simply p
If you view the html source you would notice the 'name' attribute is the
same for each radio field; this field is what groups the radios
together.
With struts, typically you would apply indexProperties feature e.g.
... N/C
Approve
Deny
...
And your formdef may look like
Each bean in the
To "clone" a DynaValidatorForm perhaps something like this will work:
LazyDynaBean obj = new LazyDynaBean(); // create a lazy dyna bean
BeanUtils.copyProperties(obj, dyForm); // save your form properties
session.setAttribute("saved.obj", obj);
...
LazyDynaBean obj = session.getAttribute("saved
could it be you have validate="true" but no form validations defined ?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 24 October 2006 9:38 PM
To: user@struts.apache.org
Subject: Form not found for locale 'en_US' warning message
Hi,
I am the getting
To populate the string array your http request would take the structure:
name=value1&name=value2&name=value3 etc where you have a java.lang.String[]
name; property on your form.
So there are many ways to do this in html, with Struts tags (eg populated from
form) you could try:
Not
alidwhen"
e.g.
1. lunch from is invalid if: (lunchFrom == null and lunchbreak != null)
now turn it around...
2. lunch from is valid if: (lunchFrom != null or lunchbreak == null)
Hope that helps
Paul
-----Original Message-
From: Strachan, Paul [mailto:[EMAIL PROTECTED]
Sent: Tuesd
try using validwhen - something like:
test
((lunchBreak == 'N') or (*this* != null))
test
((lunchBreak == 'N') or (*this* != null))
-Original Message-
From: Mallik [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 10 October 2006 4:49 PM
To: user@struts.a
Hi All,
(Struts 1.2.4, Validator 1.1.3)
I have a DispatchAction which forwards to 3 possible Jsps (populated by
a single DynaForm)
Next, I added validations for each of the 3 JSP pages but now each
validation is different, it seems I need to clone the forms ???
But, also it doesn't
Thanks
-Original Message-
From: Strachan, Paul [mailto:[EMAIL PROTECTED]
Sent: Thursday, 5 October 2006 10:17 AM
To: user@struts.apache.org
Subject: Array of DynaForms
Is it possible to define an ArrayList of DynaValidatorForm for working
with indexed properties?
Or can I construct a
Is it possible to define an ArrayList of DynaValidatorForm for working
with indexed properties?
Or can I construct a DynaForm class in my action class to add it to the
Parent DynaForm array?
**
This message is intended for th
maybe you can wrap your anchor in a Form and use the onclick event
handler to set the value and submit the form by "post" method, using
hidden attributes.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 October 2006 4:49 PM
To: user@struts.apache.or
Hi All,
I'm already familiar with the basic process of using DynaForm with
String properties (to capture the HTTP request params) and then copying
the DynaForm values to a business object.
Now I want to use indexed properties (eg multi-row edit screen). So my
DynaForm looks something
you could write a beanutils converter and plugin for struts config
e.g.
Your plugin class should register converters for each type
e.g.
Converter converter = new SqlDateConverter(..., sqlDateFormat,
sqlDateAllowNull)
ConvertUtils.register(converter, java.util.Date.class);
etc
-
You could create your own sort class which implements
java.util.Comparator
e.g.
public class MySort implements Comparator {
compare(o1, o2) {
String name1 = (String) o1.getLastName();
String name2 = (String) o2.getLastName();
return name1.compareTo(name2);
}
}
th
perhaps use a servlet filter to do this - you can simply map the filter
to whatever urls you wish to apply rather than remembering to include
some code in each and every jsp/action class etc
e.g. in your doFilter(ServletRequest, ServletResponse, FilterChain)
method:
1. HttpSession session = reque
Hi Puneet,
When I re-read your original mail I notice you use DHTML to add rows, so
my approach/thoughts may not be appropriate for you.
I use DynaForms with ArrayLists of objects. In the form I use the
logic:iterate with indexed=true on the html tags. If I need to
"dynamically" add another row
A List is an ordered collection so it doesnt make sense that the order changes.
Also, depending on which Map implementation you use ordering may not be
guaranteed. I frequently use indexed properties with List and have not
experienced this problem. You may need to check the generated html sou
in your action class:
ArrayList list = new ArrayList();
Location location = new Location();
location.setLocationName("A Location");
list.add(location);
dyForm.set("locations", list);
I'm not sure how to validate a simple array of strings (eg
Hi everyone,
I have a multi-row edit page with linked dropdowns which I render using
logic:interate (using indexed properties)
The struts html tags documentation mentions about needing the reset trick
for the html:select tag.
I'm a bit stuck how this java code should be applied in the reset me
I think just make sure any existing messages object is not replaced
e.g.
ActionMessages errors = new ActionMessages();
errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("my.error.key"));
saveErrors(request, errors);
...
// then later
errors = form.validate(mapping, request); // retur
the property is just a normal property defined in your form, and you can set a
value...
or via javascript:
function submitForm(var) {
self.document.yourform.command.value=var;
self.document.yourform.submit();
}
From: Heidy Gutiérrez Guzmán [mailto:[EM
you could move the logic into the view/jsp layer...something like:
or maybe a custom tag library...
From: Lixin Chu [mailto:[EMAIL PROTECTED]
Sent: Sat 16/09/2006 1:25 PM
To: Struts Users Mailing List
Subject: Re: calling method of a bean fr
what I would do is:
1. keep form properties as String (and consider using DynaValidatorForm)
2. use the "required,float" or "required,int" validation
3. use BeanUtils.populate method to map the form onto a typed object (property
names must match)
From: Heidy Guti
would something like this work?
function validateRadio() {
if ( self.document.mystrutsform.myradio.value = "a good value" ) { return
true; }
else {
alert('Error with radio');
return false; // should prevent submit
}
}
Also validate on the server side if the javascript coul
listElementHTML.length > 0) {
var elementHTML = listElementHTML[fieldIndex];
if (elementHTML.disabled == false) {
/*if (elementHTML.type == "text")
elementHTML.select();
else */
elementHTML.focus();
}
add something like this to your struts config...
public class GlobalExceptionHandler extends ExceptionHandler {
/*
* Static Logger
*/
private static LogsLogger =
LogFactory.getLog(GlobalExceptionHandler.class);
public ActionForward execute(Exception e
maybe we could do something like this in the JSP - the idea is taken
from the TextTag.java which knows to use the errorStyleClass when theres
an error.
...
<%@ page import="java.util.Iterator" %>
<%@ page import="org.apache.struts.Globals" %>
<%@ page import="org.apache.struts.taglib.TagUtils" %
I find all my request based filter-mapping is for *.do,index.jsp
(requests)
e.g. request comes in something.do (filter is invoked)
struts forward to tile --> includes various *.jsp (no filter mapping so
no filters invoked)
Are all your filter-mappings really needed for *.jsp (responses)?
-Or
Hi All,
I am investigating the use of continuations for a page flow wizard. Can
anyone report the status of Struts Flow sandbox project? There has not
been an official release since 2004 (0.5 is not yet released). Has this
project stalled or been superseded by something else? Is continuations
fo
57 matches
Mail list logo