RE: Struts check box validation question

2004-02-11 Thread Ben Anderson
could append my sample code snippets. I appreciate your swift replies Thanks, ~Samy -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 2:37 PM To: [EMAIL PROTECTED] Subject: RE: Struts check box validation question not too sure what you mean

RE: Struts check box validation question

2004-02-10 Thread Ben Anderson
Here's code I got from Kris Schneider. It validates that at least one of the check boxes was checked, but you should be able to change it fairly easily to do whatever you want. If you're wondering how this code fits in, check out: http://jakarta.apache.org/struts/userGuide/dev_validator.html

RE: Struts check box validation question

2004-02-10 Thread Ben Anderson
class from the jsp Regards, Samy. -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 2:28 PM To: [EMAIL PROTECTED] Subject: RE: Struts check box validation question Here's code I got from Kris Schneider. It validates that at least one

RE: Passing an ArrayList

2004-02-09 Thread Ben Anderson
project this application is for mandates only request scope be used Can I ask why? It would make things much easier to set the ArrayList in session scope. However, I guess you can do this using struts ActionForms. You'll just need to make sure that every page you are navigating to includes

RE: Form populate

2004-02-05 Thread Ben Anderson
granted your struts-config is setup properly to use your bean and it extends actionForm, then why don't you just use the reference that is passed in to the execute method? if( form instanceof myForm ){ myForm mf = (myForm)form; mf.setXXX( Steelers rule ); } You don't need to worry about

RE: duplicate form object

2004-02-05 Thread Ben Anderson
jsp:useBean id=subscription scope=session class=com.borneo.beans.SubscriptionForm / This creates a new SubscriptionForm object because no object exists in session scope(or any scope) referenced by the name subcription. Struts uses a different id. I think it depends on the version of Struts

RE: Formating a float

2004-02-05 Thread Ben Anderson
are you using jstl? fmt:formatNumber pattern=#,###.00 value=${netTotal}/ From: Lucas Gonzalez [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Formating a float Date: Thu, 5 Feb 2004 11:55:18 -0300 Hi, I´ve been

Re: img tag with action as src

2004-02-03 Thread Ben Anderson
if img src=/some/dir/myAction.dodoens't work for you, then adding an base tag isn't going to help you. You just need to add your application context in there. Check out: http://jakarta.apache.org/struts/userGuide/struts-html.html#img Also here's another archive site: http://marc.theaimsgroup.com

Re: img tag with action as src

