build failing - validator in transition?
I hope I'm not overlooking something basic because it's late. I'm trying to build from the current CVS tree and I'm running into problems. When I run Ant against the root build.xml file, I get a number of errors because Ant can't find ValidatorPlugIn. I guess some things have moved around since the last time I built from source. I thought maybe the solution would be to build .../jakarta- struts/contrib/validator, but the build.properties file in that directory references struts.jar, and I haven't yet built struts.jar. (Sure, I could just get the binary, but...) Also, looking at the validator code in contrib, it looks out of date -- still depends upon regexp instead of ORO. I can't simply move it into the core src/share directory and build. Did I overlook some instructions somewhere? Or did I catch it in transition? Thanks, Joe compile.library: [javac] Compiling 189 source files to /Users/germuska/Development/jakarta/jakarta-struts/target/library/classes [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 78: cannot resolve symbol [javac] symbol : class ValidatorPlugIn [javac] location: package validator [javac] import org.apache.struts.validator.ValidatorPlugIn; [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/util/StrutsValidatorUtil.java:78: cannot resolve symbol [javac] symbol : class ValidatorPlugIn [javac] location: package validator [javac] import org.apache.struts.validator.ValidatorPlugIn; [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 257: cannot resolve symbol [javac] symbol : variable ValidatorPlugIn [javac] location: class org.apache.struts.taglib.html.JavascriptValidatorTag [javac] pageContext.getAttribute(ValidatorPlugIn.VALIDATOR_KEY, PageContext.APPLICATION_SCOPE); [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/util/StrutsValidatorUtil.java:112: cannot resolve symbol [javac] symbol : variable ValidatorPlugIn [javac] location: class org.apache.struts.util.StrutsValidatorUtil [javac] return (ValidatorResources)application.getAttribute(ValidatorPlugIn.VALIDATOR_KEY) ; [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Betreff: RE: Use of ActionForm:
Hmh, I just tried that out. I have a Book.java Bean with title, author, etc. Than I have a BookForm.java ActionForm that has a Book. Now to use a form to set the title of the book my BookForm still needs to have a setTitle() method. So, I still end writing (and maintaining) all those getters and setters twice? Stephan ---Original-Nachricht--- Von: Struts Developers List Datum: Mittwoch, 3. April 2002 14:54:41 An: 'Struts Developers List' Betreff: RE: Use of ActionForm: Hi, Stephan: We typically keep an instance of our bean in the ActionForm and provide an accessor method for the bean. In our JSPs, we simply reference the bean properties via the accessor method: fooBean.date fooBean.name Chris -Original Message- From: Stephan Wiesner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 6:12 AM To: [EMAIL PROTECTED] Subject: Use of ActionForm: If I got it right I normally define an ActionFormBean for every Bean of mine But it is basically just the same, just without logic. I don't want my Model Beans to extend a Strut class, though. So I end coding the same getter and setter methods in two classes. If ActionForm were an Interface I could define a class extending my normal Bean and implementing it. I suppose I don't see something here, so can anybody enlighten me? Stephan -- 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: Betreff: RE: Use of ActionForm:
Hi, Stephen: No, you do not need to write more than one getter/setter. Using your example, the only getter/setter you would write is to access the book. Using the dot-delimted notation in your JSP, you can access the Book and use its getters/setters to access properties. For example: public class BookForm extends ActionForm { private Book book; public Book getBook() {...} public void setBook(Book book) {...} } Now, in your JSP, you make calls to the Book properties via the getBook() method. Again, using your example, if you wanted to have an input field for the Book title, it would look like the following: html:text name=BookForm property=book.title size=20 / This tag directs Struts to call getBook().getTitle() to populate the page when the JSP is being prepared for the browser, and Struts uses getBook().setTitle() to populate your bean with values written to the input field when the user submits the form. BTW, you might want to post these type of questions to the [EMAIL PROTECTED] lists instead of the dev list. Chris -Original Message- From: Stephan Wiesner [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 1:41 AM To: [EMAIL PROTECTED] Subject: Betreff: RE: Use of ActionForm: Hmh, I just tried that out. I have a Book.java Bean with title, author, etc. Than I have a BookForm.java ActionForm that has a Book. Now to use a form to set the title of the book my BookForm still needs to have a setTitle() method. So, I still end writing (and maintaining) all those getters and setters twice? Stephan ---Original-Nachricht--- Von: Struts Developers List Datum: Mittwoch, 3. April 2002 14:54:41 An: 'Struts Developers List' Betreff: RE: Use of ActionForm: Hi, Stephan: We typically keep an instance of our bean in the ActionForm and provide an accessor method for the bean. In our JSPs, we simply reference the bean properties via the accessor method: fooBean.date fooBean.name Chris -Original Message- From: Stephan Wiesner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 6:12 AM To: [EMAIL PROTECTED] Subject: Use of ActionForm: If I got it right I normally define an ActionFormBean for every Bean of mine But it is basically just the same, just without logic. I don't want my Model Beans to extend a Strut class, though. So I end coding the same getter and setter methods in two classes. If ActionForm were an Interface I could define a class extending my normal Bean and implementing it. I suppose I don't see something here, so can anybody enlighten me? Stephan -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: strust.taglib.bean proposal
I didn't know about this cache mecanism and multiple capital letters constraints. For use in my JSP Tag to set parent tag Attribute (known value type: String), do you think PropertyUtils.setSimpleProperty(parentTag, arg, bodyContent) is a good replacement from the reflection code ? So it will re-use PropertyUtil cache and introspection mecanism. BeanUtils and PropertyUtils actually do somewhat more than this: * Property setter names do *not* have to start with set -- bean developers can supply an additional BeanInfo class to define the get and set method names. BeanUtils uses the standard introspection capabilities to do this lookup. * There are some special case rules for property names that start with multiple capital letters that the introspection code deals with. * Because the introspection is the expensive part, the results are cached. Therefore, BeanUtils will execute repeated property sets on the same bean class much faster than the above code, which does a getMethod() lookup every single time. * The BeanUtils version of the property setters (including the ones called in populate()) do automatic type conversion for you, while the PropertyUtils version of the property setters assumes you already have the right data type. * The library methods know how to deal with indexed and mapped setters as well as scalar properties. So, the above code (if included in the tag) would most likely be replaced by a call to PropertyUtils.getProperty() to take advantage of what the library can do. 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: strust.taglib.bean proposal
I didn't know about this cache mecanism and multiple capital letters constraints. For use in my JSP Tag to set parent tag Attribute (known value type: String), do you think PropertyUtils.setSimpleProperty(parentTag, arg, bodyContent) is a good replacement from the reflection code ? So it will re-use PropertyUtil cache and introspection mecanism. NicolasString setterName = set Nicolas + arg.substring(0,1).toUpperCase() Nicolas + arg.substring(1); Nicolastry { Nicolas System.out.println(setterName +setterName); Nicolas Method setter = parentTag.getClass().getMethod( Nicolas setterName, new Class[] { String.class } ); Nicolas setter.invoke(parentTag, Nicolas new Object[] {getBodyContent().getString()} ); I believe the functionality in this block is basically what BeanUtils.populate() does, although with a little more overhead. BeanUtils and PropertyUtils actually do somewhat more than this: * Property setter names do *not* have to start with set -- bean developers can supply an additional BeanInfo class to define the get and set method names. BeanUtils uses the standard introspection capabilities to do this lookup. * There are some special case rules for property names that start with multiple capital letters that the introspection code deals with. * Because the introspection is the expensive part, the results are cached. Therefore, BeanUtils will execute repeated property sets on the same bean class much faster than the above code, which does a getMethod() lookup every single time. * The BeanUtils version of the property setters (including the ones called in populate()) do automatic type conversion for you, while the PropertyUtils version of the property setters assumes you already have the right data type. * The library methods know how to deal with indexed and mapped setters as well as scalar properties. So, the above code (if included in the tag) would most likely be replaced by a call to PropertyUtils.getProperty() to take advantage of what the library can do. 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]
The future of templates, regions, and tiles
Should I use templates, regions, or tiles? I would like to use something that meets our needs and is supported by (meaning, packaged in) Struts. Here's my understanding of the situation. In the beginning, David Geary wrote the template library which is a part of Struts. Since this library does not support inheritance, it does not meet our needs. Then, David wrote a regions library that he developed for his Advanced JavaServer Pages book. While this library has inheritance and meets our needs, this library does not appear to be a part of Struts. Independently, Cedric wrote tiles which meets our needs and is packaged with Struts 1.1 beta, but only as an adjunct. So, do you Struts developers intend to replace the template library with David's regions library or Ced's tiles library or neither? We'd like to choose the template library which will be eventually standard in Struts. -- Bill Wohler [EMAIL PROTECTED] http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian! If you're passed on the right, you're in the wrong lane. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: build failing - validator in transition?
The Struts Validator was recently moved (right before beta 1) from contrib/validator to the main source tree. I don't know why the build isn't working for you. Those classes are in cvs. Maybe your checkout failed? The ValidatorPlugIn is in the org.apache.struts.validator package (along with ValidatorForm, etc.). David --- Joe Germuska [EMAIL PROTECTED] wrote: I hope I'm not overlooking something basic because it's late. I'm trying to build from the current CVS tree and I'm running into problems. When I run Ant against the root build.xml file, I get a number of errors because Ant can't find ValidatorPlugIn. I guess some things have moved around since the last time I built from source. I thought maybe the solution would be to build .../jakarta- struts/contrib/validator, but the build.properties file in that directory references struts.jar, and I haven't yet built struts.jar. (Sure, I could just get the binary, but...) Also, looking at the validator code in contrib, it looks out of date -- still depends upon regexp instead of ORO. I can't simply move it into the core src/share directory and build. Did I overlook some instructions somewhere? Or did I catch it in transition? Thanks, Joe compile.library: [javac] Compiling 189 source files to /Users/germuska/Development/jakarta/jakarta-struts/target/library/classes [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 78: cannot resolve symbol [javac] symbol : class ValidatorPlugIn [javac] location: package validator [javac] import org.apache.struts.validator.ValidatorPlugIn; [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/util/StrutsValidatorUtil.java:78: cannot resolve symbol [javac] symbol : class ValidatorPlugIn [javac] location: package validator [javac] import org.apache.struts.validator.ValidatorPlugIn; [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 257: cannot resolve symbol [javac] symbol : variable ValidatorPlugIn [javac] location: class org.apache.struts.taglib.html.JavascriptValidatorTag [javac] pageContext.getAttribute(ValidatorPlugIn.VALIDATOR_KEY, PageContext.APPLICATION_SCOPE); [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/util/StrutsValidatorUtil.java:112: cannot resolve symbol [javac] symbol : variable ValidatorPlugIn [javac] location: class org.apache.struts.util.StrutsValidatorUtil [javac] return (ValidatorResources)application.getAttribute(ValidatorPlugIn.VALIDATOR_KEY) ; [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ 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]
Betreff: RE: Betreff: RE: Use of ActionForm:
Ahh, yes, now it works. Thanks a lot! And, sorry about the wrong list ... Stephan ---Original-Nachricht--- Von: Struts Developers List Datum: Donnerstag, 4. April 2002 18:39:49 An: 'Struts Developers List' Betreff: RE: Betreff: RE: Use of ActionForm: Hi, Stephen: No, you do not need to write more than one getter/setter. Using your example, the only getter/setter you would write is to access the book. Using the dot-delimted notation in your JSP, you can access the Book and use its getters/setters to access properties. For example: public class BookForm extends ActionForm { private Book book; public Book getBook() {...} public void setBook(Book book) {...} } Now, in your JSP, you make calls to the Book properties via the getBook() method. Again, using your example, if you wanted to have an input field for the Book title, it would look like the following: html:text name=BookForm property=book.title size=20 / This tag directs Struts to call getBook().getTitle() to populate the page when the JSP is being prepared for the browser, and Struts uses getBook().setTitle() to populate your bean with values written to the input field when the user submits the form. BTW, you might want to post these type of questions to the [EMAIL PROTECTED] lists instead of the dev list. Chris -- 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: mapped properties and jndi's Attributes
On Thu, 4 Apr 2002, Torgeir Veimo wrote: Date: Thu, 04 Apr 2002 14:15:09 +0200 From: Torgeir Veimo [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: Struts Developers List [EMAIL PROTECTED] Subject: mapped properties and jndi's Attributes I would like to use mappend properties with jndi, but using bean:write name='entry' property='(cn)' / doesn't work, since PropertyUtils chokes when not supplying anything before the opening parenthesis. Ideally a property of (string) would map to get(string), which is the getter method on Attributes. I thought I could look into PeopertyUtils to support this, but the code is a bit hard to get into at first sight. Has anyone thought of supporting get(String id) style properties in struts? If you use DynaBean based beans, you can get pretty much the same effect by just using: bean:write name='entry' property='cn'/ because the underlying DynaBean property ends up being retrieved with: String cn = entry.get(cn); (This works in the nightly builds and in Struts 1.1-b1 -- it uses the most recent commons-beanutils nightly builds as well.) Over the longer term, I would strongly suggest that we *not* add any more functionality to the proprietary expression language that Struts uses to retrieve property values. Instead, it's time to start migrating to the expression language being used in the JSP Standard Tag Library (http://jakarta.apache.org/taglibs/standard), which will also become part of JSP 1.3. -- -Torgeir Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
mapped properties and jndi's Attributes
I would like to use mappend properties with jndi, but using bean:write name='entry' property='(cn)' / doesn't work, since PropertyUtils chokes when not supplying anything before the opening parenthesis. Ideally a property of (string) would map to get(string), which is the getter method on Attributes. I thought I could look into PeopertyUtils to support this, but the code is a bit hard to get into at first sight. Has anyone thought of supporting get(String id) style properties in struts? -- -Torgeir -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: strust.taglib.bean proposal
On Thu, 4 Apr 2002, Nicolas De Loof wrote: Date: Thu, 4 Apr 2002 16:40:57 +0200 From: Nicolas De Loof [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: Struts Developers List [EMAIL PROTECTED] Subject: Re: strust.taglib.bean proposal I didn't know about this cache mecanism and multiple capital letters constraints. For use in my JSP Tag to set parent tag Attribute (known value type: String), do you think PropertyUtils.setSimpleProperty(parentTag, arg, bodyContent) is a good replacement from the reflection code ? So it will re-use PropertyUtil cache and introspection mecanism. I'd say that it would be (assuming that bodyContent has already been converted to a String, and arg is the property name of one of the parent tag property setters). Craig BeanUtils and PropertyUtils actually do somewhat more than this: * Property setter names do *not* have to start with set -- bean developers can supply an additional BeanInfo class to define the get and set method names. BeanUtils uses the standard introspection capabilities to do this lookup. * There are some special case rules for property names that start with multiple capital letters that the introspection code deals with. * Because the introspection is the expensive part, the results are cached. Therefore, BeanUtils will execute repeated property sets on the same bean class much faster than the above code, which does a getMethod() lookup every single time. * The BeanUtils version of the property setters (including the ones called in populate()) do automatic type conversion for you, while the PropertyUtils version of the property setters assumes you already have the right data type. * The library methods know how to deal with indexed and mapped setters as well as scalar properties. So, the above code (if included in the tag) would most likely be replaced by a call to PropertyUtils.getProperty() to take advantage of what the library can do. 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]
Re: strust.taglib.bean proposal
NicolasString setterName = set Nicolas + arg.substring(0,1).toUpperCase() Nicolas + arg.substring(1); Nicolastry { Nicolas System.out.println(setterName +setterName); Nicolas Method setter = parentTag.getClass().getMethod( Nicolas setterName, new Class[] { String.class } ); Nicolas setter.invoke(parentTag, Nicolas new Object[] {getBodyContent().getString()} ); I believe the functionality in this block is basically what BeanUtils.populate() does, although with a little more overhead. Your right, BeanUtils.populate() uses a cleaner PropertyDescriptor interface to get setter method, but BeanUtils.populate() needs a Map for bean attributes / values and so is not easy to use for an attribute declaration using JSP Tag syntax. To set arg0 attribute of parent Tag with the value of a bean property, it would look like : parent tag attr:setAttribute attr:oneAttribute attr=arg0 bean:write name= property= / attr:oneAttribute attr:setAttribute /parent tag -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
re-post: use of pluggable converters in ConvertUtils changes Struts behavior for primitive wrapper properties
Is the change I describe below to way beanutils does primitive wrapper conversions going to be permanent? The addition of pluggable converters in ConvertUtils on 3/18 has changed the way Struts handles empty form fields that map to primitive Wrapper bean properties. For example, the default IntegerConverter uses a default value of Integer(0) instead of null. This is a fairly significant problem because it's not backwards compatible with Struts 1.0. I often store id number in hidden form fields that map to a Long or Integer property on the serverside bean. If the hidden field is empty in the html then Struts used to populate the setBlah(Integer) method with a null, now it passes a zero. That causes me to try an update of entity 0 instead of adding a new entity, for example. The problem also occurs with drop downs that use numeric key values. In those cases I normally submit a if nothing is selected and now that becomes 0 in the form bean. The current set of converters doesn't even accept null as a legal default value. If the default is set to null then an exception is thrown when the conversion fails. In order to fix my applications I used an older common-beanutils with the 1.1 beta but if this isn't going to be fixed then I will have to write my own set of converters for Integer and Long. Let me know if I am confused or confusing. Thanks, Hal -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Working with 1.1b1 (TC404b2), but can't find MESSAGE in latest CVS
I'm using Tomcat 4.0.4b2 with JDK 1.4.0. I have a small test application that I had working with 1.1b1. I decided to install the latest from CVS for struts and commons and work on building and using that, in preparation for testing some minor Struts additions. Without changing the application code, I changed the sets of jar files and tlds built in the WAR to use the set that I built from the latest CVS. When I run this newly built application, I get the following exception: javax.servlet.jsp.JspException: Exception forwarding for name main: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:180) at org.apache.jsp.index$jsp._jspService(index$jsp.java:77) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) [more] In my struts-config.xml, I have the following element: message-resources parameter=ApplicationResources/ In my WAR file, I have the following file: WEB-INF/classes/ApplicationResources_en.properties Note again that this was working in 1.1b1. So, did I miss something, or is this likely a bug? I didn't see any recent mention of this problem in either list. I tried changing the installed file to not have the locale suffix, but that had no effect. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Confusion
I'm really confused (not hard these days...) gump says the struts nightly build succeeded, however, there are no binaries and haven't since them 4/1. It goes from 8.6Meg archive on 4/1 to a 466 byte archive on 4/2 thru 4/4. Just for kicks, I downloaded the source and tried to compile. It worked after I used the latest commons-validator code from CVS. I'm happy now I have a latest version, but I'm still confused why there are no binaries. Steve
Re: build failing - validator in transition?
I too was having compile problems, but mine was with the main tree. It was all validator stuff so I updated commons-validator from CVS with the -AdP option, compiled it into a jar, and used that with the latest struts code and the build worked fine. - Original Message - From: David Winterfeldt Sent: Thursday, April 04, 2002 2:10 PM To: Struts Developers List Subject: Re: build failing - validator in transition? The Struts Validator was recently moved (right before beta 1) from contrib/validator to the main source tree. I don't know why the build isn't working for you. Those classes are in cvs. Maybe your checkout failed? The ValidatorPlugIn is in the org.apache.struts.validator package (along with ValidatorForm, etc.). David --- Joe Germuska [EMAIL PROTECTED] wrote: I hope I'm not overlooking something basic because it's late. I'm trying to build from the current CVS tree and I'm running into problems. When I run Ant against the root build.xml file, I get a number of errors because Ant can't find ValidatorPlugIn. I guess some things have moved around since the last time I built from source. I thought maybe the solution would be to build .../jakarta- struts/contrib/validator, but the build.properties file in that directory references struts.jar, and I haven't yet built struts.jar. (Sure, I could just get the binary, but...) Also, looking at the validator code in contrib, it looks out of date -- still depends upon regexp instead of ORO. I can't simply move it into the core src/share directory and build. Did I overlook some instructions somewhere? Or did I catch it in transition? Thanks, Joe compile.library: [javac] Compiling 189 source files to /Users/germuska/Development/jakarta/jakarta-struts/target/library/classes [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 78: cannot resolve symbol [javac] symbol : class ValidatorPlugIn [javac] location: package validator [javac] import org.apache.struts.validator.ValidatorPlugIn; [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/util/StrutsValidatorUtil.java:78: cannot resolve symbol [javac] symbol : class ValidatorPlugIn [javac] location: package validator [javac] import org.apache.struts.validator.ValidatorPlugIn; [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/taglib/html/JavascriptValidatorTag.java: 257: cannot resolve symbol [javac] symbol : variable ValidatorPlugIn [javac] location: class org.apache.struts.taglib.html.JavascriptValidatorTag [javac] pageContext.getAttribute(ValidatorPlugIn.VALIDATOR_KEY, PageContext.APPLICATION_SCOPE); [javac]^ [javac] /Users/germuska/Development/jakarta/jakarta- struts/src/share/org/apache/struts/util/StrutsValidatorUtil.java:112: cannot resolve symbol [javac] symbol : variable ValidatorPlugIn [javac] location: class org.apache.struts.util.StrutsValidatorUtil [javac] return (ValidatorResources)application.getAttribute(ValidatorPlugIn.VALIDATOR_KEY) ; [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [javac] 4 errors -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ 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]
DO NOT REPLY [Bug 7751] New: - DynaValidatorForm throws NullPointerException and ClassCastException
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7751. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7751 DynaValidatorForm throws NullPointerException and ClassCastException Summary: DynaValidatorForm throws NullPointerException and ClassCastException Product: Struts Version: 1.1 Beta 1 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Major Priority: Other Component: Controller AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have a DynaValidatorForm declared in the form-bean like so: form-bean name=testDynaForm type=org.apache.struts.validator.DynaValidatorForm form-property name=username type=java.lang.String / form-property name=password type=java.lang.String / form-property name=address type=java.lang.String / form-property name=city type=java.lang.String / /form-bean It works great when DynaValidatorForm is a DynaActionForm... But, as soon as I swap it with DynaValidatorForm it throws the attached (error1) error. Also, when I have the type=org.apache.struts.action.DynaActionForm and try to cast it to a DynaValidatorForm i get a ClassCastException error. == error1 java.lang.NullPointerException at org.apache.struts.action.DynaActionForm.getDynaProperty (DynaActionForm.java:539) at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:357) at org.apache.struts.action.DynaActionForm.reset (DynaActionForm.java:158) at org.apache.struts.validator.DynaValidatorForm.reset (DynaValidatorForm.java:357) at org.apache.struts.util.RequestUtils.createActionForm (RequestUtils.java:618) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:606) at org.apache.jsp.testdynaform$jsp._jspService(testdynaform$jsp.java:76) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service (JspServlet.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:193) at ws.phase.security.filter.URLFilter.doFilter(URLFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:243) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:190) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) at org.apache.catalina.valves.CertificatesValve.invoke (CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke (StandardContext.java:2343) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:566) at org.apache.catalina.valves.ErrorDispatcherValve.invoke (ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:170) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext (StandardPipeline.java:564) at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:472) at
Re: Confusion
The Gump build and the nightly build are actually two separate builds. The former gets the latest of everything from CVS and tries to build it all. I believe it runs on Sam Ruby's machine. The latter runs on Craig's machine, and I think is intended to do the same thing, but it seems there may be a problem with the dependencies. This is the build that generates the binaries you are looking for. -- Martin Cooper At 01:43 PM 4/4/02, Steve Wilkinson wrote: I'm really confused (not hard these days...) gump says the struts nightly build succeeded, however, there are no binaries and haven't since them 4/1. It goes from 8.6Meg archive on 4/1 to a 466 byte archive on 4/2 thru 4/4. Just for kicks, I downloaded the source and tried to compile. It worked after I used the latest commons-validator code from CVS. I'm happy now I have a latest version, but I'm still confused why there are no binaries. Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 7753] New: - Please add a Struts training course to Resources/Seminars page
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7753. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7753 Please add a Struts training course to Resources/Seminars page Summary: Please add a Struts training course to Resources/Seminars page Product: Struts Version: Unknown Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: Other Component: Documentation AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] My name is Max Rahder. I do consulting and training. Onsite Java is the name of my training organization. I do consulting as Rahder Consulting, Inc. I notice that there are several training courses listed at http://jakarta.apache.org/struts/resources.html#seminars I recently developed a five day class titled J2EE Web Architecture. The course is described at http://www.onsitejava.com/outlines.html In a nutshell, the class is two days of MVC design, followed by three days of Struts. I've given the class several times and it's gotten very high ratings. (I've included the abstract at the bottom of this email.) I'm writing to ask if you could add a link to this course to the Seminars section of the Resources page. The link should be Onsite Java -- J2EE Web Architecture, and be linked to http://www.onsitejava.com/outlines.html;. Thanks! I'm also interested in sharing my Struts experiences with you. I can give you feedback from the projects I'm involved with, or I can provide tutorials and examples. Whould either of those be helpful? Thanks for adding the link! Sincerely, Max Rahder The abstract of the class is: J2EE Web Architecture In-depth coverage of building J2EE-standard Web-based applications. Students learn the key concepts behind good Web application design such as including content, forwarding control, the use of custom tags, and routining requests through a controlling servlet. Students then build on these concepts, learning how to separate a Web application into its model (accessing business classes with adapter classes), view (using JSPs and custom tags), and controller (doing URI mapping to access adapters and views). Once MVC is clear, students learn how to use the Jakarta Project's Struts framework. PREREQUISITE: J2EE Web Programming, or experience using J2EE components. DURATION: 5 days -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlet 2.3 filter
Subject: Re: Servlet 2.3 filter From: Bill Wohler [EMAIL PROTECTED] === Craig R. McClanahan [EMAIL PROTECTED] writes: - It's commonly necessary to generate slightly different HTML for different user agents, to deal with the inevitable differences. One approach is to build the knowledge of these differences into every tag that renders HTML. A different approach would be to generate some agent-neutral rendering of the output in XML, and then apply an agent-specific transformation in a response wrapper. Oh yeah, that would be nice. The different user agents applies to web browsers and phone browsers alike. I currently maintain two trees since the HTML and WML is so different. Within the phone side, there are large differences in some widgets which I plan to hide in custom tags (normally, I keep markup out of tags). However, what you suggest would be preferable. I'm also planning on using filters to do resource switching and I'm not sure yet how this will work. A given page foo.jsp might be found in any number of places depending on: - the variant in use (companyA, companyB, etc.) - the user's locale (en_US, etc.) - the markup (HTML, WML, etc.) I was planning on creating a servlet filter which would intercept the request with the virtual page (foo.jsp), find the appropriate page, and forward the request with the actual page (companyA/en_US/HTML/foo.jsp). Thoughts? -- Bill Wohler [EMAIL PROTECTED] http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian! If you're passed on the right, you're in the wrong lane. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
The future of templates, regions, and tiles
Subject: The future of templates, regions, and tiles From: Bill Wohler [EMAIL PROTECTED] === Should I use templates, regions, or tiles? I would like to use something that meets our needs and is supported by (meaning, packaged in) Struts. Here's my understanding of the situation. In the beginning, David Geary wrote the template library which is a part of Struts. Since this library does not support inheritance, it does not meet our needs. Then, David wrote a regions library that he developed for his Advanced JavaServer Pages book. While this library has inheritance and meets our needs, this library does not appear to be a part of Struts. Independently, Cedric wrote tiles which meets our needs and is packaged with Struts 1.1 beta, but only as an adjunct. So, do you Struts developers intend to replace the template library with David's regions library or Ced's tiles library or neither? We'd like to choose the template library which will be eventually standard in Struts. -- Bill Wohler [EMAIL PROTECTED] http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian! If you're passed on the right, you're in the wrong lane. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlet 2.3 filter
On Thu, 4 Apr 2002, Struts-dev Newsgroup wrote: Date: Thu, 4 Apr 2002 18:55:01 -0800 From: Struts-dev Newsgroup [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Servlet 2.3 filter Subject: Re: Servlet 2.3 filter From: Bill Wohler [EMAIL PROTECTED] === Craig R. McClanahan [EMAIL PROTECTED] writes: - It's commonly necessary to generate slightly different HTML for different user agents, to deal with the inevitable differences. One approach is to build the knowledge of these differences into every tag that renders HTML. A different approach would be to generate some agent-neutral rendering of the output in XML, and then apply an agent-specific transformation in a response wrapper. Oh yeah, that would be nice. The different user agents applies to web browsers and phone browsers alike. I currently maintain two trees since the HTML and WML is so different. Within the phone side, there are large differences in some widgets which I plan to hide in custom tags (normally, I keep markup out of tags). However, what you suggest would be preferable. I'm also planning on using filters to do resource switching and I'm not sure yet how this will work. A given page foo.jsp might be found in any number of places depending on: - the variant in use (companyA, companyB, etc.) - the user's locale (en_US, etc.) - the markup (HTML, WML, etc.) I was planning on creating a servlet filter which would intercept the request with the virtual page (foo.jsp), find the appropriate page, and forward the request with the actual page (companyA/en_US/HTML/foo.jsp). Thoughts? One potential gotcha, especially if you like MVC architectures like the one Struts advocates -- filters are only invoked on the original request, not on RequestDispatcher.forward() methods. In retrospect, that probably wasn't the best approach for *our* purposes, but we have to live with it for now. -- Bill Wohler [EMAIL PROTECTED] http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian! If you're passed on the right, you're in the wrong lane. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
javax.servlet.ServletException: Cannot find bean SubscriberInfo in scope request
hello, i'm trying to write a property of bean SubscriberInfo on a jsp page. But, this bean won't be present initially will get generated on some action in the same page. to avoid the exception javax.servlet.ServletException: Cannot find bean SubscriberInfo in scope request i got the following logic in my jsp logic:present name=SubscriberInfo scope=request bean:write name=SubscriberInfo property=serviceProvider scope=request/ /logic:present but still i get the exception. please help, thanks in advance, chaks.
RE: javax.servlet.ServletException: Cannot find bean SubscriberInfo i n scope request
please ignore this ... i missed %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % in my jsp file. thanks anyway, chaks. -Original Message- From: Chakradhar Tallam [mailto:[EMAIL PROTECTED]] Sent: Friday, 5 April 2002 2:01 PM To: 'Struts Developers List' Subject: javax.servlet.ServletException: Cannot find bean SubscriberInfo i n scope request hello, i'm trying to write a property of bean SubscriberInfo on a jsp page. But, this bean won't be present initially will get generated on some action in the same page. to avoid the exception javax.servlet.ServletException: Cannot find bean SubscriberInfo in scope request i got the following logic in my jsp logic:present name=SubscriberInfo scope=request bean:write name=SubscriberInfo property=serviceProvider scope=request/ /logic:present but still i get the exception. please help, thanks in advance, chaks.
DO NOT REPLY [Bug 7756] New: - The reset() method seems to be called twice
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7756. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7756 The reset() method seems to be called twice Summary: The reset() method seems to be called twice Product: Struts Version: 1.1 Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: Other Component: Controller AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] In the processActionForm() method, the RequestUtils.createActionForm() method is called. The last line in that method is a call to the reset method on the form instance. Nothing else really happens with the form in the processActionForm(), except for to store it into the proper scope. Immediately following this, the processPopulate() method is called. The very first line in this method, except for the check to see if the form is null and a log statement, is a call to the reset() method on the same form instance. Unless I'm missing something, I don't believe that both reset calls are needed. Chuck Cavaness -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]