I am having From date - in the form of 3 separate lists for - Day, Month, Year.
Similarly i have To date.
Using struts validator framework,
1)Firstly i want to validate whether the combined entries (day, month, year) is
a valid date or not
2)Secondly whether first date > to date
I tried to
Look into the expression language's Logical OR ("||") operator and the
JSTL core tags (such as c:if). Possibly the OR operator would work
within an EL expression using the logic:equal tag as well, but I just
can't think of an example.
Erik
Krishna Mohan Radhakrishnan wrote:
Hi all,
A very simpl
Hi Neil,
But this will lead to repetition of code.
If there are multiple OR's then it will lead to a big code.
Any other idea u have
Regards,
Krishna Mohan
INFOSYS TECHNOLOGIES LIMITED
3rd Floor | "Bhavani" Technopark | Trivandrum 695 581 | India
Phone +91 471 2700888 Extn 7365 | Mobile: +9198
How about:
...
...
BTW, you might look into the similar JSTL tags: if and choose. They
will likely have a longer life than the Struts equivalents. My
philosophy is to use JSTL whenever possible.
Krishna Mohan Radhakrishnan wrote:
Hi all,
A very simple question.
Hi all,
A very simple question.
...
.
The above code is just like an AND function.
Only if both the conditions are equal it will go inside the loop.
Similarly How will we do it for an OR condition.
If any condition satisfies it should go inside the
Hi all,
A very simple question.
...
.
The above code is just like an AND function.
Only if both the conditions are equal it will go inside the loop.
Similarly How will we do it for an OR condition.
If any condition satisfies it should go inside the
Thanks again, David.
"David G. Friedman" <[EMAIL PROTECTED]> wrote:T.T.,
Before I give you an example, let me just yell "read the manual" at:
Struts Developer Guide -> link "HTML Taglib API Reference" URL
http://struts.apache.org/userGuide/struts-html.html
Now, on to practical matters.
As you m
Sorry Hubert,
I tried with validate=false also.
It is not working. Moreover when I press Inactivate button, before going
to the Inactivate Plan Action class it is going to the validator
rules.xml and does the validation. So somehow I want to disable the form
validations when I click the Inactivate
Hi,
You *cannot* directly add parameters to an http request inside an Action
class. You *can* add attributes to the request context (that's what
HttpServletRequest was designed for).
So, in your JSTL-aware page, access your request *attribute*:
or
HTH,
Curtis
dsarris wrote:
I do not thing th
Hi,
You may find some information in
http://pow2acl.sourceforge.net/
Good Luck
Cliff
- Original Message -
From: "Barnett, Brian W." <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'"
Sent: Wednesday, January 05, 2005 4:50 AM
Subject: RE: Security question
> Well, I guess I'll proc
Hi,
Could I ask where to set the bCancel ?
as a parameter in the request ??
Thx a lot.
Cliff
- Original Message -
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Wednesday, January 05, 2005 2:27 AM
Subject: Re: HOw to avoid validations for certain submi
Hi,
You may get the reference from the Cancel Button in CancelTag.
The Tag will set a parameter in the request to block the validation in the
servlet.
Good Luck
Cliff
- Original Message -
From: "Krishna Mohan Radhakrishnan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: We
T.T.,
Before I give you an example, let me just yell "read the manual" at:
Struts Developer Guide -> link "HTML Taglib API Reference" URL
http://struts.apache.org/userGuide/struts-html.html
Now, on to practical matters.
As you may know, traditionally, you have an html:form in your JSP like so:
Have a look at commons-jexl:
http://jakarta.apache.org/commons/jexl/
import org.apache.commons.jexl.*;
public class JexlExample {
public static void main(String[] args) throws Exception {
String expr = "((123*123+567-7899*340)/1234)*1000";
Expression e = ExpressionFactory.creat
Hi Sachin,
Haven't tried but have a look at these links:
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/model/FormulaP
arser.html
http://maplenet.maplesoft.com/doc/com/maplesoft/maplenet/client/MapleSta
tement.html
Cheers
Apurva
-Original Message-
From: sachin [mailto:[EM
From: <[EMAIL PROTECTED]>
> The validation is more axed around the date format... I want to validate
> the date format ONLY if the user checked the checkbox to active the filter
> on that date.
>From a user interface perspective, the checkbox is redundant. If they want
to give you a date, they fi
> -Original Message-
> From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 1:25 PM
> To: user@struts.apache.org
> Subject: [OT] store web application specific data
>
>
> Hi
> I am working on a web application using struts, i have
> some application speicif
Well, I guess I'll proceed with that. Thank you.
-Original Message-
From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 1:55 PM
To: 'Struts Users Mailing List'
Subject: RE: Security question
I don't know of any other way than to programmatically check user'
The validation is more axed around the date format... I want to validate
the date format ONLY if the user checked the checkbox to active the filter
on that date. It's simply a "nice to have". In theory, the user should not
have edit the textbox where the date has to be entered if he didn't check
th
I don't know of any other way than to programmatically check user's role
inside your Action's method. There is no way to specify attributes in the
of the . It just doesn't support such
pattern matching.
Yaakov.
-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED]
Sent: Tuesday,
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 1:21 PM
> To: Struts Users Mailing List
> Subject: RE: Validate a field only if a checkbox is checked
>
>
> yes. It's the combination of the 2 It will validate the
> date form
Hi
I am working on a web application using struts, i have
some application speicific data which is in a xml file
in WEB-INF directory of my web application.
What is the best way to make this information
available through out the web application.
I dont want to read the xml file each time data is
re
yes. It's the combination of the 2 It will validate the date format
even if the checkbox is not checked. I would like to validate the date
format ONLY IF the checkbox is checked.
Thank you for your time.
-
Jean-Franc
Thanks Jim!
For anyone following along, Jim's suggestion to preface all actions to be
authenticated with "/secure/" works great. Of course, you have to change
all references to those actions in many places, but had I thought of that
idea when I started developing this (my first real) site, it
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 12:53 PM
> To: Struts Users Mailing List
> Subject: RE: Validate a field only if a checkbox is checked
>
>
> I tried something like that, but it doesn't work. Other
> ideas? I sea
I tried something like that, but it doesn't work. Other ideas? I search all
the mailing list. I've seen a guy with almost the same problem as me,
except he was working with radio button. He never had an answer though
Thank you.
-
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 12:03 PM
> To: user@struts.apache.org
> Subject: Validate a field only if a checkbox is checked
>
>
>
> Hi,
> I want to know, how can I validate a field that must
> contain
The Calyxo development team is pleased to announce the availability
of Calyxo 0.9.0-b4!
This is mainly a maintenance release.
However, the validation component has been further improved.
The Calyxo manual is now available in PDF format.
The Calyxo Web Application Framework encourages in MVC
Mode
Hi,
I want to know, how can I validate a field that must contains a date
with the DatePattern ONLY IF a checkbox in my form is checked? For now, I
have this, but it doesn't work at all:
test
(customerIdFlg == null)
If you install Struts and its dependencies in each of your ten
webapps's /WEB-INF/lib directories, it will indeed require more memory
than a single shared installation, because each class will get loaded
once per webapp instead of only once.
The downside of sharing, of course, is that the code you
> -Original Message-
> From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 11:30 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator question
>
>
> Agree 100%. My comment was purely theoretical.
>
> On a side note though... Does it consume mor
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 11:17 AM
> To: user@struts.apache.org
> Subject: Two Qs re: authentication servlet filter
>
>
>
>
>
>
> Can anyone help a newbie out? I have a couple of questions:
>
> 1) I
Like Jim said, take a look at the validate=false attribute for the
/InactivatePlanAction. Also, the javascript validation will kick in
by default. You can add an onClick handler to the "Inactivate" button
to set "bCancel=true;" so the javascript validation is skipped.
Hubert
On Tue, 4 Jan 2005
Agree 100%. My comment was purely theoretical.
On a side note though... Does it consume more RAM if you have 10 apps
running on the same server all having their own validator jar in their lib?
If it does, this might not be as theoretical as I think.
Of course, hopefully, I'll never be in a situa
> -Original Message-
> From: Barnett, Brian W. [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 11:04 AM
> To: 'Struts Users Mailing List'
> Subject: Security question
>
>
> I'm using LookupDispatchAction and role-based security. I
> want to allow
> certain roles to access c
Can anyone help a newbie out? I have a couple of questions:
1) I am implementing a servlet filter for authentication. In my web app,
a class reunion web site, I want people to be able to login with their
first and last names and a password, instead of a single ID and password,
so I am NOT c
I'm using LookupDispatchAction and role-based security. I want to allow
certain roles to access certain dispatches of an action. I'm not sure what
the best way to handle this is.
Should I create separate Action classes? Is there a slick way to specify
"dispatch level" security in web.xml?
Can som
Hi,
I want to know, how can I validate a field that must contains a date
with the DatePattern ONLY IF a checkbox in my form is checked? For now, I
have this, but it doesn't work at all:
test
(customerIdFlg == null)
> -Original Message-
> From: Metin Erksan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 10:59 AM
> To: Struts Users Mailing List
> Subject: RE: displaytag1.0rc2 (export) and struts problem
>
>
> hi
>
> it wants to download "myAction.do" not the excell file.
Ummm... okay
> -Original Message-
> From: Chaikin, Yaakov Y. [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 10:52 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator question
>
>
> Although I agree with you that it's much easier to keep it
> all in the lib of
> the webapp, I
hi
it wants to download "myAction.do" not the excell file.
sincerely
Jim Barrows <[EMAIL PROTECTED]> wrote:
> -Original Message-
> From: Metin Erksan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 1:03 AM
> To: user@struts.apache.org
> Subject: displaytag1.0rc2 (export)
Although I agree with you that it's much easier to keep it all in the lib of
the webapp, I think it should still be ok to keep common-validator.jar in
the server's shared lib directory.
The classloader problem would only apply to struts.jar since it tries to
load classes dynamically and therefore
> -Original Message-
> From: ans [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 7:56 PM
> To: Struts Users Mailing List; taglibs-user@jakarta.apache.org
> Subject: Re: isSessionValid request tag is false
>
>
> Hi,
> And this happens only for the first time I open the
> brows
> -Original Message-
> From: Metin Erksan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 1:03 AM
> To: user@struts.apache.org
> Subject: displaytag1.0rc2 (export) and struts problem
>
>
> hi
>
> i use jdeveloper10g and dipslaytag10rc2. i want to use export
> property but
J. Patterson Waltz III wrote:
Merci Guillaume,
I had actually seen the references to the Filter solution in the comments of
Struts bug 16191 in Bugzilla:
http://issues.apache.org/bugzilla/show_bug.cgi?id=16191
I will try that out and see if it improves my results.
I remain perplexed at what changes
> -Original Message-
> From: Krishna Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 9:28 AM
> To: Struts Users Mailing List
> Subject: HOw to avoid validations for certain submit buttons
> on a single
> form?
>
> I think one solution is to put Inactivat
> -Original Message-
> From: Manisha Sathe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 2:02 AM
> To: user@struts.apache.org
> Subject: Validator question
>
>
> I just started learning validator (struts) and developed one
> small form with one single field. I used Javasc
> -Original Message-
> From: dsarris [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 8:19 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Set request parameters in servlet through action
>
>
>
>
> I do not thing that Hollaway solution is the correct one
> -Original Message-
> From: Ritchie Warsito [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 4:36 AM
> To: Struts Users Mailing List
> Subject: I8N - Locale switch on any page
>
>
> Hey there,
> I'm studying the struts-mailreader example and as some of you
> might know
> (
> -Original Message-
> From: Mark McWiggins [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 03, 2005 6:19 PM
> To: user@struts.apache.org
> Subject: New to Struts & seeking advice
>
>
> Hi All,
>
> I've developed several web applications over the last 10
> years, mostly
> based on
Merci Guillaume,
I had actually seen the references to the Filter solution in the comments of
Struts bug 16191 in Bugzilla:
http://issues.apache.org/bugzilla/show_bug.cgi?id=16191
I will try that out and see if it improves my results.
I remain perplexed at what changes between versions 1.1 and 1
> i want to know what is bc4j exactly?and how to
> use that ...
Download JDeveloper and pull up a wizard.
- Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi all,
I have a jsp called Plan.jsp. The name of the ActionForm is
PlanActionForm.
There is a action class called PlanAction.java. From this
PlanAction.java it is forwarding to Plan.jsp.
In the Plan.jsp there are 2 buttons and one text field.
Text field name is txtboxTitle and the 2 butt
In fact there could be another solution. You could extend the
tag, by adding an attribute that propagates the request parameters.
In fact can use a java.util.Map to create the URL query
parameters but it cannot use the "current" parameters.
Normally you have to do this way:
where "nameOfTheMap
"J. Patterson Waltz III" writes:
> Hello,
>
> I recently upgraded a J2EE/Struts web application I'm working on to the
> 1.2.4 version of Struts, and ever since I made this change, I've been
> encountering a problem with the encoding of non-ascii character data
> submitted in forms. All my pages
There's no way to do it that is Struts-specific, uhh, unless I'm wrong :)
You have to think about what is happening on the browser when PlanAction.java
completes and fowards...
The response is returned to the browser, Offerings.jsp. This page loads
content, Plan.jsp. So, as far as the browser
Thanks, David. Could you please give a simple example to explain how to
"specify another bean"?
"David G. Friedman" <[EMAIL PROTECTED]> wrote:T.T.,
If you want to display something form the session object stored with
"Constants.USER_KEY" in /search.jsp (your "success" forward), you don't need
to
I do not thing that Hollaway solution is the correct one. I do not
pass it to the request parameter list. As brenmcguire stated, I can
only set an attribute in the Request (not the parameters).
Thus, what is the equivalent for retrieving the attribute in my JSP page?
OR
-
Hi all,
I have a java clas called PlanAction.java. I am forwarding to a JSP
called Offerings.jsp.
But Offerings.jsp contains a frameset which include another JSP called
Plan.jsp.
I need the request attribute set in the PlanAction.java to be available
in the Plan.jsp.
I found that request attri
Mike, you supplied the same msg three times. This should help ;-)
if ( getUsername() == null || getUsername().length() < 1 ) {
- errors.add("username",new ActionError("errors.required")); }
+ errors.add("username",new ActionError("index.msg.username")); }
if ( getPassword() == n
for a request *attribute* ?
request.setAttribute("myThing", myThing);
Hollaway, Shedrick L CIV TRIREFFAC wrote:
This should be equivalent:
Shed.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 9:28
To: user@struts.apache.org
Subject:
Yep, that will do it :-)
+ If there isnt such an attribute in the request it will also look in
the session and iirc the servlet context too...
[EMAIL PROTECTED] wrote:
I am using the JSTL:core tag libs ar a replacement of the "struts-bean"
tag.
Thus, is the following equivalent?
JSP:
Uh... I do
This should be equivalent:
Shed.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 9:28
To: user@struts.apache.org
Subject: Re: Set request parameters in servlet through action
> I am using the JSTL:core tag libs ar a replacement of
Hello,
I cannot seem to get the validator to plug args into my messages.
Everything else works (LogonForm.java/LogonAction.java,...).
When I run this basic test and click Submit with 3 empty fields, I get: {0} is
required!{0} is required!{0} is required!
Maybe somebody could kindly point out
> I am using the JSTL:core tag libs ar a replacement of the "struts-bean"
tag.
>
> Thus, is the following equivalent?
>
> JSP:
>
Uh... I don't know, I never used JSTL. Sorry but you have to try and test
:-P
Just remember that "request.setAttribute" sets a bean at request scope.
--
Hello,
I recently upgraded a J2EE/Struts web application I'm working on to the
1.2.4 version of Struts, and ever since I made this change, I've been
encountering a problem with the encoding of non-ascii character data
submitted in forms. All my pages are set to use UTF-8 encoding (via a <%@
page p
On Mon, 3 Jan 2005 11:16:16 +0200, dsarris <[EMAIL PROTECTED]> wrote:
> Hi all and happy new year,
>
> I am trying to fill an ActionForm with values that are neither Strings
> or primitives. The specified values are selected using the
> tag. This a sample of my JSP code:
>
>
>
On Tue, 4 Jan 2005 14:37:54 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> >
> > Thus, if I set an attribute using the HttpServletRequest.setAttribute,
> > how can I retrieve it my JSP page?
> > I know that all these can be very easy using an ActionForm, but I do
> > not want to create an Ac
>
> Thus, if I set an attribute using the HttpServletRequest.setAttribute,
> how can I retrieve it my JSP page?
> I know that all these can be very easy using an ActionForm, but I do
> not want to create an ActionForm for just a plain String attribute.
>
Supposing in the Java code:
String myThin
On Tue, 4 Jan 2005 13:31:35 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> > how can I add a request parameter inside an action execute method? Do
> > I have to use an ActionForm or it is an easiest way to do it?
> >
>
> You cannot set a new parameter once a http request has been submitt
> how can I add a request parameter inside an action execute method? Do
> I have to use an ActionForm or it is an easiest way to do it?
>
You cannot set a new parameter once a http request has been submitted, but
you can get parameters directly via the object "request", passed in the
"execute" me
Hi,
how can I add a request parameter inside an action execute method? Do
I have to use an ActionForm or it is an easiest way to do it?
chipix
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
Hey there,
I'm studying the struts-mailreader example and as some of you might know
(I hope), you have the option to switch languages (different
ApplicationResources).
The thing is, and I've read this on many other sites that this is the
common way to do it, is that the locale options are only o
On Mon, 3 Jan 2005 17:46:46 +0100, Pavel Kolesnikov
<[EMAIL PROTECTED]> wrote:
> On Mon, 3 Jan 2005 11:16:16 +0200, dsarris <[EMAIL PROTECTED]> wrote:
>
> > I am trying to fill an ActionForm with values that are neither Strings
> > or primitives.
>
> I think you can do it by extending the Request
In the pop up page, you can define a javascript function like this.
window.opener.reload() // This function will just reload the parent window
window.opener.location.replace(url) // This call will reload the parent window
// with the specified URL
This fu
i want to know what is bc4j exactly?and how to use
that ...
__
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250
--
Hi,
I want to submit a modal dialog window (Popup window) from a struts
application which should result in closing the popup.
Currently when I submit the popup, It shows the success/failure screen.
Can anybody let me know how to redirect the control to the parent window on
submit of the popup windo
It'll be good if you can have a look at Tomcat documentation - 'Class Loader
Section'
It clearly says that if you want to have jars accessible to different web
application,
then it should be placed in $CATALINA_HOME/shared/lib directory.
Hope this should address your problem.
- Ashutosh
I just started learning validator (struts) and developed one small form with
one single field. I used Javascript and serverside validatin both.
Till now i used to put all my jar files inside {Tomcat home}/common/lib and it
was all ok. (I do not want to keep too many copies of jar files inside
i get the following error when i run a web application to display the contents
of a table.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevente
hi
i use jdeveloper10g and dipslaytag10rc2. i want to use export property but when
i click to "excell" link it shows up a window that wants to save file ? how can
i correct this?
is there any sample code snippet displaytag export property with struts.
sincerely
-
81 matches
Mail list logo