actionframework-users Mailing List for ActionFramework (Page 2)
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: <bm...@ho...> - 2003-11-24 18:53:11
|
hi. I'm trying to catch various exceptions that can be launched from any = component so I have that in the xml controller file: .... <on-exception class=3D'org.actionframework.ActionException' = show-url=3D'url'> <output-variable name=3D'url' value=3D'$SERVLET/' /> </on-exception> <on-exception = class=3D'com.hola.postales.exceptions.InvalidPostcardException' = show-url=3D'url'> <output-variable name=3D'url' value=3D'$SERVLET/' /> </on-exception> =20 =20 </components> </application> but I become the following error: Wrong order of <on-exception> classes: = 'org.actionframework.ActionException' cannot follow = 'org.actionframework.ActionException' If I have only one <on-exception> it's catched whenever it's neccesary, = but when there are more than one, it doesn't work. thx in advance. |
From: Petr T. <Pet...@pi...> - 2003-09-25 11:10:04
|
> I am wondering if there is some progress in AS development. What are the > plans? I haven't seen an update/list traffic for a long time. > > I am using current version in my project. It would be nice to have some > more things from the roadmap document implemented. The plans remain the same, but the project is delayed due to other more urgent work I have to do these days. However, the major improvement of AS 0.95 - ActionConfig interface - is almost completed, and first beta will be released as soon as this is finished - hopefully next month. Stay tuned! With apology, Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Jakub C. <bla...@cb...> - 2003-09-24 20:07:52
|
Hello! I am wondering if there is some progress in AS development. What are the plans? I haven't seen an update/list traffic for a long time. I am using current version in my project. It would be nice to have some more things from the roadmap document implemented. Best regards Jakub Cerny |
From: Petr T. <Pet...@pi...> - 2003-07-24 05:40:11
|
> I also noticed that URL params are sometimes evaluated incorrectly. > I think the best way would be to make argument evaluation "greedy" - match > as many params as possible. Please let me know if the fix below applies to your case. >> I have noticed when you've a same action name with different number of >> parameters the definition order is important. >> Example: >> 1. <action name="/entrada/" method="getRandomQuiz()"> >> 2. <action name="/entrada/$section" method="getRandomQuiz(String >> section)"> >> 3. <action name="/entrada/$section/$name" method="getQuiz(String >> section, String name)"> >> >> When you have "123 order" written all is right. But with "312 >> order" if you ask for '/entrada/section/name', ActionServlet >> invoke the second method as "/entrada/$section" action. There seems to be a bug in ActionRuntime.parseUrlParams(). Replace line 1307 (AS 0.94.2): newAction.append("/.+"); with newAction.append("/[^/]+"); and rebuild lib/ActionServlet.jar by running "ant" from AS directory. -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Jakub C. <bla...@cb...> - 2003-07-22 06:49:01
|
Hello, I also noticed that URL params are sometimes evaluated incorrectly. I think the best way would be to make argument evaluation "greedy" - matc= h as many params as possible. jakub cerny > -----Original Message----- > From: act...@li... > [mailto:act...@li...]On > Behalf Of Ra=FAl P=E9rez > Sent: Monday, July 21, 2003 7:40 PM > To: act...@li... > Subject: [Actionframework-users] Report: parameters and action's > definition order > > > Hello, > > I have noticed when you've a same action name with different number of > parameters the definition order is important. > Example: > 1. <action name=3D"/entrada/" method=3D"getRandomQuiz()"> > 2. <action name=3D"/entrada/$section" method=3D"getRandomQuiz(String > section)"> > 3. <action name=3D"/entrada/$section/$name" method=3D"getQuiz(String se= ction, > String name)"> > > When you have "123 order" written all is right. But with "312 > order" if you > ask for '/entrada/section/name', ActionServlet invoke the second method= as > "/entrada/$section" action. > > Hope it'll be useful. > > Regards, > > Raul Perez > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Actionframework-users mailing list > Act...@li... > https://lists.sourceforge.net/lists/listinfo/actionframework-users |
From: <rp...@ho...> - 2003-07-21 17:30:29
|
Hello, I have noticed when you've a same action name with different number of parameters the definition order is important. Example: 1. <action name="/entrada/" method="getRandomQuiz()"> 2. <action name="/entrada/$section" method="getRandomQuiz(String section)"> 3. <action name="/entrada/$section/$name" method="getQuiz(String section, String name)"> When you have "123 order" written all is right. But with "312 order" if you ask for '/entrada/section/name', ActionServlet invoke the second method as "/entrada/$section" action. Hope it'll be useful. Regards, Raul Perez |
From: Petr T. <Pet...@pi...> - 2003-07-08 08:59:28
|
> Is there some possibility to also catch these view-related exceptions? > Of course it is somehow possible to force Velocity to be silent, but=20 > some kind of support from the framework would be nice. To load templates, AS calls getTemplate() method, which propagaes any=20 exception wrapped inside TemplateException. An exception ocurred during template rendering is be passed to ActionServlet.error() -=20 like: as.error(context, "Velocity error", exception) - where you can handle it. =20 > I noticed similar issue was once mentioned on this list, but I am not > sure if some solution has been proposed. It was Mark's request, right? It was solved by error() method. Perhaps it would be useful to react also by <on-exception> elements. > BTW I noticed some progress in roadmap document, is there some new > release planned? I hope AS 0.95beta will be released in August. There is still a lot=20 of work on rewriting ActionRuntime, but the rest of todos shouldn't be so much trouble. -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-07-08 08:15:35
|
> I need to put the examples that he has the actionservlet in Tomcat 4.0 > to work but with the documentation that he brings the actionservlet I > was not able to.. =20 > it is possible that they send me a manual or an explanation of as makin= g > it... There is "install.txt" file under "examples" directory, which contains detailed description of the examples installation. P. Toman [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: <die...@ya...> - 2003-07-07 21:58:23
|
I need to put the examples that he has the actionservlet in Tomcat 4.0 to work but with the documentation that he brings the actionservlet I was not able to.. it is possible that they send me a manual or an explanation of as making it... --------------------------------- Do You Yahoo!? Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. |
From: Jakub C. <bla...@cb...> - 2003-07-07 21:31:06
|
Hello AS users! I have a question/feature request. If there is a Exception generated in my business logic, it is usually caught by AS and the <on-exception> directive is used. Sometimes there is an exception generated in view layer (Velocity) and I see the stack trace being flushed somewhere in the middle of output, which looks bad. Is there some possibility to also catch these view-related exceptions? Of course it is somehow possible to force Velocity to be silent, but some kind of support from the framework would be nice. I noticed similar issue was once mentioned on this list, but I am not sure if some solution has been proposed. Thanks in advance for all comments/hints. Best regards Jakub Cerny, Prague BTW I noticed some progress in roadmap document, is there some new release planned? |
From: Petr T. <Pet...@pi...> - 2003-06-06 17:23:45
|
ActionServlet 0.94.2 (http://www.actionframework.org) Changes from 0.94.1 to 0.94.2 ----------------------------- - Velocity 1.3+ is required to rebuild ActionServlet sources - application attribute named "javax.servlet.ServletContex" is set on servlet startup for Velocity 1.3+ - relative and absolute paths can be now used together with Velocity for 'file.resource.loader.path' and 'runtime.log' Velocity properties - absolute paths must start with slash ('/') or have Windows format ('C:\...'); this is a small incompatibility with previous releases! - retrieval of type handlers is now faster thanks to caching - bugfix: ActionConfig could not be loaded from unexpanded .war file - changes in examples: - removed leading slash from relative template paths in Velocity.properties Thanks everyone for comments and patches! -Petr PS: AS 0.95beta still in (slow, but certain) progress... -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-05-19 16:42:34
|
> Has anybody tried to use AS from the common/lib directory of a servlet > container and share it between webapps? I've always deployed apps with AS, but some people reported they went this way. > I know that class loading would be an issue as AS would not be able to load > the components specified in the config as these are under a different class > loader. You can specify <application repository="/home/somewhere"> or extend ActionServlet or even override ActionServlet.getClassLoader() method. -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Mark A. <ma...@pa...> - 2003-05-16 10:39:40
|
Has anybody tried to use AS from the common/lib directory of a servlet=20 container and share it between webapps? I know that class loading would be an issue as AS would not be able to lo= ad=20 the components specified in the config as these are under a different cla= ss=20 loader. Are there any other known issues with trying to do this? --=20 Regards, Mark |
From: Petr T. <Pet...@pi...> - 2003-05-16 06:24:44
|
> Therefore I propose adding the following method to=20 > org.actionframework.engines.velocity.VelocityServlet No problem. Will be in AS 0.94.2 too :) -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Mark A. <ma...@pa...> - 2003-05-15 14:42:22
|
I would like to be able to use the WebappLoader from the velocity tools=20 subproject with ActionServlet. However, this requires that=20 javax.servlet.ServletContext is set as an application attribute of veloci= ty=20 on startup. Therefore I propose adding the following method to=20 org.actionframework.engines.velocity.VelocityServlet protected void initVelocity(ServletConfig config) throws ServletException { Velocity.setApplicationAttribute("javax.servlet.ServletContext",=20 getServletContext()); super.initVelocity(config); } --=20 Regards, Mark |
From: Petr T. <Pet...@pi...> - 2003-05-15 13:35:29
|
> > 2) destroy() method of a component with "request" persistence that > implements Destroyed interface. >=20 > This is also good idea, but I have my actions bound to methods of > 'session' scoped component so I would have to create that special=20 > component from inside other component via as.getComponent() - which > seem little dirty to me. You can also create "request" component in <action>'s <post-invoke>. > I would really suggest to have something like <post-render-invoke> in > some future release. Good idea. Maybe adding some attribute to <post-invoke> would be a "softer" solution instead of introducing a new element. =20 > One more question/suggestion: It would be really nice to have some way > of accessing AS components from any class. I know that JNDI is planned, > that would be great! I was thinking about some class with static AS > component accessors, but I didn't succeed. Yes, JNDI will be a standard way to achieve this. At present, you=20 can create a class with static accessors. A simple example: public class MyServlet extends ActionServlet { private static MyServlet _self; public MyServlet() { if (_self !=3D null) throw new IllegalStateException("There seems to be " + "a problem with the servlet container's class loader"); _self =3D this; } public static Object getASComponent(...)=20 throws InstantiatorException { if (_self =3D=3D null) throw new IllegalStateException("ActionServlet was " + "not yet initialized"); return _self.getComponent(...); } } -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Petr T. <Pet...@pi...> - 2003-05-15 12:21:32
|
> For deployment purposes, we need to access Velocity templates from=20 > outside the servlet context. We have patched method=20 > 'relativizeLoaderPath' in=20 > org.actionframework.engines.velocity.VelocityServlet as follows: > [...] Good improvement, there should also be check for Windows abs. paths=20 like "C:\someapp\...". > I have had to patch two files in ActionServlet to support running from > unexpanded wars. These are used to load the velocity properties and > action config files. > I hope you find these patches suitable for inclusion. Good, I will put all patches together and prepare them for AS 0.94.2. Thank you, -Petr [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Mark A. <ma...@pa...> - 2003-05-15 11:22:04
|
Jetty supports running webapps from wars without expanding them and I wou= ld like to do this with ActionServlet. The problem is that as the war is = not expanded there is no filesystem for the webapp so all templates and property files= have to be loaded as resources or via the classpath. I have had to patch two files in ActionServlet to support running from un= expanded wars. These are used to load the velocity properties and action = config files. Details below: 1) org.actionframework.engines.velocity.VelocityServlet If loading the velocity properties file by the real path fails then we tr= y loading as a resource. (The diff below also contains the change for abs= olute log file paths noted in another thread) --- VelocityServlet.java.orig Thu May 15 11:00:35 2003 +++ VelocityServlet.java Thu May 15 12:13:11 2003 @@ -110,7 +110,14 @@ String realPath =3D getServletContext().getRealPath(= propsFile); if (realPath =3D=3D null) { - log.error("[init] " + "Cannot get real path of V= elocity properties file '" + propsFile + "'"); + // try loading as resource + InputStream resourceStream =3D getServletContext(= ).getResourceAsStream(propsFile); + if (resourceStream =3D=3D null ) { + log.error("[init] " + "Cannot get Velocity p= roperties file as resource"); + } else { + p.load(resourceStream); + log.info("[init] " + "Property file loaded a= s resource"); + } } else { p.load(new FileInputStream(realPath)); log.info("[init] " + "Property file '" + realPat= h + "' loaded"); @@ -122,7 +129,7 @@ if (logFile =3D=3D null) logClass =3D VelocityServletLog.class; else { - String realLogFile =3D getServletContext().getRealPath(l= ogFile); + String realLogFile =3D (logFile.charAt(0)=3D=3D'/') ? lo= gFile : getServletContext().getRealPath(logFile); if (realLogFile =3D=3D null) { log.error("[init] " + "Cannot get real path of log f= ile '" + logFile + "'"); @@ -280,4 +287,4 @@ super.error(request, response, cause); } } -} \ No newline at end of file +} 2) org.actionframework.runtime.ActionRuntime When running from a war file the url returned by servlet.getClass().getRe= source("/" + configFilename) is a jar url and trying to use a FileInputSt= ream on this causes a FileNotFoundException. The patch checks the protocol and, if it = is jar, gets the InputStream from the URL directly. --- ActionRuntime.java.orig Sun Apr 20 10:26:10 2003 +++ ActionRuntime.java Thu May 15 11:00:06 2003 @@ -479,10 +479,15 @@ "' loaded via servlet realpath from " += realPath); } } else { + if (url.getProtocol().equals("jar")) { + in =3D url.openStream(); + log.info("[init] " + "ActionConfig '" + configF= ilename + "' loaded as resource from " = + url); + } else { actionConfigFile =3D new File(url.getFile()); in =3D new FileInputStream(actionConfigFile); log.info("[init] " + "ActionConfig '" + configFilen= ame + "' loaded as resource from " + url.getFile()); + } } } actionConfigFileTimestamp =3D actionConfigFile.lastModified(= ); @@ -1981,4 +1986,4 @@ return component; } -} \ No newline at end of file +} I hope you find these patches suitable for inclusion. --=20 Regards, Mark |
From: Jakub C. <bla...@cb...> - 2003-05-15 10:45:56
|
> I think you can put the db cleanup code into: > 1) overriden requestCleanup() method of ActionServlet, This looks OK, I will try to go this way. > 2) destroy() method of a component with "request" persistence that implements Destroyed interface. This is also good idea, but I have my actions bound to methods of 'session' scoped component so I would have to create that special component from inside other component via as.getComponent() - which seem little dirty to me. I would really suggest to have something like <post-render-invoke> in some future release. ---------------------------------------------------------------------------- --------------------------------- <dreaming> One more question/suggestion: It would be really nice to have some way of accessing AS components from any class. I know that JNDI is planned, that would be great! I was thinking about some class with static AS component accessors, but I didn't succeed. Imagine this: You have AS component "PersistenceManager" with session scope. This component has all the DB specific stuff in it. Then you create your datamodel classes according to ActiveRecord pattern, so you have methods like person.persist() person.delete() etc. And you can implement these methods (in common BaseClass!) like: void persist() { pm = somehowGetASComponent("PersistenceManager"); pm.save(this); } It seems to me that now the only way is to pass AS to all classes in constructor which looks quite ugly... </dreaming> Many greetings to you all! Jakub Cerny |
From: Mark A. <ma...@pa...> - 2003-05-15 09:48:47
|
I would also like this same fix applied to setting the path for the veloc= ity=20 log file so that can also be outwith the context. --=20 Regards, Mark |
From: Armando R. <ar...@ho...> - 2003-05-15 08:26:43
|
Petr, all, For deployment purposes, we need to access Velocity templates from outside the servlet context. We have patched method 'relativizeLoaderPath' in org.actionframework.engines.velocity.VelocityServlet as follows: 74c74,76 < String realPath = getServletContext().getRealPath(token); --- > String realPath = (token.charAt(0)=='/') > ? token > : getServletContext().getRealPath(token); It will leave unchanged the absolute paths in velocity.properties. I hope you find it acceptable for next revision. Best regards, Armando -- Armando Ramos http://www.hola.com |
From: Petr T. <Pet...@pi...> - 2003-05-15 07:32:14
|
> So I am asking. Is there an elegant solution to call method after the > view is rendered? I know that <template> can include <invoke> but this=20 > is called before rendering. I think you can put the db cleanup code into: 1) overriden requestCleanup() method of ActionServlet, 2) destroy() method of a component with "request" persistence=20 that implements Destroyed interface. Does this fit your needs? P. Toman [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=3D22957959 ] |
From: Jakub C. <bla...@cb...> - 2003-05-14 15:58:26
|
Hello AS users! In my project I am using O/R mapping tool (Hibernate). I am trying to use "long sessions" which means I keep the Hibernate session stored inside AS component with 'session' persistence. This is working fine but I want to disconnect from DB after each request and reconnect before the next one (for better scalability). So I created: <pre-invoke>connect to DB</pre-invoke> and <post-invoke>disconnect from DB</post-invoke> This is OK but the problem is, that connection is closed BEFORE the view is rendered. Hibernate uses so-called LAZY INIT, which means, that id doesn't load whole object hierarchy at once, but lazily when children objects are needed. And this exactly happens here. I call loadFamily() in action method and the template then uses $family.getKids() etc.... But these calls need the DB connection to be alive. So I am asking. Is there an elegant solution to call method after the view is rendered? I know that <template> can include <invoke> but this is called before rendering. Thanks in advance for your ideas. Greetings Jakub Cerny |
From: Petr T. <Pet...@pi...> - 2003-04-21 06:34:48
|
ActionServlet 0.94.1 (http://www.actionframework.org) Changes from 0.94 to 0.94.1 --------------------------- - bugfix: <input-variable> with false 'if' condition overrided value with null - bugfix: <input-variable> direct 'value' now recognizes all number types - bugfix: standard type handlers now deal with widening conversions from wrapper classes to primitive types (Byte -> short etc.) - bugfix: ActionConfig with no <components> caused NullPointerException - added note about Velocity.properties to the Specification Thanks again everyone for bug reports! :) -Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |
From: Armando R. <ar...@ho...> - 2003-04-16 12:59:06
|
Petr, > It should work now. Did you apply the fix I have sent here recently? I did, but I will double-check and report back. Best regards, Armando -- Armando Ramos http://www.hola.com |