Re: Making Struts Build Easier (Re: coming out for JSF + Struts, was: Struts JSR?)
On Mar 24, 2004, at 4:19 AM, Ted Husted wrote: Next question. In making changes like this, at what point do we start breaking the CVS history? I'd definitely want to keep it all for core and taglibs. The other components might be less important. ** Last but not least: What else do we need to do for 1.2.1 ? -- Just the three problem tickets on the bugzilla list now? Personally, I'd like to see a 1.2 release before any CVS changes are made. I think the user community would agree. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Making Struts Build Easier (Re: coming out for JSF + Struts, was: Struts JSR?)
-Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Personally, I'd like to see a 1.2 release before any CVS changes are made. I think the user community would agree. Well, did-ja have anything to add to the list, Matt? :) Nope - release, release!! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Separate Tiles From Struts?
Anyone care to educate me on why Tiles is part of Struts (and not commons-tiles?). I'd like to respond to the following post (contents pasted below) with an educated reply. https://sourceforge.net/forum/message.php?msg_id=2488961 snip On the occasion: Do you happen to know why Tiles was integrated into the Struts codebase as of Struts 1.1, rather than kept as separate component with Struts integration? I've been wondering about this for quite a while... Tiles isn't really tied to Struts in a technical manner, as we see in our usage with Spring. So why is every other piece of reusable logic a Commons component but not Tiles? I'd really like to see Tiles being factored out of the Struts codebase again, possibly before the Struts 2.0 timeframe. /snip Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Separate Tiles From Struts?
On Mar 23, 2004, at 5:23 PM, Ted Husted wrote: At first, there was talk of bringing it to Taglibs. Cedric and David Geary chatted about that for a bit, but the conversation trailed off, and we just plunged ahead with 1.1. It could certainly be abstracted and brought to the Commons, like the Validator, if someone had the itch. :) Are you volunteering? Any idea on what kind of effort this would involve? It seems like it would be simple enough, but you never know... ;-) -Ted. On Tue, 23 Mar 2004 16:02:28 -0700, Matt Raible wrote: Anyone care to educate me on why Tiles is part of Struts (and not commons-tiles?). I'd like to respond to the following post (contents pasted below) with an educated reply. https://sourceforge.net/forum/message.php?msg_id=2488961 snip On the occasion: Do you happen to know why Tiles was integrated into the Struts codebase as of Struts 1.1, rather than kept as separate component with Struts integration? I've been wondering about this for quite a while... Tiles isn't really tied to Struts in a technical manner, as we see in our usage with Spring. So why is every other piece of reusable logic a Commons component but not Tiles? I'd really like to see Tiles being factored out of the Struts codebase again, possibly before the Struts 2.0 timeframe. /snip Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: coming out for JSF + Struts, was: Struts JSR?
On Mar 22, 2004, at 6:13 AM, Ted Husted wrote: My point is that this type of prognostication doesn't help Struts in any way that matters. What helps is people rolling up their sleeves and doing the work. Given the vast numbers of developers using Struts, I'm constantly astonished at how hard it is to find more people willing and able to do the work. For me, the main discouraging thing about contributing to the development of Struts has been the build process. In the past, you had to download all of jakarta-commons and spend a day or two figuring out how to get that to build. Recently, I tried to build Struts and was successful using the Maven stuff. Personally, I don't mind using Maven, but I don't know that it should be *required* to build a project from scratch. I'd love to be able to cvs co Struts, navigate to jakarta-struts and type ant jar. I realize this is no easy thing to accomplish with a build file - but it has been the most discouraging factor for me. ;-) Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Struts Build Easier (Re: coming out for JSF + Struts, was: Struts JSR?)
On Mar 22, 2004, at 7:28 AM, Joe Germuska wrote: For me, the main discouraging thing about contributing to the development of Struts has been the build process. In the past, you had to download all of jakarta-commons and spend a day or two figuring out how to get that to build. Recently, I tried to build Struts and was successful using the Maven stuff. Personally, I don't mind using Maven, but I don't know that it should be *required* to build a project from scratch. I'd love to be able to cvs co Struts, navigate to jakarta-struts and type ant jar. I realize this is no easy thing to accomplish with a build file - but it has been the most discouraging factor for me. ;-) The only way we could accomplish something like that with a build file would be by including JARs in CVS, and if you ask me, there are enough reasons why that's a bad idea that I prefer the way it is, even though I'd very much like to see people feel more comfortable getting in and working on Struts source code. Right. I include my JARs in CVS and I've been doing it for quite some time with no issues. To be honest, there doesn't seem to be much difference in storing them in CVS vs. uploading them to a Maven repository. For me, it's often seemed easier to stick them in CVS. Of course, if I had managed to convert AppFuse to use Maven - maybe I wouldn't be so bitter. ;-) I do like to be able to checkout my CVS-based project and disconnect and compile later though. No internet dependency is a good thing. When you say I don't know that [Maven] should be *required*... is your point that Ant is a widely accepted Java tool, while Maven has yet to cut a 1.0 release? That's fair -- just want to make sure I understand you. That's part of it - as well as Ant is easier to understand IMO. I use Maven on a couple projects, but I definitely prefer Ant - mainly b/c I have an Ant build.xml file that I use on all my projects. The build.xml file generated by 'maven ant' uses the ant 'get' task and the Maven iBiblio repository to download dependencies; we could perhaps look at copying some of that into our ant script to reduce build.properties to being more about configuration stuff and less about dependency stuff. Whatever it takes to make Struts easier to build. I guarantee that if you can build Struts with an ANT_HOME (or MAVEN_HOME) and JAVA_HOME set - and that's it - you'll get a lot more contributions. My $.02. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validating Two Fields - how to do in 1.2?
My popular validate-two-fields howto seems to be broke with the Struts nightly (20031202) build I'm using. The following (which works w/ Struts 1.1) throws a NPE at the first errors.add(): public static boolean validateTwoFields(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { String value = ValidatorUtils.getValueAsString(bean, field.getProperty()); String sProperty2 = field.getVarValue(secondProperty); String value2 = ValidatorUtils.getValueAsString(bean, sProperty2); if (!GenericValidator.isBlankOrNull(value)) { try { if (!value.equals(value2)) { errors.add(field.getKey(), // NPE THROWN HERE Resources.getActionError(request, va, field)); return false; } } catch (Exception e) { errors.add(field.getKey(), Resources.getActionError(request, va, field)); return false; } } return true; } I tried adding if (errors == null) errors = new ActionErrors();, then everything works fine, but getActionError is deprecated. So how do I upgrade this to 1.2? Looking at the example (code below) in the docs (http://jakarta.apache.org/struts/userGuide/dev_validator.html), there signature of this method has changed slightly, adding ServletContext application. Also, the Resources.getActionError isn't valid and and errors.add(String, ActionError) is deprecated. Any ideas? I'll try upgrading to a newer build - but I wanted to get this archived since folks will experience it migrating from 1.1 to 1.2. Matt public static boolean validateTwoFields( Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request, ServletContext application) { String value = ValidatorUtils.getValueAsString( bean, field.getProperty()); String sProperty2 = field.getVarValue(secondProperty); String value2 = ValidatorUtils.getValueAsString( bean, sProperty2); if (!GenericValidator.isBlankOrNull(value)) { try { if (!value.equals(value2)) { errors.add(field.getKey(), Resources.getActionError( application, request, va, field)); return false; } } catch (Exception e) { errors.add(field.getKey(), Resources.getActionError( application, request, va, field)); return false; } } return true; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making Struts Build Easier (Re: coming out for JSF + Struts, was: Struts JSR?)
On Mar 22, 2004, at 11:28 AM, Ted Husted wrote: On Mon, 22 Mar 2004 09:53:02 -0800, Craig R. McClanahan wrote: Yep ... that's why we need to finish the how many repositories discussion so we can start migrating towards something that is simpler. I continue to think that the easiest thing in the long run will be a module for each product. Where a product is equivalent to a Maven artifact or a deliverable with its own release cycle. So, if infrastructure doesn't care, and we can centralize the permissions, I'd like to go back to something like * core (including tiles and validator) * examples * site * whiteboard (or sandbox) * opt-taglib * opt-el * opt-faces -Ted. While it's great to break out things into separate modules - I'd love to be able to get struts.jar w/ everything in it - including EL and tags. I can live with all the commons-* JARs (even if it is annoying), but in general - the less JARs, the better. It just simplifies things for the developer. I don't care how things are partitioned in CVS, as long as everything builds with one checkout and one command. My $0.02. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validating Two Fields - how to do in 1.2?
Nevermind - changing everything to ActionMessages solved it. Should've known. Below are the files I had to change - hopefully this helps folks in the future. I'll update my site when 1.2 is released. When's that going to happen - August? ;-) http://tinyurl.com/3x4nw http://tinyurl.com/2rm65 Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 9:36 AM To: [EMAIL PROTECTED] Subject: Validating Two Fields - how to do in 1.2? My popular validate-two-fields howto seems to be broke with the Struts nightly (20031202) build I'm using. The following (which works w/ Struts 1.1) throws a NPE at the first errors.add(): public static boolean validateTwoFields(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { String value = ValidatorUtils.getValueAsString(bean, field.getProperty()); String sProperty2 = field.getVarValue(secondProperty); String value2 = ValidatorUtils.getValueAsString(bean, sProperty2); if (!GenericValidator.isBlankOrNull(value)) { try { if (!value.equals(value2)) { errors.add(field.getKey(), // NPE THROWN HERE Resources.getActionError(request, va, field)); return false; } } catch (Exception e) { errors.add(field.getKey(), Resources.getActionError(request, va, field)); return false; } } return true; } I tried adding if (errors == null) errors = new ActionErrors();, then everything works fine, but getActionError is deprecated. So how do I upgrade this to 1.2? Looking at the example (code below) in the docs (http://jakarta.apache.org/struts/userGuide/dev_validator.html ), there signature of this method has changed slightly, adding ServletContext application. Also, the Resources.getActionError isn't valid and and errors.add(String, ActionError) is deprecated. Any ideas? I'll try upgrading to a newer build - but I wanted to get this archived since folks will experience it migrating from 1.1 to 1.2. Matt public static boolean validateTwoFields( Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request, ServletContext application) { String value = ValidatorUtils.getValueAsString( bean, field.getProperty()); String sProperty2 = field.getVarValue(secondProperty); String value2 = ValidatorUtils.getValueAsString( bean, sProperty2); if (!GenericValidator.isBlankOrNull(value)) { try { if (!value.equals(value2)) { errors.add(field.getKey(), Resources.getActionError( application, request, va, field)); return false; } } catch (Exception e) { errors.add(field.getKey(), Resources.getActionError( application, request, va, field)); return false; } } return true; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation working, but not stopping action from processing
I'm using the 1.2.0 test build on Windows XP. I have the following XDoclet-generated action-mapping: action path=/savePerson type=org.appfuse.webapp.action.PersonAction name=personForm scope=request input=validationFailed parameter=action unknown=false validate=true forward name=validationFailed path=/editPerson.do redirect=false / forward name=edit path=.personDetail redirect=false / /action When I click on a button to save my form, the validation kicks in - but it let's my Action continue to execute. I thought that any validation errors were supposed to call mapping.getInputForward()? Is that correct? I'm stumped. Here's my save() method: public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (log.isDebugEnabled()) { log.debug(Entering 'save' method); } // Extract attributes and parameters we will need ActionMessages messages = getMessages(request); PersonForm personForm = (PersonForm) form; boolean isNew = (.equals(personForm.getId())); if (log.isDebugEnabled()) { log.debug(saving person: + personForm); } // Exceptions are caught by ActionExceptionHandler PersonManager mgr = (PersonManager) getBean(personManager); personForm = (PersonForm) mgr.savePerson(personForm); // add success messages if (isNew) { messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(person.added, personForm.getFirstName() + + personForm.getLastName())); request.getSession().setAttribute(Globals.MESSAGE_KEY, messages); return mapping.findForward(mainMenu); } else { messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(person.updated, personForm.getFirstName() + + personForm.getLastName())); saveMessages(request, messages); return mapping.findForward(edit); } } The validation routes the user back to the form, but it also calles mgr.savePerson and puts the message in the requestion. So on my page, I end up with the following messages: 'First Name' is a required field. 'Last Name' is a required field. Information for has been updated successfully. Hopefully I'm just banging my head against the wall and it's something simple... Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation working, but not stopping action from processing
It's one of those days... As soon as I send something to this list, I figure it out. The problem was my validationFailed forward was not resetting the action parameter for my dispatch action and it was hitting save even when it failed. I change the input attribute to edit (removing the validationFailed forward) and it solved my problem. If you're reading these - thanks for putting up with me. ;0) Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Saturday, February 28, 2004 1:56 PM To: '[EMAIL PROTECTED]' Subject: Validation working, but not stopping action from processing I'm using the 1.2.0 test build on Windows XP. I have the following XDoclet-generated action-mapping: action path=/savePerson type=org.appfuse.webapp.action.PersonAction name=personForm scope=request input=validationFailed parameter=action unknown=false validate=true forward name=validationFailed path=/editPerson.do redirect=false / forward name=edit path=.personDetail redirect=false / /action When I click on a button to save my form, the validation kicks in - but it let's my Action continue to execute. I thought that any validation errors were supposed to call mapping.getInputForward()? Is that correct? I'm stumped. Here's my save() method: public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (log.isDebugEnabled()) { log.debug(Entering 'save' method); } // Extract attributes and parameters we will need ActionMessages messages = getMessages(request); PersonForm personForm = (PersonForm) form; boolean isNew = (.equals(personForm.getId())); if (log.isDebugEnabled()) { log.debug(saving person: + personForm); } // Exceptions are caught by ActionExceptionHandler PersonManager mgr = (PersonManager) getBean(personManager); personForm = (PersonForm) mgr.savePerson(personForm); // add success messages if (isNew) { messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(person.added, personForm.getFirstName() + + personForm.getLastName())); request.getSession().setAttribute(Globals.MESSAGE_KEY, messages); return mapping.findForward(mainMenu); } else { messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(person.updated, personForm.getFirstName() + + personForm.getLastName())); saveMessages(request, messages); return mapping.findForward(edit); } } The validation routes the user back to the form, but it also calles mgr.savePerson and puts the message in the requestion. So on my page, I end up with the following messages: 'First Name' is a required field. 'Last Name' is a required field. Information for has been updated successfully. Hopefully I'm just banging my head against the wall and it's something simple... Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deprecation on tiles.ControllerSupport
FYI... no response expected. I'm getting the following deprecation error with 1.2.0 when using JDK 1.5.0 Beta 1: [javac] C:\Source\appfuse\src\web\org\appfuse\webapp\action\UserCounterControlle r.java:26: warni ng: [deprecation] perform(org.apache.struts.tiles.ComponentContext,javax.servlet.http.Http ServletReq uest,javax.servlet.http.HttpServletResponse,javax.servlet.ServletContext ) in org.apache.struts.tiles .Controller has been deprecated [javac] public class UserCounterController extends ControllerSupport { In UserCounterController.java, I have: public void execute(ComponentContext tilesContext, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws Exception { // Get the number of current users from the application's context String userCounter = (String) servletContext.getAttribute(UserCounterListener.COUNT_KEY); // Add this number to the request for display request.setAttribute(UserCounterListener.COUNT_KEY, userCounter); } When using JDK 1.4.2, everything compiles w/o deprecation errors. I'm using Windows XP. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 1.2.0 uploaded - Take 2
I'm assuming it's at the same location since the el is in the download (the file dates from Apache are the same as last nights upload). All my tests pass! Matt -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 12:25 AM To: Struts Developers List Subject: 1.2.0 uploaded - Take 2 I've just finished uploading a new build that includes Struts-EL. (And none too soon, given the huge thunderstorm going on here right now...) It's in the same location as before, listed below. Again, I'd appreciate it if someone could verify the integrity of the files, and let me know if they're OK. Hopefully, this one will be OK and I can go ahead and announce it to both lists. -- Martin Cooper On Wed, 25 Feb 2004, Martin Cooper wrote: On Sun, 22 Feb 2004, Martin Cooper wrote: The release is built, but I have a couple of problems. 1) My ISP has gone flaky on me, and I haven't been able to upload it to minotaur. They claim the problems should be fixed tomorrow, so hopefully I'll be able to upload it then. The release is now, finally, on minotaur. You can find it here: http://www.apache.org/~martinc/struts/ Before I send out an announcement message, I would really appreciate it if someone could verify the integrity of the files (e.g. by checking the sigs against the files themselves), since I had so much trouble uploading them. random-spout As a result of this debacle, I have a new-found intense dislike of my ISP and a new-found respect for Linux. My ISP supports only Windows, and has been unable to resolve my problems in uploading large files using Windows, even though it is abundantly clear that the problem is on their end. Eventually, I solved the problem by transferring the files to a separate box that runs SuSE Linux (Thanks, Arron!), and uploading the files from there using scp. My ISP does not support Linux at all, yet scp on Linux recovered from the network stalls that caused Windows to lock up. So it seems that networking is more reliable, with my ISP, using unsupported operating systems than using supported operating systems... /random-spout -- Martin Cooper 2) Some of the exercise-taglibs tests are failing: 2a) bean:include fails because it is trying to include welcome.html, but there is no such file. 2b) html:img fails because there are no images in the struts-examples web app at all. 2c) html:messages fails with a lot of nulls in the test table. It looks like all of these are probably issues with the test app itself, rather than the tags, so I'm not overly concerned, and suspect we probably should go ahead with 1.2.0 anyway, especially since we're not claiming it's a final release. Once I get the build uploaded, I'll ask other folks to take it for a spin before sending out an announcement. Actually, with this new release strategy, where should the announcement message go, since it's not a Final release? The same lists, or a subset? Thoughts? -- Martin Cooper On Sun, 22 Feb 2004, Martin Cooper wrote: Please hold off on all checkins until the release is done. Thanks. -- Martin Cooper -- --- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 1.2.0 uploaded (Re: 1.2.0 is tagged and frozen)
The first thing I noticed is that struts-el is missing from the download. I used the one I had from a nightly build in December and it didn't seem to cause conflicts. I tried 1.2.0 in AppFuse and all tests pass! Nice work gents. I didn't even have to modify any files - my last Struts update was December 2, 2003. Matt -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 1:39 AM To: Struts Developers List Subject: 1.2.0 uploaded (Re: 1.2.0 is tagged and frozen) On Sun, 22 Feb 2004, Martin Cooper wrote: The release is built, but I have a couple of problems. 1) My ISP has gone flaky on me, and I haven't been able to upload it to minotaur. They claim the problems should be fixed tomorrow, so hopefully I'll be able to upload it then. The release is now, finally, on minotaur. You can find it here: http://www.apache.org/~martinc/struts/ Before I send out an announcement message, I would really appreciate it if someone could verify the integrity of the files (e.g. by checking the sigs against the files themselves), since I had so much trouble uploading them. random-spout As a result of this debacle, I have a new-found intense dislike of my ISP and a new-found respect for Linux. My ISP supports only Windows, and has been unable to resolve my problems in uploading large files using Windows, even though it is abundantly clear that the problem is on their end. Eventually, I solved the problem by transferring the files to a separate box that runs SuSE Linux (Thanks, Arron!), and uploading the files from there using scp. My ISP does not support Linux at all, yet scp on Linux recovered from the network stalls that caused Windows to lock up. So it seems that networking is more reliable, with my ISP, using unsupported operating systems than using supported operating systems... /random-spout -- Martin Cooper 2) Some of the exercise-taglibs tests are failing: 2a) bean:include fails because it is trying to include welcome.html, but there is no such file. 2b) html:img fails because there are no images in the struts-examples web app at all. 2c) html:messages fails with a lot of nulls in the test table. It looks like all of these are probably issues with the test app itself, rather than the tags, so I'm not overly concerned, and suspect we probably should go ahead with 1.2.0 anyway, especially since we're not claiming it's a final release. Once I get the build uploaded, I'll ask other folks to take it for a spin before sending out an announcement. Actually, with this new release strategy, where should the announcement message go, since it's not a Final release? The same lists, or a subset? Thoughts? -- Martin Cooper On Sun, 22 Feb 2004, Martin Cooper wrote: Please hold off on all checkins until the release is done. Thanks. -- Martin Cooper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionExceptionHandler doesn't work with Nightly Build (does with 1.1)
I have an ActionExceptionHandler (see code below) that works fine with Struts 1.1, but bombs with a nightly build (Nov. 20th). With Struts 1.1, I get an error on on my input page that reads: The process did not complete. Details should follow. No row with the given identifier exists: 3, of class: org.appfuse.persistence.Resume With the nightly build I get: The process did not complete. Details should follow. javax.servlet.ServletException at org.apache.struts.action.RequestProcessor.processException(RequestProces sor.java:552) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr ocessor.java:451) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 264) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1176) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:454) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.appfuse.webapp.filter.ActionFilter.doFilter(ActionFilter.java:178) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.appfuse.webapp.filter.CompressionFilter.doFilter(CompressionFilter.j ava:80) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:553) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78 1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:666) at java.lang.Thread.run(Thread.java:534) Here is the code for my ActionExceptionHandler which is mapped as follows: exception type=java.lang.Exception key=errors.general handler=org.appfuse.webapp.action.ActionExceptionHandler/ public final class ActionExceptionHandler extends ExceptionHandler { private Log log =
RE: ActionExceptionHandler doesn't work with Nightly Build (does with 1.1)
The strange part about this whole thing is that my logs looks the same, but the UI doesn't forward to the inputForward like it used to. Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 9:50 AM To: [EMAIL PROTECTED] Subject: ActionExceptionHandler doesn't work with Nightly Build (does with 1.1) I have an ActionExceptionHandler (see code below) that works fine with Struts 1.1, but bombs with a nightly build (Nov. 20th). With Struts 1.1, I get an error on on my input page that reads: The process did not complete. Details should follow. No row with the given identifier exists: 3, of class: org.appfuse.persistence.Resume With the nightly build I get: The process did not complete. Details should follow. javax.servlet.ServletException at org.apache.struts.action.RequestProcessor.processException(Req uestProces sor.java:552) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestPr ocessor.java:451) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java: 264) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1176) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:454) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.appfuse.webapp.filter.ActionFilter.doFilter(ActionFilter.java:178) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.appfuse.webapp.filter.CompressionFilter.doFilter(Compressi onFilter.j ava:80) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut henticator Base.java:553) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:241 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve. java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter. java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:78 1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.processC onnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt
RE: ActionExceptionHandler doesn't work with Nightly Build (does with 1.1) [solved]
Nevermind, I should have known - ActionErrors vs. ActionMessages. Changing this: ActionErrors errors = (ActionMessages) request.getAttribute(Globals.ERROR_KEY); if (errors == null) { errors = new ActionErrors(); } To this: ActionMessages errors = (ActionMessages) request.getAttribute(Globals.ERROR_KEY); if (errors == null) { errors = new ActionMessages(); } Fixed the problem. Since there were no deprecation warnings - I figured it should work the same. Silly me. Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 2:33 PM To: 'Struts Developers List' Subject: RE: ActionExceptionHandler doesn't work with Nightly Build (does with 1.1) The strange part about this whole thing is that my logs looks the same, but the UI doesn't forward to the inputForward like it used to. Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 9:50 AM To: [EMAIL PROTECTED] Subject: ActionExceptionHandler doesn't work with Nightly Build (does with 1.1) I have an ActionExceptionHandler (see code below) that works fine with Struts 1.1, but bombs with a nightly build (Nov. 20th). With Struts 1.1, I get an error on on my input page that reads: The process did not complete. Details should follow. No row with the given identifier exists: 3, of class: org.appfuse.persistence.Resume With the nightly build I get: The process did not complete. Details should follow. javax.servlet.ServletException at org.apache.struts.action.RequestProcessor.processException(Req uestProces sor.java:552) at org.apache.struts.action.RequestProcessor.processActionPerform (RequestPr ocessor.java:451) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java: 264) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1176) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:454) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.appfuse.webapp.filter.ActionFilter.doFilter(ActionFilter.java:178) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.appfuse.webapp.filter.CompressionFilter.doFilter(Compressi onFilter.j ava:80) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Applica tionFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut henticator Base.java:553) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:241 7) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherVa lve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java :172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.i nvokeNext(StandardPipeline.java:641
Upgrading from 1.1 to Nightly Build
I upgraded from 1.1 to last night's build and discovered a whole bunch of steps needed to upgrade. http://tinyurl.com/rmai I ended up with 3 issues in the end. They are as follows: 1. org.apache.struts.tiles.Controller requires you to implement both execute and perform - even though perform is deprecated. 2. org.apache.lang.math.NumberUtils.stringToInt(String) has been deprecated according to the compiler. Not according to its javadocs (http://tinyurl.com/rmci) 3. ValidatorForm.getFieldMap() is deprecated, and there's no signs that a replacement exists. [javac] /Users/mraible/dev/appfuse/src/web/org/appfuse/webapp/action/ UserCounterController.java: 53: warning: perform(org.apache.struts.tiles.ComponentContext,javax.servlet.http.Http ServletRequest, javax.servlet.http.HttpServletResponse,javax.servlet.ServletContext) in org.apache.struts.tiles.Cont roller has been deprecated [javac] public void perform(ComponentContext tilesContext, [javac] ^ [javac] /Users/mraible/dev/appfuse/src/web/org/appfuse/webapp/filter/ BreadCrumbFilter.java:182: warning: stringToInt(java.lang.String) in org.apache.commons.lang.math.NumberUtils has been deprecat ed [javac] int mSS = NumberUtils.stringToInt(temp); [javac] ^ [javac] /Users/mraible/dev/appfuse/src/web/org/appfuse/webapp/taglib/ LabelTag.java:71: warning: getFieldMap() in org.apache.commons.validator.Form has been deprecated [javac] Field field = (Field) form.getFieldMap().get(fieldName); [javac] ^ [javac] 3 warnings Any help is appreciated. Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Upgrading from 1.1 to Nightly Build
Thanks Steve - all your solutions worked!. Thanks, Matt On Monday, October 20, 2003, at 12:52 PM, Steve Raeburn wrote: -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: October 20, 2003 10:35 AM To: [EMAIL PROTECTED] Subject: Upgrading from 1.1 to Nightly Build I upgraded from 1.1 to last night's build and discovered a whole bunch of steps needed to upgrade. http://tinyurl.com/rmai I ended up with 3 issues in the end. They are as follows: 1. org.apache.struts.tiles.Controller requires you to implement both execute and perform - even though perform is deprecated. That's because it's an interface and you *have* to implement the interface methods. Can you not just extend ControllerSupport? It implements both methods but the default behaviour for perform is just to call execute, saving you the need to implement it yourself. (This is the same way that Action was modified). 2. org.apache.lang.math.NumberUtils.stringToInt(String) has been deprecated according to the compiler. Not according to its javadocs (http://tinyurl.com/rmci) The JavaDoc on the website doesn't neccessarily reflect the latest source. The CVS version has it deprecated: * @deprecated Use [EMAIL PROTECTED] #toInt(String)} * This method will be removed in Commons Lang 3.0 */ public static int stringToInt(String str) { return toInt(str); } 3. ValidatorForm.getFieldMap() is deprecated, and there's no signs that a replacement exists. Again, the online Javadoc may not reflect the latest source. From CVS version: /** * The codeField/codes are returned as an unmodifiable codeMap/code. * @deprecated Use containsField(String) and getField(String) instead. */ public Map getFieldMap() { return Collections.unmodifiableMap(hFields); } HTH Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSF Example - Commons Logging
Interesting ... did you find that to be true with the standard Struts examples as well? Nope, they seem to work fine. I am using 1.1 RC1 in my app and it works fine. Then again, I'm not using a ServletContextListener in my app. The stack trace below is from the first use of logging in the ServletContextListener in the struts-faces library, which would probably be the first use of logging in the webapp. I'd expect the same sort of problem from a standard Struts app that used a ServletContextListener which did logging. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Struts-JavaServer Faces Integration Library -- Early Access Version Now Available
Very Cool! But... You don't have permission to access /builds/jakarta-struts/nightly/struts-faces/jakarta-struts-faces-20030306.zip on this server. Apache/2.1.0-dev (Unix) SVN/0.16.1 (dev build) DAV/2 Server at cvs.apache.org Port 80 I'm happy to announce the immediate availability of an integration library that allows you to use the recently published EA3 release of JavaServer Faces http://java.sun.com/j2ee/javaserverfaces/ with a recent Struts build (nightly build 20030216 or later, or the upcoming 1.1- rc2 or final release). Nightly builds of this package are available at: http://jakarta.apache.org/builds/jakarta-struts/nightly/struts-faces/ The sources for this package are in the contrib/struts-faces subdirectory of the jakarta-struts CVS repository. You should take note of the following important points: * The design goal of this library was to allow Struts application developers to migrate the view tier of their applications from the existing Struts tags, to pages that use corresponding JavaServer Faces component tags, with no changes to the corresponding business logic. This goal has been substantially achieved for simple applications so far; additional work will be necessary for more advanced apps. As a proof of concept, the JavaServer Faces based version of the canonical struts-example web application is included in the distribution, so that you can see for yourself how little had to be changed. * The integration library has been tested under Tomcat 4.1.18 and the Java Web Services Developer Pack (version 1.0_01), although in principle it should run on any Servlet 2.3/JSP 1.2 container. (It will not run on Servlet 2.2/JSP 1.1 containers). * There is a known issue when trying to run JavaServer Faces EA3 under the recently released Java Web Services Developer Pack (version 1.1). Watch the JavaServer Faces web page (at the URL listed above) for up-to-date information on workarounds. * The JavaServer Faces distribution is an EA release, not suitable for use in production environments. In addition, the license terms under which it can be downloaded prohibit redistribution. Therefore, you will need to download your own copy of JavaServer Faces EA3 and integrate it with the example application before it can be deployed. * The integration library should also be considered to be of alpha quality, not suitable for production use. There are a set of known issues and limitations at the bottom of the README.txt file. Please file bugs against this package in the usual Bugzilla location: http://nagoya.apache.org/bugzilla/ * For generic questions about JavaServer Faces (i.e. not related to this integration library), your best resource is the JavaServer Faces forum (free registration required) at: http://forum.java.sun.com/forum.jsp?forum=427 See the README.txt file in the top-level subdirectory for more information about installing and using this release. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Matt Raible, Raible Designs, Morrison CO US -- Tel: +1 303 979-5340 -- Mob: +1 720 560-8460 -- Fax: +1 508 256-6471 -- Web: http://www.raibledesigns.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Struts-JavaServer Faces [installation error]
I installed struts-faces as recommended and found that I had to remove commons-logging.jar from WEB-INF/lib when running on the following platform: Tomcat 4.1.18 JDK 1.4.1_01 Windows 2000 SP3 Here's the stack trace from the startup: 2003-03-06 22:35:27 StandardContext[/struts-faces]: Error configuring application listener of class org.apache.struts.faces.taglib.LifecycleListener java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:306) at java.lang.Class.newInstance(Class.java:259) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3237) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3598) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257) at org.apache.catalina.core.StandardHost.install(StandardHost.java:772) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:569) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:411) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2189) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:568) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:292) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:265) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395) at org.apache.struts.faces.taglib.LifecycleListener.clinit(LifecycleListener.java:117) ... 32 more Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:434) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:561) ... 36 more Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:430) ... 37 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Nested Struts ..Monkey Struts
It is my understanding that for indexed properties to work, you need to have an additional method: public void setLocationList(int index, ChildForm form) { this.locationList.set(index, form); } This is because the nested tags produce indexed elements in the form: input type=text name=locationList[0] value= / input type=text name=locationList[1] value= / ... etc. The only way I got this to work was to populate the array with empty forms, and then the setLocationList(int, form) replaced the empty ones with the correct ones. As I said earlier, this seems silly to me and their should be an easier way. I spent about a day on this trying all kinds of different approaches, and this was the only one I could get to work. Matt -Original Message- From: Jarrett Grantham [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 19, 2003 2:45 PM To: Struts Developers List Subject: RE: Nested Struts ..Monkey Struts I tried that and I don't understand what is done in the reset method. You mentioned that you create a new ArrayList of the specified size(that I have done without problem); but when u mention populate it with empty child formsI don't understand that. I don't see how we can populate this new array list with the child forms when the child forms are empty when the page is submitted. I have defined in my Form class the following: private List locationList = new ArrayList(); public Object[] getLocationList() { return this.locationList.toArray(); } public void setLocationList( Object[] anLocationArray) { this.locationList = new ArrayList(); for( int each = 0; each anLocationArray.length; each++ ) { locationList.add( anLocationArray[each] ); } } Now when I set a break point in the reset method of my Location Form and submit the form, the variable locationList is empty. Any ideas? jg Jarrett Grantham Razza Solutions 1149 Haleys Way Dr Buda, Tx 78610 512-797-8198 www.razzasolutions.com -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 6:37 PM To: 'Struts Developers List' Subject: RE: Nested Struts ..Monkey Struts I have been able to do this successfully - but only by setting a hidden variable that tells my ParentForm what size the ArrayList for the ChildForm is. Then in my reset method, I grab the hidden variable (indicating size) and create a new ArrayList of the specified size and populate it with empty child forms. It seems like quite a workaround - but it works! Matt -Original Message- From: James Nguyen [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 2:36 PM To: Struts Developers List Subject: Re: Nested Struts ..Monkey Struts I've also experience this as well. If there's a clear explanation of why this happens, please share. I have a hunch as to why, but I don't know for sure. It would be nice to not have to use the session scope just to retrieve my form inputs when there's no need for it to be in the session scope. I'm glad someone else experience this besides me. =) James Nguyen At 01:44 PM 1/17/2003 -0600, you wrote: I have been using Struts 1.0 for some time now and I was wondering if anyone has ever run into this particular problem. I am nesting forms with nested tags(Monkey Struts add on )which works great for displaying data using the scope of request. I understand that nested struts is now included in the latest version of Struts 1.1B3. I have noticed that when I use a input field such as a text input box and then submit the page that has nested forms on it; the nested forms do not get rendered to my action class(form param in my perform method). Only the top level Parent form is populated; any child forms( a array list in my parent form class) are not populated. If I change the scope to session, then the child form's are populated in my Action class. The difference between Session and Request in this particular example puzzles me. Anyone seen anything like this? Thanks, Jarrett Jarrett Grantham Razza Solutions 1149 Haleys Way Dr Buda, Tx 78610 512-797-8198 www.razzasolutions.com James Nguyen I/T Professional 600 Anton Boulevard - Suite 360 Costa Mesa, California 92626 Cogito ergo sum -Rene Descartes -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL
RE: Nested Struts ..Monkey Struts
I have been able to do this successfully - but only by setting a hidden variable that tells my ParentForm what size the ArrayList for the ChildForm is. Then in my reset method, I grab the hidden variable (indicating size) and create a new ArrayList of the specified size and populate it with empty child forms. It seems like quite a workaround - but it works! Matt -Original Message- From: James Nguyen [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 2:36 PM To: Struts Developers List Subject: Re: Nested Struts ..Monkey Struts I've also experience this as well. If there's a clear explanation of why this happens, please share. I have a hunch as to why, but I don't know for sure. It would be nice to not have to use the session scope just to retrieve my form inputs when there's no need for it to be in the session scope. I'm glad someone else experience this besides me. =) James Nguyen At 01:44 PM 1/17/2003 -0600, you wrote: I have been using Struts 1.0 for some time now and I was wondering if anyone has ever run into this particular problem. I am nesting forms with nested tags(Monkey Struts add on )which works great for displaying data using the scope of request. I understand that nested struts is now included in the latest version of Struts 1.1B3. I have noticed that when I use a input field such as a text input box and then submit the page that has nested forms on it; the nested forms do not get rendered to my action class(form param in my perform method). Only the top level Parent form is populated; any child forms( a array list in my parent form class) are not populated. If I change the scope to session, then the child form's are populated in my Action class. The difference between Session and Request in this particular example puzzles me. Anyone seen anything like this? Thanks, Jarrett Jarrett Grantham Razza Solutions 1149 Haleys Way Dr Buda, Tx 78610 512-797-8198 www.razzasolutions.com James Nguyen I/T Professional 600 Anton Boulevard - Suite 360 Costa Mesa, California 92626 Cogito ergo sum -Rene Descartes -- To unsubscribe, e-mail: mailto:struts-dev- [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: xhtml javascript hiding methods
I object to generating *incorrect* XHTML -- or XHTML that doesn't follow the recommendations of the standard -- simply to deal with stupid browsers. It's basically the same reason I do not want to see us add non-standard HTML attributes to what we generate either. I agree, just trying to prod a workaround ;) If Struts is going to produce standards-compliant code, we should probably remove the language attribute from all script tags - or at least when a page is in XHTML compliant mode. I can enter a bug if you'd like. From the HTML 4.01 spec, the language attribute has been deprecated in favor of script: http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1 Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Repost from users list: Re: Axis/SOAP proposal for Struts
Here's a more e-mail friendly version: http://tinyurl.com/4krg Bookmark this link for a list of current struts bugs: http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMEDbug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDbug_severity=Blockerbug_severity=Criticalbug_severity=Majorbug_severity=Normalbug_severity=Minoremail1=emailtype1=substringemailassigned_to1=1email2=emailtype2=substringemailreporter2=1bugidtype=includebug_id=changedin=votes=chfieldfrom=chfieldto=Nowchfieldvalue=product=Strutsshort_desc=short_desc_type=allwordssubstrlong_desc=long_desc_type=allwordssubstrbug_file_loc=bug_file_loc_type=allwordssubstrkeywords=keywords_type=anywordsfield0-0-0=nooptype0-0-0=noopvalue0-0-0=cmdtype=doitnewqueryname=order=Reuse+same+sort+as+last+time From: V. Cekvenich [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Repost from users list: Re: Axis/SOAP proposal for Struts Date: Fri, 17 Jan 2003 12:45:49 -0500 +1. And also XML RPC called via JavaScript from a browser w/o a submit. (To me, any time you call an action before a bean == Struts) Already in 1.1 execute() signature is a bit different for tiles action then Struts action. But maybe post on dev list for suggestions? (or even put sample implementation in bugzila). I am sure lots of good and bad ideas: -Have struts work a bit more like JasperRepports - via Jelly ie: describe the JSP page in XML, so other projects can have code generators and IDE's. (like they have Eclipse plugin in fo JasperReport XML) - a default action on dispatch action; dispatch action for tiles; -ship Struts with JSTL via Maven; -more interfaces?; -deprecate some tags; - make a DAO interface in Commons; (extends iterator?) people could implement many ways. - more exotic JavaScript tags in Taglibs (Calendar, ); - some default actions with default behavior (ex: onExecuteSave() {formBean.save();}; -encapsulate req, resp, mapping, formbean into an event object so : execute(eventObject eo) { x= eo.getRequest(); .] this allows for many action signatures to be replaced with one; - add a testIt() abstract method to formBeans and the like (thus encouraging developers to unit test the bean patters before placing in Struts - Styxx, Stuts Menu added in - Should formBean extend collection and have a DAO property (makes master detail multi row trivial) - indexed tag alternative having a concept of groped bands with nesting, like JasperReports (I have no Idea how to implement) Oh yeah, maybe first let you ship 1.1 and get out of the way and thank you one more time for even having 1.1. (and then see the initiatives). Is there a new list of open bugs for 1.1 release? .V Mike Oliver wrote: Struts Users, I would like to propose that Struts be extended to support another entry point. The ActionServlet would be augmented by an Axis/SOAP Web Services Interface to Struts. FormBeans would be part of the payload for requests. Responses would be generated by Forwards for SOAP. This new Axis entry point would do the same work as ActionServlet with the only significant difference being the construction of the FormBean. Incoming SOAP Requests would be configured to call the same RequestHandlers and as far as the actions go they won't know that the source was an HTML Form or a serialized FormBean. I feel this will give a great deal of flexibility to Applications where they want a Web Browser User Interface as well as Web Services for the same Application Data Model and Business Logic. I am planning on doing this anyway, and felt it applicable to this group and would offer to share it as a sub project and would welcome contributions of thought, expertise and code. Michael Oliver Chief Technology Officer AppsAsPeers LLC 7391 S. Bullrider Ave. Tucson, AZ 85747 520.574.1150 Voice 520.844.1036 Fax 520.270.8862 Cell http://www.appsaspeers.com http://www.appsaspeers.com/ Home Page [EMAIL PROTECTED] SMS http://www.ollie.ezpeer.net http://www.ollie.ezpeer.net/ Personal Home Page http://www.ollie.im-live.com/im-live/ Instant Chat [EMAIL PROTECTED] MSN Messenger [EMAIL PROTECTED] Yahoo Instant Messenger MikeOliverAZ Aol Instant Messenger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Matt Raible, Raible Designs, Morrison CO US -- Tel: +1 303 979-5340 -- Mob: +1 720 560-8460 -- Fax: +1 508 256-6471 -- Web: http://www.raibledesigns.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail
Proposal: Use java2html to generate browseable source code.
I don't know if this is a possibility, but it'd be pretty cool to use Java2HTML to generate browseable source code from the JavaDocs. I use this and it's pretty slick - all that's required is a simple link in the JavaDoc comments: a href=ClassName.java.htmlView Source/a And then users can see the source. I run a j2h task that javadoc depends on to produce this. See example at: http://www.raibledesigns.com/downloads/appfuse/api/org/appfuse/persistence/BaseDAOHibernate.html Look for the View Source link. Probably a lot of work to add this to all the classes, but I'd be willing to help out and submit patches if you think it's a good idea. Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Beta 3 PlugIn interface change
I figured out the change in the PlugIn interface the hard way. BTW, I've made some recent improvements to Struts Menu, for supporting CoolMenus4 and role-based permissions. If you prod Scott a little, he might even push out a new release ;-) Matt -Original Message- From: news [mailto:[EMAIL PROTECTED]] On Behalf Of V. Cekvenich Sent: Monday, January 06, 2003 4:49 PM To: [EMAIL PROTECTED] Subject: Re: Beta 3 PlugIn interface change FYI: Struts menu is aware that plug in services was changed a bit. Very useful is Struts menu (hint). .V David Morris wrote: David, My mistake, I didn't realize that ApplicationConfig was not available as part of 1.0.X. For consistency, I would recommend removing ApplicationConfig references from ActionServlet as well. I will pass this on to the Struts Menu project instead. Thanks, David Morris [EMAIL PROTECTED] 01/06/03 03:28PM That's the risk you take using beta software. Struts does not guarantee compatibility between betas just between releases. David -- To unsubscribe, e-mail: mailto:struts-dev- [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: DynaActionFormClass.getDynaActionFormClass [nevermind]
Nevermind, this seems to work: FormBeanConfig cfg = mapping.getModuleConfig().findFormBeanConfig(Constants.REQUEST_KEY); DynaActionForm requestForm = (DynaActionForm) DynaActionFormClass.createDynaActionFormClass(cfg).newInstance(); Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 8:52 PM To: 'Struts Developers List' Subject: RE: DynaActionFormClass.getDynaActionFormClass After looking at this method, I don't know that it will work for me: createActionForm(javax.servlet.http.HttpServletRequest request, ActionMapping mapping, ModuleConfig moduleConfig, ActionServlet servlet) My form is not associated with a particular mapping, as I'm creating it on the fly and using it to send an e-mail message. There's got to be an easy way to do this - any examples? How do I get the mapping if the form is not associated with any actions - or even if it is? This was working great for me in 1.1b2: DynaActionForm requestForm = (DynaActionForm) DynaActionFormClass .getDynaActionFormClass(Constants.REQUEST_KEY).newInstance(); But now it's gone :( I'd love a quick HowTo for writing this same logic with Struts 1.1 b3. Thanks, Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 05, 2003 6:26 PM To: Struts Developers List Subject: RE: DynaActionFormClass.getDynaActionFormClass On Sun, 5 Jan 2003, Matt Raible wrote: Date: Sun, 5 Jan 2003 17:12:51 -0700 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: 'Struts Developers List' [EMAIL PROTECTED] Subject: RE: DynaActionFormClass.getDynaActionFormClass Has it become as easy as: DynaActionForm myForm = new DynaActionForm(); ?? Man - that would be slick if (true)! Unfortunately, that is not technically feasible :-). Your best bet is the utility method RequestUtils.createActionForm(). As an extra added advantage, this works for either standard ActionForm beans or DynaActionForm beans. Thanks, Matt Craig -- To unsubscribe, e-mail: mailto:struts-dev- [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]
Validator enhancement request
Currently the Validator creates error messages in the order of that fields are specified in validation.xml. I am using XDoclet to generate my forms, and the getter/setters in my form are in alphabetical order. I am also using XDoclet to generate validation.xml and therefore, the errors I receive when my form elements aren't valid are in alphabetical order, rather than in the field order on my page. Would it be difficult to detect the field order on my page? Yeah - I'm assuming so. Any ideas how to workaround this? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DynaActionFormClass.getDynaActionFormClass
This used to work fine with 1.1b2, but now it's not even available: org.apache.struts.action.DynaActionFormClass .getDynaActionFormClass(messageForm).newInstance(); D:\source\onpoint\src\onpoint\com\onpoint\webapp\action\CourseCatalogAct ion.java:81: cannot resolve symbol symbol : method getDynaActionFormClass (java.lang.String) location: class org.apache.struts.action.DynaActionFormClass .getDynaActionFormClass(messageForm).newInstance(); Any ideas? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: DynaActionFormClass.getDynaActionFormClass
Has it become as easy as: DynaActionForm myForm = new DynaActionForm(); ?? Man - that would be slick if (true)! Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 05, 2003 2:58 PM To: [EMAIL PROTECTED] Subject: DynaActionFormClass.getDynaActionFormClass This used to work fine with 1.1b2, but now it's not even available: org.apache.struts.action.DynaActionFormClass .getDynaActionFormClass(messageForm).newInstance(); D:\source\onpoint\src\onpoint\com\onpoint\webapp\action\Course CatalogAct ion.java:81: cannot resolve symbol symbol : method getDynaActionFormClass (java.lang.String) location: class org.apache.struts.action.DynaActionFormClass .getDynaActionFormClass(messageForm).newInstance(); Any ideas? Thanks, Matt -- To unsubscribe, e-mail: mailto:struts-dev- [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]
Modules and path mapping (/do/*)
I decided to try to get modules to work with path-mapping tonight with no luck. I'll enter this into Bugzilla if you'd like. Basically, I have a forward that switches to the module: With extension mapping: forward name=uploadResume contextRelative=true path=/upload/index.do redirect=true / With path mapping: forward name=uploadResume contextRelative=true path=/do/upload/index redirect=true / Or at least, I think that's the logical configuration. From the logging, I get: ERROR [Thread-2] [org.apache.struts.action.RequestProcessor] RequestProcessor.processMapping(664) | Invalid path /upload /index was requested In my upload module, I have the following index forward that I'm expecting it to hit: forward name=index path=/do/index / I'm willing to try a couple hints if anyone has some. My controller does not have a pagePattern defined. Thanks, Matt
RE: [ANNOUNCEMENT] Struts 1.1 Beta 3 Released
Awesome - thanks guys - you really know how to make someones day. All your hard work is definitely appreciated on my end! Matt -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 31, 2002 2:31 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [ANNOUNCEMENT] Struts 1.1 Beta 3 Released The Struts team is proud to announce the release of Struts 1.1 Beta 3. This release includes significant new functionality, while retaining full backwards compatibility with earlier versions of Struts. It also incorporates fixes for a number of bugs which were reported against earlier versions. The binary distribution is available at: http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/ and the source distribution is available at: http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/src/ In addition, the library distibution, which contains updated binaries without the sample applications, is available at: http://jakarta.apache.org/builds/jakarta-struts/release/v1.1-b3/lib/ Details of the changes in this release are available in the Release Notes, which can be found here: http://jakarta.apache.org/struts/userGuide/release-notes-1.1-b3.html -- Martin Cooper -- 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: Switching Modules - isn't working for me...
This was caused by the StrutsMenu PlugIn in my situation. Changing ApplicationConfig to ModuleConfig fixed the problem. Here's from from the bug I documented: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15697 --- I compiled with the latest nightly of Struts and got some deprecation warnings for ApplicationConfig, but it wouldn't compile because of the init (ActionServlet, ModuleConfig) method: [javac] D:\source\StrutsMenu\src\share\com\fgm\web\menu\MenuPlugIn.java:26: com.fgm.web.menu.MenuPlugIn should be declared abstract; it does not d efine init (org.apache.struts.action.ActionServlet,org.apache.struts.config.ModuleConfig) in com.fgm.web.menu.MenuPlugIn [javac] public class MenuPlugIn implements PlugIn { [javac]^ Changing my init method to use init(ActionServlet, ModuleConfig) vs. (ActionServlet, ApplicationConfig) fixed the problem. Does this break backwards compatibility with old PlugIns? --- Thanks, Matt Does someone have a simple example war file reproducing the problem ? If yes, could you send it to me ? Cedric Matt Raible wrote: I tried switching to last night's build, but that appears to be even worse - I can't even use the default module. I get the following error the first time (and all other times) I hit an action: - Root Cause - java.lang.AbstractMethodError at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j ava:1096) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470) at javax.servlet.GenericServlet.init(GenericServlet.java:256) My log file never shows any modules getting initialized (save ''). The last build I had, from 11-24, the default app worked, just the switching didn't. Are there any sample applications I can prove this works against? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 1:37 AM To: '[EMAIL PROTECTED]' Subject:Switching Modules - isn't working for me... It's late, so it's possible my problem is something small and I just need a second set of eyes on it. I am trying to configure my application have an upload module. I'm following the instructions at http://jakarta.apache.org/struts/userGuide/configuration.html# module_config-switching. In my global-forwards, I have the following forward: !-- Switch to upload sub-application -- forward name=uploadResume contextRelative=true path=/upload/index.do redirect=true / I have my ActionServlet configured as follows: init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameconfig/upload/param-name param-value/WEB-INF/struts-upload.xml/param-value /init-param And struts-upload.xml has the following action-mappings: !-- Router to upload tiles definition -- action path=/index type=org.apache.struts.actions.ForwardAction parameter=upload/ !-- Upload Action -- actionpath=/uploadFile type=org.appfuse.webapp.actions.UploadAction name=uploadForm scope=request input=upload forward name=success path=display / /action Where upload and display are tiles definitions. When I try to access this forward (either via link or direct URL), I get: Tomcat 404: The requested resource (/appfuse/upload) is not available. And in the log file: INFO [Thread-4] [org.apache.struts.util.PropertyMessageResources] PropertyMessageResources.init(127) | Initializing, c onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true INFO [Thread-4] [org.apache.struts.tiles.TilesRequestProcessor] TilesRequestProcessor.initDefinitionsMapping(154) | Tile s definition factory found for request processor '/upload'. INFO [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.process(225) | Processing a 'GET' for path '/index' DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processActionCreate(305) | Looking for Ac tion instance for class org.apache.struts.actions.ForwardAction DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processActionCreate(321) | Creating new Action instance DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processForwardConfig(428) | processForward Config(ForwardConfig[name=null,path=upload,redirect=false,cont extRelative=true]) Any ideas? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto
RE: Switching Modules - isn't working for me...
I tried switching to last night's build, but that appears to be even worse - I can't even use the default module. I get the following error the first time (and all other times) I hit an action: - Root Cause - java.lang.AbstractMethodError at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j ava:1096) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470) at javax.servlet.GenericServlet.init(GenericServlet.java:256) My log file never shows any modules getting initialized (save ''). The last build I had, from 11-24, the default app worked, just the switching didn't. Are there any sample applications I can prove this works against? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 1:37 AM To: '[EMAIL PROTECTED]' Subject: Switching Modules - isn't working for me... It's late, so it's possible my problem is something small and I just need a second set of eyes on it. I am trying to configure my application have an upload module. I'm following the instructions at http://jakarta.apache.org/struts/userGuide/configuration.html# module_config-switching. In my global-forwards, I have the following forward: !-- Switch to upload sub-application -- forward name=uploadResume contextRelative=true path=/upload/index.do redirect=true / I have my ActionServlet configured as follows: init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameconfig/upload/param-name param-value/WEB-INF/struts-upload.xml/param-value /init-param And struts-upload.xml has the following action-mappings: !-- Router to upload tiles definition -- action path=/index type=org.apache.struts.actions.ForwardAction parameter=upload/ !-- Upload Action -- actionpath=/uploadFile type=org.appfuse.webapp.actions.UploadAction name=uploadForm scope=request input=upload forward name=success path=display / /action Where upload and display are tiles definitions. When I try to access this forward (either via link or direct URL), I get: Tomcat 404: The requested resource (/appfuse/upload) is not available. And in the log file: INFO [Thread-4] [org.apache.struts.util.PropertyMessageResources] PropertyMessageResources.init(127) | Initializing, c onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true INFO [Thread-4] [org.apache.struts.tiles.TilesRequestProcessor] TilesRequestProcessor.initDefinitionsMapping(154) | Tile s definition factory found for request processor '/upload'. INFO [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.process(225) | Processing a 'GET' for path '/index' DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processActionCreate(305) | Looking for Ac tion instance for class org.apache.struts.actions.ForwardAction DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processActionCreate(321) | Creating new Action instance DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processForwardConfig(428) | processForward Config(ForwardConfig[name=null,path=upload,redirect=false,cont extRelative=true]) Any ideas? Thanks, Matt
Fwd: Declared Exceptions and Chained Exceptions
I didn't get a response from the User List - so maybe one of you gents will know the answer. Thanks, Matt --- In [EMAIL PROTECTED], Matt Raible [EMAIL PROTECTED] wrote: Can I use Declarative Exceptions and Chained Exceptions at the same time? I'd love to be a able to specify a list of exceptions in my struts-config.xml, and have those errors stacked on each other. Currently, I'm rendering ChainedExceptions using the following, and would love to do it in struts-config.xml instead. Any advice or suggestions are appreciated. try { UserManager mgr = new UserManagerImpl( (String) ctx.getAttribute(Constants.DAO_TYPE)); UserForm user = mgr.getUser(username); session.setAttribute(Constants.USER_KEY, user); } catch (Exception e) { log.error(Error getting user's information + e); e.printStackTrace(); ActionErrors errors = new ActionErrors(); errors.add( ActionErrors.GLOBAL_ERROR, new ActionError(errors.general)); StringBuffer sb = new StringBuffer(); if (e.getCause() == null) { sb.append(e.getMessage()); } else { while (e.getCause() != null) { sb.append(e.getMessage()); e = (Exception) e.getCause(); } } errors.add( ActionErrors.GLOBAL_ERROR, new ActionError(errors.detail, sb.toString())); } Thanks, Matt -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe@j... For additional commands, e-mail: mailto:struts-user-help@j... --- End forwarded message --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Switching Modules - isn't working for me...
For some reason, I thought Cedric fixed this problem today. However, I just checked out Struts from CVS and no dice - it's still broken. In fact, I can't run my app at all, regardless of whether I use a sub app or not. This has been broken for a couple of weeks now, I'll enter a bug. Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 2:02 AM To: '[EMAIL PROTECTED]' Subject: RE: Switching Modules - isn't working for me... I tried switching to last night's build, but that appears to be even worse - I can't even use the default module. I get the following error the first time (and all other times) I hit an action: - Root Cause - java.lang.AbstractMethodError at org.apache.struts.action.ActionServlet.initModulePlugIns(Actio nServlet.java:1096) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470) at javax.servlet.GenericServlet.init(GenericServlet.java:256) My log file never shows any modules getting initialized (save ''). The last build I had, from 11-24, the default app worked, just the switching didn't. Are there any sample applications I can prove this works against? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 1:37 AM To: '[EMAIL PROTECTED]' Subject:Switching Modules - isn't working for me... It's late, so it's possible my problem is something small and I just need a second set of eyes on it. I am trying to configure my application have an upload module. I'm following the instructions at http://jakarta.apache.org/struts/userGuide/configuration.html# module_config-switching. In my global-forwards, I have the following forward: !-- Switch to upload sub-application -- forward name=uploadResume contextRelative=true path=/upload/index.do redirect=true / I have my ActionServlet configured as follows: init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameconfig/upload/param-name param-value/WEB-INF/struts-upload.xml/param-value /init-param And struts-upload.xml has the following action-mappings: !-- Router to upload tiles definition -- action path=/index type=org.apache.struts.actions.ForwardAction parameter=upload/ !-- Upload Action -- actionpath=/uploadFile type=org.appfuse.webapp.actions.UploadAction name=uploadForm scope=request input=upload forward name=success path=display / /action Where upload and display are tiles definitions. When I try to access this forward (either via link or direct URL), I get: Tomcat 404: The requested resource (/appfuse/upload) is not available. And in the log file: INFO [Thread-4] [org.apache.struts.util.PropertyMessageResources] PropertyMessageResources.init(127) | Initializing, c onfig='com.fgm.web.menu.displayer.DisplayerStrings', returnNull=true INFO [Thread-4] [org.apache.struts.tiles.TilesRequestProcessor] TilesRequestProcessor.initDefinitionsMapping(154) | Tile s definition factory found for request processor '/upload'. INFO [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.process(225) | Processing a 'GET' for path '/index' DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processActionCreate(305) | Looking for Ac tion instance for class org.apache.struts.actions.ForwardAction DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processActionCreate(321) | Creating new Action instance DEBUG [Thread-4] [org.apache.struts.action.RequestProcessor] RequestProcessor.processForwardConfig(428) | processForward Config(ForwardConfig[name=null,path=upload,redirect=false,cont extRelative=true]) Any ideas? Thanks, Matt
LookupDispatchAction - loading values from a properties file
I was thinking of loading a properties file for my KeyMethodMap in a subclass of LookupDispatchAction. So this: * Provides the mapping from resource key to method name * * @return Resource key / method name map */ protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.add, add); map.put(button.cancel, cancel); map.put(button.copy, copy); map.put(button.save, save); map.put(button.edit, edit); return map; } Could be replaced with the following psuedo code: protected Map getKeyMethodMap() { Map map = new HashMap(); ResourceBundle methods = ResourceBundle.getBundle(LookupMethods); Enumeration keys = methods.getKeys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); map.put(key, methods.getString(key)); } return map; } Is there any reason(s) why I shouldn't do this? I think it allows greater flexibility for development - so I don't have to re-compile this class everytime I want map a new method. My last project had 18 different mappings for the the different button names - where many mapped to the same method. Thanks, Matt
RE: LookupDispatchAction - loading values from a properties file
Pardon my ignorance, but your comment about Properties.load got me interested. However, I can't seem to figure out how to shorten my code (guess I haven't done much work with Properties files). I found this example: http://www.javaworld.com/javaworld/javatips/jw-javatip125.html But it seems to just increase the number of lines ;-) Matt -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 7:06 AM To: Struts Developers List Subject: Re: LookupDispatchAction - loading values from a properties file Matt, This looks reasonable. Generally speaking changing a button mapping would involve new code, so a recompile is necessary, but as you mention you are mapping multiple buttons to the same method. Although I'd caution against using LookupDispatchAction unless you really have forms that have multiple submit buttons to submit that same form data. If you're simply mapping multiple non-form-related actions into one class, then I'd argue this is not the right approach. Erik p.s. It looks like you might be able to save a few lines of code by using the Properties.load method instead of going through a ResourceBundle. ??? Matt Raible wrote: I was thinking of loading a properties file for my KeyMethodMap in a subclass of LookupDispatchAction. So this: * Provides the mapping from resource key to method name * * @return Resource key / method name map */ protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.add, add); map.put(button.cancel, cancel); map.put(button.copy, copy); map.put(button.save, save); map.put(button.edit, edit); return map; } Could be replaced with the following psuedo code: protected Map getKeyMethodMap() { Map map = new HashMap(); ResourceBundle methods = ResourceBundle.getBundle(LookupMethods); Enumeration keys = methods.getKeys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); map.put(key, methods.getString(key)); } return map; } Is there any reason(s) why I shouldn't do this? I think it allows greater flexibility for development - so I don't have to re-compile this class everytime I want map a new method. My last project had 18 different mappings for the the different button names - where many mapped to the same method. Thanks, Matt -- To unsubscribe, e-mail: mailto:struts-dev- [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: LookupDispatchAction - loading values from a properties file
I think I'll resort to using the ResourceBundle as I can't override getKeyMethodMap() and throw an IOException: [javac] D:\source\appfuse\src\web\org\apache\webapp\actions\BaseAction.java:107: getKeyMethodMap() in org.apache.web app.actions.BaseAction cannot override getKeyMethodMap() in org.apache.struts.actions.LookupDispatchAction; overridden m ethod does not throw java.io.IOException [javac] protected Map getKeyMethodMap() throws IOException [javac] ^ Thanks, Matt -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 8:56 AM To: Struts Developers List Subject: Re: LookupDispatchAction - loading values from a properties file I'm not sure where your .properties file lives, but you should be able to do something similar to this: Properties props = new Properties(); InputStream is = this.getClass().getClassLoader().getResourceAsStream (my.properties); props.load(is); return props; // since its just a Map also Matt Raible wrote: Pardon my ignorance, but your comment about Properties.load got me interested. However, I can't seem to figure out how to shorten my code (guess I haven't done much work with Properties files). I found this example: http://www.javaworld.com/javaworld/javatips/jw-javatip125.html But it seems to just increase the number of lines ;-) Matt -Original Message- From: Erik Hatcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 7:06 AM To: Struts Developers List Subject: Re: LookupDispatchAction - loading values from a properties file Matt, This looks reasonable. Generally speaking changing a button mapping would involve new code, so a recompile is necessary, but as you mention you are mapping multiple buttons to the same method. Although I'd caution against using LookupDispatchAction unless you really have forms that have multiple submit buttons to submit that same form data. If you're simply mapping multiple non-form-related actions into one class, then I'd argue this is not the right approach. Erik p.s. It looks like you might be able to save a few lines of code by using the Properties.load method instead of going through a ResourceBundle. ??? Matt Raible wrote: I was thinking of loading a properties file for my KeyMethodMap in a subclass of LookupDispatchAction. So this: * Provides the mapping from resource key to method name * * @return Resource key / method name map */ protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.add, add); map.put(button.cancel, cancel); map.put(button.copy, copy); map.put(button.save, save); map.put(button.edit, edit); return map; } Could be replaced with the following psuedo code: protected Map getKeyMethodMap() { Map map = new HashMap(); ResourceBundle methods = ResourceBundle.getBundle(LookupMethods); Enumeration keys = methods.getKeys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); map.put(key, methods.getString(key)); } return map; } Is there any reason(s) why I shouldn't do this? I think it allows greater flexibility for development - so I don't have to re-compile this class everytime I want map a new method. My last project had 18 different mappings for the the different button names - where many mapped to the same method. Thanks, Matt -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [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]
AbstractMethodError in Nightly from 12.16.2002
I get the following error when trying to deploy my app to Tomcat 4.1.17 - with a nightly build from 12.16.2002. I reverted back to a nightly build from 11.24.2002 and everything works fine. java.lang.AbstractMethodError at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.j ava:1076) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:457) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:934) My struts-config.xml is below: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- == Data Sources Definitions === -- !-- Define your Struts data sources in a file called struts-data-sources.xml and place it in your merge directory. -- !-- == Form Bean Definitions === -- form-beans form-bean name=userForm type=org.apache.webapp.forms.UserForm / !-- If you have non XDoclet forms, define them in a file called struts-forms.xml and place it in your merge directory. -- /form-beans !-- == Global Exceptions Definitions === -- !-- Define your exceptions in a file called global-exceptions.xml and place it in your merge directory. -- !-- == Global Forward Definitions === -- global-forwards !-- Default forward to Welcome action -- !-- Demonstrates using index.jsp to forward -- forward name=welcome path=/welcome.do/ /global-forwards !-- == Action Mapping Definitions === -- action-mappings action path=/editUser type=org.apache.webapp.actions.UserAction name=userForm scope=session parameter=action unknown=false validate=false /action action path=/saveUser type=org.apache.webapp.actions.UserAction name=userForm scope=session parameter=action unknown=false validate=true /action !-- Default welcome action -- !-- Forwards to the mainMenu tile definition -- action path=/welcome type=org.apache.struts.actions.ForwardAction parameter=mainMenu/ /action-mappings !-- Define your Struts controller in a file called struts-controller.xml and place it in your merge directory. -- message-resources parameter=ApplicationResources/ !-- == Tiles plugin === -- plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-config.xml / set-property property=moduleAware value=true / set-property property=definitions-parser-validate value=true / /plug-in !-- == Validator plugin === -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/ /plug-in !-- == Menu plugin -- plug-in className=com.fgm.web.menu.MenuPlugIn set-property property=menuConfig value=/WEB-INF/menu-config.xml/ /plug-in
RE: AbstractMethodError in Nightly from 12.16.2002
I did, from scratch. The good news is the struts-example app seems to work. Basically, I'm using a version-switcher variable in an Ant properties file, so I switched between 11.24 and built/deployed from scratch. It worked. Then I switched to recent versions, undeployed, cleaned and built/deployed from scratch. I tried it on Tomcat 4.1.12 and 4.0.5 and received the same errors there. It's late though, maybe I'm overlooking something. ;-) Matt -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 11:26 PM To: [EMAIL PROTECTED] Subject: RE: AbstractMethodError in Nightly from 12.16.2002 Probably because the new builds aren't binary compatible with the old ones. Try rebuilding your app. against the new jar files. Dave From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: 'Struts Developers List' [EMAIL PROTECTED] Subject: RE: AbstractMethodError in Nightly from 12.16.2002 Date: Wed, 18 Dec 2002 23:22:13 -0700 This happens with last night's (12.17) build as well. Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 11:13 PM To: [EMAIL PROTECTED] Subject: AbstractMethodError in Nightly from 12.16.2002 I get the following error when trying to deploy my app to Tomcat 4.1.17 - with a nightly build from 12.16.2002. I reverted back to a nightly build from 11.24.2002 and everything works fine. java.lang.AbstractMethodError at org.apache.struts.action.ActionServlet.initModulePlugIns(Actio nServlet.j ava:1076) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:457) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardW rapper.jav a:934) My struts-config.xml is below: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- == Data Sources Definitions === -- !-- Define your Struts data sources in a file called struts-data-sources.xml and place it in your merge directory. -- !-- == Form Bean Definitions === -- form-beans form-bean name=userForm type=org.apache.webapp.forms.UserForm / !-- If you have non XDoclet forms, define them in a file called struts-forms.xml and place it in your merge directory. -- /form-beans !-- == Global Exceptions Definitions === -- !-- Define your exceptions in a file called global-exceptions.xml and place it in your merge directory. -- !-- == Global Forward Definitions === -- global-forwards !-- Default forward to Welcome action -- !-- Demonstrates using index.jsp to forward -- forward name=welcome path=/welcome.do/ /global-forwards !-- == Action Mapping Definitions === -- action-mappings action path=/editUser type=org.apache.webapp.actions.UserAction name=userForm scope=session parameter=action unknown=false validate=false /action action path=/saveUser type=org.apache.webapp.actions.UserAction name=userForm scope=session parameter=action unknown=false validate=true /action !-- Default welcome action -- !-- Forwards to the mainMenu tile definition -- action path=/welcome type=org.apache.struts.actions.ForwardAction parameter=mainMenu/ /action-mappings !-- Define your Struts controller in a file called struts-controller.xml and place it in your merge directory. -- message-resources parameter=ApplicationResources/ !-- == Tiles plugin === -- plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-config.xml / set-property property=moduleAware value=true / set-property property=definitions-parser-validate value=true / /plug-in !-- == Validator plugin === -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF
20M vs. 23M downloads
Any idea why some nightly builds are 23MB and some are only 20MB? http://jakarta.apache.org/builds/jakarta-struts/nightly/ Matt
Module path-mapping limitation
Is there a bug that I can reference (in my writing) for the limitation that modules can only be used with extension-mapping (*.do) rather than path-mapping (/do/*)? If this has been fixed, please let me know. Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Module path-mapping limitation
I don't really *need* this feature personally, so I'm probably not justified in submitting an enhancement request. If I do decide to develop a module as part of my sample application, I'll try switching from *.do to /do/* and then log a bug if I feel it's necessary. Thanks, Matt -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 12:19 PM To: Struts Developers List Subject: Re: Module path-mapping limitation On Tue, 17 Dec 2002, Matt Raible wrote: Is there a bug that I can reference (in my writing) for the limitation that modules can only be used with extension-mapping (*.do) rather than path-mapping (/do/*)? I don't see a bug report for that in Bugzilla, so feel free to submit an enhancement request. It is still an open issue. -- Martin Cooper If this has been fixed, please let me know. Matt -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [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]
Taglib URI's
This is probably a question for the struts-user list, but I'm scared to subscribe to that inbox filler-upper ;) It has come to my attention that JSTL has standardized upon the following syntax for importing tag libraries: %@ taglib uri=http://java.sun.com/jstl/core prefix=c % Where there is no entry in web.xml and the classloader will pick up the .tld file from the taglib's jar file. Here's the e-mail I found out about this from: snip The reason that this is important in JSTL (although you don't have to do it this way) is that in the future servlet containers will no doubt supply their own optimized JSTL implementations. The JSTL spec states that unless the full URI is used in the taglib declaration, the optimized library cannot be used /snip Is this possible with Struts tags - do they have a similar http-based URI? Thanks, Matt
RE: Taglib URI's
Thanks - much appreciated. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 15, 2002 12:41 PM To: [EMAIL PROTECTED] Subject: Re: Taglib URI's You're right, this is for struts-user :-). Look in the tld files for the uri to use. This is also documented in the users guide. David From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Taglib URI's Date: Sun, 15 Dec 2002 09:14:23 -0700 This is probably a question for the struts-user list, but I'm scared to subscribe to that inbox filler-upper ;) It has come to my attention that JSTL has standardized upon the following syntax for importing tag libraries: %@ taglib uri=http://java.sun.com/jstl/core prefix=c % Where there is no entry in web.xml and the classloader will pick up the .tld file from the taglib's jar file. Here's the e-mail I found out about this from: snip The reason that this is important in JSTL (although you don't have to do it this way) is that in the future servlet containers will no doubt supply their own optimized JSTL implementations. The JSTL spec states that unless the full URI is used in the taglib declaration, the optimized library cannot be used /snip Is this possible with Struts tags - do they have a similar http-based URI? Thanks, Matt _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-dev- [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: TILES DTD: role attribute of definition
That one is much better, but according to XML Spy, it's not valid: It chokes on the following line and highlights small-icon !ELEMENT icon (small-icon?, large-icon?) Here's the error: This DTD doesn't appear to be valid by itself (as a part of another DTD, it might still be OK): DTD/Schema error - element 'small-icon' is undefined. Matt -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 8:39 AM To: Struts Developers List Subject: Re: TILES DTD: role attribute of definition Here is the latest tiles dtd url: http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd Is it what you are expecting, or do you thing something still missing ? Matt Raible wrote: Yeah, the tiles DTD could use some work, I viewed the struts-config.dtd and tiles.dtd using XMLSpy and the struts-config.dtd was very informative, while tiles had virtually no information. Thanks, Matt -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 08, 2002 9:44 PM To: [EMAIL PROTECTED] Subject: Re: TILES DTD: role attribute of definition I don't know the answer to this but it should be added to the dtd documentation. David From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: TILES DTD: role attribute of definition Date: Sun, 8 Dec 2002 20:37:42 -0700 Does the role attribute of the definition element allow a comma-delimited list of roles? Thanks, Matt _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [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: TILES DTD: role attribute of definition
Done, and I'm sure it'll come through before this e-mail arrives: http://issues.apache.org/bugzilla/show_bug.cgi?id=15188 -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 8:19 AM To: Struts Developers List Subject: Re: TILES DTD: role attribute of definition The role attribute is passed as is to the pageContext.getRequest()).isUserInRole(role)) method. This later doesn't accept a comma delimited list ... You can add an improvement request to bugzilla. Cedric Matt Raible wrote: Does the role attribute of the definition element allow a comma-delimited list of roles? Thanks, Matt -- To unsubscribe, e-mail: mailto:struts-dev- [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]
TILES DTD: role attribute of definition
Does the role attribute of the definition element allow a comma-delimited list of roles? Thanks, Matt
RE: TILES DTD: role attribute of definition
Yeah, the tiles DTD could use some work, I viewed the struts-config.dtd and tiles.dtd using XMLSpy and the struts-config.dtd was very informative, while tiles had virtually no information. Thanks, Matt -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 08, 2002 9:44 PM To: [EMAIL PROTECTED] Subject: Re: TILES DTD: role attribute of definition I don't know the answer to this but it should be added to the dtd documentation. David From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: TILES DTD: role attribute of definition Date: Sun, 8 Dec 2002 20:37:42 -0700 Does the role attribute of the definition element allow a comma-delimited list of roles? Thanks, Matt _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-dev- [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]
Why struts is looked down upon...
Any of you care to comment on this? http://java.enigmastation.com/Q806 I'll post a rebuttle on my weblog shortly. Matt
struts-config.xml datasource vs. Tomcat's Connection Pool
I've heard that the data-source definitions in struts-config.xml use Common's DBCP, just like Tomcat 4.1-5.0 uses for it's connection pooling. Is it then safe to say that implementing a data-source via struts-config.xml will give you the same connection pooling architecture as configuring it in Tomcat's server.xml? What is the difference between the two? I'm guessing that if you configure in struts-config.xml, you have to access your connection in an action, and if you do it in Tomcat, you can access it via JNDI. Is that a fair analogy? Thanks, Matt
Enhancement Request - add label and labelKey to form elements
I thought I'd run this idea by the development team before entering it into Bugzilla. One of the items that is required with 508 compliance is a label value for each form element: For example: label for=nameName:/label input type=text id=name size=50 name=name / More information at: http://www.csuohio.edu/uctl/508/forms.html This would typically be rendered with Struts tags using: label for=nameName:/label html:text name=name styleId=name size=50/ To make it easier, we could do: html:text name=name styleId=name size=50 label=Name:/ OR html:text name=name styleId=name size=50 labelKey=prompt.name/ The problems I see with this are that you lose some control over the presentation (i.e. a br / after the label or labels in a separate td). However, it might be useful for rapid prototyping and code-generating tools. My hope someday is that the JSP simply renders XML, and then an XSL stylesheet is applied, and in this case, the presentation issues would disappear? What does everyone think? Would anyone use it? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Enhancement Request - add label and labelKey to form elements
I agree, and does require more work, considering: html:label for=name bean:message key=prompt.username/ /html:label Is more typing than: label for=name ... /label Maybe something like this would make it more useful: html:label key=prompt.username / I was thinking of reducing the prefixes in my struts-xdoclet app from: html - h logic - l bean - b tiles - t nested - n Would this create too much confusion (even though it would require less typing?)? It much rather type h:label key=prompt.username / Matt -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, November 25, 2002 12:25 PM To: [EMAIL PROTECTED] Subject: Re: Enhancement Request - add label and labelKey to form elements I don't see what advantage the html:label tag has over hand coding the html. Looks like the same amount of work to me. David From: Craig R. McClanahan [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: Struts Developers List [EMAIL PROTECTED] Subject: Re: Enhancement Request - add label and labelKey to form elements Date: Mon, 25 Nov 2002 11:14:10 -0800 (PST) On Mon, 25 Nov 2002, Matt Raible wrote: Date: Mon, 25 Nov 2002 11:10:33 -0700 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Enhancement Request - add label and labelKey to form elements I thought I'd run this idea by the development team before entering it into Bugzilla. One of the items that is required with 508 compliance is a label value for each form element: For example: label for=nameName:/label input type=text id=name size=50 name=name / More information at: http://www.csuohio.edu/uctl/508/forms.html This would typically be rendered with Struts tags using: label for=nameName:/label html:text name=name styleId=name size=50/ To make it easier, we could do: html:text name=name styleId=name size=50 label=Name:/ OR html:text name=name styleId=name size=50 labelKey=prompt.name/ The problems I see with this are that you lose some control over the presentation (i.e. a br / after the label or labels in a separate td). However, it might be useful for rapid prototyping and code-generating tools. My hope someday is that the JSP simply renders XML, and then an XSL stylesheet is applied, and in this case, the presentation issues would disappear? What does everyone think? Would anyone use it? I think a way to create label elements would be very useful. I just don't think we should embed it in the existing UI element tags (for the reasons that others have articulated. How about a new html:label tag instead. Then, you could do things like this on the logon page in struts-example: ... tr th align=right html:label for=name bean:message key=prompt.username/ /html:label /th td align=left html:text styleId=name property=username size=16 maxlength=18/ /td /tr ... (I thought you tied labels to elements with the id ???) The above approach assumes that it's not necessary to localize the element id itself (which would really complicate attempts to generate JavaScript event handlers), but you do (of course) need to localize the text of the label. This also imposes no restrictions on the mechanisms by which you manage layout, and can be easily retrofitted onto existing pages. Thanks, Matt Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: mailto:struts-dev- [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: Enhancement Request - add label and labelKey to form elements
That being said, the JSTL libraries went pretty much towards this approach (single-character prefixes where feasible), and I'm currently leaning that way on JavaServer Faces as well. IT makes sense to consider this. So are you saying that I should go ahead and use this single-digit prefix? I know it might cause confusion, but most people should be able to figure it out fairly quickly. Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
blank.war vs. struts-blank.war [was: Re: Tools in Struts]
I noticed that the Struts Applications project on SourceForge has a blank.war project and there's also struts-blank.war that is distributed with Struts. Which one is best to advertise as a good starting package. I hope to both 1) create an app based on struts advanced features (i.e. exceptions, tiles, validator, DispatchAction) and 2) create a base app with a how to about using XDoclet and a persistence layer using Hibernate or Castor. The hope is that a new project can start with this project (i.e. struts-xdoclet.war) and have ant scripts and samples of how to use Struts with a popular persistence mechanism. I've been discussing this project with Erik Hatcher and my initial thoughts are to hand-code some POJO that generate persistent objects (i.e. using Castor) and ValidatorForms. Even better (or maybe worse), I'm putting myself on a tight deadline for this (i.e. 2-3 weeks) so it resembles a real-world project. Thanks, Matt On Sunday, November 24, 2002, at 02:54 AM, Ted Husted wrote: Yes =:0) Maybe that will finally give Eric a chance to show us what he's been up to =:0) -Ted. 11/23/2002 11:23:41 PM, Matt Raible [EMAIL PROTECTED] wrote: I'm thinking of starting an Xdoclet/Middlegen-based Struts project where (hopefully) most of the code can be generated. Can I start a project within the one below? Thanks, Matt If anyone is interested, I have a Struts project setup at SourceForge that is open to all comers. http://sourceforge.net/projects/struts I wouldn't mind turning this into a Struts commons, where we can all cooperate on developing various extensions to the Struts core. -Ted. -- 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: Tools in Struts [was: Re: Struts At ApacheCon 2002]
I'm thinking of starting an Xdoclet/Middlegen-based Struts project where (hopefully) most of the code can be generated. Can I start a project within the one below? Thanks, Matt If anyone is interested, I have a Struts project setup at SourceForge that is open to all comers. http://sourceforge.net/projects/struts I wouldn't mind turning this into a Struts commons, where we can all cooperate on developing various extensions to the Struts core. -Ted. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Velocity vs. JSP: objective tests?
See comments below... yeah, no offense intended to David Johnson, but that's a really poor way to use Velocity. it looks as though that method is intended to spit out some HTML hardcoded into whatever $macros is or some such thing. the HTML shouldn't come from the java, it should be in the template to begin with, or at least defined the global Velocimacro library. that way the code could just be: #showNavBar( true) anyway, i hope i'm not coming off too argumentative, it's just that these are poor examples of using velocity. i wouldn't want people to get the wrong idea. :) As I am a committer on the Roller project - I'm curious to know what a better way of implementing this would be. We do want Roller to be a best-practices examples - so any advice is appreciated! Thanks, Matt -Original Message- From: Nathan Bubna [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 2:12 PM To: Struts Developers List Subject: Re: Velocity vs. JSP: objective tests? Craig said: ... For example, here's a simple little loop example in Velocity syntax and a couple approaches in JSP: Velocity: (Note -- it's assumed that the Customer collection has been stored in the VelocityContext by some preceding business logic.) actually, if you are using the Velocity/Struts support in the Velocity Tools project, the recommended pattern is to define a set of tools in an xml config. these will then be automatically placed in the template's Context and available for you to pull the needed data. there are other ways of getting objects into the template still, but i don't have time to detail them here. see the docs concerning the VelocityViewServlet for that. oh, and Jon Stevens does a good job of explaining the Pull MVC Model here: http://jakarta.apache.org/turbine/turbine-2/pullmodel.html #foreach $result in $results { tr td$result.ID/td td$result.Name/td /tr } actually, this is syntax is almost completely wrong. :) a more fitting example would be: #foreach( $result in $sometool.results ) tr td$result.ID/td td$result.Name/td /tr #end velocity and it's supporting tools are evolving too. :-) ... * Velocity advocates used to argue that using Velocity was safer because it restricted what a page designer could do to calling getter methods. This was never a completely true argument (how do *you* know that the getter method of the beans you are calling doesn't mutate something?), but it's been pretty much eliminated by the fact that you can call arbitrary methods in Velocity. yes, it is possible to design badly even in Velocity, but perhaps we could agree it's at least harder in Velocity to do so. ... There was an interesting article on onjava.com about a project to implement a simple blogger app that used both Struts and Velocity: http://www.onjava.com/pub/a/onjava/2002/04/17/wblogosj2ee.html I was particularly struck by the following snippet of Velocity code: $macros.showNavBar(true) which builds part of the UI by rendering the navigation bar. I don't know about you, but that looks an awful lot like a scriptlet equivalent: % macros.showNavBar(true); % to me :-). yeah, no offense intended to David Johnson, but that's a really poor way to use Velocity. it looks as though that method is intended to spit out some HTML hardcoded into whatever $macros is or some such thing. the HTML shouldn't come from the java, it should be in the template to begin with, or at least defined the global Velocimacro library. that way the code could just be: #showNavBar( true) anyway, i hope i'm not coming off too argumentative, it's just that these are poor examples of using velocity. i wouldn't want people to get the wrong idea. :) Nathan Bubna [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [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: Tomcat 4.1.x
This problem turned out to have NOTHING to do with my code! It took me a day and a half to track down - talk about frustrating!! The problem was using the Jike 1.16 compiler. I can use Jike 1.15 or modern just fine with Ant. I also found that switching to modern from jikes reduced my build process from 1 min 20 seconds to 50 seconds - I'm sold ;-) Platform: Windows XP, JDK 1.4.1, Tomcat 4.0/4.x, Struts 1.1b2 Hope this helps anyone else who might hit this issue! Matt --- Matt Raible [EMAIL PROTECTED] wrote: Nevermind, it appears to be bugs in my code - sorry the traffic. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 4:15 PM To: '[EMAIL PROTECTED]' Subject: Tomcat 4.1.x I'm trying to upgrade my struts-based app (1.1b2) from Tomcat 4.0.4 to 4.1.10 and now 4.1.12 after today's announcement and JDK 1.4.1. However, I'm getting the following error that didn't occur on 4.0.4 with JDK 1.4.0_01 - any rough hints or ideas? java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty( PropertyUtils.java:475) at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty( PropertyUtils.java:410) at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(P ropertyUtils.java:749) at org.apache.commons.beanutils.PropertyUtils.getProperty(Propert yUtils.java:780) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(Requ estProcessor.java:786) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java:246) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:193) at com.onpoint.webapp.ActionFilter.doFilter(ActionFilter.java:296) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut henticatorBase.java:527) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(Certificat esValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:2397) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv
Re: Tomcat 4.1.x
From Ant's documentation at http://jakarta.apache.org/ant/manual/CoreTasks/javac.html: It is possible to use different compilers. This can be specified by either setting the global build.compiler property, which will affect all javac tasks throughout the build, or by setting the compiler attribute, specific to the current javac task. Valid values for either the build.compiler property or the compiler attribute are: classic (the standard compiler of JDK 1.1/1.2) – javac1.1 and javac1.2 can be used as aliases. modern (the standard compiler of JDK 1.3/1.4) – javac1.3 and javac1.4 can be used as aliases. --- Eddie Bush [EMAIL PROTECTED] wrote: The modern compiler? Thanks for the heads-up - could you explain what you mean by the modern compiler though? :-) Thanks! Matt Raible wrote: This problem turned out to have NOTHING to do with my code! It took me a day and a half to track down - talk about frustrating!! The problem was using the Jike 1.16 compiler. I can use Jike 1.15 or modern just fine with Ant. I also found that switching to modern from jikes reduced my build process from 1 min 20 seconds to 50 seconds - I'm sold ;-) Platform: Windows XP, JDK 1.4.1, Tomcat 4.0/4.x, Struts 1.1b2 Hope this helps anyone else who might hit this issue! Matt -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.1.x
Nevermind, it appears to be bugs in my code - sorry the traffic. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 24, 2002 4:15 PM To: '[EMAIL PROTECTED]' Subject: Tomcat 4.1.x I'm trying to upgrade my struts-based app (1.1b2) from Tomcat 4.0.4 to 4.1.10 and now 4.1.12 after today's announcement and JDK 1.4.1. However, I'm getting the following error that didn't occur on 4.0.4 with JDK 1.4.0_01 - any rough hints or ideas? java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty( PropertyUtils.java:475) at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty( PropertyUtils.java:410) at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(P ropertyUtils.java:749) at org.apache.commons.beanutils.PropertyUtils.getProperty(Propert yUtils.java:780) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:793) at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:726) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:978) at org.apache.struts.action.RequestProcessor.processPopulate(Requ estProcessor.java:786) at org.apache.struts.action.RequestProcessor.process(RequestProce ssor.java:246) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1292) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:193) at com.onpoint.webapp.ActionFilter.doFilter(ActionFilter.java:296) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut henticatorBase.java:527) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.CertificatesValve.invoke(Certificat esValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:2397) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480
Logging in Struts 1.1 Beta 2
My log4j.properties files was working for the nightly builds (even one from 2 days ago). But when I updated to the 1.1 Beta 2, I get the log messages below: log4j.properties log4j.category.org.apache.commons.validator.ValidatorResources=ERROR log4j.category.org.apache.struts.validator.ValidatorPlugIn=ERROR log4j.category.org.apache.commons.digester.Digester=ERROR log4j.category.org.apache.struts.action.RequestProcessor=ERROR log4j.category.org.apache.struts.tiles.TilesRequestProcessor=ERROR log4j.category.org.apache.struts.util.PropertyMessageResources=ERROR log messages I'm not expecting Aug 13, 2002 11:28:58 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Aug 13, 2002 11:28:58 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Aug 13, 2002 11:28:59 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='CustomResources', returnNull=true Aug 13, 2002 11:28:59 AM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='ApplicationResources', returnNull=true Aug 13, 2002 11:28:59 AM org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml' Aug 13, 2002 11:28:59 AM org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validation.xml' Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml' Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: required,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: minlength,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: maxlength,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: mask,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: byte,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: short,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: integer,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: long,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: float,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: double,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: date,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: range,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: creditCard,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Add ValidatorAction: email,org.apache.struts.util.StrutsValidator Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Loading validation rules file from '/WEB-INF/validation.xml' Aug 13, 2002 11:29:09 AM org.apache.commons.logging.impl.Jdk14Logger info INFO: Adding FormSet 'FormSet: language=null country=null variant=null -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tiles as a Plug-In
I'm trying to upgrade to last night's nightly build. In tiles-documentation.war (the only tiles webapp I saw) the following is no longer applicable: controller processorClass=org.apache.struts.tiles.TilesRequestProcessor / Is this true? Please confirm. Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: NPE when setting values on DynaActionForm
The call below results in: [javac]- [javac] 85. DynaActionForm requestForm = [javac] 86. DynaActionFormClass.getDynaActionFormClass(requestForm).newInstance(); [javac] -- [javac] *** Error: The type of the left-hand side in this assignment, org/apache/struts/action/DynaActionForm, is not compatible with the type of the right-hand side expression, org/apache/commons/beanutils/DynaBean. BUILD FAILED However, this seems to work: DynaActionForm requestForm = (DynaActionForm) DynaActionFormClass.getDynaActionFormClass(requestForm).newInstance(); --- Craig R. McClanahan [EMAIL PROTECTED] wrote: The required changes to implement this has been checked in, and will be available in nightly build 20020723 of Struts. The only difference is that you need to call: DynaActionForm requestForm = DynaActionFormClass.getDynaActionFormClass(requestForm).newInstance(); instead of the previously quoted method name, for consistency with previous method signatures. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[BUG] html:link forward does not add servlet context correctly
Any hints for fixing this in the nightly build? I'd like to fix it myself, rather than waiting for tonight's build. http://issues.apache.org/bugzilla/show_bug.cgi?id=10534 Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NPE when setting values on DynaActionForm
I want to populate a DynaActionForm before dispatching to a JSP, however the following doesn't work: DynaActionForm requestForm = new DynaActionForm(); requestForm.set(subject, subject); requestForm.set(content, content); requestForm.set(courseId, cForm.getCourseId()); requestForm.set(courseName, cForm.getName()); I get a NPE at the first .set - here is my configuration: form-bean name=requestForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=courseId type=java.lang.String/ form-property name=courseName type=java.lang.String/ form-property name=type type=java.lang.String/ form-property name=subject type=java.lang.String/ form-property name=content type=java.lang.String/ form-property name=message type=java.lang.String/ /form-bean Should it? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: NPE when setting values on DynaActionForm
A stack track may help: Caused by: java.lang.NullPointerException at org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:539) at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:357) at com.onpoint.webapp.action.CourseCatalogAction.add(CourseCatalogAction.java:86) ... 47 more Line 86 is the first set below --- Matt Raible [EMAIL PROTECTED] wrote: I want to populate a DynaActionForm before dispatching to a JSP, however the following doesn't work: DynaActionForm requestForm = new DynaActionForm(); requestForm.set(subject, subject); requestForm.set(content, content); requestForm.set(courseId, cForm.getCourseId()); requestForm.set(courseName, cForm.getName()); I get a NPE at the first .set - here is my configuration: form-bean name=requestForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=courseId type=java.lang.String/ form-property name=courseName type=java.lang.String/ form-property name=type type=java.lang.String/ form-property name=subject type=java.lang.String/ form-property name=content type=java.lang.String/ form-property name=message type=java.lang.String/ /form-bean Should it? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: NPE when setting values on DynaActionForm
--- Craig R. McClanahan [EMAIL PROTECTED] wrote: On Mon, 22 Jul 2002, Matt Raible wrote: Date: Mon, 22 Jul 2002 18:40:56 -0600 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: NPE when setting values on DynaActionForm I want to populate a DynaActionForm before dispatching to a JSP, however the following doesn't work: DynaActionForm requestForm = new DynaActionForm(); requestForm.set(subject, subject); requestForm.set(content, content); requestForm.set(courseId, cForm.getCourseId()); requestForm.set(courseName, cForm.getName()); I get a NPE at the first .set - here is my configuration: This won't work because the DynaActionForm you created doesn't know what the set of valid properties are. form-bean name=requestForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=courseId type=java.lang.String/ form-property name=courseName type=java.lang.String/ form-property name=type type=java.lang.String/ form-property name=subject type=java.lang.String/ form-property name=content type=java.lang.String/ form-property name=message type=java.lang.String/ /form-bean Should it? With the current APIs, it is surprisingly hard to do this, because there is no convenient way to get to the underlying DynaActionFormClass instance. Im going to be adding some API in tonight's nightly build so that you will be able to say: DynaActionForm requestForm = DynaActionFormClass.getDynaClass(requestForm).newInstance(); I'd much rather do the above ^ than the below. I'll look for a commit that resembles this and download the nightly tomorrow. Will it just be in BeanUtils? I'd be willing to make the jump to 1.1 nightly if Tiles has been safely integrated and there's a plugin example. Last time I updated was a few weeks ago. to get a DynaActionForm initalized with the correct properties. In the mean time, a workaround is to declare that your setup action also uses this form bean (so that Struts will set it up for you), or go through the following exercise: ApplicationConfig appConfig = (ApplicationConfig) request.getAttribute(Action.APPLICATION_KEY); FormBeanConfig fbConfig = appConfig.findFormBeanConfig(requestForm); DynaActionForm requestForm = DynaActionFormClass.createDynaActionFormClass(fbConfig).newInstance(); Thanks, Matt Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] Thanks, Matt __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: New Tag
Why not just replace: link href=/myapp/stylesheets/blah.css rel=stylesheet type=text/css with: link href='html:rewrite page=/stylesheets/blah.css/' rel=stylesheet type=text/css I think this is a better way because then you can specify a global-forward in strut-config and use rewrite forward if you want to allow someone to change at any time (site-wide). Also, what about this stylesheet syntax: style type=text/css media=screen @import url(html:rewrite page=/stylesheets/blah.css/); /style My 2 cents, Matt --- James Holmes [EMAIL PROTECTED] wrote: I'm not aware of anything that accomplishes what you're looking for, however, I've never gone looking for it either :) I would try looking at the JSTL stuff. Struts is headed that way. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- James Mitchell [EMAIL PROTECTED] wrote: Hey James H., Are you aware of any stylesheet tags in the core? One that will render a simple: link href=/myapp/stylesheets/blah.css rel=stylesheet type=text/css from something like this: util:styleSheet href=/stylesheets/blah.css/ To my knowledge there aren't any. I wrote my own last year, and I'd like to submit it if there's not a similar one. It's 50 lines (including comments, but not license) James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles And Struts
It's a miracle! ;) Thanks for doing this, now I can use XMLSpy to validate my tiles definitions. Matt --- Craig R. McClanahan [EMAIL PROTECTED] wrote: On Wed, 26 Jun 2002, James Holmes wrote: Date: Wed, 26 Jun 2002 11:02:52 -0700 (PDT) From: James Holmes [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: Struts Developers List [EMAIL PROTECTED] Subject: Re: Tiles And Struts While we're on the subject of Struts and Tiles can someone, with privilege to do so, add the Tiles dtd to the jakarta.apache.org/dtds/ directory. This is being referenced in the config files, but it returns a 403 forbidden when you try to access it. http://jakarta.apache.org/struts/dtds/tiles-config.dtd Done (by virtue of refreshing the Struts website). Ted, by the way, there is one file (news_2002_q1.html) that has 644 permissions instead of 664 in /www/jakarta.apache.org/struts. Could you please reset the perms on this? -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Validation on DynamicForm problem
You might try matching up your form names in your validation.xml file: form-validation formset form name=LogonForm field property=user depends=required arg0 key=error.user.required/ /field /form /formset /form-validation Should be logonForm according to struts-config.xml. HTH, Matt --- Struts-dev Newsgroup [EMAIL PROTECTED] wrote: Subject: Validation on DynamicForm problem From: Tomas [EMAIL PROTECTED] === Hello, how, to make verification (validation) of dynamic forms ? in struts-config.xml is: struts-config . . . form-bean name=logonForm dynamic=true type=org.apache.struts.validator.DynaValidatorActionForm form-property name=user type=java.lang.String / form-property name=password type=java.lang.String / /form-bean action-mappings action path=/logon type=simple.LogonAction name=logonForm validate=true scope=session input=/index.jsp /action /action-mappings !-- == Message Resources Definitions === -- message-resources parameter=org.apache.struts.webapp.validator.ApplicationResources/ !-- == Plug-in Definitions == -- plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml/ /plug-in . . . /struts-config in file validator.xml is: form-validation formset form name=LogonForm field property=user depends=required arg0 key=error.user.required/ /field /form /formset /form-validation in web.xml is: web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value3/param-value /init-param init-param param-namedetail/param-name param-value3/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet /web-app no efect in edit form, always (but still) error messages: 747375 [HttpProcessor[80][4]] DEBUG org.apache.struts.action.RequestProcessor - Validating input form properties 747375 [HttpProcessor[80][4]] DEBUG org.apache.struts.action.RequestProcessor - No errors detected, accepting input Can you help? Second question is, how to used text fields (width indexed=true) on dynamic forms? [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
XHTML in 1.1?
Will this be fixed in 1.1: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5518 I posted a patch at http://www.raibledesigns.com/struts/xhtml-contrib.zip about 6 months ago ;) Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: forEach compared to logic:iterate
This looks like it will work, but there is no c:declare tag in JSTL. There is a c:set, but it has no type attribute. Thanks, Matt -Original Message- From: Tim Moore [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 12:22 PM To: Struts Developers List Subject: RE: forEach compared to logic:iterate c:forEach var=pageInfo items=${topicForm.pages} c:declare id=pageInfo type=package.PageForm/ html:link forward=getPage name=pageInfo property=pageTopicMap title=%=pageInfo.getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /c:forEach The important part is the c:declare, which defines the scripting variable (var attributes in other tags don't). Also the type attribute lets you remove the cast from the scriptlet. You could also use bean:define, but if you're migrating away from Struts tags, you'll probably want to do it this way. -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 1:01 AM To: 'Tag Libraries Users List' Cc: 'Struts Developers List' Subject: c:forEach compared to logic:iterate I'm using the logic:iterate tag in the following manner: logic:iterate id=pageInfo name=topicForm property=pages html:link forward=getPage name=pageInfo property=pageTopicMap title=%=((PageForm)pageInfo).getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /logic:iterate Which works great! However, I was hoping to migrate my logic tags to JSTL and the following doesn't work: c:forEach var=pageInfo items=${topicForm.pages} html:link forward=getPage name=pageInfo property=pageTopicMap title=%=((PageForm)pageInfo).getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /c:forEach However, I get the following error when I try this: [ServletException in:/viewer/coursePage.jsp] Unable to compile class for JSP An error occured between lines: 83 and 84 in the jsp file: /viewer/coursePage.jsp Generated servlet error: D:\Tools\tomcat-4.0.1\work\localhost\onpoint\viewer\coursePage $jsp.java: 743: Undefined variable: pageInfo _jspx_th_html_link_0.setTitle(((PageForm)pageInfo).getName()); ^ 1 error ' -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [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]
c:forEach compared to logic:iterate
I'm using the logic:iterate tag in the following manner: logic:iterate id=pageInfo name=topicForm property=pages html:link forward=getPage name=pageInfo property=pageTopicMap title=%=((PageForm)pageInfo).getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /logic:iterate Which works great! However, I was hoping to migrate my logic tags to JSTL and the following doesn't work: c:forEach var=pageInfo items=${topicForm.pages} html:link forward=getPage name=pageInfo property=pageTopicMap title=%=((PageForm)pageInfo).getName()% c:out value=${pageInfo.pageSequence + 1}/ /html:link /c:forEach However, I get the following error when I try this: [ServletException in:/viewer/coursePage.jsp] Unable to compile class for JSP An error occured between lines: 83 and 84 in the jsp file: /viewer/coursePage.jsp Generated servlet error: D:\Tools\tomcat-4.0.1\work\localhost\onpoint\viewer\coursePage$jsp.java: 743: Undefined variable: pageInfo _jspx_th_html_link_0.setTitle(((PageForm)pageInfo).getName()); ^ 1 error ' -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multipart/form-data (bug?) or intended behavior?
Rob, this is how it works pre-1.1. 1.1b1 has a bug in it and is not even usable (for me). In 1.1 you have to add redirect=true to your action forward to forward to another action. This is only when using the multi-part request. Search the archives for more information. Matt -Original Message- From: Jens Viebig [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 7:09 AM To: Struts Developers List; [EMAIL PROTECTED] Subject: Re: multipart/form-data (bug?) or intended behavior? I posted a Patch to this Mailing List a few days ago, but nobody seems to be interested in it. I got an Error in 1.1b even when i just forwarded a Multipart-Request to a JSP-Page.It's a bug in the RequestProcessor doForward() Method. There the MultipartRequestWrapper must be unwrapped to a normal HttpServletRequest-Object. See the patch - Original Message - From: rob [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 18, 2002 2:47 PM Subject: multipart/form-data (bug?) or intended behavior? It's been this way since struts 1.0 (and likely prior to) but http requests carrying multipart/form-data posts result in an exception being thrown if forwarded through more than one action. (e.g request flow) 1 - submit multipart/form-data request (with at least one file input) request is forwarded to ActionOne. 2 - ActionOne handles multipart data, writes a file to disk does something with other parameters etc. then forwards to ActionTwo. 3 - Exception is thrown. This occurs in the following versions I've tested 1.0.x, 1.1-b1. Copies of the exceptions follow this post. Workaround, never forward to a second action, always forward to a .jsp which must be the end point for the request after the first action. (This kind of sucks). If this is a bug then consider it submitted, if it's designed this way then how about changing it? (pretty please?) Thanks Rob -- 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: File Upload button label
Try searching the archives for the Users list in the future, but since it's easy: html:submit bean:message key=submit.label/ /html:submit You might be thinking for the Browse label on the input type=file but that's not possible in the current HTML spec. -Original Message- From: Juan de Castro Paredes [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 10:52 AM To: Struts Developers List Subject: File Upload button label Hi, Hi, does anybody know how to change the Submit label on the Submit button? I have tried with: html:file property=file value=Go for it/ but does not change the label at all... Thanx in advance, Juan -- To unsubscribe, e-mail: mailto:struts-dev- [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: Is FormBean mandatory???
Web forms can only handle Strings and booleans - so if your value objects have Dates or Integers, get ready for some fun! -Original Message- From: Sachin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 1:47 AM To: [EMAIL PROTECTED] Subject: Is FormBean mandatory??? Hi Action class interacts with a model,where business logic resides.In my project i have designed the model in such a way that there is mapping of a table with a Value Object.So the Value Object will have a setter getter methods.(for eg. if there are 5 columns in a table,then Value object will have 5 setter getter methods ). In action class i call some business methods which returns Value Object .Then i put the Value Object in the session and retrieve the same in jsp page with the help of iterate tag. In this scenario if i donot use form bean,then also i will be able to proceed in my jsp page. Could anyone explain the pros cons of not using form beans in my project and are there any performance issues in this context?? Thanks Regards, Sachin -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Nightly Build 04/09/02 - Problem with Tiles
I updated to the nightly build tonight and when running Tiles, I get the error below. I was using a recent build (2-3 weeks) for the past couple weeks and it's been running fine - anything change? In JSP: [Exception in:/layouts/menuLayout.jsp] org.apache.struts.tiles.xmlDefinition.XmlAttribute In Error Log: 2002-04-09 23:59:20 ApplicationDispatcher[/onpoint] Servlet.service() for servlet jsp threw exception java.lang.ClassCastException: org.apache.struts.tiles.xmlDefinition.XmlAttribute at org.apache.jsp.menuLayout$jsp._jspService(menuLayout$jsp.java:105) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet$JspServletWrapper .service(IDEJspServlet.java:172) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.serviceJspFile(ID EJspServlet.java:234) at org.netbeans.modules.tomcat.tomcat40.runtime.IDEJspServlet.service(IDEJspSer vlet.java:326) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Menu 1.1
This one works for me: http://husted.com/struts/resources/struts-menu.zip -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 9:09 AM To: Struts Developers List Subject: Re: Struts Menu 1.1 At 7:40 AM -0800 4/5/02, Struts-dev Newsgroup (@Basebeans.com) wrote: Subject: Struts Menu 1.1 From: Vic Cekvenich [EMAIL PROTECTED] === I have put the Struts Menu 1.1 on my web site (StrutsPlus.com) The menu looks nice (but not my site, yet) Looks like the link from the Struts site to download this is broken http://jakarta.apache.org/struts/userGuide/resources.html links to http://jakarta.apache.org/struts/userGuide/resources/struts-menu.zip which is 404. Anyone know the right link? Joe -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 tune in posse radio: http://www.live365.com/stations/289268 -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Menu 1.1
I noticed StrutsPlus.com uses coolmenus3 - but I don't think the struts-menu does. Any comments? Didja know coolmenus4 is out? Matt -Original Message- From: Struts-dev Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 8:40 AM To: [EMAIL PROTECTED] Subject: Struts Menu 1.1 Subject: Struts Menu 1.1 From: Vic Cekvenich [EMAIL PROTECTED] === I have put the Struts Menu 1.1 on my web site (StrutsPlus.com) The menu looks nice (but not my site, yet) Vic -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Menu 1.1
I'd use Coolmenus instead of HVMenu - here's why: Coolmenus (http://www.dhtmlcentral.com/projects/coolmenus/) is free! HVMenu costs money - here's an e-mail I got from the owner: For commercial use of Menu and PopMenu: 1-5 sites US$ 50 6-10 sites US$ 75 11-25 sites US$ 125 unlimited sites US$ 250 Coolmenus is already integrated into struts-menu - I think we should upgrade it to Coolmenus4, and definitely integrate roles and stuff. I'd be willing to help. Maybe we could post it at sourceforge.net with Ted Husted's other project... Matt -Original Message- From: chaz [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:28 AM To: Struts Developers List Subject: Re: Struts Menu 1.1 Is anyone doing active maintenance on Struts Menu? I took the version (originally from Scott Sayles) from Ted's site, and extened it to allow me to dynamically build the menu's based on a a users login (application level roles). Also I'm using HVMenu from dynamicdrive.com, which seemed to be more amenable to what I was trying to do. chaz On Fri, 5 Apr 2002, Struts-dev Newsgroup wrote: Date: Fri, 5 Apr 2002 07:40:02 -0800 From: Struts-dev Newsgroup [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts Menu 1.1 Subject: Struts Menu 1.1 From: Vic Cekvenich [EMAIL PROTECTED] === I have put the Struts Menu 1.1 on my web site (StrutsPlus.com) The menu looks nice (but not my site, yet) Vic -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- Charles E Brault [EMAIL PROTECTED] Where are we going, and why am I in this handbasket? -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Menu 1.1
Correction - coolmenus is not integrated into the original struts-menu. It appears that Vic from strutsplus.com integrated it into his version... Can we get the source ;)? Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:36 AM To: 'Struts Developers List' Subject: RE: Struts Menu 1.1 I'd use Coolmenus instead of HVMenu - here's why: Coolmenus (http://www.dhtmlcentral.com/projects/coolmenus/) is free! HVMenu costs money - here's an e-mail I got from the owner: For commercial use of Menu and PopMenu: 1-5 sites US$ 50 6-10 sites US$ 75 11-25 sites US$ 125 unlimited sites US$ 250 Coolmenus is already integrated into struts-menu - I think we should upgrade it to Coolmenus4, and definitely integrate roles and stuff. I'd be willing to help. Maybe we could post it at sourceforge.net with Ted Husted's other project... Matt -Original Message- From: chaz [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:28 AM To: Struts Developers List Subject: Re: Struts Menu 1.1 Is anyone doing active maintenance on Struts Menu? I took the version (originally from Scott Sayles) from Ted's site, and extened it to allow me to dynamically build the menu's based on a a users login (application level roles). Also I'm using HVMenu from dynamicdrive.com, which seemed to be more amenable to what I was trying to do. chaz On Fri, 5 Apr 2002, Struts-dev Newsgroup wrote: Date: Fri, 5 Apr 2002 07:40:02 -0800 From: Struts-dev Newsgroup [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts Menu 1.1 Subject: Struts Menu 1.1 From: Vic Cekvenich [EMAIL PROTECTED] === I have put the Struts Menu 1.1 on my web site (StrutsPlus.com) The menu looks nice (but not my site, yet) Vic -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- Charles E Brault [EMAIL PROTECTED] Where are we going, and why am I in this handbasket? -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Menu 1.1
Hmm, no released files at http://sourceforge.net/project/showfiles.php?group_id=49385 Do I have to become a developer? I tried to browse CVS, but nothing there either... Matt -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:44 AM To: Struts Developers List Subject: Re: Struts Menu 1.1 You can get the struts menu at Source Forge. Joe Germuska wrote: At 7:40 AM -0800 4/5/02, Struts-dev Newsgroup (@Basebeans.com) wrote: Subject: Struts Menu 1.1 From: Vic Cekvenich [EMAIL PROTECTED] === I have put the Struts Menu 1.1 on my web site (StrutsPlus.com) The menu looks nice (but not my site, yet) Looks like the link from the Struts site to download this is broken http://jakarta.apache.org/struts/userGuide/resources.html links to http://jakarta.apache.org/struts/userGuide/resources/struts-menu.zip which is 404. Anyone know the right link? Joe -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Declarative Exception Handling - Any Documentation?
1. Since a key has to be specified in struts-config.xml - what is the point of the super(key, value) in ExpiredPasswordException? 2. I added the code from %-- Error Messages --% to changePassword.jsp, and the key=expired.password showed up on the page. However, when I added {0} to the key, no substitution occurred. Is this a bug? I can enter into bugzilla if so. Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 8:21 PM To: 'Struts Developers List' Subject: RE: Declarative Exception Handling - Any Documentation? After investigating the PasswordExpiredException, I'm a little confused. This class uses the following code: code public ExpiredPasswordException(String username) { super(error.password.expired, username); } /code But there is no key error.password.expired in ApplicationResources.properties. In struts-config.xml there is exception key=expired.password type=org.apache.struts.webapp.example.ExpiredPasswordExceptio n path=/changePassword.jsp/ And I found an expired.password key, but this is never used. How are each designed to be used - simply for logging? There are no messages that show up in the log for either of these. Here's how I would expect these to be used. 1. If no key is specified in struts-config, then the key error.password.expired would be used. 2. This message would be attainable with the following JSP code: %-- Error Messages --% logic:messagesPresent html:messages id=error bean:write name=error/br/ /html:messages /logic:messagesPresent Is this correct? Also, is it possible to have a separate .properties file for Exception messages? This stuff is great, as well as the rest of Struts - awesome to work with this stuff. You all do an awesome job - makes my life a lot easier. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 5:55 PM To: Struts Developers List; [EMAIL PROTECTED] Subject: Re: Declarative Exception Handling - Any Documentation? On Wed, 20 Mar 2002, Matt Raible wrote: Date: Wed, 20 Mar 2002 17:18:45 -0700 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED], [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Declarative Exception Handling - Any Documentation? I *think* declarative exception handling has been added to the 1.1 beta 1 - correct me if I'm wrong. If so, where can I find good documentation and examples on how to use it? This is all I found: http://www.mail-archive.com/struts- [EMAIL PROTECTED]/msg04150.htm l It has. To use it, you have to use the (new) execute() method in your Actions, instead of perform() -- the signature includes throws Exception so that you can throw any kind of exception you wish, and then have the controller catch it. To configure usage, use the exception elements inside a global-exceptions section for global definitions, or inside an action element for local overrides, analogous to the way forwards work. A contrived use of this is in the Struts example webapp -- if you enter the username arithmetic, LogonAction will throw an ArithmeticException. Likewise, if you enter the username expired it will throw an ExpiredPasswordException (a business logic exception unique to this webapp). Only the business logic exception has a defined handler: action path=/logon ... exception key=expired.password type=org.apache.struts.webapp.example.ExpiredPasswordException path=/changePassword.jsp/ /action Also, will Tiles be adapted as a Plug In? Makes sense to me ... but I'm not going to have a chance to do it. I upgraded my app using 1.1 beta 1 with Tiles Validator this afternoon - took me about 10 minutes. Mostly validator changes. Nice work! Cool! Matt Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Declarative Exception Handling - Any Documentation?
I *think* declarative exception handling has been added to the 1.1 beta 1 - correct me if I'm wrong. If so, where can I find good documentation and examples on how to use it? This is all I found: http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04150.html Also, will Tiles be adapted as a Plug In? I upgraded my app using 1.1 beta 1 with Tiles Validator this afternoon - took me about 10 minutes. Mostly validator changes. Nice work! Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Declarative Exception Handling - Any Documentation?
Sorry, STFA eh? I found an example in struts-example - any others examples? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 5:19 PM To: [EMAIL PROTECTED] Subject: Declarative Exception Handling - Any Documentation? I *think* declarative exception handling has been added to the 1.1 beta 1 - correct me if I'm wrong. If so, where can I find good documentation and examples on how to use it? This is all I found: http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04150.html Also, will Tiles be adapted as a Plug In? I upgraded my app using 1.1 beta 1 with Tiles Validator this afternoon - took me about 10 minutes. Mostly validator changes. Nice work! Matt -- 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: Declarative Exception Handling - Any Documentation?
After investigating the PasswordExpiredException, I'm a little confused. This class uses the following code: code public ExpiredPasswordException(String username) { super(error.password.expired, username); } /code But there is no key error.password.expired in ApplicationResources.properties. In struts-config.xml there is exception key=expired.password type=org.apache.struts.webapp.example.ExpiredPasswordException path=/changePassword.jsp/ And I found an expired.password key, but this is never used. How are each designed to be used - simply for logging? There are no messages that show up in the log for either of these. Here's how I would expect these to be used. 1. If no key is specified in struts-config, then the key error.password.expired would be used. 2. This message would be attainable with the following JSP code: %-- Error Messages --% logic:messagesPresent html:messages id=error bean:write name=error/br/ /html:messages /logic:messagesPresent Is this correct? Also, is it possible to have a separate .properties file for Exception messages? This stuff is great, as well as the rest of Struts - awesome to work with this stuff. You all do an awesome job - makes my life a lot easier. Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 5:55 PM To: Struts Developers List; [EMAIL PROTECTED] Subject: Re: Declarative Exception Handling - Any Documentation? On Wed, 20 Mar 2002, Matt Raible wrote: Date: Wed, 20 Mar 2002 17:18:45 -0700 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED], [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Declarative Exception Handling - Any Documentation? I *think* declarative exception handling has been added to the 1.1 beta 1 - correct me if I'm wrong. If so, where can I find good documentation and examples on how to use it? This is all I found: http://www.mail-archive.com/struts- [EMAIL PROTECTED]/msg04150.htm l It has. To use it, you have to use the (new) execute() method in your Actions, instead of perform() -- the signature includes throws Exception so that you can throw any kind of exception you wish, and then have the controller catch it. To configure usage, use the exception elements inside a global-exceptions section for global definitions, or inside an action element for local overrides, analogous to the way forwards work. A contrived use of this is in the Struts example webapp -- if you enter the username arithmetic, LogonAction will throw an ArithmeticException. Likewise, if you enter the username expired it will throw an ExpiredPasswordException (a business logic exception unique to this webapp). Only the business logic exception has a defined handler: action path=/logon ... exception key=expired.password type=org.apache.struts.webapp.example.ExpiredPasswordException path=/changePassword.jsp/ /action Also, will Tiles be adapted as a Plug In? Makes sense to me ... but I'm not going to have a chance to do it. I upgraded my app using 1.1 beta 1 with Tiles Validator this afternoon - took me about 10 minutes. Mostly validator changes. Nice work! Cool! Matt Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validator conflict with Nightly build?
I'm using tiles and validator in my project. I just downloaded the nightly build of struts (3/14) and replaced all my jar's - except for validator as it's not in the distro. Now I'm getting the following error: - Root Cause - java.lang.NoSuchMethodError at org.apache.struts.validator.util.StrutsValidatorUtil.getArgs(Unknown Source) at org.apache.struts.validator.util.StrutsValidatorUtil.getMessage(Unknown Source) at org.apache.struts.validator.taglib.html.JavascriptValidatorTag.doStartTa g(Unknown Source) I reverted back to the 3/13 nightly build and it works fine. On another note, I saw the maxFileSize attribute added in the struts-config.xml for struts-upload. Do I have to add any extra code in my UploadAction to handle this? Thanks, Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Humorous error when running nightly build of struts-example
java.lang.IllegalArgumentException: Class 'org.apache.struts.action.DynaActionForm' is not a subclas s of 'org.apache.struts.action.DynaActionForm' I couldn't resist sharing this. Matt -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: XHTML-compliant tags
I would recommend that you remove the styleId attribute from the taglib. I use CSS quite a bit and I've never used this on the form level. The other thing we probably need is a strict attribute for the html:html tag - or at least someway of detecting a string DTD or transitional DTD. One of the differences b/w them is that strict doesn't allow name as part of the form tag, but only id. Also, all tag attributes (except for values) must be lowercase. It's been awhile since I patched this, so it might best that I do it all over again. If you could let me know when a good time to do this is - that'd be great. I probably need about 2 days. Any ideas from the group on setting/determining strict vs. transitional is appreciated. Thanks, Matt -Original Message- From: Martin Cooper [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:59 PM To: Struts Developers List; [EMAIL PROTECTED] Subject: Re: XHTML-compliant tags Hi Matt, This is still on my personal list of things I want to get in to Struts 1.1. I've been holding off precisely because I don't know what we should do about Bugzilla #4868. If anyone has any good ideas about this, I'd love to hear them. If we can resolve that issue (or if it would work to resolve #5518 while leaving #4868 open), I'd be glad to make the changes. A patch would be a *huge* help. However, you should be aware that I have some other taglib changes in process that would affect a diff, so you might want to wait if you're thinking of providing a patch. (I can let you know when I'm done, if you like.) -- Martin Cooper - Original Message - From: Matt Raible [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 19, 2002 8:49 AM Subject: XHTML-compliant tags Just wanted to get a status on this bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5518 Wondering if I should patch a distribution or if this will be released soon? Also, I don't know how to resolve this - but surely it will come up: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4868 When a user wants strict compliance, the form name= needs to be replaced with form id= and this might cause problems in javascript with document.formName. Thanks, Matt -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
XHTML-compliant tags
Just wanted to get a status on this bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5518 Wondering if I should patch a distribution or if this will be released soon? Also, I don't know how to resolve this - but surely it will come up: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4868 When a user wants strict compliance, the form name= needs to be replaced with form id= and this might cause problems in javascript with document.formName. Thanks, Matt
RE: Custom tag library for WML
Sweet - I hope to (1) find a project I can develop a WML interface for and (2) use your tags! Any chance you have a reference implementation for download? Thanks, Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 8:06 AM To: [EMAIL PROTECTED] Subject: Custom tag library for WML I needed a custom tag library to generate WML pages rather like the existing HTML tag library. Since there wasn't one, I've started writing one, and am currently using it. Since I'm about to cut the first production release of my application and haven't had to make any changes to the tag library in a while, I figured it's probably safe to de-lurk now. If you would like to evaluate the tag library, I've posted a source patchfile and binary distributions for both 1.0.1 and 1.0.2 after applying the patchfile. Come 'n get it at URL:http://www.mindspring.com/~mmorris/ -- To unsubscribe, e-mail: mailto:struts-dev- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-dev- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Logging and logClassName
This discussion was started here: http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg04513.html I am using the latest nightly builds for struts, tiles and validator. I have log4j configured and working, but I am still getting the following messages right after tiles initializes: logClassName=org.apache.commons.logging.impl.NoOpLog logClassName=org.apache.commons.logging.impl.NoOpLog Anyone know where these are coming from? Is it possible to declaratively switch to Log4JCategoryLog from this default? Thanks, Matt
Nightly Build - struts-config and DynaActionForms
I just downloaded the nightly build and it doesn't appear that the 1_1 DTD has been updated for DynaActionForms. Is this true? logClassName=org.apache.commons.logging.impl.Log4JCategoryLog INFO [main] [org.apache.commons.digester.Digester.sax] Log4JCategoryLog.info(142) | startDocument() INFO [main] [org.apache.commons.digester.Digester.sax] Log4JCategoryLog.info(142) | endDocument() INFO [main] [org.apache.commons.digester.Digester.sax] Log4JCategoryLog.info(142) | startDocument() ERROR [main] [org.apache.commons.digester.Digester] Log4JCategoryLog.error(182) | Parse Error at lin e 21 column -1: Element form-bean does not allow form-property here. org.xml.sax.SAXParseException: Element form-bean does not allow form-property here. at org.apache.crimson.parser.Parser2.error(Parser2.java:3160) at org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(Val idatingParser.jav a:349) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1317) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.content(Parser2.java:1779) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500) at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) at org.apache.commons.digester.Digester.parse(Digester.java:1301) at org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServl et.java:741) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:408) at org.apache.struts.tiles.ActionComponentServlet.init(ActionComponentServl et.java:52) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3267) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3384 ) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454) at org.apache.catalina.core.StandardHost.install(StandardHost.java:712) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:599) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:777) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:46 3) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:612) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:505) at org.apache.catalina.startup.Catalina.start(Catalina.java:776) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) ERROR [main] [org.apache.commons.digester.Digester] Log4JCategoryLog.error(182) | Parse Error at lin e 21 column -1: Element type form-property is not declared.
Exception creating bean of DynaActionForm
First of all - thanks for adding this feature Craig. I am now trying to use it in my application. I followed the syntax I found in last night's struts-example struts-config.xml - and copied all the jars from it. So I have as follows: form-bean name=courseForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=courseId type=java.lang.int/ form-property name=courseName type=java.lang.String/ form-property name=description type=java.lang.String/ form-property name=topics type=java.lang.String[]/ form-property name=creator type=java.lang.String/ /form-bean In my JSP page I have: html:form action=/editCourse html:submit property=action/ /html:form But I'm getting this exception: javax.servlet.ServletException: javax.servlet.ServletException: Exception creating bean of class org.apache.struts.action.DynaActionForm: {1} at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457) at org.apache.jsp.courseList$jsp._jspService(courseList$jsp.java:180) 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) __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Exception creating bean of DynaActionForm
I'm thinking this might've had to do with the java.lang.String[] - cause it works when I simply have action defined as a property. Is it possible to declare arrays for this? Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 10:30 AM To: Struts Developers List Subject: Exception creating bean of DynaActionForm First of all - thanks for adding this feature Craig. I am now trying to use it in my application. I followed the syntax I found in last night's struts-example struts-config.xml - and copied all the jars from it. So I have as follows: form-bean name=courseForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=courseId type=java.lang.int/ form-property name=courseName type=java.lang.String/ form-property name=description type=java.lang.String/ form-property name=topics type=java.lang.String[]/ form-property name=creator type=java.lang.String/ /form-bean In my JSP page I have: html:form action=/editCourse html:submit property=action/ /html:form But I'm getting this exception: javax.servlet.ServletException: javax.servlet.ServletException: Exception creating bean of class org.apache.struts.action.DynaActionForm: {1} at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:457) at org.apache.jsp.courseList$jsp._jspService(courseList$jsp.java:180) 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.ja va: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) __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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]
Digester.debug() deprecated - what to replace with?
Cool - thanks! Also, I'm trying to use the workflow sample from struts-simple and I'm getting a deprecation warning on RegistryServlet. I looked in the javadocs for 1.1.1 of Digester, but gives no indication of what the new method should be. Thanks, Matt -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 12:07 PM To: Struts Developers List; [EMAIL PROTECTED] Subject: RE: Exception creating bean of DynaActionForm On Thu, 17 Jan 2002, Matt Raible wrote: Date: Thu, 17 Jan 2002 11:49:20 -0700 From: Matt Raible [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED], [EMAIL PROTECTED] To: Struts Developers List [EMAIL PROTECTED] Subject: RE: Exception creating bean of DynaActionForm I'm thinking this might've had to do with the java.lang.String[] - cause it works when I simply have action defined as a property. Is it possible to declare arrays for this? It's supposed to allow you to declare arrays that way -- it looks like I forgot to put in the special handling that is required. Will be patched today. Thanks, Matt Craig -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 10:30 AM To: Struts Developers List Subject: Exception creating bean of DynaActionForm First of all - thanks for adding this feature Craig. I am now trying to use it in my application. I followed the syntax I found in last night's struts-example struts-config.xml - and copied all the jars from it. So I have as follows: form-bean name=courseForm type=org.apache.struts.action.DynaActionForm form-property name=action type=java.lang.String/ form-property name=courseId type=java.lang.int/ form-property name=courseName type=java.lang.String/ form-property name=description type=java.lang.String/ form-property name=topics type=java.lang.String[]/ form-property name=creator type=java.lang.String/ /form-bean In my JSP page I have: html:form action=/editCourse html:submit property=action/ /html:form But I'm getting this exception: javax.servlet.ServletException: javax.servlet.ServletException: Exception creating bean of class org.apache.struts.action.DynaActionForm: {1} at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:457) at org.apache.jsp.courseList$jsp._jspService(courseList$jsp.java:180) 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.ja va: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) __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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: JSPTL EA3 - x:transform tag and struts:html tag
I got this figured out - I just put my html:html and html:base tag in my XSL stylesheet and now it works fine. Still wondering if anyone has ideas on #3 though. Thanks, Matt -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 8:38 PM To: Tag Libraries Users List Cc: [EMAIL PROTECTED] Subject: JSPTL EA3 - x:transform tag and struts:html tag I downloaded the latest nightly build and this error went away. However, I now a few new issues: 1. If I call my JSP Page directly (which is contentType=text/xml), the html:html xhtml=true locale=true is translated to html lang=en xml:lang=en. But when I call it with the following transform code: c:import url=/pages/index.jsp var=xml/ c:import url=/styles/xsl-xhtml.jsp var=xslt/ x:transform source=$xml xslt=$xslt/ It gets rendered as html xhtml= locale=. 2. There is another struts tag html:base/ that is rendered when I call the page directly, but not when I call it with the code above. 3. I'm wondering if anyone has suggestions for determining the XSL stylesheet to use above. I'd love to detect if the client is a WAP device, and if so, change the c:import to be url=/styles/xsl-wap.jsp. The rest of the struts tags (bean, html) seem to work fine, both in my $xml file and in my $xlst files. Sorry for the cross post to the Struts Dev list, but wanted to see if anyone has seen this behavior. Any ideas are appreciated. Thanks, Matt -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 3:11 PM To: Tag Libraries Users List Subject: Re: JSPTL EA3 - x:transform works, but error in tomcat Are you sure that html:html is producing a well-formed XML document (i.e., with a single root element)? Shawn On Mon, 14 Jan 2002, Matt Raible wrote: I am trying to use the x:transform tag to render the following page (code pasted below). The transformation works (displayed in browser correctly), but the following error shows in tomcat's log: SystemId Unknown; Line 55; Column -1; Can not load requested doc: Document root element is missing. Code from page - %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ taglib uri=http://java.sun.com/jstl/ea/core; prefix=c % %@ taglib uri=http://java.sun.com/jstl/ea/xml; prefix=x % c:import url=/styles/xsl-xhtml.jsp var=xslt/ x:transform xslt=$xslt html:html locale=true xhtml=true properties authorMatt Raible/author titlebean:message key=index.title//title headingbean:message key=index.heading//heading /properties body !-- TODO: Remove ALL HTML -- logic:notPresent name=database scope=application span class=error ERROR: User database not loaded -- check servlet container logs for error messages. /span hr / /logic:notPresent logic:notPresent name=org.apache.struts.action.MESSAGE scope=application span class=error ERROR: Application resources not loaded -- check servlet container logs for error messages. /span /logic:notPresent ul lihtml:link page=/do/editRegistration?action=Createbean:message key=index.registration//html:link/li lihtml:link page=/logon.jspbean:message key=index.logon//html:link/li /ul html:link page=/do/tour bean:message key=index.tour/ /html:link /body /html:html /x:transform -- 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]