actionframework-users Mailing List for ActionFramework (Page 5)
Status: Inactive
Brought to you by:
ptoman
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(11) |
Aug
(26) |
Sep
(38) |
Oct
(33) |
Nov
(18) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(26) |
Feb
(7) |
Mar
(3) |
Apr
(14) |
May
(12) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(2) |
Oct
|
Nov
(5) |
Dec
|
2004 |
Jan
(4) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Petr T. <Pet...@pi...> - 2002-12-01 17:24:30
|
Hello, unfortunatelly I have to announce another delay of A long expected part... eh, release. 1) I was a more bussy than I had expected, 2) I have found necessary to start major code revision of ActionServlet.java and Action.java in order to implement new features (published in the Roadmap - http://www.actionframework.org/roadmap.html). I'm sorry that my schedule estimations are so inaccurate, but I promise 0.94 will definitely come out in December. -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <Pet...@pi...> - 2002-11-25 20:51:48
|
> xml (Xmlspy) says that I cannot use the <output-variable> tag inside > a <on-exception> if I have the <invoke> tag too: unexpected child > element 'output-variable' Presently, you must keep the order 1) <output-variable>s 2) <invoke>s. This will be modified (in 0.94), so that you will be able to mix these two elements. -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: <bm...@ho...> - 2002-11-25 15:25:18
|
well, one member of the developing team where I work found the solution to it(maybe that was the one you were saying): instead of giving to the var an empty string value, we should just give a "null" value: <input-variable name="miniatura" value="null" if="!$miniatura"/> so, there is no necessity of causing an exception. thx for all. ----- Original Message ----- From: "Petr Toman" <cz5...@ti...> To: <act...@li...> Sent: Thursday, November 21, 2002 8:53 PM Subject: Re: [Actionframework-users] org.actionframework.MissingParameterException >well, I found a solution, but I don't think it's the "cleanest" one: >I added the the following tag ><input-variable name="miniatura" value="" if="!$miniatura"/> >so if the input file isnt filled, $miniatura gets a value. I use this solution too. Catching ConversionException by <on-exception> is scheduled for 0.94 (see http://www.actionframework.org/roadmap.html). Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] ____________________________________________________________________ Bude se opakovat válka o Prahu? Na čem se v matce měst domluví vládci světa? Jak bude omezen život v Praze? Sledujte http://nato.tiscali.cz! ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Actionframework-users mailing list Act...@li... https://lists.sourceforge.net/lists/listinfo/actionframework-users |
From: <bm...@ho...> - 2002-11-22 17:00:51
|
hi. I'm using the http://dione.zcu.cz/~toman40/ActionServlet/dtd/ActionServlet_0_93beta2.dtd file to validate my xml config file. The program I use to write the xml (Xmlspy) says that I cannot use the <output-variable> tag inside a <on-exception> if I have the <invoke> tag too: unexpected child element 'output-variable' Byez. |
From: Petr T. <cz5...@ti...> - 2002-11-21 19:55:43
|
>well, I found a solution, but I don't think it's the "cleanest" one: >I added the the following tag ><input-variable name=3D"miniatura" value=3D"" if=3D"!$miniatura"/> >so if the input file isnt filled, $miniatura gets a value. I use this solution too. Catching ConversionException by <on-exception> is scheduled for 0.94 (see http://www.actionframework.org/roadmap.html). Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] ____________________________________________________________________ Bude se opakovat v=E1lka o Prahu? Na =E8em se v matce m=ECst domluv=ED vl= =E1dci sv=ECta? Jak bude omezen =BEivot v Praze? Sledujte http://nato.tiscali.cz! |
From: <bm...@ho...> - 2002-11-21 18:35:19
|
well, I found a solution, but I don't think it's the "cleanest" one: I added the the following tag <input-variable name="miniatura" value="" if="!$miniatura"/> so if the input file isnt filled, $miniatura gets a value. eventually, because there is a conversion error, so, instead of using the missingParameterException, I use the java.lang.IllegalArgumentException, which is catched by actionservlet. byez. ----- Original Message ----- From: "Borja Martín" <bm...@ho...> To: <act...@li...> Sent: Thursday, November 21, 2002 6:45 PM Subject: [Actionframework-users] org.actionframework.MissingParameterException > hi. > I have a form to upload files, the files are uploaded fine, but the problem > comes when the user submits the form with no file selected in the input > widget, I become the following error: > > Conversion error occurred when handling action '/grabarGaleria' (field: > 'miniatura'): org.actionframework.MissingParameterException: HTTP parameter > 'miniatura' - taken from HTML <input> tag of type "File" - does not exist > (required by action '/grabarGaleria'); nested exception is: > org.actionframework.MissingParameterException: Parameter 'miniatura' is not > defined or the file has a zero length > > I thought I could solve it using the on-exception in the xml config file: > inside the tag <action name="grabarGaleria" ... I put that code: > <on-exception class="org.actionframework.MissingParameterException" > show-template="uploadfile.vm" /> > but the on-exception content isn't loaded altough ActionServlet checks > before if that exception does exist... > > (I'm using ActionServlet 0.93.2c) > > Thx in advance > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Actionframework-users mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/actionframework-users > > |
From: <bm...@ho...> - 2002-11-21 17:47:21
|
hi. I have a form to upload files, the files are uploaded fine, but the problem comes when the user submits the form with no file selected in the input widget, I become the following error: Conversion error occurred when handling action '/grabarGaleria' (field: 'miniatura'): org.actionframework.MissingParameterException: HTTP parameter 'miniatura' - taken from HTML <input> tag of type "File" - does not exist (required by action '/grabarGaleria'); nested exception is: org.actionframework.MissingParameterException: Parameter 'miniatura' is not defined or the file has a zero length I thought I could solve it using the on-exception in the xml config file: inside the tag <action name="grabarGaleria" ... I put that code: <on-exception class="org.actionframework.MissingParameterException" show-template="uploadfile.vm" /> but the on-exception content isn't loaded altough ActionServlet checks before if that exception does exist... (I'm using ActionServlet 0.93.2c) Thx in advance |
From: <bm...@ho...> - 2002-11-14 18:49:44
|
yes , that was the problem. I thought I had the newest version, but there was a copy of ActionServlet in the jre/lib/ext dir that I had forgotten, so resin was using always that old version. ----- Original Message ----- From: "Mark D. Anderson" <md...@di...> To: <act...@li...> Sent: Thursday, November 14, 2002 6:31 PM Subject: Re: [Actionframework-users] Component constructor > (please don't send html email) > > >I become the following error: > > Component class 'IncludeComponent' does not have a public non-parametric constructor nor a > > ... > > It appears to me that you have an older version of the software. > > -mda > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > Actionframework-users mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/actionframework-users > > |
From: Mark D. A. <md...@di...> - 2002-11-14 17:32:00
|
(please don't send html email) >I become the following error: > Component class 'IncludeComponent' does not have a public non-parametric constructor nor a > ... It appears to me that you have an older version of the software. -mda |
From: <bm...@ho...> - 2002-11-14 17:06:10
|
why cannot I use a Component(ActionServlet, String, Context) constructor = although it appears in the documentation? = (http://www.actionframework.org/doc/api/org/actionframework/instantiators= /DefaultInstantiator.html) I become the following error: org.actionframework.ActionException: Error while evaluating = <output-variable> $include; nested exception is: = org.actionframework.instantiators.InstantiatorException: Component class = 'IncludeComponent' does not have a public non-parametric constructor nor = a public constructor with a single parameter of type = org.actionframework.ActionServlet nor a public constructor with = parameters of type org.actionframework.ActionServlet and = java.lang.String what I'm trying to do is to get to the the User-Agent value that I've = saved in the Context in another Component. Thx in advance. |
From: Petr T. <Pet...@pi...> - 2002-11-10 10:17:43
|
>> > <input-variable name="dog" value="[]" if="!$dog"/> >> >>I'm sorry, this only creates array of length 1. Here's a correction: > > huh? [] has length 1, not 0? It works like this: dog=new String[] {"[]"}; Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Mark D. A. <md...@di...> - 2002-11-10 07:08:11
|
> > <input-variable name="dog" value="[]" if="!$dog"/> > > I'm sorry, this only creates array of length 1. Here's a correction: huh? [] has length 1, not 0? -mda |
From: Petr T. <Pet...@pi...> - 2002-11-09 18:13:40
|
> PS: presently, there is a solution for this using <input-variable>: > > <action name="/doSomething" method="doSomething(String[] dog)"> > <input-variable name="dog" value="[]" if="!$dog"/> > ... > </action> > > This would set dog="empty array" if it is not set in the request. I'm sorry, this only creates array of length 1. Here's a correction: <input-variable name="dog" component="Util" value="getEmpty()" if="!$dog"/> Where Util is a component that has a method: public class Util { private static final String[] array = new String[0]; public String[] getEmpty() { return array; } } Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <Pet...@pi...> - 2002-11-09 10:29:53
|
> I'd like to be able to declare a java method like > doSomething(String[] dog) which would handle: > > <input type="checkbox" name="dog" value="beagle"/> <input > type="checkbox" name="dog" value="spitz"/> > > but that doesn't work because if no dogs are selected, "dog" doesn't > show up at all on the query string. If I have an array argument, it > should allow for no members. PS: presently, there is a solution for this using <input-variable>: <action name="/doSomething" method="doSomething(String[] dog)"> <input-variable name="dog" value="[]" if="!$dog"/> ... </action> This would set dog="empty array" if it is not set in the request. Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <cz5...@ti...> - 2002-11-06 13:50:34
|
>this is not as pressing as my txn issue, but something to put on the fut= ure >feature list: >support <input type=3D"image" name=3D"foo"> buttons. >Right now that fails because the browser actually sends those as "foo.x=3D= 0&foo.y=3D0". >I think there should be a default conversion to a java boolean argument.= Ok -> 0.94 todo. As previously, I suggest a standard property like org.ac= tionframework.ActionServlet.imageInputToBoolean that would allows turn the conversion on/off. Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] ___________________________________________________________ http://sms.tiscali.cz ...LOGA a MELODIE na mobil! Nyn=ED NOV=CC i pro mobiln=ED telefony SIEMENS! |
From: Petr T. <cz5...@ti...> - 2002-11-06 13:41:57
|
>> I'd like to be able to declare a java method like doSomething(String[]= >> dog) which would handle: >> >> <input type=3D"checkbox" name=3D"dog" value=3D"beagle"/> >> <input type=3D"checkbox" name=3D"dog" value=3D"spitz"/> >> >> but that doesn't work because if no dogs are selected, "dog" doesn't show >> up at all on the query string. >> If I have an array argument, it should allow for no members. Useful! Adding to 0.94 todo :) We would only have trouble with noarg doSo= mething() method (overloading). A standard property like org.actionframework.Action= Servlet.dontMapEmptyToArrays should allow disabling this feature. Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] ___________________________________________________________ http://sms.tiscali.cz ...LOGA a MELODIE na mobil! Nyn=ED NOV=CC i pro mobiln=ED telefony SIEMENS! |
From: Aron W. <aw...@mj...> - 2002-11-06 00:16:11
|
Mark D. Anderson wrote: > I'd like to be able to declare a java method like doSomething(String[] dog) > which would handle: > > <input type="checkbox" name="dog" value="beagle"/> > <input type="checkbox" name="dog" value="spitz"/> > > or > <select name="dog" multiple="multiple"> > <option value="beagle"/> > <option value="spitz"/> > </select> > > but that doesn't work because if no dogs are selected, "dog" doesn't show up > at all on the query string. > If I have an array argument, it should allow for no members. > > -mda > > I would like to my add my vote supporting this suggestion as well. This would be useful for our application. A.W. |
From: Mark D. A. <md...@di...> - 2002-11-05 21:07:09
|
I'd like to be able to declare a java method like doSomething(String[] dog) which would handle: <input type="checkbox" name="dog" value="beagle"/> <input type="checkbox" name="dog" value="spitz"/> or <select name="dog" multiple="multiple"> <option value="beagle"/> <option value="spitz"/> </select> but that doesn't work because if no dogs are selected, "dog" doesn't show up at all on the query string. If I have an array argument, it should allow for no members. -mda |
From: Mark D. A. <md...@di...> - 2002-11-05 20:48:59
|
this is not as pressing as my txn issue, but something to put on the future feature list: support <input type="image" name="foo"> buttons. Right now that fails because the browser actually sends those as "foo.x=0&foo.y=0". I think there should be a default conversion to a java boolean argument. -mda |
From: Petr T. <cz5...@ti...> - 2002-10-30 13:54:20
|
>> protected void doGet(HttpServletRequest req, HttpServletResponse res) { >> super.doGet(req, res); >> finishTransaction(); >> } > >I thought of this, but it won't work for me, because super.doGet() calls= >cleanupRequest (which is private so I can't override), and cleanupReques= t >will nuke my requestComponents that I need in my finishTransaction. >Or maybe not? When do requestComponents get destroyed? You cannot call ActionServlet.getComponent() method from finishTransactio= n(), but you can use request components until they are garbage collected. Btw, as I have just found, there is a bug in calling Destroy.destroy() me= thod of request components. My original idea was to destroy() request componen= t before the *next* request (because ActionServlet was formerly a subclass of WebMacro's WMServlet and the template returned from ActionServlet.hand= le() could use the component). Now it is sensible to destroy() request compone= nts after the current request, i.e. after ActionServlet.requestCleanup(Contex= t) in 0.94. Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] ___________________________________________________________ http://sms.tiscali.cz ...LOGA a MELODIE na mobil! Nyn=ED NOV=CC i pro mobiln=ED telefony SIEMENS! |
From: Mark D. A. <md...@di...> - 2002-10-29 19:57:23
|
> protected void doGet(HttpServletRequest req, HttpServletResponse res) { > super.doGet(req, res); > finishTransaction(); > } I thought of this, but it won't work for me, because super.doGet() calls cleanupRequest (which is private so I can't override), and cleanupRequest will nuke my requestComponents that I need in my finishTransaction. Or maybe not? When do requestComponents get destroyed? -mda |
From: Petr T. <Pet...@pi...> - 2002-10-29 19:31:00
|
>> - bugfix: Velocity's error() was not overridden to call >> ActionServlet.error() > > Thanks; unfortunately (and I should have caught this before) I still > can't do transaction management. That is because cleanupRequest() is > private, and doesn't pass in Context anyway. There is afterInvoke(), > but it still happens before template merging. And velocity's > requestCleanup() is not hooked by AS. Lastly, I can't deal with this > by overriding doGet and doPost, because the superclass calls its > cleanup which will invalidate my request-level components before I > can do my own cleanup. > > So I don't see any way for request cleanup. VelocityServlet (combining AS + Velocity) method calls are: "HTTP request" -> doGet()/doPost() -> doRequest(...) protected void doRequest(...) { try { handleRequest(request, response, context) -> ActionServlet.handle(...) if (template != null) { mergeTemplate(template, context, response); requestCleanup(request, response, context); } } catch (Exception e) { error(request, response, e) -> ActionServlet.error(...); } } Conclusion from this schema: if ActionServlet.error() is not called during the request, everything is ok. Therefore, you can override doGet(), doPost() and error() in your servlet like this: private Hashtable data = new Hashtable(); protected void doGet(HttpServletRequest req, HttpServletResponse res) { super.doGet(req, res); finishTransaction(); } protected void doPost(HttpServletRequest req, HttpServletResponse res) { super.doPost(req, res); finishTransaction(); } public Template error(Context context, String message, Throwable e) { // get unique id for current thread (i.e. request) Integer threadId = new Integer(System.identityHashCode(Thread.currentThread())); // save context (or set error flag - whatever you need) data.put(threadId, context); super.error(context, message, e); } private void finishTransaction() { Integer threadId = new Integer(System.identityHashCode(Thread.currentThread())); // check for error if (data.contains(threadId)) { // rollback transaction data.remove(threadId); } else { // commit transaction } } But I think that adding ActionServlet.requestCleanup(Context ctx) is not a bad idea - for AS 0.94 :) Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Mark D. A. <md...@di...> - 2002-10-28 00:22:20
|
> - bugfix: Velocity's error() was not overridden to call > ActionServlet.error() Thanks; unfortunately (and I should have caught this before) I still can't do transaction management. That is because cleanupRequest() is private, and doesn't pass in Context anyway. There is afterInvoke(), but it still happens before template merging. And velocity's requestCleanup() is not hooked by AS. Lastly, I can't deal with this by overriding doGet and doPost, because the superclass calls its cleanup which will invalidate my request-level components before I can do my own cleanup. So I don't see any way for request cleanup. Again, I should have caught this before the release, but I wasn't paying attention until the error() problem was resolved. -mda |
From: Petr T. <Pet...@pi...> - 2002-10-27 14:55:27
|
ActionServlet 0.93.2c (http://www.actionframework.org) - Velocity 1.2+ is now needed for rebuilding ActionServlet (but still works with Velocity 1.1) - DefaultInstantiator recognizes component construtor with 3 args - RMIInstatiator accepts component name with specified host (see API) - AS also tries to load ActionConfig relatively to servlet "real path" - ActionServlet.error() is now public, added error() with Throwable parameter - Throwable is now catched instead of Exception in many places in code - bugfix: invocation of "static" component's method caused NullPointerException - bugfix: Velocity's error() was not overridden to call ActionServlet.error() - bugfix: Velocity log didn't include stack trace info even if it was turned on - bugfix: if ActionConfig reloading was enabled, invoking action method of "session" and "request" components could cause IllegalStateException - bugfix: template path with comma-separated values was not relativized properly for Velocity engine - bugfix: HTTPParameterRetriever reported String as parameter type - bugfix: MultipartParameterRetriever now retrieves also array params -- I'm sorry for this release has been delayed, but I've had more work besides AS and a few bugs (which have always a higher priority than implementing new features) had to be fixed. Mark, your ActionServlet.processRequest rewrite was not included (yet), because there will be some more changes regarding action handling in 0.94, but I keep it in mind! Thanks to everyone for bugreports and help (especially to Mark!) I'm putting hands on 0.94 :) Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <cz5...@ti...> - 2002-10-22 08:16:06
|
>petr, where do you stand in getting a new release out? I want to fix just two things for 0.93.2c - and release! :) 1) stack trace output into Velocity log (waiting for Geir's answer) 2) upload ArrOutOfBounds exception (waiting for B. Mart=EDn's verification) Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] ___________________________________________________________ http://sms.tiscali.cz ...LOGA a MELODIE na mobil! Nyn=ED NOV=CC i pro mobiln=ED telefony SIEMENS! |