RE: Struts check box validation question

2004-02-11 Thread Ben Anderson
s a array and pass it to my deleteBooks() method in my Action class. Please let me know if I was not clear and I could append my sample code snippets. I appreciate your swift replies Thanks, ~Samy -Original Message- From: Ben Anderson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February

RE: Struts check box validation question

2004-02-10 Thread Ben Anderson
oser now, but do we have to pass in the array of selections to the ActionForm 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 questi

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 a

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 you

RE: Formating a float

2004-02-05 Thread Ben Anderson
are you using jstl? 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 searching the list for any insight about this i

RE: duplicate form object

2004-02-05 Thread Ben Anderson
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 you're using as to what this id is... something like org.apache.struts.action[s].Ac

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: 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 s

Re: img tag with action as src

2004-02-03 Thread Ben Anderson
if doens't work for you, then adding an 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 -Ben From: Manfred Wolff <[EMAIL

RE: stop user from clicking the submit button twice

2004-01-30 Thread Ben Anderson
EnterInfoAction -- saveToken(request); enterInfo.jsp - nothing required - the ProcessInfoAction - if ( !isTokenValid(request, true) ) { //incorrect token } I'm pretty sure this is how it works, but it's been a while, so I may

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 mor

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: 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. non-scriplet. That is solved with expression language. It'd probably be easier if you c

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]> R

Re: Validation Multiple Pages forward-Failure

2004-01-27 Thread Ben Anderson
e validation find the failure, so the User could corret his failure an procced the applikation. BTW: I used the struts-validation exmaple as pattern. I changed in the pattern struts-config.xml at the action multiRegistration the validation to true and the applikation dosen't work any more. Why

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 valida

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 MessageResources resources = retrieveMessageResources(pageContext, bundle, false); ... message = resources.getMessage(userLocale, key); ...

Re: Bean Tag question

2004-01-14 Thread Ben Anderson
que VIECILI" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[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

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? From: "Henrique VIECILI" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: Bean Tag question Date: Wed, 14 Jan 2004 16:14:49 -0300 Hi,

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 a

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: http://jakarta.apache.org/struts/api/org/apache/struts/action/ActionMessages.html#add(org.

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 Us

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 D

RE:

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: From: Clark Kent <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: usergroup <[EMAIL PR

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: something like this should work: however, based on your use case I would suggest making use of the property attribute of hth, Ben From: [EMAIL PROTECTE

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 PROTEC

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 --- If you are writing your own validation class, you'

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 identif

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 poin

RE: Property Declaration Annoyances

2003-12-09 Thread Ben Anderson
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 -0500 As of JSP 1.1 (and apparently 1.2 as I'm experiencing this with Tomcat 4.x) the following does

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

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

Re: Returning raw data from an action

2003-12-01 Thread Ben Anderson
from http://marc.theaimsgroup.com/?l=struts-user&m=106730742008404&w=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

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" %> -Ben From: Wendy Smoak <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>

Re: Basic question about

2003-11-25 Thread Ben Anderson
if that's how you want to do it you need to change your quotes from: ">abc to: abc From: "Ricky Lee" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Subject: Re: Basic question about hi, so glad that i met the same

Re: Basic question about

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 there might be a better way to do this. I haven't worked with radio buttons that much, but this should work. -Ben From: "Raman" <[

[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 ex

Re: Html:image

2003-11-10 Thread Ben Anderson
Shishir, you cannot nest tags within tags. You probably want to use 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: Html:

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 private /myPages/* From: "Greg Hess" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PRO

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: 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]>

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-user&m=106641120427697&w=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
in your struts-config.xml: in your jsps: From: Ashish Kulkarni <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: how to use 2 resource files in one struts-config.xml? Date: Wed, 29 Oct 2

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

2003-10-29 Thread Ben Anderson
jstl solution: in your jsp: - -- you probably also want to declare a default resou

Re: AW: Looking up the Struts Datasource

2003-10-17 Thread Ben Anderson
struts-config.xml. When I do the naming lookup as you described I get "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:

Re: JSTL evaluate problems

2003-10-17 Thread Ben Anderson
this should work: From: [EMAIL PROTECTED] Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: JSTL evaluate problems Date: Fri, 17 Oct 2003 12:29:44 -0500 No. The variable that is actually nestedProp is populated dynamicall

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 InitialC

Re: html:checkbox, iterate and a value

2003-08-15 Thread Ben Anderson
have you looked at multibox? this produces something like:

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 vie

struts-user@jakarta.apache.org

2003-07-10 Thread Ben Anderson
As per earlier requests, I attempted to switch my This is what worked: keys are defined in MessagesMyBundle.properties I changed to this and I can't seem to get it working the page renders but instead of displaying the message, it displays "???my.me

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

html spaces

2003-07-10 Thread Ben Anderson
but does anyone know if there's a way to continue to the next line without inserting a space? Thanks, Ben Anderson _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=feature

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 -Ben From: "Dmitri Ilyin" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> T

RE: form bean

2003-06-20 Thread Ben Anderson
This is what I have in struts-config.xml: -Ben Anderson From: <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: form bean Date: Fri, 20 Jun

Re: javascript validation

2003-06-20 Thread Ben Anderson
ing to run into problems 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 foun

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

2003-06-19 Thread Ben Anderson
Try 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 +0

validate String[]

2003-06-19 Thread Ben Anderson
any cases where the property is an array of Strings. Any thoughts? Thanks in advance, Ben Anderson _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?pa

w/out ??

2003-06-18 Thread Ben Anderson
I have a form with 2 buttons. I know I can handle this ok using the dispatch property. But, what I'd rather do (so I don't have to put ugly query strings in my links) is use javascript. What I'm wondering is, if there's a way to get action -> link resolution that the tag gives me without th

Re: DynaValidator Form is Null

2003-06-17 Thread Ben Anderson
it may help you pinpoint your problem. -Ben 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 0

Re: DynaValidator Form is Null

2003-06-17 Thread Ben Anderson
e in the action. -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