actionframework-users Mailing List for ActionFramework (Page 3)
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...> - 2003-04-16 11:46:22
|
> 'method' will return 'null' if <input-variable> is present and the > parameter sent. It should work now. Did you apply the fix I have sent here recently? Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-04-16 11:40:51
|
> When I use long as variable type, then: > a) When I supply both variables in URL: /test/2?b=3D9 ... it works fin= e. > (<in-var> not activated) > b) When I only supply variable a in the URL: /test/2 .... I get > org.actionframework.ConversionException: No type handler for conversion > from 'java.lang.Integer' to 'long' This problem is caused by evaluation of <in/out-var>s. AS uses internally Velocity/WebMacro as engine for expressions and conditions. Until this is rewritten (scheduled for AS 0.96), there is a workaround: define a type handler for these cases, something like: <type-handlers> <type-handler source-type=3D"java.lang.Integer"=20 target-type=3D"long" class=3D"Dummy"/> </type-handlers> public class Dummy implements SimpleTypeHandler { public Object convert(Context context, Object o) {return o;} } It would be necessary to add all combinations of THs for conversions from wrapper classes to primitive types, like:=20 Integer -> long, Short -> int, Short -> long etc., which could be done for AS 0.94.1 :) Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Armando R. <ar...@ho...> - 2003-04-15 15:49:09
|
Dear all, I'm sorry I made a mistake in my previous configuration: > Test.xml > -------- > <component name="Test" class="Test" persistence="application"> > <action name="/action" method="method (int parameter)"> > <input-variable name="parameter" value="-1" if="!$parameter"/> > <on-return value="*" show-template="test.vm"> > <output-variable name="parameter" value="$parameter"/> > </on-return> > </action> > </component> I wasn't checking the return value of 'method', but assigning it straight from the request value. The <on-return> statement should have read: <on-return value="*" assign-to="parameter" show-template="test.vm"/> Thus, changing 'int' to 'Integer' doesn't help as I mistakenly reported. With public class Test{ public Integer method(Integer parameter){ return parameter; } } 'method' will return 'null' if <input-variable> is present and the parameter sent. Best regards, Armando PD I forgot to mention that this doesn't happen with version 0.93c -- Armando Ramos http://www.hola.com |
From: Armando R. <ar...@ho...> - 2003-04-15 14:59:23
|
Dear all, Jakub Cerny wrote: > If I use Integer variables, everything is OK. Maybe related to this bug: Test.xml -------- <component name="Test" class="Test" persistence="application"> <action name="/action" method="method (int parameter)"> <input-variable name="parameter" value="-1" if="!$parameter"/> <on-return value="*" show-template="test.vm"> <output-variable name="parameter" value="$parameter"/> </on-return> </action> </component> Test.java --------- public class Test{ public int method(int parameter){ return parameter; } } This throws a NullPointerException when you send 'parameter' in the request, but it works fine if you don't (when <input-variable> is evaluated). Everything goes alright if you use 'Integer' instead of 'int'. If you leave out <input-variable>, result is as expected: MissingParameterException when 'parameter' is not present and OK otherwise. Best regards, Armando -- Armando Ramos http://www.hola.com |
From: Jakub C. <bla...@cb...> - 2003-04-14 20:57:15
|
Thank you very much for quick fix! If I use Integer variables, everything is OK. When I use long as variable type, then: a) When I supply both variables in URL: /test/2?b=9 ... it works fine. (<in-var> not activated) b) When I only supply variable a in the URL: /test/2 .... I get org.actionframework.ConversionException: No type handler for conversion from 'java.lang.Integer' to 'long' I hope this will help to fix it! Good night (in CEST zone) Jakub Cerny > -----Original Message----- > From: act...@li... > [mailto:act...@li...]On > Behalf Of Petr Toman > Sent: Monday, April 14, 2003 7:02 PM > To: act...@li... > Subject: Re: [Actionframework-users] parameter passing bug > > > > I think there is a bug in parameter passing routines. I found it when I > > tried to use both regexp parameters and ordinary URL parameters together > > (IMHO this is very useful combination..). > > You are right that a combination of HTTP, regex params and <in-var> > causes this bug. There is a fix in the attachment - just replace the > processInVars() method in Action.java (under 'src' directory) and run: > > ant clean > ant > > in ActionServlet root directory - this should rebuild ActionServet.jar. > > > One more strange thing: If I change variable types in previous > example to > > long from Integer, I get: > > org.actionframework.ConversionException: No type handler > for conversion > > from 'java.lang.Integer' to 'long' > > when <input-variable> tag is used. When I comment it out, type > conversion > > works fine. > > I tried this with the fixed version and it seems to be ok now. Please > let me know if you have more problems. > > Thank you for a good analysis and bug report! :) > Petr > -- > [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] > |
From: Petr T. <Pet...@pi...> - 2003-04-14 17:01:52
|
> I think there is a bug in parameter passing routines. I found it when I > tried to use both regexp parameters and ordinary URL parameters together > (IMHO this is very useful combination..). You are right that a combination of HTTP, regex params and <in-var> causes this bug. There is a fix in the attachment - just replace the processInVars() method in Action.java (under 'src' directory) and run: ant clean ant in ActionServlet root directory - this should rebuild ActionServet.jar. > One more strange thing: If I change variable types in previous example to > long from Integer, I get: > org.actionframework.ConversionException: No type handler for conversion > from 'java.lang.Integer' to 'long' > when <input-variable> tag is used. When I comment it out, type conversion > works fine. I tried this with the fixed version and it seems to be ok now. Please let me know if you have more problems. Thank you for a good analysis and bug report! :) Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Jakub C. <bla...@cb...> - 2003-04-14 11:41:56
|
Hello! I think there is a bug in parameter passing routines. I found it when I tried to use both regexp parameters and ordinary URL parameters together (IMHO this is very useful combination..). Let's define an action: <action name="/test/$a" method="test(Integer a,Integer b)"> <input-variable name="b" value="0" if="!$b"/> </action> And let's define trivial method 'test' in component: public void test(Integer a, Integer b) { System.out.println("Variable a:" + a + " Variable b:" + b); } Let's try it! GET /test/5 output: Variable a:5 Variable b:0 FINE GET /test/5?b=17 output:Variable a:5 Variable b:null BAD!!! variable b is discarded ------------------------------------------------------------------------- Let's comment out the "input variable" tag: <action name="/test/$a" method="test(Integer a,Integer b)" /> Let's try again: GET /test/5 output: org.actionframework.MissingParameterException FINE GET /test/5?b=17 output:Variable a:5 Variable b:17 FINE ------------------------------------------------------------------------- So what's the result? It seems to me that <input-variable> evaluation breaks something... ------------------------------------------------------------------------- One more strange thing: If I change variable types in previous example to long from Integer, I get: org.actionframework.ConversionException: No type handler for conversion from 'java.lang.Integer' to 'long' when <input-variable> tag is used. When I comment it out, type conversion works fine. I think these bugs really are worth fixing, because these features seem extremely useful for me. I use regex variables for pages, which I want to be perfectly 'googleable' - like "/view/article/17". For admin pages, which are not intended for the public I use normal "?foo=bar" variables, so I don't have to define so many actions. Greetings from Prague! Jakub Cerny |
From: Petr T. <Pet...@pi...> - 2003-04-09 12:33:29
|
> But if I don't put the tag <components>, a NullPointerException occurs > in line 598 of ActionRuntime, where the code is getting the length of > the list of components. >=20 > // parse <component>s subelements > for(int i=3D0; i < componentList.getLength(); i++) { = =20 > <---- > Node node =3D componentList.item(i); >=20 > It seems that the existence of <components> is not controlled > previously. Seems to be a bug that has to be fixed. Thank you for report! P. Toman [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-04-09 12:32:46
|
> I am developing new website using AS. I really enjoy it. Good :) > I am using regex URLs almost everywhere. Sometimes I need to create URL > and only display a template - without calling any action method. Is the= re Omitting 'method' attribute of <action> will be possible in AS0.95 - see Roadmap (http://www.actionframework.org/roadmap.html) > I know that I can create special component which will take template nam= e > as parameter and display it, but I would like to have my URLs consisten= t. AFAIK, this is the most clean solution - at the time. P. Toman [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Javier U. F. <fju...@mu...> - 2003-04-09 07:15:48
|
Hi In 0.93 version of the DTD the element <components> is mandatory, with = at least one subelement <component>. However, in 0.94, <components> is not mandatory. This is useful for = starting with a dummy application with only a new session template. But if I don't put the tag <components>, a NullPointerException occurs = in line 598 of ActionRuntime, where the code is getting the length of = the list of components. // parse <component>s subelements for(int i=3D0; i < componentList.getLength(); i++) { = <---- Node node =3D componentList.item(i); It seems that the existence of <components> is not controlled previously. |
From: Jakub C. <bla...@cb...> - 2003-04-08 15:25:11
|
Hello ActionServlet users! I am developing new website using AS. I really enjoy it. I have a kind of newbie question: I am using regex URLs almost everywhere. Sometimes I need to create URL and only display a template - without calling any action method. Is there some elegant way to have empty method in action? Right now I am using hashCode() call which simply does nothing, but it doesn't look very sexy. I know that I can create special component which will take template name as parameter and display it, but I would like to have my URLs consistent. They logically belong to some particular component so why put them somewhere else? Thanks in advance for all hints/comments. Best regards Jakub Cerny, Prague |
From: Petr T. <Pet...@pi...> - 2003-04-03 16:50:35
|
Hello, I have to announce delay of AS 0.95, because of my other activities. Currently, I've got implemented half of ActionConfig programmatic configuration and I now have to modify ASWizards to verify the API. I suppose AS 0.95 will be released in May 2003. With apology, Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Armando R. <ar...@ho...> - 2003-03-03 20:11:18
|
Petr, > Well, I guess the reason is that noone ever required that :) What else > besides Content-Length would you need? I'm glad to hear that! One never knows... I was just surprised to find a Content-Length=0 when I was doing a HEAD request of a 'show-value-of' action. As I know you are already busy evaluating multipart request libraries, I'll try to document a patch. Thanks for your prompt reply, as usual. Best regards, Armando -- Armando Ramos http://www.hola.com |
From: Petr T. <Pet...@pi...> - 2003-03-03 18:09:26
|
> When working with 'show-value-of' and ContentTypeHandler, I have > noticed that there is no provision for the Content-Length header. Is > there any reason? Well, I guess the reason is that noone ever required that :) What else besides Content-Length would you need? Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Armando R. <ar...@ho...> - 2003-03-03 09:30:16
|
Dear all, When working with 'show-value-of' and ContentTypeHandler, I have noticed that there is no provision for the Content-Length header. Is there any reason? Best regards, Armando -- Armando Ramos http://www.hola.com |
From: Petr T. <Pet...@pi...> - 2003-02-22 16:29:39
|
> I found the problem myself: I'm used to set the > velocity.properties-file as a context-param, which is no problem in > using "pure" velocity and saves a little bit of typing. ActionServlet > seems to ignore context-parameters and expects every property to be > set as an init-parameter. Well, ok. But since this behaviour is not > completely consistent with using velocity directly, I believe it > should be documented. You can use Velocity.properties with AS. Here is a piece of web.xml: <servlet> <servlet-name>LoginServlet</servlet-name> <servlet-class>org.actionframework.ActionServlet</servlet-class> <init-param> <param-name>ActionConfig</param-name> <param-value>LoginServlet.xml</param-value> </init-param> <init-param> <param-name>ActionEngine</param-name> <param-value>Velocity</param-value> </init-param> <init-param> <param-name>properties</param-name> <param-value>WEB-INF/classes/Velocity.properties</param-value> </init-param> </servlet> Path for Velocity.properties can be relative to servlet context (like above) or absolute. You are right that this is missing in the Spec - will be there in the next release - thank you! :) -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Patrick v. d. H. <pa...@vo...> - 2003-02-21 21:41:26
|
Patrick von der Hagen wrote: [...] > How can I easily pass the "usual" velocity-configuration when using > AcionServlet? Hi all, I found the problem myself: I'm used to set the velocity.properties-file as a context-param, which is no problem in using "pure" velocity and saves a little bit of typing. ActionServlet seems to ignore context-parameters and expects every property to be set as an init-parameter. Well, ok. But since this behaviour is not completely consistent with using velocity directly, I believe it should be documented. -- CU, Patrick. |
From: Patrick v. d. H. <pa...@vo...> - 2003-02-21 15:24:24
|
Hi everybody, this is probably a stupid question, but I am used to configure Velocity by using velocity.properties to configure the velocity-log-file and the path where my vm-files can be found. However, when using actionservlet, my config-file seems to be ignored, which leads to some problems and ugly workarounds. How can I easily pass the "usual" velocity-configuration when using AcionServlet? Any help would be greatly appreciated. -- CU, Patrick. |
From: Petr T. <Pet...@pi...> - 2003-02-17 10:35:46
|
> I was wondering whether someone has any thoughts about "the other"=20 > LGPLed library, MultipartHttpServletRequest > (http://sourceforge.net/projects/marsh/),=20 > which does allow file arrays. I tried several libs when I implemented the file-upload feature, but I didn't know about this one. I will take a look and if it's=20 good, I can switch AS to Marsh or allow the user to choose. Thank you for the link! -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Armando R. <ar...@ho...> - 2003-02-16 22:57:43
|
Hello, all, Most HTTP requests deal with strings and files. ActionFramework already handles arrays of strings, but its reliance on MultipartRequest File Upload Parser (1.20 - http://sourceforge.net/projects/multpartrequest/ [sic]) seems to prevent from generalizing to arrays of files. It seems that the new version, 1.30b4, doesn't address that issue yet, and I was wondering whether someone has any thoughts about "the other" LGPLed library, MultipartHttpServletRequest (http://sourceforge.net/projects/marsh/), which does allow file arrays. All the best, Armando -- Armando Ramos http://www.hola.com Spain, EU |
From: Petr T. <Pet...@pi...> - 2003-02-16 10:12:57
|
Hello, the following extras have been upgraded for use with ActionServlet 0.94. JAASModule 0.52 (http://dione.zcu.cz/~toman40/JAASModule) * JAASModule provides classes for authentication via JAAS, granting and revoking permissions for principals (users/groups) and storing these information in a database. Examples demonstrate easy usage and integration into ActionServlet framework. miniRMI Connector for ActionServlet 0.94 (http://dione.zcu.cz/~toman40/AS_miniRMI_Connector) * Allows tight integration of servlet and and applet based applications. -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-02-15 09:52:33
|
ActionServlet 0.94 (http://www.actionframework.org) Changes from 0.94beta2 ---------------------- - ActionServlet_0_94beta2.dtd -> ActionServlet_0_94.dtd - added a new Validate example Hints for upgrading from 0.93x (same as for 0.94beta and beta2) -------------------------------- - return type of ActionServlet.getProperty(...) methods changed to Object -> quick fix: change calls: servlet.getProperty(...) to servlet.getProperty(...).toString() - access moddifiers of most previously "protected" ActionServlet methods changed to "public" -> subclasses must also use "public" modifier - ActionServlet.invokeMethod() throws Exception instead of InvocationTargetException -> widen "throws" clause too - beforeInvoke(), afterInvoke(), invokeMethod(), beforeConversion(), conversionError(), getActionMethod(), unassignedAction()), onException() and onReturn() methods of ActionServlet had 'form' parameter, but now are passsed 'requestType' parameter instead and values of 'form' and 'action' parameters are concatenated by '.': 1) form="form1", action="submit" -> action="form1.submit" 2) no 'form', action="withNoForm" -> action="withNoForm" -> if you have used 'form' parameter in you overridden methods, you have to verify if your code is correct -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-01-28 19:24:43
|
> I guess i'd suggest instead something like this: > > public void destroySession(String sessionId) { > destroySession(sessionId, true); > } > > protected static final CHECK_RECURSION = true; >[...] You cannot use a static variable, because it could be shared among several ActionRuntime instances - maybe yes, maybe no - but it's not safe. I released AS 0.94beta2 with my "hack", but we may improve this solution for the next version. I think that the same mechanism AS uses for mapping sessions-to-threads would be a "clean work" :) -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-01-28 19:24:39
|
ActionServlet 0.94beta2 (http://www.actionframework.org) Highlights ---------- * bugfixes (including recently reported bugs - thank you!) * added ActionServlet.getClassLoader() - useful for custom classloading * <include-template> 'name' attribute is now evalutated as an expression * <on-exception>s may be nested also in <template> and <templates> * improvements and fixes in API documentation and Specification * examples simplified: Shop components use a new JDBC design pattern, Shop.xml reduced by 75 lines - uses new <validate>, <pre-invoke> and <include-template> elements, custom exceptions are used instead of error codes; many examples now use <on-exception> elements History ------- http://www.actionframework.org/doc/whatsnew.txt Future ------ http://www.actionframework.org/roadmap.html Hints for upgrading from 0.93x (same as for 0.94beta) ------------------------------ http://sourceforge.net/forum/forum.php?forum_id=238992 Enjoy! -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Mark D. A. <md...@di...> - 2003-01-28 10:06:18
|
hmm, well that is kind of a hack, though it looks like it would prevent the recursion. I guess i'd suggest instead something like this: public void destroySession(String sessionId) {destroySession(sessionId, true);} protected static final CHECK_RECURSION = true; public void destroySession(String sessionId, boolean invalidate_session) { HttpSession session = (HttpSession) sessions.get(sessionId); if (session = null) return; sessions.remove(sessionId); destroySessionComponents(); if (invalidate_session) { // sanity check if (CHECK_RECURSION && Util.getStackTrace(new Exception()).indexOf("SessionObject")!=-1) log.error("ack, i am my own grandpa"); else session.invalidate(); } } then in SessionObject.valueUnbound, explicitly call destroySession(event.getSession().getId(), false) -mda ----- Original Message ----- From: "Petr Toman" <Pet...@pi...> To: <act...@li...> Sent: Monday, January 27, 2003 9:27 AM Subject: Re: [Actionframework-users] severe bug in session cleanup > >> log.error("WebSphere", new Exception()); into > >> ActionRuntime.destroySession(String) method. > > > > Sorry, not very easily. I'm doing development on Jetty, and my client > > is hosting on websphere, but I don't have websphere myself. Plus I've > > already patched the version of action servlet we are running to not > > do this. websphere is really just apache underneath, except out of > > date and with ibm's own bugs thrown in. but you could likely see this > > using tomcat, and at least then you'd have source access. > > public void destroySession(String sessionId) { > HttpSession session = (HttpSession) sessions.get(sessionId); > > if (session != null) > try { > String stack = Util.getStackTrace(new Exception()); > > if (stack.indexOf("org.actionframework." + > "ActionServlet$SessionObject") == -1) > session.invalidate(); > } catch (Throwable e) {} > > destroySessionComponents(sessionId); > sessions.remove(sessionId); > } > > Ok, would you be satisfied with something like this? If so, beta2 > could be out tomorrow! :) > > -Petr > -- > [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Actionframework-users mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/actionframework-users > |