RE: Inside WEB-INF or outside WEB-INF? Struts security.
Exactly! So, why do the typical examples put the jsp pages outside? At 02:43 PM 4/19/02 -0300, you wrote: He means that it is more secure to place JSP files inside the WEB-INF directory, since it does not allow direct access to its files. So, nobody would be able to access the JSP files directly, and would then have to use the mapped URLs in struts.config.xml, which is more secure. --- Galbreath, Mark [EMAIL PROTECTED] escreveu: I thought I answered that. If you have nothing that can execute outside WEB-INF, what does security matter? Mark -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 12:32 PM To: Struts Users Mailing List Subject: RE: Inside WEB-INF or outside WEB-INF? Struts security. Thank you for the response, but it is not responsive to the question I asked, I think. My question was: Most sample apps have the jsp pages and images outside the WEB-INF. Why? Isn't it more secure inside? So, where the servlets are ultimately put is not the question, Mark. The question is why do most sample applications put the jsp pages outside the WEB-INF file, even in Tomcat? That works with Tomcat too. You can put them in either place, but if you do it outside you use relative urls and if you put them inside you use the controller framework. My question is why in the world would someone use struts and then put them outside the WEB-INF file? Thanks. Micael At 05:31 AM 4/19/02 -0400, you wrote: All web containers MUST support files inside WEB-INF by specification. As for JSP files, some containers, like Tomcat, considers them controller component Java classes (servlets) and places them in the WEB-INF/class directory by default. Others, like JRun, consider JSPs view components (they are, if used correctly) and place them in a jsp directory outside WEB-INF. The point is, JSPs should never have executable Java scriplets in them. Programmatic functionality should consist solely of tags, which hide the implementation inside WEB-INF. Mark -Original Message- From: Victor Hadianto [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 3:18 AM On Fri, 19 Apr 2002 08:20, you wrote: Most sample apps have the jsp pages and images outside the WEB-INF. Why? Isn't it more secure inside? Not all web container supports files inside the WEB-INF. Tomcat does. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Frederico Ferro Schuh [EMAIL PROTECTED] ICQ: 20486081 ___ Yahoo! Empregos O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no Yahoo! Empregos e tenha acesso a milhares de vagas abertas! http://br.empregos.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Creating beans dynamically from byte code in a byte[] with ClassLoader.defineClass- how to do it right?
Thorbjørn Ravn Andersen (Scandiatransplant) wrote: I have spent some time lately figuring out how I can generate beans on-the-fly with fields completely specified at run-time, since this would be an enourmeous help when working with JDBC and Struts in an informal matter (which is why I ask here :-) I have now made it work with generating code automatically. There are still some rough edges, but I can now take a JDBC-request, generate a bean for all the fields, and forward it to Struts without having to create beans in advance. It complements the BeanUtils very well. Is this interesting to anybody but me :-) ? -- Thorbjoern -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Strtus Tags inside XSLT
Hello Samip, The custom tags are evaluated in the order they appear in the jsp. If you are using Jakarta tag libraries for XSLT processing the solution is as follows. xsltlib:apply xsl=text.xsl !-- Here u can generate XML using struts tags or any other tag library. can also have jsp code -- strutsbean:message key=key locale=locale bundle=bundlename/ / xsltlib:apply In this case the apply tag is evaluated first and there is a call to execute the body of the apply tag. When the body is being processed the struts tag is called and further processed. Hope it helps, Regards, Srinivas. -Original Message- From: Samip Ladhawala [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 10:19 PM To: [EMAIL PROTECTED] Subject: Strtus Tags inside XSLT Hi Srinivas, I saw your post on the mailing archive saying that you solved the porblem of using Struts taglib in XSLT. Could you please email me how did u slove that. I am also in same situation and I want to use struts tablib in xslt. Thanks in advance, Samip. _ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax
RE: null in html on validation
Hi, In the action did u save errors and then forward to the jsp. Try calling this method saveErrors(request, errors); and then forward. Regards, srinivas -Original Message- From: Team Gasoline [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 3:29 AM To: [EMAIL PROTECTED] Subject: null in html on validation Hello -- I'm having a problem with errors being surrounded by null on my page after validation. Here is a snippet of the html when i view source of the page through the browser. tr th align=right User Name: /th td align=left input type=text name=username maxlength=16 size=16 value= null td bgcolor=grayfont color=red size=2--Required Field/font/td null /td /tr Here is what I have in my jsp. tr th align=right bean:message key=prompt.username/ /th td align=left html:text property=username size=16 maxlength=16/ html:errors property=username/ /td /tr and my form. public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((username == null) || (username.length() 1)) errors.add(username, new ActionError(error.username.required)); return errors; } Has anyone ever seen this before. I have checked everywhere and have found no good answers. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How do I disable struts-validator on first call using the do
Hi All, We're using the struts-validator and it's great. We have one problem: when the page is called through the do (/transferUtitlity.do), the validator fires and displays the error. We wanted on the first call to the page that the validator will be disabled. Thanks for your help, Reynaldo
RE: Validator help
I found using the Struts validation cumbersome and unpredictable, so I just wrote a custom tag to validate my input forms. If anyone is interested, I'll post the code. Mark -Original Message- From: Parmar, Dipakkumar [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 5:48 PM To: Struts Users Mailing List Subject: Validator help Hi, I'm having really hard time to figure out why the validator is not working. Here is the summary what i did: 1. I tried to produce debug/error messages for org.apache.commons.validator but no luck. (see thread How can i turn on debug for org.apache.commons.validator) 2. I override validate method in my ActionForm and put the same code from validate method in validate.java(org.apache.commons.validator). I found out that my validation.xml file is not initialize. I don't know why. I follow validator sample come with struts. I'm using 1.1b1. here is all required info if any one interested helping me out. // CRTypeForm.java public class CRTypeForm extends ValidatorForm { // CR Type name private String crTypeName; public String getCrTypeName() { logger.debug(CRTypeForm:getCrTypeName + crTypeName); return crTypeName; } public void setCrTypeName(String crTypeName) { logger.debug(CRTypeForm:setCrTypeName + crTypeName); this.crTypeName = crTypeName; } } // struts-config.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- == Form Bean Definitions === -- form-beans !-- CR Type form bean -- form-bean name=CRTypeForm type=com.cgmp.esm.web.crtype.CRTypeForm/ /form-beans !-- == Action Mapping Definitions == -- action-mappings !-- Save CR Type-- actionpath=/saveCrType type=com.cgmp.esm.web.crtype.SaveCrTypeAction name=CRTypeForm scope=request validate=true input=/crtype.jsp forward name=success path=/success.jsp/ /action /action-mappings !-- == Message Resources Definitions === -- message-resources parameter=com.cgmp.esm.web.ApplicationResources/ !-- == Plug Ins Configuration == -- !-- Add multiple validator resource files by setting the pathname property -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathname value=/WEB-INF/validation.xml/ /plug-in /struts-config # Validation.xml file form-validation formset formname=CRTypeForm fieldproperty=crTypeName depends=required, maxlength arg0 key=prompt.crtypename/ arg1 name=maxlength key=${var:minlength} resource=false/ var var-namemaxlength/var-name var-value50/var-value /var /field /form /formset /form-validation regards, Deepak -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: null in html on validation
If the request object contains nulls, the response object in JSP returns the String null. Test for the presence of nulls in the request object and return an empty String (). Mark -Original Message- From: Team Gasoline [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 8:29 PM To: [EMAIL PROTECTED] Subject: null in html on validation Hello -- I'm having a problem with errors being surrounded by null on my page after validation. Here is a snippet of the html when i view source of the page through the browser. tr th align=right User Name: /th td align=left input type=text name=username maxlength=16 size=16 value= null td bgcolor=grayfont color=red size=2--Required Field/font/td null /td /tr Here is what I have in my jsp. tr th align=right bean:message key=prompt.username/ /th td align=left html:text property=username size=16 maxlength=16/ html:errors property=username/ /td /tr and my form. public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if ((username == null) || (username.length() 1)) errors.add(username, new ActionError(error.username.required)); return errors; } Has anyone ever seen this before. I have checked everywhere and have found no good answers. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Inside WEB-INF or outside WEB-INF? Struts security.
Because some web containers don't allow you to put jsp pages in WEB-INF. Tomcat does, but there is at least one other server out there that doesn't allow it. It's been discussed on this list before so you can search the archives to find out which one. If yours does and you want to put them in there, you can put them inside WEB-INF. Jay On Sat, 20 Apr 2002, Micael Padraig Og mac Grene wrote: Exactly! So, why do the typical examples put the jsp pages outside? At 02:43 PM 4/19/02 -0300, you wrote: He means that it is more secure to place JSP files inside the WEB-INF directory, since it does not allow direct access to its files. So, nobody would be able to access the JSP files directly, and would then have to use the mapped URLs in struts.config.xml, which is more secure. --- Galbreath, Mark [EMAIL PROTECTED] escreveu: I thought I answered that. If you have nothing that can execute outside WEB-INF, what does security matter? Mark -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 12:32 PM To: Struts Users Mailing List Subject: RE: Inside WEB-INF or outside WEB-INF? Struts security. Thank you for the response, but it is not responsive to the question I asked, I think. My question was: Most sample apps have the jsp pages and images outside the WEB-INF. Why? Isn't it more secure inside? So, where the servlets are ultimately put is not the question, Mark. The question is why do most sample applications put the jsp pages outside the WEB-INF file, even in Tomcat? That works with Tomcat too. You can put them in either place, but if you do it outside you use relative urls and if you put them inside you use the controller framework. My question is why in the world would someone use struts and then put them outside the WEB-INF file? Thanks. Micael At 05:31 AM 4/19/02 -0400, you wrote: All web containers MUST support files inside WEB-INF by specification. As for JSP files, some containers, like Tomcat, considers them controller component Java classes (servlets) and places them in the WEB-INF/class directory by default. Others, like JRun, consider JSPs view components (they are, if used correctly) and place them in a jsp directory outside WEB-INF. The point is, JSPs should never have executable Java scriplets in them. Programmatic functionality should consist solely of tags, which hide the implementation inside WEB-INF. Mark -Original Message- From: Victor Hadianto [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 3:18 AM On Fri, 19 Apr 2002 08:20, you wrote: Most sample apps have the jsp pages and images outside the WEB-INF. Why? Isn't it more secure inside? Not all web container supports files inside the WEB-INF. Tomcat does. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] = Frederico Ferro Schuh [EMAIL PROTECTED] ICQ: 20486081 ___ Yahoo! Empregos O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no Yahoo! Empregos e tenha acesso a milhares de vagas abertas! http://br.empregos.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: FormBean changes not recognized across actions
Declare your form bean to be in session scope in struts-config.xml. Mark -Original Message- From: C D [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 6:22 PM To: [EMAIL PROTECTED] Subject: FormBean changes not recognized across actions Hi, I am having a problem with the following flow would appreciate any help on it JSP(1) - StrutsAction(2) mapping.findForward() from struts_config.xml(3) - Struts Action(4) Any properties that I set on the form bean(request scope) at step 2 are not reflected in the form bean at step 4. Rather the orginal values of the form bean are there.(the same that were there at the beginning of step 2) How do I propagate my changes to the form bean from the first action to the second action in the above scenario?? Ofcourse, had my mapping above forwarded to a jsp page, then the page reflects the correct form bean values that I set in the first action class. Thanks in advance, CD __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: *.do ---- Proof of Concepts
To satisfy your questions (maybe), have you read the relevant parts of the API, like the name field in the ActionConfig class (the class replacing ActionMapping)? Mark -Original Message- From: Robert [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 6:08 PM To: 'Struts Users Mailing List' Subject: RE: *.do Proof of Concepts An error of cut and pasting config info :-) That example did have the name, but it really didn't have a form bean in use. -Original Message- From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 4:49 PM To: Struts Users Mailing List Subject: Re: *.do Proof of Concepts Robert wrote: Mark made a good point about omitting the name. I double checked with another app we wrote and I left the name in the tag, but it didn't cause any 'harm'; again no beans or actions. I knew about omitting the name, I just found strange that in your example earlier you told that no form beans were created, although there was a name attribute in the action declaration. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validator help
Mark, you are right about struts validation. Please post your code. Thanks Deepak -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 9:25 AM To: 'Struts Users Mailing List' Subject: RE: Validator help I found using the Struts validation cumbersome and unpredictable, so I just wrote a custom tag to validate my input forms. If anyone is interested, I'll post the code. Mark -Original Message- From: Parmar, Dipakkumar [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 5:48 PM To: Struts Users Mailing List Subject: Validator help Hi, I'm having really hard time to figure out why the validator is not working. Here is the summary what i did: 1. I tried to produce debug/error messages for org.apache.commons.validator but no luck. (see thread How can i turn on debug for org.apache.commons.validator) 2. I override validate method in my ActionForm and put the same code from validate method in validate.java(org.apache.commons.validator). I found out that my validation.xml file is not initialize. I don't know why. I follow validator sample come with struts. I'm using 1.1b1. here is all required info if any one interested helping me out. // CRTypeForm.java public class CRTypeForm extends ValidatorForm { // CR Type name private String crTypeName; public String getCrTypeName() { logger.debug(CRTypeForm:getCrTypeName + crTypeName); return crTypeName; } public void setCrTypeName(String crTypeName) { logger.debug(CRTypeForm:setCrTypeName + crTypeName); this.crTypeName = crTypeName; } } // struts-config.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- == Form Bean Definitions === -- form-beans !-- CR Type form bean -- form-bean name=CRTypeForm type=com.cgmp.esm.web.crtype.CRTypeForm/ /form-beans !-- == Action Mapping Definitions == -- action-mappings !-- Save CR Type-- actionpath=/saveCrType type=com.cgmp.esm.web.crtype.SaveCrTypeAction name=CRTypeForm scope=request validate=true input=/crtype.jsp forward name=success path=/success.jsp/ /action /action-mappings !-- == Message Resources Definitions === -- message-resources parameter=com.cgmp.esm.web.ApplicationResources/ !-- == Plug Ins Configuration == -- !-- Add multiple validator resource files by setting the pathname property -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathname value=/WEB-INF/validation.xml/ /plug-in /struts-config # Validation.xml file form-validation formset formname=CRTypeForm fieldproperty=crTypeName depends=required, maxlength arg0 key=prompt.crtypename/ arg1 name=maxlength key=${var:minlength} resource=false/ var var-namemaxlength/var-name var-value50/var-value /var /field /form /formset /form-validation regards, Deepak -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Mark's Custom Validator Tag (part 1 of 2)
Okay, here ya go. As usual, change the variables, methods and params to suit your requirements. -- Usage example (see the TLD for full list - and/or add your own. Be sure to reflect any changes in the TLD in the class as well): partner:validation baseName=name isNotNull=true isWithinMaxLength=true parameter=50/ partner:validation baseName=areaCode isNotNull=true isWithinMaxLength=true parameter=3/ -- TLD: ?xml version=1.0 ? taglib tlibversion0.0/tlibversion jspversion1.0/jspversion shortnamePartner Tag Library/shortname tag namevalidation/name tagclasscom.tessco.partner.web.taglib.ValidationTag/tagclass bodycontentempty/bodycontent attribute namebaseName/name requiredtrue/required rtexprvaluefalse/rtexprvalue /attribute attribute nameparameter/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisNotNull/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisBoolean/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisInteger/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisLong/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisDouble/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisFloat/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisGreaterThan/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisLessThan/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisDate/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisFutureDate/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisPastDate/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisWithinMaxLength/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisPhone/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisEmail/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisZipCode/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nameisCreditCardNumber/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute /tag /taglib -- Tag Handler: package com.tessco.partner.web.taglib; import java.io.IOException; import java.util.List; import java.util.ArrayList; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.TagSupport; import javax.servlet.ServletRequest; import com.tessco.partner.web.validation.DefaultValidator; /** ValidationTag.java @description: generates an HTML element that is consistent with the server-side validation logic. example: code The following jsp code : partner:validation baseName=logon isNotNull=true isWithinMaxLength=true parameter=50/ generates the following HTML: input type=hidden name=validations value=nn-ml50|logon / /code */ public final class ValidationTag extends TagSupport { priave boolean isNotNull = false; private boolean isBoolean = false; private boolean isInteger = false; private boolean isLong = false; private boolean isDouble = false; private boolean isFloat = false; private boolean isGreaterThan = false; private boolean isLessThan = false; private boolean isDate = false; private boolean isFutureDate = false; private boolean isPastDate = false; private boolean isWithinMaxLength = false; private boolean isPhone = false; private boolean isEmail = false; private boolean isCreditCardNumber = false; private boolean isZipCode = false; private String baseName = null; private String parameter = ; public void setBaseName( String baseName ) { this.baseName = baseName; } public String getBaseName(){ return baseName; } public void setParameter( String parameter ) { this.parameter = parameter; } public String getParameter(){ return baseName; } public void setIsNotNull( boolean isNotNull ){ this.isNotNull = isNotNull; } public void setIsBoolean( boolean isBoolean ){ this.isBoolean = isBoolean; } public void setIsInteger( boolean isInteger ){ this.isInteger = isInteger; } public void setIsLong( boolean isLong
strange behavious when setting null=false for message-resources
Subject: strange behavious when setting null=false for message-resources From: Torgeir Veimo [EMAIL PROTECTED] === When I specify a message resources like this in my struts config; message-resources parameter=PublishingApplicationResources null=false / I get automatically title and alt attributes set for my html input types, even when I didn't ask for it; Eg. html:text size=50 name=mediaForm property=altText / html:file name=mediaForm property=mediaFile / html:submit property=savebean:message key=media.edit.save//html:submit html:submit property=cancelbean:message key=media.edit.cancel//html:submit gets translated into input type=text name=altText size=50 value= title=???en_US.null??? alt=???en_US.null??? input type=file name=mediaFile value= title=???en_US.null??? alt=???en_US.null??? input type=submit name=save value=Save title=???en_US.null??? alt=???en_US.null??? input type=submit name=cancel value=Cancel title=???en_US.null??? alt=???en_US.null??? Is this correct? I get very annoying tool tips when hovering over these fields in mozilla with the title and alt attributes set. -- -Torgeir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Mark's Custom Validator Tag (part 2 of 2)
package com.tessco.partner.web.validation; //java imports import java.util.Map; import java.util.List; import java.util.HashMap; import java.util.ArrayList; import java.util.Enumeration; import java.util.StringTokenizer; //javax imports import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; //struts imports import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionError; //partner imports import com.tessco.partner.web.AbstractPartnerActionForm; public class DefaultValidator { /** * The code for an is-not-null validation. * Used to ensure that required fields are * provided. */ public final static String IS_NOT_NULL = nn; /** * The code for an is-boolean validation. */ public final static String IS_BOOLEAN = b; /** * The code for an is-integer validation. */ public final static String IS_INTEGER = i; /** * The code for an is-long validation. */ public final static String IS_LONG = l; /** * The code for an is-double validation. */ public final static String IS_DOUBLE = d; /** * The code for an is-float validation. */ public final static String IS_FLOAT = f; /** * The code for an is-number greater than validation. * By default this converts * the number to an Integer object, if this is * not the desired behavior, the appropriate * type conversion should be performed before * executing this validation. For example, to * verify that an entry is a Long greater than 1000, * the following validation list should be used, * l-gt1000|myLong */ public final static String IS_GREATER_THAN = gt; /** * The code for an is-number less than validation. * By default this converts * the number to an Integer object, if this is * not the desired behavior, the appropriate * type conversion should be performed before * executing this validation. For example, to * verify that an entry is a Long less than 1000, * the following validation list should be used, * l-gt1000|myLong */ public final static String IS_LESS_THAN = lt; /** * The code for an is-date validation. */ public final static String IS_DATE = d1; /** * The code for an is-date-in-future validation. */ public final static String IS_FUTURE_DATE = d2; /** * The code for an is-date-in-past validation. */ public final static String IS_PAST_DATE = d3; /** * The code for an is-within-max-length validation. * This validation treates all parameters as Strings. */ public final static String IS_WITHIN_MAX_LENGTH = ml; /** * The code for an is-phone validation. * This validation treates all parameters as Strings. */ public final static String IS_PHONE = p; /** * The code for an is-email validation. * This validation treates all parameters as Strings. */ public final static String IS_EMAIL = e; /** * The code for an is-credit-card number validation. * This validation treates all parameters as Strings. */ public final static String IS_CREDIT_CARD_NUMBER = ccn; /** * The code for an is-zipcode validation. * This validation treates all parameters as Strings. */ public final static String IS_ZIP_CODE = z; public final static String VALIDATOR_ERROR_MSG = default.global.error.key; public final static String CLASS_NAME = com.tessco.partner.web.validation.DefaultValidator; protected final static HashMap validationList = new HashMap(); public static ActionErrors validate( AbstractPartnerActionForm form, HttpServletRequest request ){ String[] requestedValidations = form.getValidations(); if( requestedValidations == null || requestedValidations.length == 0 ){//nothing to do return null; } else{ ActionErrors errors = new ActionErrors(); for( int k = 0; k requestedValidations.length; k++ ){ String originalParamName = requestedValidations[k]; StringTokenizer st = new StringTokenizer(originalParamName, |, false); String[] validations = null; String key = null; if (st.countTokens() == 1){//no validations, should not happen with proper client coding return null; } else if (st.countTokens() == 2){ validations = getValidations(st.nextToken()); key = st.nextToken(); String[] values = request.getParameterValues( key ); if (values == null){//no value provided values = new String[]{}; } Object[] results = new Object[values.length]; for (int j = 0; j values.length; j++){//for each value for (int i = 0; i validations.length; i++){//perform each validation try{ IValidation validation = getValidation(validations[i]); Object validatee = results[j] == null ? values[j] : results[j];//do not overwrite potential type conversion results[j] = validation.validate(validations[i], validatee); } catch(ValidationException e){ results[j] = values[j];
Mark's Custom Validator Tag Extended ActionForm Class
package com.tessco.partner.web; // java.sql import import java.sql.Timestamp; import java.util.Date; import java.util.Calendar; import java.util.GregorianCalendar; //javax imports import javax.servlet.http.HttpServletRequest; //struts imports import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionErrors; //partner imports import com.tessco.partner.web.validation.DefaultValidator; public abstract class AbstractPartnerActionForm extends ActionForm{ public final static boolean DEFAULT_BOOLEAN = false; public final static char DEFAULT_CHAR = 'Y'; public final static int DEFAULT_INT = 0; public final static float DEFAULT_FLOAT = 0f; public final static String DEFAULT_STRING = ; public final static String[] DEFAULT_COLLECTION = new String[]{}; public final String CLASS_NAME = this.getClass().getName(); private String[] validations; public String[] getValidations(){ return validations; } public void setValidations( String[] validations ){ this.validations = validations; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){ return DefaultValidator.validate( this, request ); } //TO DO: see about getting reset method defined here that uses reflection to set all attributes to the default public void reset( ActionMapping mapping, HttpServletRequest request) { validations = DEFAULT_COLLECTION; } } Mark De recta non tolerandum sunt.
RE: Validator help
Mark I'm interested. Jack [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 8:25 AM To: 'Struts Users Mailing List' Subject: RE: Validator help I found using the Struts validation cumbersome and unpredictable, so I just wrote a custom tag to validate my input forms. If anyone is interested, I'll post the code. Mark -Original Message- From: Parmar, Dipakkumar [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 5:48 PM To: Struts Users Mailing List Subject: Validator help Hi, I'm having really hard time to figure out why the validator is not working. Here is the summary what i did: 1. I tried to produce debug/error messages for org.apache.commons.validator but no luck. (see thread How can i turn on debug for org.apache.commons.validator) 2. I override validate method in my ActionForm and put the same code from validate method in validate.java(org.apache.commons.validator). I found out that my validation.xml file is not initialize. I don't know why. I follow validator sample come with struts. I'm using 1.1b1. here is all required info if any one interested helping me out. // CRTypeForm.java public class CRTypeForm extends ValidatorForm { // CR Type name private String crTypeName; public String getCrTypeName() { logger.debug(CRTypeForm:getCrTypeName + crTypeName); return crTypeName; } public void setCrTypeName(String crTypeName) { logger.debug(CRTypeForm:setCrTypeName + crTypeName); this.crTypeName = crTypeName; } } // struts-config.xml ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- == Form Bean Definitions === -- form-beans !-- CR Type form bean -- form-bean name=CRTypeForm type=com.cgmp.esm.web.crtype.CRTypeForm/ /form-beans !-- == Action Mapping Definitions == -- action-mappings !-- Save CR Type-- actionpath=/saveCrType type=com.cgmp.esm.web.crtype.SaveCrTypeAction name=CRTypeForm scope=request validate=true input=/crtype.jsp forward name=success path=/success.jsp/ /action /action-mappings !-- == Message Resources Definitions === -- message-resources parameter=com.cgmp.esm.web.ApplicationResources/ !-- == Plug Ins Configuration == -- !-- Add multiple validator resource files by setting the pathname property -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathname value=/WEB-INF/validation.xml/ /plug-in /struts-config # Validation.xml file form-validation formset formname=CRTypeForm fieldproperty=crTypeName depends=required, maxlength arg0 key=prompt.crtypename/ arg1 name=maxlength key=${var:minlength} resource=false/ var var-namemaxlength/var-name var-value50/var-value /var /field /form /formset /form-validation regards, Deepak -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Custom tags problem...
Hi, Getting myself in a bit of a knot with Struts custom tags... I'm using logic:iterate to go through a collection, and I'm setting the indexId so I know where I've got to like so: logic:iterate id=app name=user property=applications indexId=appIdx Now, within my loop I want to know if this iteration is the final one, i.e. indexId = applications.size(). Any suggestions of how I should do this? Ideally I don't want to have Java in the JSP. I'm surprised that the logic:equal tag doesn't allow me to equate two beans, instead of a bean and a constant, or have I got this wrong? TIA, Ric Searle Web Application Developer -- Dialogue Communications Ltd http://www.dialogue.co.uk +44 (0) 114 221 0307 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validator help
No problemo. I'm in the #%$@$#!! office on a Saturday again, anyway. :-( -Original Message- From: Jack Zakarian [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 2:43 PM To: Struts Users Mailing List Subject: RE: Validator help Sorry Mark I sent my request before I read the rest of my mail. I got the code. Thanks Jack -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Custom tags problem...
For something like this, it is permissible to have scriplets in the JSP. Or you can modify the iterator bean handler code to provide you with this ability - it IS open-source Mark -Original Message- From: Ric Searle [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 1:37 PM Hi, Getting myself in a bit of a knot with Struts custom tags... I'm using logic:iterate to go through a collection, and I'm setting the indexId so I know where I've got to like so: logic:iterate id=app name=user property=applications indexId=appIdx Now, within my loop I want to know if this iteration is the final one, i.e. indexId = applications.size(). Any suggestions of how I should do this? Ideally I don't want to have Java in the JSP. I'm surprised that the logic:equal tag doesn't allow me to equate two beans, instead of a bean and a constant, or have I got this wrong? TIA, Ric Searle Web Application Developer -- Dialogue Communications Ltd http://www.dialogue.co.uk +44 (0) 114 221 0307 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Does struts-validator work with multiple resource bundle?
Hi All, Does struts-validator work with multiple resource bundle? Thanks for your help, Reynaldo
converting logic:iterate to nested:iterate
Subject: converting logic:iterate to nested:iterate From: Matt Raible [EMAIL PROTECTED] === How would I convert the following to use the nested tags: logic:iterate id=topic name=courseForm property=topics Topic Name: bean:write name=topic property=name/br/ /logic:iterate I want to do this because my topics each have children that I want to iterate too: pseudo-code would look like this: logic:iterate id=topicForm name=courseForm property=topics Topic Name: bean:write name=topicForm property=name/br/ logic:iterate id=pageForm name=topicForm property=pages nbsp;nbsp; - Page Name: bean:write name=pageForm property=name/br/ /logic:iterate /logic:iterate Maybe I don't need the nested tag? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: IDE for EJB2.0 development
On Wed, 17 Apr 2002, Joseph Barefoot wrote: Date: Wed, 17 Apr 2002 16:53:00 -0700 From: Joseph Barefoot [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: IDE for EJB2.0 development Okay, I have to ask a question of all of you emacs/vi developers out there with S's on your chests: Are graphical versions of these tools allowed in the kindom of Studcodia, or monochromatic versions only? ;) Does XEMACS count as a graphical version? peace, Joe Barefoot Craig McClanahan (who always uses XEMACS when building Struts itself ;-) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Use of Powered By Struts Logo
On Thu, 18 Apr 2002, Jack Frosch wrote: Date: Thu, 18 Apr 2002 15:10:24 -0500 From: Jack Frosch [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Use of Powered By Struts Logo I read through various FAQs about this, but didn't see anything that specifically addressed the use of the Jakarta project logos, such as the Power By Struts and the Tomcat logo. However, the Apache license does talk about restrictions on use of its trademark feather and other marks belonging to Apache. I'm not sure why a Powered By Struts logo would exist if the only site that could use it is the Struts site, but wanted to ask about restrictions on its use before using it. Can someone point me to a FAQ or licensing statement that deals with the powered By Struts and Tomcat logos? The logos are licensed under the Apache license, same as the software and the documentation. Basically, that gives you the freedom to use them as you like -- but please obey the attribution clause in the license by acknowledging (in the docs) that your package was built using stuff from Apache. In other words, please do go ahead and use them! Thanks. Jack Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Inside WEB-INF or outside WEB-INF? Struts security.
On Sat, 20 Apr 2002, Micael Padraig Og mac Grene wrote: Date: Sat, 20 Apr 2002 00:39:53 -0700 From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Inside WEB-INF or outside WEB-INF? Struts security. Exactly! So, why do the typical examples put the jsp pages outside? The requirement that JSP pages work from inside /WEB-INF is not particularly clear in the Servlet 2.2 and JSP 1.1 specs, and in fact they do not work in some containers. To minimize startup problems, that is why the Struts examples have them outside. Additionally, some Struts-based webapps do direct links from one JSP page to another, when there is no need for any processing logic in between. This won't work if they are inside. Finally, on't forget that, even if you put your own JSP pages inside the /WEB-INF directory, you'll need to leave the app home page (usually index.jsp) outside so that it is accessible. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Inside WEB-INF or outside WEB-INF? Struts security. SWF FILES
You seem to be suggesting, Craig, that you find putting them outside WEB-INF should be fine. Is that a correct reading of your comments? If so, would you please expand on that? I am dealing with some relatively complex issues of reference between pages, including swf template files with arrays accessing other swf photo files, without, of course, including forwarding mechanisms available to struts. I would like to do this inside of WEB-INF by instinct, thinking it would enhance security, but that may not be an option? Thanks for any help on this. At 01:59 PM 4/20/02 -0700, you wrote: On Sat, 20 Apr 2002, Micael Padraig Og mac Grene wrote: Date: Sat, 20 Apr 2002 00:39:53 -0700 From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Inside WEB-INF or outside WEB-INF? Struts security. Exactly! So, why do the typical examples put the jsp pages outside? The requirement that JSP pages work from inside /WEB-INF is not particularly clear in the Servlet 2.2 and JSP 1.1 specs, and in fact they do not work in some containers. To minimize startup problems, that is why the Struts examples have them outside. Additionally, some Struts-based webapps do direct links from one JSP page to another, when there is no need for any processing logic in between. This won't work if they are inside. Finally, on't forget that, even if you put your own JSP pages inside the /WEB-INF directory, you'll need to leave the app home page (usually index.jsp) outside so that it is accessible. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Inside WEB-INF or outside WEB-INF? Struts security. SWF FILES
On Sat, 20 Apr 2002, Micael Padraig Og mac Grene wrote: Date: Sat, 20 Apr 2002 15:25:15 -0700 From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Inside WEB-INF or outside WEB-INF? Struts security. SWF FILES You seem to be suggesting, Craig, that you find putting them outside WEB-INF should be fine. Is that a correct reading of your comments? If so, would you please expand on that? I am dealing with some relatively complex issues of reference between pages, including swf template files with arrays accessing other swf photo files, without, of course, including forwarding mechanisms available to struts. I would like to do this inside of WEB-INF by instinct, thinking it would enhance security, but that may not be an option? Thanks for any help on this. It depends on what you mean by enhance security. The only thing different about putting JSP pages inside /WEB-INF versus outside is whether a client can directly request one of your pages with a URL. For example, this URL will work (assuming there's a page there): http://localhost:8080/myapp/foo.jsp whereas this one will never work from a browser: http://localhost:8080/myapp/WEB-INF/foo.jsp If you don't have users who do this sort of thing (or you don't care if they do or not, because the app won't work correctly for them anyway), then there is no difference in where the JSP pages are located. Craig At 01:59 PM 4/20/02 -0700, you wrote: On Sat, 20 Apr 2002, Micael Padraig Og mac Grene wrote: Date: Sat, 20 Apr 2002 00:39:53 -0700 From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Inside WEB-INF or outside WEB-INF? Struts security. Exactly! So, why do the typical examples put the jsp pages outside? The requirement that JSP pages work from inside /WEB-INF is not particularly clear in the Servlet 2.2 and JSP 1.1 specs, and in fact they do not work in some containers. To minimize startup problems, that is why the Struts examples have them outside. Additionally, some Struts-based webapps do direct links from one JSP page to another, when there is no need for any processing logic in between. This won't work if they are inside. Finally, on't forget that, even if you put your own JSP pages inside the /WEB-INF directory, you'll need to leave the app home page (usually index.jsp) outside so that it is accessible. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:select is very slow
Hello, I am using the html:select tag, and I am having some major performance problems. If I have very few items on the list (less than 10), the form page is displaying quickly. Then I tried to put about 100 items on the list (html:option tags), it is becoming incredible slow. Sometimes it takes up to 10 seconds for the page to display. Have anyone of you had this problem? What can be causing this? Regards, Torgeir. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:select is very slow
Had the same problem, use a Collection with html:options instead. Later, Jake T. -Original Message- From: Torgeir Punnerud [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 7:31 PM To: [EMAIL PROTECTED] Subject: html:select is very slow Hello, I am using the html:select tag, and I am having some major performance problems. If I have very few items on the list (less than 10), the form page is displaying quickly. Then I tried to put about 100 items on the list (html:option tags), it is becoming incredible slow. Sometimes it takes up to 10 seconds for the page to display. Have anyone of you had this problem? What can be causing this? Regards, Torgeir. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problems with struts under Tomcat 4 + Apache 2 + mod_webapp
I have successfully integrated Tomcat 4.0.3 and Apache 2.0.35 using the mod_webapp WARP module. Works perfectly for all my servlets/jsp webapps that are non-struts. As soon as I try to access my strutstest webapp, or if I try the struts-example webapp, I get problems (and, yes, I verified that these both work wonderfully when accessing them via http://localhost:8080/struts-example/index.jsp, etc.). For example, when I access http://localhost/struts-example/index.jsp, I get the page but with an error message at the top of the page: ERROR: User database not loaded -- check servlet container logs for error messages. and checking the logs as suggested, catalina.out supplies this: Starting service Tomcat-Apache Apache Tomcat/4.0.3 New org.apache.struts.webapp.example.User Set org.apache.struts.webapp.example.User properties Begin event threw exception java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:28) at java.lang.reflect.Method.invoke(Method.java:327) at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:988) at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:904) at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932) at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509) at org.apache.struts.digester.SetPropertiesRule.begin(SetPropertiesRule.java:120) at org.apache.struts.digester.Digester.startElement(Digester.java:528) at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1490) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433) at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223) at javax.xml.parsers.SAXParser.parse(SAXParser.java:316) at javax.xml.parsers.SAXParser.parse(SAXParser.java:91) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.java:251) at org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet.java:175) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:916) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3266) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3395) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454) at org.apache.catalina.core.StandardHost.install(StandardHost.java:714) at org.apache.catalina.connector.warp.WarpConfigurationHandler.deploy(WarpConfigurationHandler.java:313) at org.apache.catalina.connector.warp.WarpConfigurationHandler.handle(WarpConfigurationHandler.java:117) at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:189) at java.lang.Thread.run(Thread.java:539) register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/usr/local/jakarta-tomcat-4.0.3-LE-jdk14/webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/usr/local/jakarta-tomcat-4.0.3-LE-jdk14/webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/usr/local/jakarta-tomcat-4.0.3-LE-jdk14/webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_3.dtd' resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Resolving to alternate DTD 'jar:file:/usr/local/jakarta-tomcat-4.0.3-LE-jdk14/webapps/struts-example/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' New org.apache.struts.action.ActionFormBean Set org.apache.struts.action.ActionFormBean properties Begin event threw exception
Re: converting logic:iterate to nested:iterate
try this nested:iterate name=courseForm property=topics nested:write name=Name of the nested object in courseForm Bean property=Property of the nested Object you wish to display /nested:iterate Hope this helps, if not let me know and I will send you a detail worked out solution. -Sanjay --- Struts Newsgroup [EMAIL PROTECTED] wrote: Subject: converting logic:iterate to nested:iterate From: Matt Raible [EMAIL PROTECTED] === How would I convert the following to use the nested tags: logic:iterate id=topic name=courseForm property=topics Topic Name: bean:write name=topic property=name/br/ /logic:iterate I want to do this because my topics each have children that I want to iterate too: pseudo-code would look like this: logic:iterate id=topicForm name=courseForm property=topics Topic Name: bean:write name=topicForm property=name/br/ logic:iterate id=pageForm name=topicForm property=pages nbsp;nbsp; - Page Name: bean:write name=pageForm property=name/br/ /logic:iterate /logic:iterate Maybe I don't need the nested tag? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Games - play chess, backgammon, pool and more http://games.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Capturing response of dynamically generated form
I put the form in session which effectively persists the structure until you get the response. I used nested tag so modifications are already made when response is received. My data structure in form is copy of real data so I can pick and choose what I want to permanently persist. - Original Message - From: Kodali, Satish [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 20, 2002 7:28 AM Subject: Capturing response of dynamically generated form I am rendering a form by iterating over a tree like data structure. I am trying to capture the response of the dynamically generated form into Form object. Please share your ideas and experiences in using struts framework to capture the response. Thanks, Satish ** The information transmitted herewith is sensitive information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How do I disable struts-validator on first call using the do
I thought this occurs on session forms but not request. does your case disprove that? - Original Message - From: Reynaldo Timonera [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Saturday, April 20, 2002 6:14 AM Subject: How do I disable struts-validator on first call using the do Hi All, We're using the struts-validator and it's great. We have one problem: when the page is called through the do (/transferUtitlity.do), the validator fires and displays the error. We wanted on the first call to the page that the validator will be disabled. Thanks for your help, Reynaldo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]