Mick-
The ActionForm.validate method
return an ActionErrors object that encapsulates any validation errors that
have been found. If no errors are found, return null or an ActionErrors
object with no recorded error messages.
The default implementation performs no validation and returns null.
Subcla
With the new version of Struts, we are getting a NullPointerException whenever
custom rules are being run because they are expecting a parameter list of:
Object Bean,
ValidatorAction va,
Field field,
ActionErrors errors,
org.apache.commons.validator.Validator validator,
HttpServletRequest request
Mick-
www.localhost ?
I know http://www.wellsfargo.com and I know http://localhost
but I must confess I do not what www.localhost is
Martin-
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 8:22 PM
Subject: Issues switching context pa
I just upgraded to struts 1.2.4, and now we want to move from our app at /, to
being /ice/
So I modified my application.xml to be /ice and then pre-pended /ice to all of
my actions.
So I went from /appEntryPoint to /ice/appEntryPoint in the struts-config.xml
Now when I navigate to http://www.loc
I don't know if this is the best fix for the problem but it worked for me,
I changed
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
to
public ActionForward execute(ActionMapping mapping,
On Thursday 09 December 2004 19:09, Laconia Data Systems wrote:
> Derek-
> Any conversions (String to Integer or whatever) need to happen in your
> Business Bean layer
Not me... I just replied to a reply. :-)
--
derek
-
To unsub
On Thursday 09 December 2004 18:02, Wendy Smoak wrote:
> From: "Derek Broughton" <[EMAIL PROTECTED]>
>
> > > What happens when somebody types "ABCDE" into your Integer field on the
> > > form, and it fails validation? Can you re-display the incorrect user
>
> input
>
> > > so they can see what the
On Thursday 09 December 2004 18:28, Frank W. Zammetti wrote:
> I always tend to chime in on topics like this because I sense a real
> over-reliance on taglibs in general, certainly the Struts taglibs more
> specifically.
...
> My point is simply that, as with most good technology, use custom tahs
>
Ben wrote:
I meant this:
UserForm () {
String name;
AddressForm address = new AddressForm();
}
AddressForm () {
String city;
String zipcode;
String country;
validate(...) {
// validate the address
}
}
UserAction () {
UserForm userForm = (UserForm) form;
ActionErrors errors = userForm.
I meant this:
UserForm () {
String name;
AddressForm address = new AddressForm();
}
AddressForm () {
String city;
String zipcode;
String country;
validate(...) {
// validate the address
}
}
UserAction () {
UserForm userForm = (UserForm) form;
ActionErrors errors = userForm.valida
Derek-
Any conversions (String to Integer or whatever) need to happen in your
Business Bean layer
e.g.
ActionForm which uses Strings and booleans
private String IntegerDisplay = null;
public String getIntegerDisplay()
{
return this.IntegerDisplay();
}
public void setDateIntegerDisplay(String displ
Hi, David,
This seems to be a fairly easy problem if there are no considerations
other than these. If you don't know which response page you want to
send make until after you receive a request, then you just make the
decision during the execution of the Action with different
ActionForward objects
Wendy Smoak wrote:
From: "Matt Bathje" <[EMAIL PROTECTED]>
What do you mean by "must be there for a reason"? As far as I know, a
form property can be any class type that you want it to be.
Sorry, I think only in terms of dynamic forms, and there is a list of
allowed field types:
http://struts.apac
Jim,
Since the ActionForm is working but you're getting no data from your Action
class, are you using perform() instead of execute()? Old tutorials (and
some older books) on Struts all show the perform() method which is not
present in the current releases (1.2.4, it was deprecated in 1.1 and remo
Hey All,
I'm using webdoclet to generate my ActionForms and hibernate config files from
my POJO's. But when I try and make one of my POJO's have a FormFile object
(only struts, and not hibernate config), it generates it as a String object.
Any ideas?
Thanks!
Steven
--
From: "Matt Bathje" <[EMAIL PROTECTED]>
> What do you mean by "must be there for a reason"? As far as I know, a
> form property can be any class type that you want it to be.
Sorry, I think only in terms of dynamic forms, and there is a list of
allowed field types:
http://struts.apache.org/userGui
I always tend to chime in on topics like this because I sense a real
over-reliance on taglibs in general, certainly the Struts taglibs more
specifically.
As Jeff said, people seem to forget that the taglibs are really in a
sense an extension of Struts. Struts works just fine without them (I
k
Wendy Smoak wrote:
From: "Derek Broughton" <[EMAIL PROTECTED]>
What happens when somebody types "ABCDE" into your Integer field on the
form, and it fails validation? Can you re-display the incorrect user
input
so they can see what they typed and why it was wrong?
Or more concisely, because HTML on
One situation I might consider this acceptable is when it's for a
field that uses a drop down as the control, and I'm sure that my users
won't try to be smart with me by submitting the form using their own
hand made HTML. In this case, I don't have to worry about the
typos/invalid values.
In my ac
Why not call nested.validate() inside NormalForm#validate(), then add
the appropriate ActionMessage objects in the resulting ActionErrors?
On Fri, 10 Dec 2004 08:57:17 +1100, Ben <[EMAIL PROTECTED]> wrote:
> Hi
>
> Within my normal form there is a nested form. The nested form has
> custom valida
From: "Derek Broughton" <[EMAIL PROTECTED]>
> > What happens when somebody types "ABCDE" into your Integer field on the
> > form, and it fails validation? Can you re-display the incorrect user
input
> > so they can see what they typed and why it was wrong?
>
> Or more concisely, because HTML only
Are you talking something like
If so, then its most likely not possible. Furthermore, it is not
standard HTML, and not guaranteed to work on any browser - whatever you
are doing with nested forms needs to be rethought so as not to use them.
If that is not what you are talking abo
Hi
Within my normal form there is a nested form. The nested form has
custom validation. The validate attribute of the action is set to
false. My question is how do I validate the normal form and
automatically validate the nested form with my custom validation
method?
E.g.
NormalForm () {
NestedF
[EMAIL PROTECTED] wrote:
This works fine, but I have to ask, is this how a purely struts application
should be written, or is there a truly struts-based solution to what I was
trying to do?
Thanks!
I, for one, don't have any problems with this approach from a Struts
standpoint.
David-
Cant make an intelligent decision without looking at your code which fills
in 'sometarget'
Martin-
- Original Message -
From: "David Bolsover" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 4:16 PM
Subject: [Spam] Conditional forward to target page on
At 9:16 PM + 12/9/04, David Bolsover wrote:
I need to extend an existing application with a conditional forward
to a specified page following form submittal.
For example forward name="top" path="/toppage.jsp" ... needs to
forward to named target page "top"
forward name="side" path="/sidepage
I need to extend an existing application with a conditional forward to a
specified page following form submittal.
For example forward name="top" path="/toppage.jsp" ... needs to forward to
named target page "top"
forward name="side" path="/sidepage.jsp" ... needs to forward to named target
pag
how about
Post message
for this classmate
or perhaps you could create a throw-away DynaActionForm for this action if
you really want it to be a button.
csl
> [ServletException in:/classmateInfoData1.jsp] Cannot retrieve
> definition for form bean null' javax.servlet.jsp.JspException: Ca
I have a jsp where I want to include a button that will simply invoke a new
struts action, which is a ForwardAction that invokes the Tiles definition
for a new page. At first I tried this with a Struts tag, as below:
However, I was getting the following error in my browser
Cool. So the Validator will pick them up if I add them to the paths in the
struts-config I assume.
Mick Knutson
Wells Fargo Business Direct
(415) 222-1020
"This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to re
I'd keep them separate. That way, if you upgrade to a new version you can
just drop in a new validator-rules.xml without having to add your custom
rules again.
Niall
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 8:19 PM
Subject:
I would upgrade to 1.2.4 at this point, unless you need any of the 1.2.6
features. Upgrading to 1.2.6 (from 1.2.4) is simply a matter of deploying
the new jars (Struts, BeanUtils & Digester) and perhaps new versions of the
TLDS (if you configure and deploy the TLDS).
If there is a 1.2.7 it will p
We have been using struts v1.1 and just upgraded to 1.2.4.
We also created several custom rules and appended them to the
validation-rules.xml.
But now it seems the validation-rules.xml is in the struts lib DIR.
Should we create a files called validation-rules-wfb.xml for our custom rules
without
On Thursday 09 December 2004 14:28, Wendy Smoak wrote:
> From: "aris" <[EMAIL PROTECTED]>
>
> > > Use String (and occasionally Boolean) for form fields and things will
>
> work
>
> > > the way you need them to.
> >
> > I don't understand your answer... If I need an Integer field for my
> > ActionFo
Sean,
Is there a proxy server involved in the upload request?
csl
Sullivan, Sean C - MWT said:
>
> I am using Struts 1.1 in Websphere 5.0.1
>
> I am trying to use Struts' FormFile feature to receive an uploaded file.
>
> The file upload is failing due to a "Read timed out" error. The error
> o
I am using Struts 1.1 in Websphere 5.0.1
I am trying to use Struts' FormFile feature to receive an uploaded file.
The file upload is failing due to a "Read timed out" error. The error
occurs when Struts is trying to read data from the InputStream for the
HttpServletRequest object.
Is this a kn
From: "aris" <[EMAIL PROTECTED]>
> > Use String (and occasionally Boolean) for form fields and things will
work
> > the way you need them to.
>
> I don't understand your answer... If I need an Integer field for my
> ActionForm derived class why I've to use a String?
What happens when somebody typ
We have a customized login/authentication scheme in our site, using an extended
Struts ActionMapping class. The authentication check itself (handled in our
extended ActionServlet class) is simple: if the user has a username, proceed,
otherwise forward to the login page. In order to smoothly ha
From: "Wendy Smoak" <[EMAIL PROTECTED]>
> From: "aris" <[EMAIL PROTECTED]>
> > When I submit the form, after the validation process I have value="0"
(the
> > field is an Integer) but I haven't set validation rules on this field :|
>
> Use String (and occasionally Boolean) for form fields and thing
Hi,
I am using the struts validator plug-in in my webapp. I have observed that
sometimes on JSPs that use form validation that the javascript generated by
html:javascript tag comes out on the generated html page. It happens very
irregularly so its hard to spot what is causing it. Anybody have a
Hi all,
I solved my problem ...reading the documentation
At page http://struts.apache.org/userGuide/building_view.html
at section "3.3.5 The Struts Validator" I read:
[...]
Note: If your required form property is one of the Java object
representations of primitive types (ie. java.lang.Inte
From: "aris" <[EMAIL PROTECTED]>
> When I submit the form, after the validation process I have value="0" (the
> field is an Integer) but I haven't set validation rules on this field :|
Use String (and occasionally Boolean) for form fields and things will work
the way you need them to.
> In my opi
Hi all,
I've a strange behaviour with my application and I suppose the reason is the
ValidatorPlugIn.
I've an html form with an hidden field and the pre-population lets its
value="" (this is right because the value of the field in the associated
ValidatorForm is null).
When I submit the form, aft
Ah.. stupid me =)
So the solution with dynaactionform is:
---
public ActionForward execute(ActionMapping _mapping, ActionForm _form,
HttpServletRequest _request, HttpServletResponse _response) throws
Exception
{
DynaActionForm dynaForm = (DynaActionForm) _form;
String userId = (String) dynaFor
Jim:
could we see the entire struts-config.xml
could you print out the head for your LogonAction so we can see the
Package specification for LogonAction?
Has the LogonAction class been included in the war?
Martin-
- Original Message -
From: "Jim Douglas" <[EMAIL PROTECTED]>
To: <[EMAIL PRO
Erik Weber writes:
> I often write a Struts plug-in that sets static collections (such as
> select box values) as ServletContext attributes in the init method.
That becomes more complicated when you handle i18n (e.g. in
labelProperty).
--
Guillaume Cottenceau
-
[EMAIL PROTECTED] wrote:
I want to use a bean to supply options to a select widget.
I have a business object, DevicesBO that has a method that returns a
Collection.
Class Name: DevicesBO
Method: Collection getDevices()
The collection is a List of CodeDecodeDTO objects.
Class Name: Cod
agree,
I've read the O'reilly struts book and "Struts in Action".
The Oreilly is more WHAT you can do, where "Struts in Action" is takes a
more practical approach.
Mr. Husted has already sorted out the good vs bad approaches for you. A
good read.
Henrik Bentel
"Laconia Data Systems" <[EMA
Niall,
I fixed that but it didn't matter. Any other suggestions?
Thanks,
Jim
From: "Niall Pemberton" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: Controller Form not forwarding to Action
Date: Thu,
Hi
thanx for the answeres,
i was asking this question because i have an existing
struts application using 1.1, and is in production and
working fine, we have plans to update this web
application and add new features, so i thought this
was the right time to update struts also,
so i wanted to jump to
good answer-
I would also strongly encourage reading
"Struts in Action" by Ted Husted
if you Read the foreword from Craig McClanahan you'll want to read this book
cover to cover
Martin
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent:
> For Struts, O'Reilly has a pretty good book, the title of which elludes
me at the moment,
Programming Jakarta Struts 2nd ed - Chuck Cavaness
Stuts The Complete Reference - James Holmes was the first Struts book I
read and was very helpful. Each chapter gave a good overview before
getting i
You will need to set the "selectedCompanies" in the ActionForm
so that the can determine which companies
have been selected by comparing the company id against the selected
company id.
If "allCompanies" does not change per user, you may want to place that in
the ServletContext on application sta
I want to use a bean to supply options to a select widget.
I have a business object, DevicesBO that has a method that returns a
Collection.
Class Name: DevicesBO
Method: Collection getDevices()
The collection is a List of CodeDecodeDTO objects.
Class Name: CodeDecodeDTO
Methods:
Use execute method instead of perform in your Action class.
sankar
On Thu, 9 Dec 2004 14:36:31 +0100, Vadim Petrenko <[EMAIL PROTECTED]> wrote:
> Hi,
>
> can you manually invoke your Login action, directly from the browser, like
> http://localhost:8080/test/Login.do ???
>
>
>
>
> -Orig
How I can prepopulate a form containing a multibox when using
DynaActionForms? The following code doesn't seem to work - it wont check
any checkboxes (why?)
---
Action which prepopulates the form:
---
String[] companies = MyDBTools.getUser(userId).getCompanies();
ArrayList allCompanies = MyDBTool
Jason,
Thanks for the detailed info. It helps.
-You
Jason Lea <[EMAIL PROTECTED]> wrote:
An example of what you can do
tiles-def.xml (.main.home defines menus and other things, and extends
layout.jsp):
I put the title in my layout template:
layout.jsp (using JSP 2.0/JSTL/EL - you m
A MySQL developer apparently has increased the throughput of Connector/J
significantly for the latest (not yet a production version) release.
http://jroller.com/page/mmatthews/20041202#connector_j_3_1_5
Erik
-
To unsubscribe, e-m
London Struts Networking BOF VI
Agenda
Since it is nearly Xmas, rather than concentrate entirely on niche and very
specialist topics, I want to generalise and open-up the discussions during the
evening. I have put together a basic agenda of themes.
Depending on the seating arrangeme
Hi,
can you manually invoke your Login action, directly from the browser, like
http://localhost:8080/test/Login.do ???
-Original Message-
From: Sylvain ~ [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 09, 2004 2:21 PM
To: [EMAIL PROTECTED]
Subject: An Other "Blank Page" issue
Hi
Hi,
I'm quite new to struts, and I'm trying to make a simple example taken
from a website.
The first page show a formular, and when submited it is automatically
forwarded to an other page.
the problem is that when I submit, I get an absolute blank page, the
source is "".
I checked Tomcat logs, a
Hi,
I'm quite new to struts, and I'm trying to make a simple example taken
from a website.
The first page show a formular, and when submited it is automatically
forwarded to an other page.
the problem is that when I submit, I get an absolute blank page, the
source is "".
I checked Tomcat logs, a
Though I've used Struts quite a bit in the past, I found this freely
downloadable book a very good source of '101' Struts information:
http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/index.tss
Mike
"Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
Sounds good! You'll find that t
Also, just because they label something beta, doesn't mean you should
ignore it. You could try it out, and if it meets your needs, or has
features you want to use, then use it. From my understanding, the
issues that made the dev team vote "beta" are older validator-related
issues (which would alr
Or something like:
Authentication webapp authenticates the user, obtains it's data, like name,
age, all parameters you were talking about, then saves them in the database,
in a row with a primary key which == id of the session of the authentication
webapp. Then it redirects to the main webapp with
>>is there any other way to share session between two
>> different web application. I really need to do this...
Just my 2 cents,
which ever application creates the session, you could create a unique
indentifier,
store it in a dsn, then write indentifier to url for all inetractions with
application
Although its a Tomcat How To it does say "This guide should apply to all
J2EE containers."
Niall
- Original Message -
From: "Claude Libois" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 9:57 AM
Subject: Re: Transmission of a ses
Unfortunately we are working with weblogic 8.1...
However now it seems to work but I don't know why :)
I just make the https redirection into the pre-processor and now the session
seems to be kept...
Claude Libois
[EMAIL PROTECTED]
Technical associate - Unisys
- Original Message -
From: "
Maybe this "Tomcat How To" will help...
http://www.fwd.at/tomcat/sharing-session-data-howto.html
Niall
- Original Message -
From: "Claude Libois" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 8:59 AM
Subject: Re: Transmission o
I need to do this because when arriving on a web application a PreProcessor
redirect to an authentication web application. But when the authentication
is finished we have to come back to original web application with all the
paramater given to this web application.
This process works with username-
I agree, that sharing a session between 2 separate webapps is an example of
a horrible design. One is not supposed to manipulate with jsessionid
directly.
However, if you don't need to share _entire_ session, but only several
attributes, then you can use database to share them or take advantage o
Didn't work but I guess you didn't see that I wanted to share the session
between two different web application.
So I suppose that It won't work this way.
Claude Libois
[EMAIL PROTECTED]
Technical associate - Unisys
- Original Message -
From: "Vadim Petrenko" <[EMAIL PROTECTED]>
To: "'Str
Claude,
Try this one:
ActionForward af=new ActionForward(response.encodeRedirectURL(
"http://12.2.33.13:4/Consumer/receiveSession.do";),true);
It's gonna add jsessionid as well, if necessary, see
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse
.html#encodeRedire
A precision that make a big difference.
The two actions are not in the same web application.
I saw on a forum that sharing session between two web app is "bad design"
and so is not allow with jsessionID.
Is it true? If so, is there any other way to share session between two
different web applicatio
Hi all,
I try to keep my session after a redirect in struts but it doesn't work. So
I made a test application with an action sendSession.do and an other action
receiveSession.do.
Here are the code of those two simple action:
sendSession.do
public class sendSession extends
75 matches
Mail list logo