2004-02-03 Thread Ben Anderson
Could that play a part in this? nope From: Greg Blomquist [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: img tag with action as src Date: Tue, 3 Feb 2004 13:38:38 -0500 Thanks for the speedy reply. However, that doesn't seem to solve

RE: stop user from clicking the submit button twice

2004-01-30 Thread Ben Anderson
EnterInfoAction -- saveToken(request); enterInfo.jsp - nothing required - the html:form tag places an input type=hidden tag for you ProcessInfoAction - if ( !isTokenValid(request, true) ) { //incorrect token } I'm pretty

RE: [OT] Distribute a Struts Application on CD ??

2004-01-29 Thread Ben Anderson
I'm assuming you're trying to use a Linux Live distro. Perhaps you could test by removing write capabilities to your Tomcat/Resin directories - chmod -R -w /some/dir. If Resin still operates ok, I don't see why it wouldn't work from a live CD. -Ben From: Rouven Gehm [EMAIL PROTECTED]

RE: Struts text field 'value' attribute set from another ActionForm?

2004-01-29 Thread Ben Anderson
if you use the struts-el tag libraries you can try this: html-el:text name=someForm property=someProperty value=${otherForm.map.yourProp/ I've heard that it's best to avoid putting scriptlet/java code in my jsp pages. It is, but you're specific problem isn't pertaining to scriptlet vs.

RE: multiple action forms in a single jsp

2004-01-29 Thread Ben Anderson
I think you need to take a step back and understand how http works. Per each request, only one html form can be submitted(whether it's a get or a post). This is not specific to Struts, Java or any web server solutions. Your design is flawed, but it doesn't pertain to Struts. You can have

RE: Validation Multiple Pages forward-Failure

2004-01-27 Thread Ben Anderson
struts validation uses the input attribute of the action tag to send you back to where you came from if validation fails. Here's the excerpt from the dtd: input Module-relative path of the action or other resource to which control should be returned if a

Re: Validation Multiple Pages forward-Failure

2004-01-27 Thread Ben Anderson
dosen't work any more. Why? Thx Robert Lehner Ben Anderson wrote: struts validation uses the input attribute of the action tag to send you back to where you came from if validation fails. Here's the excerpt from the dtd: input Module-relative path of the action or other resource

RE: MessageResources and html help!

2004-01-19 Thread Ben Anderson
Actually those 2 methods should provide the same output. This is from the TagUtils.jsp, which is used in the bean:write tag: MessageResources resources = retrieveMessageResources(pageContext, bundle, false); ... message = resources.getMessage(userLocale,

RE: Images as links in struts

2004-01-14 Thread Ben Anderson
http://jakarta.apache.org/struts/userGuide/struts-html.html#img From: vasudevrao gupta [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Images as links in struts Date: Wed, 14 Jan 2004 17:34:35 +0530 Hi All, Can anyone help me about how

RE: Bean Tag question

2004-01-14 Thread Ben Anderson
you can't have a tag as an attribute for another tag. How bout this? bean-el:message key=parametric.key arg0=${myBean.myParam} / From: Henrique VIECILI [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Bean Tag

Re: Bean Tag question

2004-01-14 Thread Ben Anderson
[EMAIL PROTECTED] Subject: Re: Bean Tag question Date: Wed, 14 Jan 2004 17:32:55 -0300 Ok, i will try it! but, where can i download the struts-el.tld files?? i have not found them in the struts web site! Thanx Henrique - Original Message - From: Ben Anderson [EMAIL PROTECTED] To: [EMAIL

Re: ConcurrentModificationException on ActionErrors

2003-12-31 Thread Ben Anderson
Could you show the implementation(s) of your ObjX.getErrors() methods. I'm guessing there's probably a better way to do what you're trying to do. It probably has something to do with the implementation of:

RE: Oracle DataSource configuration

2003-12-29 Thread Ben Anderson
not sure if this matters, but my oracle jar is in common/lib instead of shared/lib. I'm not familiar with the differences/uses of common and shared, but that's how mine works. -Ben From: Ed Dowgiallo [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users

RE: URGENT - Help defending Struts

2003-12-18 Thread Ben Anderson
http://www.paychex.com/demos/s125/index.html you can't directly access it, because it's a subsription service, but there's a flash tour of the site. From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: URGENT - Help defending Struts Date:

RE: html:submit

2003-12-17 Thread Ben Anderson
you can't specifiy a tag as the value of an attribute in another tag. There are a few different ways you could solve this problem. Here's one using jstl and struts-el: c:set var=messy bean:message key='csc.button.submit'/ /c:set html-el:submit property=physicianSubmit value=${messy}/ From:

RE: Help Req : Loading init params

2003-12-12 Thread Ben Anderson
you're getting the NullPointerException because getServlet() is returning null. This is because setServlet hasn't been called by Struts yet. From the javadoc for Action: When an Action instance is first created, the controller servlet will call setServlet() with a non-null argument to

RE: Commons validation framework and struts

2003-12-12 Thread Ben Anderson
You need to decide if you want to use Struts validation or define your own class. You're example below is inconsistent: If you want to use Struts validation(which you probably do): struts-config.xml --- form-bean name=calcForm type=org.apache.struts.validator.DynaValidatorForm

RE: [OT] Beer

2003-12-12 Thread Ben Anderson
alright, didn't think I'd need to chime in, but someone's gotta defend the black gold: representing the great city of Pittsburgh: Iron City Beer From: Chappell, Simon P [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]

RE: Iterate and onClick problem for html:submit

2003-12-12 Thread Ben Anderson
This is because you can't mix the value of an attribute of a custom tag with both string literal and run time expressions. Instead of this: html:submit onclick=this.form.hiddenId.value='%=(String) theCode %'; value=Edit / something like this should work: c_rt:set var=theCode value=%=(String)

RE: token pattern

2003-12-10 Thread Ben Anderson
http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html From: Kalra, Ashwani [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts (E-mail) [EMAIL PROTECTED] Subject: token pattern Date: Wed, 10 Dec 2003 22:12:52 +0800 hi, Can any one point me to the

RE: Property Declaration Annoyances

2003-12-09 Thread Ben Anderson
c_rt:set var=key value=%= myKey %/ c:set var=mapper value=${myMap[myKey]}/ c:out value=${mapper.myProperty}/ From: Joe Hertz [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Property Declaration Annoyances Date: Tue, 9 Dec 2003 10:43:22

RE: display tag library

2003-12-02 Thread Ben Anderson
I don't know which tag library you're referring to, but I believe you should be able to call pageContext.getRequest() from any method in a class that extends TagSupport. -Ben From: Honza Spurný [EMAIL PROTECTED] Reply-To: Honza Spurný [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: display tag

Re: display tag library

2003-12-02 Thread Ben Anderson
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/tagext/TagSupport.html From: Honza Spurný [EMAIL PROTECTED] Reply-To: Honza Spurný [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: display tag library Date: Tue, 2 Dec 2003 16:39:22 +0100 Ben Anderson

Re: Using one Action class for several forms

2003-12-01 Thread Ben Anderson
not sure I fully understand your problem. This may be the answer you aren't looking for, but maybe it can help (it just gives the current path): %@ page import=org.apache.struts.Globals % c_rt:set var=mapping_key value=%= Globals.MAPPING_KEY %/ c:set var=mapping

Re: Returning raw data from an action

2003-12-01 Thread Ben Anderson
from http://marc.theaimsgroup.com/?l=struts-userm=106730742008404w=2 modified slightly: // Now write the actual content type and data response.setContentType(text/plain); JspWriter stream = response.getWriter(); ... write out the csv ... // Return null to tell Struts the response is

Re: Basic question about html:

2003-11-25 Thread Ben Anderson
You can't specify a tag for the value of an attribute. The only place you can nest tags is inside the tagbody. Are you using JSTL and struts-el? You could do html-el:radio property=id value='${filters.filterID}/ but what you're describing sounds more like: c:forEach var=row items=${filters}

Re: Basic question about html:

2003-11-25 Thread Ben Anderson
if that's how you want to do it you need to change your quotes from: option value=bean:write name=module property=module_id/abc/option to: option value='bean:write name=module property=module_id/'abc/option From: Ricky Lee [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED]

[OT] struts for PHP

2003-11-20 Thread Ben Anderson
I'm starting a new project that the customer says must be done in PHP. I've been looking at frameworks and there seems to be a bunch. There is one called php.MVC - http://phpmvc.net - that is based on struts. I'd love to use it since I'm already familiar with struts. Does anyone have any

Re: Html:image

2003-11-10 Thread Ben Anderson
Shishir, you cannot nest tags within tags. You probably want to use html-el:image http://jakarta.apache.org/struts/faqs/struts-el.html -Ben From: Shishir K. Singh [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject:

Re: Best Practices in Struts for Form objects?

2003-11-06 Thread Ben Anderson
you probably only want one form set to request scope. If you use different forms, then that form is only valid for the one specific action it is associated with. For instance, if the submitting page contains a form that has a textbox where you can input your name. And you want to display the

RE: saving jsp in WEB-INF

2003-11-06 Thread Ben Anderson
or if you want to keep them outside of WEB-INF add a line like this to your web.xml security-constraint web-resource-collection web-resource-nameprivate/web-resource-name url-pattern/myPages/*/url-pattern /web-resource-collection auth-constraint/

Re: validate method

2003-10-31 Thread Ben Anderson
ActionErrors ae = form.validate( mapping, request ); if( ae.size() != 0 ){ saveErrors( request, ae ); return new ActionForward( mapping.getInput() ); } From: Khandelwal, Rahul [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To:

Re: two resource bundles?!

2003-10-30 Thread Ben Anderson
http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest,%20java.lang.String) http://marc.theaimsgroup.com/?l=struts-userm=106641120427697w=2 From: Otto, Frank [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL

Re: how to use 2 resource files in one struts-config.xml?

2003-10-29 Thread Ben Anderson
jstl solution: in your jsp: - fmt:setBundle basename=com.myapp.one var=oneProps/ fmt:setBundle basename=com.myapp.two var=twoProps/ fmt:message key=errors.header

Re: how to use 2 resource files in one struts-config.xml?

2003-10-29 Thread Ben Anderson
in your struts-config.xml: !-- this is now your default resource bundle -- message-resources parameter=com.myapp.one/ message-resources parameter=com.myapp.two key=MESSAGE_TWO/ in your jsps: bean:message key=errors.header/ bean:message key=approval.001 bundle=MESSAGE_TWO/ From:

Re: Looking up the Struts Datasource

2003-10-17 Thread Ben Anderson
It depends on the container as to how you put the datasource into the context. If you're using Tomcat 4.1: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html Then to access the datasource: String dsName = java:comp/env/jdbc/myDS; ctx = new

Re: JSTL evaluate problems

2003-10-17 Thread Ben Anderson
this should work: c:set var=person value=${requestScope.personForm}/ c:set var=_name value=name/ c:set var=_firstName value=firstName/ c:out value=${person[_name][_firstName]}/ From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL

Re: AW: Looking up the Struts Datasource

2003-10-17 Thread Ben Anderson
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Philipp -Ursprüngliche Nachricht- Von: Ben Anderson [mailto:[EMAIL PROTECTED] Gesendet: Fr 17.10.2003 16:22 An: [EMAIL PROTECTED] Cc: Betreff: Re: Looking up the Struts

Re: html:checkbox, iterate and a value

2003-08-15 Thread Ben Anderson
have you looked at multibox? c:forEach items=${reports} var=row tr td align=left valign=top html:multibox property=reportList c:out value=${row.key}/

Re: Iterating the resultset contents in the view (jsp)

2003-07-15 Thread Ben Anderson
That is true, but when columns are added to the table - you need not edit any file other than the jsp(doing it Kris' way). From: David Graham [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Iterating the resultset contents in the view

html spaces

2003-07-10 Thread Ben Anderson
know this will work: c:set var=link bean:message key=path/bean:message key=file /c:set but does anyone know if there's a way to continue to the next line without inserting a space? Thanks, Ben Anderson

Re: html spaces

2003-07-10 Thread Ben Anderson
would you mind elaborating? From: Eric Jain [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: html spaces Date: Thu, 10 Jul 2003 17:19:17 +0200 but does anyone know if there's a way to continue to the next line

fmt:message

2003-07-10 Thread Ben Anderson
As per earlier requests, I attempted to switch my bean:message tags to fmt:message tags, however I have been unsuccessful thus far. This is what worked: keys are defined in MessagesMyBundle.properties code file=struts-config.xml message-resources key=MESSAGE_MY_BUNDLE

Re: html:text tag with null bean

2003-07-08 Thread Ben Anderson
I'm not too sure exactly what you're trying to do, but I think this is generally how you'd be using html:text code file=struts-config.xml? form-beans form-bean name=myForm type=org.apache.struts.validator.DynaValidatorActionForm form-property

Re: javascript validation

2003-06-20 Thread Ben Anderson
writing the .js and then finding it because our actions are mapped /do/xxx/yyy/zzz? It doesn't seem to be looking in the right place. I've been searching all over the web and through the mail-archive for answers, but haven't found anything definitive. Thanks in advance, Ben Anderson

RE: form bean

2003-06-20 Thread Ben Anderson
This is what I have in struts-config.xml: form-beans form-bean name=reportForm type=org.apache.struts.validator.DynaValidatorActionForm form-property name=reportList type=java.lang.String[]/ /form-bean /form-beans -Ben Anderson From: [EMAIL

Re: [struts-menu] how to use URL rewriting ?

2003-06-19 Thread Ben Anderson
Try html:rewrite http://jakarta.apache.org/struts/userGuide/dev_html.html From: Nicolas De Loof [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: [struts-menu] how to use URL rewriting ? Date: Thu, 19 Jun 2003 15:53:56

html:link/ w/out a href??

2003-06-18 Thread Ben Anderson
window.open( link ); Thanks, Ben Anderson _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail

Re: DynaValidator Form is Null

2003-06-17 Thread Ben Anderson
. -Ben Anderson From: Natalie D Rassmann [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: DynaValidator Form is Null Date: Tue, 17 Jun 2003 07:24:10 -0400 Sorry, that line isn't throwing the null pointer exception

Re: DynaValidator Form is Null

2003-06-17 Thread Ben Anderson
-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: DynaValidator Form is Null Date: Tue, 17 Jun 2003 07:37:03 -0400 How do you add the form somewhere in the action? Ben Anderson wrote: I had trouble with this as well. Hopefully, the answer