Re: Is Tiles the right way to go?
Do you know where the trend will go? your sitemesh or tiles? On Tue, 31 Aug 2004 01:57:03 -0400, Rick Reumann [EMAIL PROTECTED] wrote: PC Leung wrote: I am trying to learn Tiles. Is Tiles the right way to go with Struts? Should I study other tool before sticking with Tiles? Tiles is pretty cool, but I find Sitemesh actually easier to use (a lot less maintenance also once it's set up for an application). I have a quick tutorial and simple struts app using it that you can download. http://www.reumann.net/struts/lessons/sitemesh/rr_sitemesh_example.jsp (There's some things I need to update on the link above, but it'll give you a start if you want to give it a try.) -- Rick - 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: [OT] Tomcat MD5 Authentication
On 30/08/2004 22:34 Steven Leija wrote: I'm trying to configure Tomcat to use MD5 encryption for my JDBCRealm. Has anyone successfully gotten this to work? Thanks, Steven Yes. It works a trat for me. Your RDBMS will need to be able to support MD5 passwords of course. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Design patterns used in Struts
Well, original poster asked the question for some reason. Who knows, maybe he has to give a presentation of Struts? I wouldn't like to embarrass myself by speaking of patterns that do not exist. Have a look at some random books on the subject, I'll bet they all talk about Model 1, Model 2, and MVC and none about MVC1 and MVC2. As does art of web development, by the way, at least according to the table of contents (I have not actually read that book). I think the reviewer was just confused. I am not sure whether MVC2 has been said to be the XML extension of MVC1, can you please provide some links (or did you just pull that one out of your hat :) ? The whole point of patterns is to create a common language for describing universal solutions. If you start to speak of MVC1 and MVC2 patterns, majority of people will not understand what you are talking about. That is why I care about precise nomenclature in this matter, and you should too... From: Michael McGrady [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: AW: Design patterns used in Struts Date: Mon, 30 Aug 2004 08:05:12 -0700 Janne Mattila wrote: I think you have some confusion of terms there MVC = a general (non-JSP specific) architectural Model-View-Controller pattern Model1 and Model2 = models (or patterns) for implementing web applications with JSP technology. Model2 implements the MVC pattern. From: Michael McGrady [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: AW: Design patterns used in Struts Date: Mon, 30 Aug 2004 04:58:00 -0700 Rosenberg, Leon wrote: Sorry, but what is MVC2? There is no such pattern by Gamma :-) And I've never heard of an MVC2 paradigma... Or do you mean Model2? Google *MVC2 java Michael Some suggest that MVC2 is the XML extension of MVC1. Who care about the precise nomenclature at this point? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Questions on logging
Hi I am in the stage of implementing logging in my struts application. I have been reading online but have some questions unanswered. 1. Action class should be thread-safe. Therefore no static variable, I should just use a non-static variable to hold my logger? 2. In a multi-user web application, how can I keep logs from the same class (same execution thread or same user request) stays together? I envision them to be all messy in the log file when there's multiple user requesting for the same action class. 3. About the thread safe issue with Actin class, that doesn't apply to the other classes that action execute right? Those are treated as normal java files. Thanks Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Questions on logging
1. thread-safe require no variable (instance or static) that a thread may consider to be the only one to update. Read-only member (as a logger instance) can be used safely. 2. you can configure log4j to add the thread id to the log, so that a simple grep will extract all logs for a request. 3. other classes can be used as you designed them. If they're creating a new instance for each request you will have no thread-safe requirement to reach. If you use any singleton or static method you may have to take threads into account. Nico. Hi I am in the stage of implementing logging in my struts application. I have been reading online but have some questions unanswered. 1. Action class should be thread-safe. Therefore no static variable, I should just use a non-static variable to hold my logger? 2. In a multi-user web application, how can I keep logs from the same class (same execution thread or same user request) stays together? I envision them to be all messy in the log file when there's multiple user requesting for the same action class. 3. About the thread safe issue with Actin class, that doesn't apply to the other classes that action execute right? Those are treated as normal java files. Thanks Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tile: including one layout .jsp inside another?
Mmm... I think there is some misunderstanding in your use of Tiles. If I understood, maybe you want to have an effect of panel and subpanels. If you want to do such a thing, you can use what I call as definitions of definitions. If I understood (again :-P ) you want to have a main page, divided into three pieces (left, top and body) and the body is changin depending on your needs. 1) Prepare the base definition: definition name=main path=/WEB-INF/jsp/layouts/main.jsp put name=top value=/WEB-INF/jsp/common/top.jsp / put name=leftNav value=/WEB-INF/jsp/common/leftNav.jsp / /definition 2) Prepare the body layout. Suppose that you want to put only two attributes, one for your tabs and one for the list. bodyLayout.jsp: tiles:insert attribute=first / tiles:insert attribute=second / 3) Prepare the body definition: definition name=myBody path=/WEB-INF/jsp/layouts/bodyLayout.jsp put name=first value=/WEB-INF/jsp/common/first.jsp / put name=second value=/WEB-INF/jsp/common/second.jsp / /definition 4) Make a definition of definition: definition name=main.usable extends=main put name=top value=myBody / /definition This is all you need (again, if I undestood :-P ). Anyway I wish to put a note aboud the extends attribute. The attribute extends is used to put all the missing attributes that you left in a definition. For example, take this layout: /layout/layout.jsp: html:html body tiles:insert attribute=one / tiles:insert attribute=two / tiles:insert attribute=three / /body /html:html And take these definitions: definition name=defOne path=/layouts/layout.jsp put name=one value=/tiles/one.jsp / put name=two value=/tiles/two.jsp / /definition definition name=defTwo extends=defOne put name=three value=/tiles/three.jsp / /definition The defOne definition is unusable, because it misses the three attribute, but it can be used to be a base for defTwo definition. bill curtis wrote: hello!! I have been looking high and low for an answer to this problem. I am trying to define a layout, one component of which is another layout: definition name=main path=/WEB-INF/jsp/layouts/main.jsp put name=top value=/WEB-INF/jsp/common/top.jsp / put name=leftNav value=/WEB-INF/jsp/common/leftNav.jsp / /definition definition name=tabs extends=main put name=body value=/WEB-INF/jsp/foo/tabs.jsp / /definition definition name=list extends=tabs put name=view value=/WEB-INF/jsp/foo/list.jsp / /definition main.jsp: html:html body tiles:insert attribute=top / tiles:insert attribute=leftNav / tiles:insert attribute=body / /body /html:html tabs.jsp: tiles:insert attribute=view / When I forward to list, main loads, it's children, including tabs, but when tabs tries to load list as a child, I get this error: [ServletException in:/WEB-INF/jsp/foo/tabs.jsp] Error - Tag Insert : No value found for attribute 'view'.' I have tried numerous variants of my tiles defs and tiles tags, but I can't get it to work. Is there a way to do this? If not, are there any recommended workarounds that can be used to acheive the same effect? Ideally, tabs.jsp would not have it's component hard coded, I would like to be able to select on the basis of the original forwards (which will come from different action mappings and use different forms). thanks regards, --bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionForm: simply calling reset() or have to recreate one ?
I think it was me who pointed you down that route to destroy recreate a form bean to clear any data in it. reset() is not used for this purpose - read up on what reset() does. servlet is a variable of Action and is available in all methods of your own Action classes. Paul -Original Message- From: lixin chu [mailto:[EMAIL PROTECTED] Sent: Saturday, August 28, 2004 3:52 AM To: [EMAIL PROTECTED] Subject: ActionForm: simply calling reset() or have to recreate one ? Hi, IN one of my Actions I need to clear the existing session scoped ActionForm, should I just call form.reset() and then repopulate values, or I have to remove it and recreate it using RequestUtils ? I saw a recent message talking about this, but I am not sure if I have to recreate one. If so, how do I get the servlet parameter needed in: RequestUtils.createActionForm(request, mapping, mapping.getModuleConfig(), servlet); thanks ! li xin ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Possible to change input path in actionForm validate?
What I meant is that you can use the same action class multiple times, each with a different path input: action path=/Handler1 type=com.foo.some.Action input=/file.jsp /action action path=/Handler2 type=com.foo.some.Action input=/otherfile.jsp /action Paul -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 2:18 AM To: Struts Users Mailing List Subject: RE: Possible to change input path in actionForm validate? I tried that but it is complainin about more than one identical action definition in struts-config. sebastian ho On Fri, 2004-08-27 at 20:21, Paul McCulloch wrote: One way to do this is to have multiple actions defined in struts-config.xml, each using the same Action class. Each action can have a different input JSP. Paul -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: Friday, August 27, 2004 1:05 PM To: Struts Users Mailing List Subject: Possible to change input path in actionForm validate? Hi Is it possible to change the input path that validate() displays if there are errors in the validation? I try using mapping.setInput() but it returns java.lang.IllegalStateException: Configuration is froze. Reason for this is I am using the same Action for different JSP, therefore the validation errors need to be displayed in the respective JSP, and not the input path specified in actino-mappings. Thanks Sebastian Ho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - 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]
problem with jsp:include
hi all, I had written the code in a.jsp like: tr td bgcolor=#ff align=center width=20%html:link page=/accountlisting.dofont color=#00Accounts/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=/ContactsListing.dofont color=#00Contacts/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=/dealslisting.dofont color=#00Deals/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=TasksListView.jspfont color=#00Tasks/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=Reports.jspfont color=#00Reports/font/html:link/td /tr and i included this page in another jsp file like jsp:include page=a.jsp/ (offcourse with apropriate taglibs) but the html:link tags are not rendered y this is happening? Thanks in advance vinu
Re: problem with jsp:include
taglibs must be set in the included JSP when using jsp:include tag : it includes JSP result, not JSP source code as does %@ include %. Nico. - Original Message - From: vineesh . kumar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:17 AM Subject: problem with jsp:include hi all, I had written the code in a.jsp like: tr td bgcolor=#ff align=center width=20%html:link page=/accountlisting.dofont color=#00Accounts/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=/ContactsListing.dofont color=#00Contacts/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=/dealslisting.dofont color=#00Deals/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=TasksListView.jspfont color=#00Tasks/font/html:link/td td bgcolor=#ff align=center width=20%html:link page=Reports.jspfont color=#00Reports/font/html:link/td /tr and i included this page in another jsp file like jsp:include page=a.jsp/ (offcourse with apropriate taglibs) but the html:link tags are not rendered y this is happening? Thanks in advance vinu Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator 1.1.3 with Struts 1.1
Can I use the validator 1.1.3 also with applications developed with Struts 1.1 or do I need to upgrade my application to Struts 1.2? Thanks Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:errors for indexed properties
I have googled and searched the mailing list, but couldn't find an answer to this. I have a DynaValidatorForm containing a collection of objects presented using the logic:iterate tag in the JSP. The validation of the objects in the collection is done in the validation.xml file using something like field property=closeHour indexedListProperty= regularTimingList depends=integer, intRange arg0 key=error.workingHours.invalidHour / arg1 name=intRange key=${var:min} resource=false/ arg2 name=intRange key=${var:max} resource=false/ varvar-namemin/var-namevar-value0/var-value/var varvar-namemax/var-namevar-value24/var-value/var /field This creates an Action error for the property regularTiming[i].closeHour. 'i' being the index of the collection that fails validation. What do I use for the property element of the html:errors tag? I hardcoded a property of regularTimingList[1].closeHour to see if the error shows up on the page if the close hour of the 2nd item in the collection is invalid. It does. But obviously, I don't want to do this for every record in the collection. What I need is an equivalent of logic:iterate tag for errors. Any pointers to doing this would be appreciated. -- Regards Milind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Patterns in struts.
Hello folks, I just want to know the list of patterns that we are using while implementing struts with tiles framework. I have just started working with the struts framework hence correct me if I am going wrong somewhere.. 1. Front Controller - With ActionServlet and struts-config.xml 2. Command Pattern - With Action classes 3. Composite View - Using the tiles framework Regards, Nitin __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SecurityFilter Question?
I haven't been following this thread too closely but I know its been some what long so if this solution has already been proposed, I apologize in advance. We use SecurityFilter and an additional filter which checks for the Principal in the request. If the Principal exists, then we can be assured that the user has successfully logged in; at which point we check to see if the required information is in the session. If not, then we persist the required information into the session. If so, then we do nothing. In either case we allow the filter chain to proceed. It has worked quite nicely so far. Principal principal = req.getUserPrincipal(); if (principal != null) { if (req.getSession().getAttribute(requiredInformation) == null) { // do other login stuff here } } chain.doFilter(req, res); hth, robert -Original Message- From: struts Dude [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 8:19 PM To: Struts Users Mailing List Subject: Re: SecurityFilter Question? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, August 30, 2004 6:07 PM Subject: Re: SecurityFilter Question? Can't u do this using an Action? Say, accessing /admin/LogAction.do invokes SecurityFilter, after authentication by SecurityFilter is passed, go directly to LogAction as below The problem comes if the user bookmarks a url like /user/abc.do, starts up their browser and goes directly to the protected URL. The security filter will take them to the login form, they submit username/password and seucirty filter authenticates them. Once they are authenticated they are redirected back to /users/abc.do - they don't pass through LogAction at all. So I normally have a filter that makes sure the bean is in session from where ever they are called. You don't have to use a filter though, you could make a base action that does puts the bean into session and have all your actions sub-class that one. Using action to put bean in Session after SecurityFilter, how is that possible when after authentication by SecurityFilter, u taken right back to /user/abc.do where u 1st request it and doesn't pass through to action attribute as specified in action-mapping of struts-config.xml? I have tried to use action, after authentication, I am indeed taken back to the page /admin/logon.do or /user/logon.do and got error message in browser: HTTP Status 400 - Invalid path /admin/Logon was requested message Invalid path /admin/Logon was requested description The request sent by the client was syntactically incorrect (Invalid path /admin/Logon was requested). - My action mapping is struts-conf.xml Both action path=/admin/Logon.do type=org.apache.struts.actions.ForwardAction parameter=LogAction.do?action=logon/ action path=/user/Logon.do type=org.apache.struts.actions.ForwardAction parameter=LogAction.do?action=logon/ !-- My LogAction extends DispatchAction and will try to put User bean in session. -- or action path=/admin/Logon.do type=org.apache.struts.actions.ForwardAction parameter=Welcome.do/ action path=/user/Logon.do type=org.apache.struts.actions.ForwardAction parameter=Welcome.do/ won't work. --- BTW, how wud u use html:form to display login fields? I can't get struts tag to work with login fields except for using things like: form action=j_security_check method=POST Username: input type=text name=j_usernamep Password: input type=password name=j_passwordp input type=Submit /form -- Ok, using filter (as u said) after SecurityFilter wud solve this simply but I like to stick with pure Struts approach if possible. Thanks Jason Lea - 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]
The jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory
There are three .jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory that are not in the C:\jakarta-struts-1.1\lib directory. Those three files are jstl.jar, standard.jar, and struts-el.jar. Do we also copy those three files to the C:\TOMCAT\webapps\AppName\WEB-INF\lib directory to setting up to use the Struts? Thanks. __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: The jar files in the C:\jakarta-struts-1.1\contrib\struts-el\ lib directory
These files are need if you wish to use JSP EL in a JSP 1.2 container. If you use a JSP 2 container then EL is supported for the standard struts tags (by the container rather than the tags themselves). See http://struts.apache.org/faqs/struts-el.html for more details. Paul -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:37 PM To: [EMAIL PROTECTED] Subject: The jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory There are three .jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory that are not in the C:\jakarta-struts-1.1\lib directory. Those three files are jstl.jar, standard.jar, and struts-el.jar. Do we also copy those three files to the C:\TOMCAT\webapps\AppName\WEB-INF\lib directory to setting up to use the Struts? Thanks. __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:errors for indexed properties
You have to use the html:messages tag in a loop to generate the property values in a loop. Here's an example -- logic:iterate name=IndexedListForm property=orders id=orders indexId=ndx tr td html:text name=orders property=partNumber indexed=true/br /nbsp; html:messages id=error property='%=orders[+ndx+].partNumber%' font color=redbean:write name=error//font /html:messages /td td html:text name=orders property=quantity indexed=true/br /nbsp; html:messages id=error property='%=orders[+ndx+].quantity%' font color=redbean:write name=error//font /html:messages /td /tr /logic:iterate Enjoy! Bill Siggelkow Milind Rao wrote: I have googled and searched the mailing list, but couldn't find an answer to this. I have a DynaValidatorForm containing a collection of objects presented using the logic:iterate tag in the JSP. The validation of the objects in the collection is done in the validation.xml file using something like field property=closeHour indexedListProperty= regularTimingList depends=integer, intRange arg0 key=error.workingHours.invalidHour / arg1 name=intRange key=${var:min} resource=false/ arg2 name=intRange key=${var:max} resource=false/ varvar-namemin/var-namevar-value0/var-value/var varvar-namemax/var-namevar-value24/var-value/var /field This creates an Action error for the property regularTiming[i].closeHour. 'i' being the index of the collection that fails validation. What do I use for the property element of the html:errors tag? I hardcoded a property of regularTimingList[1].closeHour to see if the error shows up on the page if the close hour of the 2nd item in the collection is invalid. It does. But obviously, I don't want to do this for every record in the collection. What I need is an equivalent of logic:iterate tag for errors. Any pointers to doing this would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: prechecked checkbox using DynaValidatorForm
Hi, Try declaring eatable in your form-bean declaration as java.lang.Boolean and in the action before your edit page go myForm.set(eatable, new Boolean(true)) -Yves- On Tue, 31 Aug 2004 12:25:18 +0200, Wolfgang Woger [EMAIL PROTECTED] wrote: Hi, I have acheckbox that needs to be prechecked with the value of myBean.toEat. html:checkbox property=eatable value=true/ I use a DynaValidatorForm, eatable is a property of my DynaValidatorForm, I tried to set: myForm.set(eatable,true); before forwarding to the jsp page, but without success. Any ideas ? Wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- For me to poop on! http://www.formetopoopon.com http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Submit to 3rd party URL after completing Action
Hi, I have a form which must be sent to an external site for payment processing. But first I want to run it through my own action to insert the values in the database, and then forward to the 3rd party URL for payment. If I submit to the 3rd party directly from a JSP using an html form (ass opposed to struts html:form) then they recieve the data on my form no problem. But when I use struts and go through my action then all data is lost. Here is my mapping bit; action input=.base.signup.step3 parameter=action name=signupForm path=/SubmitSignup3 type=uk.co.membershiponline.website.actions.SignupAction validate=true forward name=next path=https://select.worldpay.com/wcc/purchase; redirect=true/ forward name=failure1 path=.base.signup.step1 redirect=false/ forward name=failure2 path=.base.signup.step2 redirect=false/ forward name=cancel path=.base redirect=false/ forward name=previous path=.base.signup.step2 redirect=false/ /action It is the 'next' forward that goes to the 3rd party. I have tried setting redirect tru/false. Same problem. The form is in session scope. I think I am not understanding something about how this works. Any pointers gratefully received, Richard Richard Aukland 49 Ravensmere, Beccles, Suffolk, UK. NR34 9BE Tel/Fax. +44(0)1502 470162 Cell.+44(0)7906 094578 mailto: [EMAIL PROTECTED] http://www.aukinfo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory
Hi, There's a long thread about that just yesterday. Check the messages history. -Yves- On Tue, 31 Aug 2004 04:36:57 -0700 (PDT), Caroline Jen [EMAIL PROTECTED] wrote: There are three .jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory that are not in the C:\jakarta-struts-1.1\lib directory. Those three files are jstl.jar, standard.jar, and struts-el.jar. Do we also copy those three files to the C:\TOMCAT\webapps\AppName\WEB-INF\lib directory to setting up to use the Struts? Thanks. __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- For me to poop on! http://www.formetopoopon.com http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Learning the basics
Hi Kenneth, Everyone. Since we're on the subject, using the example being discussed, towards the end of the chain we call findRecords.do which takes us to foundRecords.jsp. All well and good. I'm having trouble understanding how to get database output from the model to the view layer? How is that data passed around, more to the point? Or if someone could point me in the direction of some documentation on the subject i would be more than happy to study it. I've found plenty of Struts information, but quite little on database programming with Struts. Thanks, Chris. On Thu, 19 Aug 2004 09:46:56 -0700, Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Kenneth Litwak [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:18 AM To: Struts Users Mailing List Subject: RE: Learning the basics Hi Jim, I was hoping to avoid having to read a book to write my first Struts app, which is basically a small web app to let a user search a database table according to one of three sets of search criteria. I thought this would be relatively simple. My impression so far, however, is that Struts is way way way way more complicated than I thought for this simple app. Perhaps I should just write it without Struts and get a book to red and try Struts next time. It is relatevily simple. showSearchCriteria.do forwards to searchCriteria.jsp (The class could be the ForwardAction) searchCriteria.jsp has the fields for searching in. action goes to findRecords.do, which queries the database and forwards the results to foundRecorrds.jsp Ken asks: My impression is that a something.do means a web page, like a JSP is involved. I don't understand this part about a jsp linking to an action that goes to findRecords.do. What does that represent? From what I understand to this moment, it represents a page, when it needs to work with a backend component to search the database. This may be part of the piece I'm missing. Part may be that you also need to understand how the web works... such subtle things as the stateless nature of the http protocol, it's tendency to not pass fields that are empty that kind of thing. Then on top of that... the servlet specification... then on top of that the JSP specification, and then tieing all that together neatly, is struts. :) Let's see if I can simplify this a bit... Tomcat/Websphere/Weblogic (the container) receives this URL http://foo.com/fooApp/showIndex.do Container looks at it, and says... okay this goes to the fooApp web app... then says *.do.. goes to the struts servlet in fooApp. The struts servlet goes.. h... showIndex strtus-config says that maps to ShowIndexAction class... I better call it's exectue method.. and it returns the sucess/index/whateverYouWantToCallItForward.. struts-config says that maps to index.jsp better serve that up. And now the request processing is done, the requestor has the resource they asked for. So, 2 jsp pages, 2 actions (If you dont use ForwardAction). If your search criteria are really three different searches, then you can put all three forms on one page, and use DispatchAction for the findRecords.do action class. I thought EJBs were complex when I first learned them, but they have NOTHING on Struts. Thanks again. How do you figure? Because, at least for me (and I grant that I'm much more at home in the business tier than the web tier), the workflow for an EJB (find it, create it, call it, remove it) is somewhat straightforward. I have yet to get the exact mechanics of how Struts works.I've seen a couple of diagrams but I need something more detailed that shows the exact flow through each little step. Do I need a Form? A FormBean? A regular bean? When? Where? I can't figure out how to answer these questions. Note: this is NOT an attack on Struts. I haven't spent several days reading about it in order to be difficult in a mailing list. Struts may be a great framework once one figures it out. I would suggest that you spend more time looking at the online struts documentation. It's how most of us learned. If you've done mostly business tier, then it would also be a good idea to study how the Servlet/JSP specs work, and how the HTTP protocol works. Without Servlet/JSP fundamentals and some knowledge of HTTP, you will probably be very lost for quite some time. Yes, you have to learn 3 technologies just to learn struts if you have never ever done any web programming at all. This isn't struts fault... just the way the web is. Servlets/JSP abstracts some of the HTTP protocol, Struts abstracts that. Ken Ken -Original Message- From: Janne Mattila [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 11:19 PM To: [EMAIL PROTECTED] Subject: RE:
Re: Learning the basics
Geia sou re Keladi, Chris Keladis wrote: Hi Kenneth, Everyone. Since we're on the subject, using the example being discussed, towards the end of the chain we call findRecords.do which takes us to foundRecords.jsp. [...] I'm having trouble understanding how to get database output from the model to the view layer? If I understand correctly, all you have to do in findRecords.do is put the records in some scope (i.e. request.setParameter(records, records) and then pick them from there in your foundRecords.jsp hth, Manos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Submit to 3rd party URL after completing Action
You are only going to be able to redirect to an external URL. However, when you redirect its a new request so the form data is lost. I would use the Jakarta Commons HttpClient to do the posting. Bill Siggelkow Richard Aukland wrote: Hi, I have a form which must be sent to an external site for payment processing. But first I want to run it through my own action to insert the values in the database, and then forward to the 3rd party URL for payment. If I submit to the 3rd party directly from a JSP using an html form (ass opposed to struts html:form) then they recieve the data on my form no problem. But when I use struts and go through my action then all data is lost. Here is my mapping bit; action input=.base.signup.step3 parameter=action name=signupForm path=/SubmitSignup3 type=uk.co.membershiponline.website.actions.SignupAction validate=true forward name=next path=https://select.worldpay.com/wcc/purchase; redirect=true/ forward name=failure1 path=.base.signup.step1 redirect=false/ forward name=failure2 path=.base.signup.step2 redirect=false/ forward name=cancel path=.base redirect=false/ forward name=previous path=.base.signup.step2 redirect=false/ /action It is the 'next' forward that goes to the 3rd party. I have tried setting redirect tru/false. Same problem. The form is in session scope. I think I am not understanding something about how this works. Any pointers gratefully received, Richard Richard Aukland 49 Ravensmere, Beccles, Suffolk, UK. NR34 9BE Tel/Fax. +44(0)1502 470162 Cell.+44(0)7906 094578 mailto: [EMAIL PROTECTED] http://www.aukinfo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Learning the basics
Chris -- Struts knows nothing of the model -- the subject you need to learn is Java database programming. There are many different tutorials on this -- a good one can be found at http://java.sun.com/docs/books/tutorial/jdbc/. Chris Keladis wrote: Hi Kenneth, Everyone. Since we're on the subject, using the example being discussed, towards the end of the chain we call findRecords.do which takes us to foundRecords.jsp. All well and good. I'm having trouble understanding how to get database output from the model to the view layer? How is that data passed around, more to the point? Or if someone could point me in the direction of some documentation on the subject i would be more than happy to study it. I've found plenty of Struts information, but quite little on database programming with Struts. Thanks, Chris. On Thu, 19 Aug 2004 09:46:56 -0700, Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Kenneth Litwak [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:18 AM To: Struts Users Mailing List Subject: RE: Learning the basics Hi Jim, I was hoping to avoid having to read a book to write my first Struts app, which is basically a small web app to let a user search a database table according to one of three sets of search criteria. I thought this would be relatively simple. My impression so far, however, is that Struts is way way way way more complicated than I thought for this simple app. Perhaps I should just write it without Struts and get a book to red and try Struts next time. It is relatevily simple. showSearchCriteria.do forwards to searchCriteria.jsp (The class could be the ForwardAction) searchCriteria.jsp has the fields for searching in. action goes to findRecords.do, which queries the database and forwards the results to foundRecorrds.jsp Ken asks: My impression is that a something.do means a web page, like a JSP is involved. I don't understand this part about a jsp linking to an action that goes to findRecords.do. What does that represent? From what I understand to this moment, it represents a page, when it needs to work with a backend component to search the database. This may be part of the piece I'm missing. Part may be that you also need to understand how the web works... such subtle things as the stateless nature of the http protocol, it's tendency to not pass fields that are empty that kind of thing. Then on top of that... the servlet specification... then on top of that the JSP specification, and then tieing all that together neatly, is struts. :) Let's see if I can simplify this a bit... Tomcat/Websphere/Weblogic (the container) receives this URL http://foo.com/fooApp/showIndex.do Container looks at it, and says... okay this goes to the fooApp web app... then says *.do.. goes to the struts servlet in fooApp. The struts servlet goes.. h... showIndex strtus-config says that maps to ShowIndexAction class... I better call it's exectue method.. and it returns the sucess/index/whateverYouWantToCallItForward.. struts-config says that maps to index.jsp better serve that up. And now the request processing is done, the requestor has the resource they asked for. So, 2 jsp pages, 2 actions (If you dont use ForwardAction). If your search criteria are really three different searches, then you can put all three forms on one page, and use DispatchAction for the findRecords.do action class. I thought EJBs were complex when I first learned them, but they have NOTHING on Struts. Thanks again. How do you figure? Because, at least for me (and I grant that I'm much more at home in the business tier than the web tier), the workflow for an EJB (find it, create it, call it, remove it) is somewhat straightforward. I have yet to get the exact mechanics of how Struts works.I've seen a couple of diagrams but I need something more detailed that shows the exact flow through each little step. Do I need a Form? A FormBean? A regular bean? When? Where? I can't figure out how to answer these questions. Note: this is NOT an attack on Struts. I haven't spent several days reading about it in order to be difficult in a mailing list. Struts may be a great framework once one figures it out. I would suggest that you spend more time looking at the online struts documentation. It's how most of us learned. If you've done mostly business tier, then it would also be a good idea to study how the Servlet/JSP specs work, and how the HTTP protocol works. Without Servlet/JSP fundamentals and some knowledge of HTTP, you will probably be very lost for quite some time. Yes, you have to learn 3 technologies just to learn struts if you have never ever done any web programming at all. This isn't struts fault... just the way the web is. Servlets/JSP abstracts some of the HTTP protocol, Struts abstracts that. Ken Ken -Original Message- From: Janne Mattila [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 11:19 PM To: [EMAIL PROTECTED]
RE: Learning the basics
If you want to follow common java 'patterns' then try to find some info about data access objects (DAOs), data transfer objects (DTOs or TOs), and view objects (VOs). That should point you in the right direction. Basically, they are javabeans! Daniel. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Sent: 31 August 2004 13:39 To: [EMAIL PROTECTED] Subject: Re: Learning the basics Chris -- Struts knows nothing of the model -- the subject you need to learn is Java database programming. There are many different tutorials on this -- a good one can be found at http://java.sun.com/docs/books/tutorial/jdbc/. Chris Keladis wrote: Hi Kenneth, Everyone. Since we're on the subject, using the example being discussed, towards the end of the chain we call findRecords.do which takes us to foundRecords.jsp. All well and good. I'm having trouble understanding how to get database output from the model to the view layer? How is that data passed around, more to the point? Or if someone could point me in the direction of some documentation on the subject i would be more than happy to study it. I've found plenty of Struts information, but quite little on database programming with Struts. Thanks, Chris. On Thu, 19 Aug 2004 09:46:56 -0700, Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Kenneth Litwak [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:18 AM To: Struts Users Mailing List Subject: RE: Learning the basics Hi Jim, I was hoping to avoid having to read a book to write my first Struts app, which is basically a small web app to let a user search a database table according to one of three sets of search criteria. I thought this would be relatively simple. My impression so far, however, is that Struts is way way way way more complicated than I thought for this simple app. Perhaps I should just write it without Struts and get a book to red and try Struts next time. It is relatevily simple. showSearchCriteria.do forwards to searchCriteria.jsp (The class could be the ForwardAction) searchCriteria.jsp has the fields for searching in. action goes to findRecords.do, which queries the database and forwards the results to foundRecorrds.jsp Ken asks: My impression is that a something.do means a web page, like a JSP is involved. I don't understand this part about a jsp linking to an action that goes to findRecords.do. What does that represent? From what I understand to this moment, it represents a page, when it needs to work with a backend component to search the database. This may be part of the piece I'm missing. Part may be that you also need to understand how the web works... such subtle things as the stateless nature of the http protocol, it's tendency to not pass fields that are empty that kind of thing. Then on top of that... the servlet specification... then on top of that the JSP specification, and then tieing all that together neatly, is struts. :) Let's see if I can simplify this a bit... Tomcat/Websphere/Weblogic (the container) receives this URL http://foo.com/fooApp/showIndex.do Container looks at it, and says... okay this goes to the fooApp web app... then says *.do.. goes to the struts servlet in fooApp. The struts servlet goes.. h... showIndex strtus-config says that maps to ShowIndexAction class... I better call it's exectue method.. and it returns the sucess/index/whateverYouWantToCallItForward.. struts-config says that maps to index.jsp better serve that up. And now the request processing is done, the requestor has the resource they asked for. So, 2 jsp pages, 2 actions (If you dont use ForwardAction). If your search criteria are really three different searches, then you can put all three forms on one page, and use DispatchAction for the findRecords.do action class. I thought EJBs were complex when I first learned them, but they have NOTHING on Struts. Thanks again. How do you figure? Because, at least for me (and I grant that I'm much more at home in the business tier than the web tier), the workflow for an EJB (find it, create it, call it, remove it) is somewhat straightforward. I have yet to get the exact mechanics of how Struts works.I've seen a couple of diagrams but I need something more detailed that shows the exact flow through each little step. Do I need a Form? A FormBean? A regular bean? When? Where? I can't figure out how to answer these questions. Note: this is NOT an attack on Struts. I haven't spent several days reading about it in order to be difficult in a mailing list. Struts may be a great framework once one figures it out. I would suggest that you spend more time looking at the online struts documentation. It's how most of us learned. If you've done mostly business tier, then it
Re: The jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory
How do I check the message history for yesterday's message? --- Yves Sy [EMAIL PROTECTED] wrote: Hi, There's a long thread about that just yesterday. Check the messages history. -Yves- On Tue, 31 Aug 2004 04:36:57 -0700 (PDT), Caroline Jen [EMAIL PROTECTED] wrote: There are three .jar files in the C:\jakarta-struts-1.1\contrib\struts-el\lib directory that are not in the C:\jakarta-struts-1.1\lib directory. Those three files are jstl.jar, standard.jar, and struts-el.jar. Do we also copy those three files to the C:\TOMCAT\webapps\AppName\WEB-INF\lib directory to setting up to use the Struts? Thanks. __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- For me to poop on! http://www.formetopoopon.com http://www.nbc.com/nbc/Late_Night_with_Conan_O'Brien/video/triumph.shtml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoClassDefFoundError: .../commons/beanutils/Converter
What am I missing? I got the following error java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter What should I do? ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoClassDefFoundError: .../commons/beanutils/Converter
NoClassDefFoundError - this means the JVM cannot find the class in question. You need to make this class available to the JVM by adding the commons-beanutils JAR to the WEB-INF/lib directory. Rob -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: 31 August 2004 14:01 To: [EMAIL PROTECTED] Subject: NoClassDefFoundError: .../commons/beanutils/Converter What am I missing? I got the following error java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter What should I do? ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk _ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Submit to 3rd party URL after completing Action
If you use redirect to the payment url, the data in the form is in the session in your site and not the external site where it is needed. So redirect or forward will not help. Try splitting up this work-flow into two steps: 1. in the first one you write the action class and save the stuff into database and then forward to a page where a hidden form is recreated using the same values as the first one, 2. in the body onload of this page, submit the form to the external url. Hope this helps. Regards, Partha -- From: Richard Aukland [SMTP:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 5:38 PM To: [EMAIL PROTECTED] Subject: Submit to 3rd party URL after completing Action Hi, I have a form which must be sent to an external site for payment processing. But first I want to run it through my own action to insert the values in the database, and then forward to the 3rd party URL for payment. If I submit to the 3rd party directly from a JSP using an html form (ass opposed to struts html:form) then they recieve the data on my form no problem. But when I use struts and go through my action then all data is lost. Here is my mapping bit; action input=.base.signup.step3 parameter=action name=signupForm path=/SubmitSignup3 type=uk.co.membershiponline.website.actions.SignupAction validate=true forward name=next path=https://select.worldpay.com/wcc/purchase; redirect=true/ forward name=failure1 path=.base.signup.step1 redirect=false/ forward name=failure2 path=.base.signup.step2 redirect=false/ forward name=cancel path=.base redirect=false/ forward name=previous path=.base.signup.step2 redirect=false/ /action It is the 'next' forward that goes to the 3rd party. I have tried setting redirect tru/false. Same problem. The form is in session scope. I think I am not understanding something about how this works. Any pointers gratefully received, Richard Richard Aukland 49 Ravensmere, Beccles, Suffolk, UK. NR34 9BE Tel/Fax. +44(0)1502 470162 Cell.+44(0)7906 094578 mailto: [EMAIL PROTECTED] http://www.aukinfo.com * Disclaimer: The information in this e-mail and any attachments is confidential / privileged. It is intended solely for the addressee or addressees. If you are not the addressee indicated in this message, you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:errors for indexed properties
Worked well. Thanks. Used html:errors instead of the message for brevity. It would have been nice if html:errors could have been set with indexed=true. Would have prevented the scriplet and been more consistent. Regards Milind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 1.2.2 is up
Hi Everyone, Struts 1.2.2 is up and available. http://struts.apache.org/acquiring.html __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validate in ActionForm not working for errors
what is your directory structure ??? Are you giving the correct relative path for the input parameter --- Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 2:52 PM To: Struts Users Mailing List Subject: RE: validate in ActionForm not working for errors hi Jim i had tried index.jsp too but it didnt work. I also tried sending it back to another page but that didnt work either. This should be working.. I don't see any reason why it wouldn't.. So.. let's try something you probably already tried: there's a difference between index.jsp and /index.jsp, so make sure that slash is in there. Other then that... I'd try stepping through the struts code with a debugger and see what's going on. what should i do, i m stuck regards saurabh On Mon, 2004-08-30 at 16:47, Jim Barrows wrote: -Original Message- From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 2:41 PM To: Struts Users Mailing List Subject: RE: validate in ActionForm not working for errors Hi jim here is the snippet from struts-config.xml actionpath=/logon type=prototype.beans.LogonAction name=logonForm validate=true scope=request input=index I think this needs to be /index.jsp, not just index. Unless index is your tiles definition... In which case try /index.jsp and see if it works.. if it does then you mave something going on with tiles. forward name=success path=/main.jsp/ /action and here is the snippet from LogonForm public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if(getName().trim().equals() || getName()==null) errors.add(name,new ActionError(errors.name.required)); if(getPassword().trim().equals() || getPassword()==null) errors.add(password,new ActionError(errors.passwd.required)); return errors; } and here is relevant portion of jsp html:html locale=true head titlebean:message key=logon.title//title html:base/ /head body bgcolor=white html:errors/ div align=center h3bean:message key=logon.heading//h3 /div html:form action=/logon table border=0 width=100% .table information /table /html:form /body /html:html regards saurabh On Mon, 2004-08-30 at 16:31, Jim Barrows wrote: -Original Message- From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 2:29 PM To: struts Subject: validate in ActionForm not working for errors hi all, I have a simple form that takes username and passwd. for that i have a LogonForm bean, which has a validate method. if i enter both username and passwd it works fine and gets forwarded to the next page. but if there is an error in validate() and ActionErrors object is returned then my control goes to a blank page. I know that my ActionErrors object has been populated as i have checked it with debug statements. 'input' property in my action mapping is to index.jsp, that is the page itself. why is it showing me a blank page. why is the framework not showing any exception if there is one. any suggestions could you show us the relevant portions of your struts-config.xml, index.jsp and the validate method? Given what you said it's probably a typo, or something very subtle. - 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
Re: html:errors for indexed properties
instead of the scriptlet, I think you could use html-el and do the following: html-el:messages id=error property=orders[${ndx}].partNumber The el notation forces the ndx to evaluate From: Bill Siggelkow [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: html:errors for indexed properties Date: Tue, 31 Aug 2004 08:01:15 -0400 You have to use the html:messages tag in a loop to generate the property values in a loop. Here's an example -- logic:iterate name=IndexedListForm property=orders id=orders indexId=ndx tr td html:text name=orders property=partNumber indexed=true/br /nbsp; html:messages id=error property='%=orders[+ndx+].partNumber%' font color=redbean:write name=error//font /html:messages /td td html:text name=orders property=quantity indexed=true/br /nbsp; html:messages id=error property='%=orders[+ndx+].quantity%' font color=redbean:write name=error//font /html:messages /td /tr /logic:iterate Enjoy! Bill Siggelkow Milind Rao wrote: I have googled and searched the mailing list, but couldn't find an answer to this. I have a DynaValidatorForm containing a collection of objects presented using the logic:iterate tag in the JSP. The validation of the objects in the collection is done in the validation.xml file using something like field property=closeHour indexedListProperty= regularTimingList depends=integer, intRange arg0 key=error.workingHours.invalidHour / arg1 name=intRange key=${var:min} resource=false/ arg2 name=intRange key=${var:max} resource=false/ varvar-namemin/var-namevar-value0/var-value/var varvar-namemax/var-namevar-value24/var-value/var /field This creates an Action error for the property regularTiming[i].closeHour. 'i' being the index of the collection that fails validation. What do I use for the property element of the html:errors tag? I hardcoded a property of regularTimingList[1].closeHour to see if the error shows up on the page if the close hour of the 2nd item in the collection is invalid. It does. But obviously, I don't want to do this for every record in the collection. What I need is an equivalent of logic:iterate tag for errors. Any pointers to doing this would be appreciated. - 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]
[ANN] Struts 1.2.2 release is now available for download.
The Apache Struts team is extremely proud to announce the availability of Struts 1.2.2. This release represents the first official release available for General Availability since Struts 1.1. You can find all of the features, enhancements, and bug fixes in the release notes listed below. I would personally like to send a big _THANK YOU_ to all the users and developers who help make this community project possible and an even bigger _THANK YOU_ to the developers and committers who volunteer their time and talents to this (as well as other) Open Source project. Pat yourselves on the back, you are doing a stellar job Release notes: http://struts.apache.org/userGuide/release-notes.html You can access the binary, source, or library distributions from any of our mirrors http://struts.apache.org/download.cgi The Apache Struts Team -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Will the Struts 1.2.2 jar be available Apache's Maven Repository?
Will the Struts 1.2.2 jar be available Apache's Maven Repository? http://www.apache.org/dist/java-repository/struts/jars/ BTW: Thank you for the release! Paul Spencer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Learning the basics
Chris, In our app we're building a model object Assignment from a dao object AssignmentDAO. We then fill the form AssignmentForm from the model object. All this is controlled from the AssignmentAction. I think I've recently read that in general a lower layer should not be aware of a higher layer. If true the form should fill itself from the model object not the model object fill the form. This is the direction I'm going. (We break this rule in that the DAO returns a model object). Would appreciate opinions of the more experienced as far as how closely this follows best practices. Daniel Perry [EMAIL PROTECTED] co.uk To Struts Users Mailing List 08/31/2004 08:44 [EMAIL PROTECTED] AM cc Subject Please respond to RE: Learning the basics Struts Users Mailing List [EMAIL PROTECTED] he.org If you want to follow common java 'patterns' then try to find some info about data access objects (DAOs), data transfer objects (DTOs or TOs), and view objects (VOs). That should point you in the right direction. Basically, they are javabeans! Daniel. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Sent: 31 August 2004 13:39 To: [EMAIL PROTECTED] Subject: Re: Learning the basics Chris -- Struts knows nothing of the model -- the subject you need to learn is Java database programming. There are many different tutorials on this -- a good one can be found at http://java.sun.com/docs/books/tutorial/jdbc/. Chris Keladis wrote: Hi Kenneth, Everyone. Since we're on the subject, using the example being discussed, towards the end of the chain we call findRecords.do which takes us to foundRecords.jsp. All well and good. I'm having trouble understanding how to get database output from the model to the view layer? How is that data passed around, more to the point? Or if someone could point me in the direction of some documentation on the subject i would be more than happy to study it. I've found plenty of Struts information, but quite little on database programming with Struts. Thanks, Chris. On Thu, 19 Aug 2004 09:46:56 -0700, Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Kenneth Litwak [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:18 AM To: Struts Users Mailing List Subject: RE: Learning the basics Hi Jim, I was hoping to avoid having to read a book to write my first Struts app, which is basically a small web app to let a user search a database table according to one of three sets of search criteria. I thought this would be relatively simple. My impression so far, however, is that Struts is way way way way more complicated than I thought for this simple app. Perhaps I should just write it without Struts and get a book to red and try Struts next time. It is relatevily simple. showSearchCriteria.do forwards to searchCriteria.jsp (The class could be the ForwardAction) searchCriteria.jsp has the fields for searching in. action goes to findRecords.do, which queries the database and forwards the results to foundRecorrds.jsp Ken asks: My impression is that a something.do means a web page, like a JSP is involved. I don't understand this part about a jsp linking to an action that goes to findRecords.do. What does that represent? From what I understand to this moment, it represents a page, when it needs to work with a backend component to search the database. This may be part of the piece I'm missing. Part may be that you also need to understand how the web works... such subtle things as the stateless nature of the http protocol, it's tendency to not pass fields that are empty that kind of thing. Then on top of that... the servlet specification... then on top of that the JSP specification, and then tieing all that together neatly, is struts. :) Let's see if I can simplify this a bit... Tomcat/Websphere/Weblogic (the
Re: Will the Struts 1.2.2 jar be available Apache's Maven Repository?
At 10:33 AM -0400 8/31/04, Paul Spencer wrote: Will the Struts 1.2.2 jar be available Apache's Maven Repository? http://www.apache.org/dist/java-repository/struts/jars/ The preferred repository would continue to be iBiblio. James, do you want me to do the deployment to the Maven mirror directory? Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place. - Carlos Santana
Re: Will the Struts 1.2.2 jar be available Apache's Maven Repository?
I've already started on it..should be done in a minute. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 10:51 AM Subject: Re: Will the Struts 1.2.2 jar be available Apache's Maven Repository? At 10:33 AM -0400 8/31/04, Paul Spencer wrote: Will the Struts 1.2.2 jar be available Apache's Maven Repository? http://www.apache.org/dist/java-repository/struts/jars/ The preferred repository would continue to be iBiblio. James, do you want me to do the deployment to the Maven mirror directory? Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place. - Carlos Santana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Submit to 3rd party URL after completing Action
Many thanks to Bill and Partha for your suggestions. I used the javascript (2nd) technique because I am currently more familiar with it. It is now working. :) Cheers Richard If you use redirect to the payment url, the data in the form is in the session in your site and not the external site where it is needed. So redirect or forward will not help. Try splitting up this work-flow into two steps: 1. in the first one you write the action class and save the stuff into database and then forward to a page where a hidden form is recreated using the same values as the first one, 2. in the body onload of this page, submit the form to the external url. Hope this helps. Regards, Partha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Learning the basics
It's generally best practice not to tie layers in together. Assume that you have your DAOs that are aware of ActionForm (or subclasses), in constructors, or methods. Now say you want to use the same DAOs in a standalone app. In order to do that, you are going to have to include the struts jar, as the code relies on it! It also applies the other way round. Assume that your struts actions know all about the underlying persistence mechanism. Now assume that you want to change it from direct jdbc database access, to an object-relational mapping like apache OJB. Not only will you have to change the DAO code, but also all the actions! In general Data Transfer Objects (DTO) are used to get round these problems. These are simple javabeans. Despite this, i often 'cheat' and combine a DTO/DAO/BO/VO all together. Using OJB I make a base DAO (with common methods: insert, delete, soft-delete, find), and then extend this to make the other model objects, that are persisted by OJB. As they are already javabeans i use them as DTOs directly. I have found that this doesnt create a dependance on OJB, etc, as it is only really the base DAO that relies on it. (as well as some service classes) In general, i think you have to weigh up the benefits of sticking to a 'best practice' design, vs the benefits (time, simplicity, etc) of not. Sharing only a set of dedicated transfer objects between layers certainly makes things easier in a large team. But i have found the model i describe with combined DTO/DAO to be equally as effective. Daniel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 31 August 2004 15:42 To: Struts Users Mailing List Subject: RE: Learning the basics Chris, In our app we're building a model object Assignment from a dao object AssignmentDAO. We then fill the form AssignmentForm from the model object. All this is controlled from the AssignmentAction. I think I've recently read that in general a lower layer should not be aware of a higher layer. If true the form should fill itself from the model object not the model object fill the form. This is the direction I'm going. (We break this rule in that the DAO returns a model object). Would appreciate opinions of the more experienced as far as how closely this follows best practices. Daniel Perry [EMAIL PROTECTED] co.uk To Struts Users Mailing List 08/31/2004 08:44 [EMAIL PROTECTED] AM cc Subject Please respond to RE: Learning the basics Struts Users Mailing List [EMAIL PROTECTED] he.org If you want to follow common java 'patterns' then try to find some info about data access objects (DAOs), data transfer objects (DTOs or TOs), and view objects (VOs). That should point you in the right direction. Basically, they are javabeans! Daniel. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Sent: 31 August 2004 13:39 To: [EMAIL PROTECTED] Subject: Re: Learning the basics Chris -- Struts knows nothing of the model -- the subject you need to learn is Java database programming. There are many different tutorials on this -- a good one can be found at http://java.sun.com/docs/books/tutorial/jdbc/. Chris Keladis wrote: Hi Kenneth, Everyone. Since we're on the subject, using the example being discussed, towards the end of the chain we call findRecords.do which takes us to foundRecords.jsp. All well and good. I'm having trouble understanding how to get database output from the model to the view layer? How is that data passed around, more to the point? Or if someone could point me in the direction of some documentation on the subject i would be more than happy to study it. I've found plenty of Struts information, but quite little on database programming with Struts. Thanks, Chris. On Thu, 19 Aug 2004 09:46:56 -0700, Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Kenneth Litwak [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 9:18 AM To: Struts Users Mailing List Subject: RE: Learning the basics Hi Jim, I was hoping to avoid having to read a book to write my first Struts app, which is basically a small web app to let a user search a database table according to one of three sets of search criteria. I thought this would be relatively simple. My impression so far, however, is that Struts is way way way way more complicated than I thought for this simple app. Perhaps I should just write it without Struts and get a book to red and try Struts next time. It is relatevily simple. showSearchCriteria.do forwards to
Re: Submit to 3rd party URL after completing Action
I'm currently trying to do something similar. Therefore I would like to share my thoughts: Relying on javascript for business critical functions (and if payment is not a business critical function, what is?) is IMO NEVER a good idea, because it is not fail-proof at all. What only if the user has switched of javascript in his browser? IMO this kind of functionality should always be handled server-side! Richard Aukland wrote: Many thanks to Bill and Partha for your suggestions. I used the javascript (2nd) technique because I am currently more familiar with it. It is now working. :) Cheers Richard If you use redirect to the payment url, the data in the form is in the session in your site and not the external site where it is needed. So redirect or forward will not help. Try splitting up this work-flow into two steps: 1. in the first one you write the action class and save the stuff into database and then forward to a page where a hidden form is recreated using the same values as the first one, 2. in the body onload of this page, submit the form to the external url. Hope this helps. Regards, Partha - 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: Patterns in struts.
Someone else taking this exam already got the answers on this list. ///8-) Check the archives, unless you want to do it yourself. LOL nitin dubey wrote: Hello folks, I just want to know the list of patterns that we are using while implementing struts with tiles framework. I have just started working with the struts framework hence correct me if I am going wrong somewhere.. 1. Front Controller - With ActionServlet and struts-config.xml 2. Command Pattern - With Action classes 3. Composite View - Using the tiles framework Regards, Nitin __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - 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: Submit to 3rd party URL after completing Action
Whenever i come accross this, i put a 'confirmation' screen, with all the details repeated, and a 'pay now' button that submits the (hidden) form to the external site. Daniel. -Original Message- From: Christoph Kutzinski [mailto:[EMAIL PROTECTED] Sent: 31 August 2004 16:17 To: Struts Users Mailing List Subject: Re: Submit to 3rd party URL after completing Action I'm currently trying to do something similar. Therefore I would like to share my thoughts: Relying on javascript for business critical functions (and if payment is not a business critical function, what is?) is IMO NEVER a good idea, because it is not fail-proof at all. What only if the user has switched of javascript in his browser? IMO this kind of functionality should always be handled server-side! Richard Aukland wrote: Many thanks to Bill and Partha for your suggestions. I used the javascript (2nd) technique because I am currently more familiar with it. It is now working. :) Cheers Richard If you use redirect to the payment url, the data in the form is in the session in your site and not the external site where it is needed. So redirect or forward will not help. Try splitting up this work-flow into two steps: 1. in the first one you write the action class and save the stuff into database and then forward to a page where a hidden form is recreated using the same values as the first one, 2. in the body onload of this page, submit the form to the external url. Hope this helps. Regards, Partha - 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: Is Tiles the right way to go?
-Original Message- From: PC Leung [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 8:58 PM To: [EMAIL PROTECTED] Subject: Is Tiles the right way to go? I am trying to learn Tiles. Is Tiles the right way to go with Struts? Should I study other tool before sticking with Tiles? Yes, and yes. You get paid for your knowledge and skill. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: including one layout .jsp inside another?
I raised exactly the same question on this list a week or two ago. I'm glad to see someone else attempting the same thing. Two workarounds came out of that discussion--structure your tiles defs differently, or futz with tiles:importAttribute and tiles:put. The first approach doesn't scale well, because for every page that includes tabs, you need two tiles defs instead of one. (It gets worse if you have subtabs.) The second approach works but is a kludge, not a clean solution. Unfortunately, there does not seem to be a good way to handle this case with Tiles. -- Bill I am trying to define a layout, one component of which is another layout: definition name=main path=/WEB-INF/jsp/layouts/main.jsp put name=top value=/WEB-INF/jsp/common/top.jsp / put name=leftNav value=/WEB-INF/jsp/common/leftNav.jsp / /definition definition name=tabs extends=main put name=body value=/WEB-INF/jsp/foo/tabs.jsp / /definition definition name=list extends=tabs put name=view value=/WEB-INF/jsp/foo/list.jsp / /definition main.jsp: html:html body tiles:insert attribute=top / tiles:insert attribute=leftNav / tiles:insert attribute=body / /body /html:html tabs.jsp: tiles:insert attribute=view / When I forward to list, main loads, it's children, including tabs, but when tabs tries to load list as a child, I get this error: [ServletException in:/WEB-INF/jsp/foo/tabs.jsp] Error - Tag Insert : No value found for attribute 'view'.' I have tried numerous variants of my tiles defs and tiles tags, but I can't get it to work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: including one layout .jsp inside another?
-Original Message- From: Bill Schneider [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 8:54 AM To: [EMAIL PROTECTED] Subject: Re: including one layout .jsp inside another? I raised exactly the same question on this list a week or two ago. I'm glad to see someone else attempting the same thing. Two workarounds came out of that discussion--structure your tiles defs differently, or futz with tiles:importAttribute and tiles:put. The first approach doesn't scale well, because for every page that includes tabs, you need two tiles defs instead of one. (It gets worse if you have subtabs.) The second approach works but is a kludge, not a clean solution. Unfortunately, there does not seem to be a good way to handle this case with Tiles. I dunno.. I've been doing this at least once every 2 or three weeks accidently with forwards and action classes. I usually have an action class that forwards to a definition, and try to put it where I really want a jsp page. Scales as well as your html is coded too -- Bill I am trying to define a layout, one component of which is another layout: definition name=main path=/WEB-INF/jsp/layouts/main.jsp put name=top value=/WEB-INF/jsp/common/top.jsp / put name=leftNav value=/WEB-INF/jsp/common/leftNav.jsp / /definition definition name=tabs extends=main put name=body value=/WEB-INF/jsp/foo/tabs.jsp / /definition definition name=list extends=tabs put name=view value=/WEB-INF/jsp/foo/list.jsp / /definition main.jsp: html:html body tiles:insert attribute=top / tiles:insert attribute=leftNav / tiles:insert attribute=body / /body /html:html tabs.jsp: tiles:insert attribute=view / When I forward to list, main loads, it's children, including tabs, but when tabs tries to load list as a child, I get this error: [ServletException in:/WEB-INF/jsp/foo/tabs.jsp] Error - Tag Insert : No value found for attribute 'view'.' I have tried numerous variants of my tiles defs and tiles tags, but I can't get it to work. - 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]
Struts-faces form input with rendered attribute set
Craig, All, I would like to discuss the issue I have entered in Bugzilla (issue #30511) with title Struts-faces form input with rendered attribute set that you put invalid a while ago. I am first going to rewrite the issue and I will try to explain where I do not find things logical. First of all, I use the struts-faces library, so I have Struts forms and JSF pages (I also use tiles). So I have 1 Struts forms, called serverForm with 2 attributes: form-bean name=serverForm type=org.apache.struts.validator.DynaValidatorForm form-property name=dns type=java.lang.String / form-property name=mtc type=java.lang.String / /form-bean I also have 2 actions: one called before displaying the JSF page, and another one called at submission time. These 2 actions are associated with the same form serverForm marked as request scope for both. The first action populates the form attributes so as to prefill the inputs, it also sets the mtc attribute to edit. The second action is used to save the data into an XML data file. The JSF page looks like this: s:form action=/saveServer onsubmit=return validateServerForm(this); h:inputHidden id=mtc value=#{serverForm.mtc} / ... h:inputText id=dns value=#{serverForm.dns} rendered=#{serverForm.mtc == 'edit'}/ ... /s:form At rendering time the page is correctly displayed and the dns input displays if mtc is equals to edit, if the dns field has a value its value displays in the field. Then if I submit the form, in my Struts action class, I can get the mtc value using: DynaValidatorForm serverForm = (DynaValidatorForm) form ; String mtc = (String)serverForm.get( mtc ) ; The mtc attribute is equals to edit. But when I try to do: String dns = (String)serverForm.get( dns ) ; I cannot obtain the dns value that was submitted even if mtc is equals to edit. To sum up the value of the attribute serverForm.mtc is available at rendering time and at submitting time but seems not present while evaluating the rendered JSF attribute during the form submit phase. Then if I put the scope of both actions used as Session scope, it works correctly, I can get the dns submitted value. Without knowing in details the way a request is handled behind the scene especially between JSF and Struts, I think there is something wrong here but I am not 100% sure. In fact I am pretty sure that I should not be obliged to set these actions in session scope. If you need more information, please let me know. Thanks a lot for your help Xavier _ MSN Messenger : discutez en direct avec vos amis ! http://www.msn.fr/msger/default.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Identifying the 'clicked' line when iterating over collection
-Original Message- From: andy wix [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 9:19 AM To: [EMAIL PROTECTED] Subject: Re: Identifying the 'clicked' line when iterating over collection Hi, I have tried most of the code in the replies and, alas, fear my brain is too small to get any working. I am persevering with Rick Reumann's method (because I liked the Struttin' with Struts stuff!) but I don't get a session parameter in my next page after the link is followed (I have changed the scope to session). To get the ID would be something, but it would save me needing an action class at all if I could get the contact object representing the 'clicked' row into the session or request scope. A cut down version of the code is: form name=form0 method=post TABLE border=0 % ArrayList list = (ArrayList)session.getAttribute(Contacts); Iterator it = list.iterator(); int id = 0; while(it.hasNext()) { Contact tempContact = (Contact)it.next(); }% TR TD%=tempContact.getName()%/TD TD%=tempContact.getNumber()%/TD TDc:url var=url scope=session value=/do/modifyContact c:param name=ID value=${form0.tempContact.id}//c:url a href=c:out value='${url}'/Modify/a Note that I am not using any Struts Forms for this Action as I receive the ArrayList from the session. I added an html form tag as above because you had one in the example code. What session attribute are you thinking should be there when you click on Modify? What you'll end up with is a url with params, the params of which won't be in session scope at all. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Identifying the 'clicked' line when iterating over collection
I would do somthing like the following: TABLE border=0 c:forEach items=${contacts} var=contact TR TD${contact.name}/TD TD${contact.number}/TD TDc:url var=url scope=session value=/do/modifyContact c:param name=ID value=${contact.id}//c:url a href=c:out value='${url}'/Modify/a /c:forEach The action modifyContact should load the contact with the specified id, ID is available by String ID = request.getParameter(ID); The action then stores the contact in the request scope: request.setAttribute(contact,contact); then forward to the jsp: name:${contact.name} etc... Hope that helps, Daniel. -Original Message- From: andy wix [mailto:[EMAIL PROTECTED] Sent: 31 August 2004 17:19 To: [EMAIL PROTECTED] Subject: Re: Identifying the 'clicked' line when iterating over collection Hi, I have tried most of the code in the replies and, alas, fear my brain is too small to get any working. I am persevering with Rick Reumann's method (because I liked the Struttin' with Struts stuff!) but I don't get a session parameter in my next page after the link is followed (I have changed the scope to session). To get the ID would be something, but it would save me needing an action class at all if I could get the contact object representing the 'clicked' row into the session or request scope. A cut down version of the code is: form name=form0 method=post TABLE border=0 % ArrayList list = (ArrayList)session.getAttribute(Contacts); Iterator it = list.iterator(); int id = 0; while(it.hasNext()) { Contact tempContact = (Contact)it.next(); }% TR TD%=tempContact.getName()%/TD TD%=tempContact.getNumber()%/TD TDc:url var=url scope=session value=/do/modifyContact c:param name=ID value=${form0.tempContact.id}//c:url a href=c:out value='${url}'/Modify/a Note that I am not using any Struts Forms for this Action as I receive the ArrayList from the session. I added an html form tag as above because you had one in the example code. Cheers, Andy _ Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo - 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: html:errors for indexed properties
Do you want to supply a patch?! |-+ | | Milind Rao | | | [EMAIL PROTECTED]| | | m | | || | | 08/31/2004 09:40 | | | AM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: html:errors for indexed properties | | Worked well. Thanks. Used html:errors instead of the message for brevity. It would have been nice if html:errors could have been set with indexed=true. Would have prevented the scriplet and been more consistent. Regards Milind - 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]
Iterating over collection ...
Hello there I am having some issue getting the correctly output while iterating over my collection I'm doing the following: I'm iterating over an processList(ArrayList) which contains 4 objects of type ProcessBO. ProcessBO has 3 attributes; int ID String name ArrayList tasklist The tasklist holds objects of type TaskBO TaskBO has several attributes of type String In my jsp I am iterating over the processList like this: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br bean:write name=process property=tasklist/br /logic:iterate which prints the name, ID as I want it to but for the property tasklist it prints the class name for each object in the tasklist. I would like to access the attributes of the objects inside the tasklist and print them similar to the other output with bean:write I have looked searched for an answer in the documentation where it says I could use something like tasklist.name for the property value but his did not work. Help would be very much appreciated Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Iterating over collection ...
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 9:48 AM To: [EMAIL PROTECTED] Subject: Iterating over collection ... Hello there I am having some issue getting the correctly output while iterating over my collection I'm doing the following: I'm iterating over an processList(ArrayList) which contains 4 objects of type ProcessBO. ProcessBO has 3 attributes; int ID String name ArrayList tasklist The tasklist holds objects of type TaskBO TaskBO has several attributes of type String In my jsp I am iterating over the processList like this: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br bean:write name=process property=tasklist/br Instead of do this: logic:iterate id=task name=processlist property=tasklist bean:write name=task property=property1/ /logic:iterate /logic:iterate which prints the name, ID as I want it to but for the property tasklist it prints the class name for each object in the tasklist. I would like to access the attributes of the objects inside the tasklist and print them similar to the other output with bean:write I have looked searched for an answer in the documentation where it says I could use something like tasklist.name for the property value but his did not work. Help would be very much appreciated Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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]
Classloading problem
We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once again, thanks in advance. Ivan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Iterating over collection ...
Don't you want a nested iteration of the second ArrayList, similar to the iteration you already have? Erik [EMAIL PROTECTED] wrote: Hello there I am having some issue getting the correctly output while iterating over my collection I'm doing the following: I'm iterating over an processList(ArrayList) which contains 4 objects of type ProcessBO. ProcessBO has 3 attributes; int ID String name ArrayList tasklist The tasklist holds objects of type TaskBO TaskBO has several attributes of type String In my jsp I am iterating over the processList like this: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br bean:write name=process property=tasklist/br /logic:iterate which prints the name, ID as I want it to but for the property tasklist it prints the class name for each object in the tasklist. I would like to access the attributes of the objects inside the tasklist and print them similar to the other output with bean:write I have looked searched for an answer in the documentation where it says I could use something like tasklist.name for the property value but his did not work. Help would be very much appreciated Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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: Iterating over collection ...
You need to nest another iterate'er in order to iterate through the inner list for each object: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br logic:iterate id=task name=process property=tasklist bean:write name=task property=name/br /logic:iterate /logic:iterate Daniel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 31 August 2004 17:48 To: [EMAIL PROTECTED] Subject: Iterating over collection ... Hello there I am having some issue getting the correctly output while iterating over my collection I'm doing the following: I'm iterating over an processList(ArrayList) which contains 4 objects of type ProcessBO. ProcessBO has 3 attributes; int ID String name ArrayList tasklist The tasklist holds objects of type TaskBO TaskBO has several attributes of type String In my jsp I am iterating over the processList like this: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br bean:write name=process property=tasklist/br /logic:iterate which prints the name, ID as I want it to but for the property tasklist it prints the class name for each object in the tasklist. I would like to access the attributes of the objects inside the tasklist and print them similar to the other output with bean:write I have looked searched for an answer in the documentation where it says I could use something like tasklist.name for the property value but his did not work. Help would be very much appreciated Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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: Identifying the 'clicked' line when iterating over collection
andy wix wrote: session). To get the ID would be something, but it would save me needing an action class at all if I could get the contact object representing the 'clicked' row into the session or request scope. To do what you want above would take a slightly different approach. Say you had your ArrayList of Contacts in Session scope and after the user clicked on a link you wanted to edit one of those objects. In this case you wouldn't use the ID to look him up you'd have to use the index of where you were in the Collection so that when you submit to the Action you can then pull the user out like so... //on JSP in a loop of you contacts c:forEach items=${contacts} var=contact varStatus=status c:url var=url value=/do/modifyContact c:param name=indexPos value=${status.index}/ /c:url a href=c:out value='${url}'/Modify/a //in Action... //from parameter on the JSP indexPos = new Integer(request.getParamater(indexPos).intVal(); //grab your existing ArrayList ArrayList contacts = (ArrayList)request.getSession().getAttribute(contacts); //now pull out the one you want and probably set it in request scope //for the next update page to use Contact contact = (Contact)contacts.get( indexPos ); request.setAttribute( contact, contact ); //forward to update JSP page The above being said, that 'usually' isn't the approach you want to take (although it's not always bad). The reason is A) you are required to stuff possibly a large Collection into Session scope and B) Each object in the Collection needs to be fully populated, which could be expensive if each item had large objects nested inside, etc. The more typical approach we were describing would involve a call to populate the Contact based on a unique indentifier such as an 'id' Imagine a case where you just wanted the user to choose a contact to update.. you'd probably just be displaying their name and maybe a couple other attributes (but probably not all the other contact information - alternate phone numbers etc). So really all you need for this first list is a simple Collection put in request scope of Contact beans with just a few things populated. Then the user clicks on the row and you can then fully populate the Contact. (This also has the added benefit of helping you have a better chance of getting a fresh unmodified Contact). Using the first approach, what if the user was looking at the list for a while and went to the bathroom and came back 15 minutes later and went to update the contact. You would end up giving him a Contact from teh Collection that could have been modified (or even deleted) by another user. On the other hand, if you get a fresh population of the Contact you can alert the User the Contact was deleted or he'd at least see more recently modified changes. And in the below you woldn't need the form tag (like you mention). However you would need to be getting the list from somewhere so this part is probably wrong: value=${form0.tempContact.id}/ Hope that helps. A cut down version of the code is: form name=form0 method=post TABLE border=0 % ArrayList list = (ArrayList)session.getAttribute(Contacts); Iterator it = list.iterator(); int id = 0; while(it.hasNext()) { Contact tempContact = (Contact)it.next(); }% TR TD%=tempContact.getName()%/TD TD%=tempContact.getNumber()%/TD TDc:url var=url scope=session value=/do/modifyContact c:param name=ID value=${form0.tempContact.id}//c:url a href=c:out value='${url}'/Modify/a Note that I am not using any Struts Forms for this Action as I receive the ArrayList from the session. I added an html form tag as above because you had one in the example code. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Iterating over collection ...
Thanks Daniel, this worked. I have tried nesting a iterate tag earlier today but I wasn't setting it correct. Thanks for the answer. Regards Karim PS: Thanks to the other replies too. Daniel Perry [EMAIL PROTECTED] wrote: You need to nest another iterate'er in order to iterate through the inner list for each object: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br logic:iterate id=task name=process property=tasklist bean:write name=task property=name/br /logic:iterate /logic:iterate Daniel. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 31 August 2004 17:48 To: [EMAIL PROTECTED] Subject: Iterating over collection ... Hello there I am having some issue getting the correctly output while iterating over my collection I'm doing the following: I'm iterating over an processList(ArrayList) which contains 4 objects of type ProcessBO. ProcessBO has 3 attributes; int ID String name ArrayList tasklist The tasklist holds objects of type TaskBO TaskBO has several attributes of type String In my jsp I am iterating over the processList like this: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br bean:write name=process property=tasklist/br /logic:iterate which prints the name, ID as I want it to but for the property tasklist it prints the class name for each object in the tasklist. I would like to access the attributes of the objects inside the tasklist and print them similar to the other output with bean:write I have looked searched for an answer in the documentation where it says I could use something like tasklist.name for the property value but his did not work. Help would be very much appreciated Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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] __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloading problem
Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say incorrectly? Erik Ivan Vasquez wrote: We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once again, thanks in advance. Ivan. - 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: Iterating over collection ...
Thanks Jim, the reply Daniel Perry posted worked/ I have done it your way earlier nad it did not produce the correct output. Have look (if you care at Daniel Perry's reply. It did produce the correct outpu. Thanks anyway Karim Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 9:48 AM To: [EMAIL PROTECTED] Subject: Iterating over collection ... Hello there I am having some issue getting the correctly output while iterating over my collection I'm doing the following: I'm iterating over an processList(ArrayList) which contains 4 objects of type ProcessBO. ProcessBO has 3 attributes; int ID String name ArrayList tasklist The tasklist holds objects of type TaskBO TaskBO has several attributes of type String In my jsp I am iterating over the processList like this: logic:iterate id=process name=processlist bean:write name=process property=name/ bean:write name=process property=ID/br bean:write name=process property=tasklist/br Instead of do this: logic:iterate id=task name=processlist property=tasklist bean:write name=task property=property1/ /logic:iterate /logic:iterate which prints the name, ID as I want it to but for the property tasklist it prints the class name for each object in the tasklist. I would like to access the attributes of the objects inside the tasklist and print them similar to the other output with bean:write I have looked searched for an answer in the documentation where it says I could use something like tasklist.name for the property value but his did not work. Help would be very much appreciated Thanks Karim __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - 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] __ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.2.2 validator problem in websphere
What steps did you take when you upgraded? What library and files did you replace? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:51 AM Subject: 1.2.2 validator problem in websphere I'm getting this error migrating to 1.2.2 from 1.1 in Websphere 5.0.x which is running in the 1.3 JVM. [8/31/04 11:42:19:686 EDT] 5d4abeff ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml' [8/31/04 11:42:20:139 EDT] 5d4abeff ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:99) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycle Servlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecy cleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleS ervlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:18 9) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServlet Manager.java:870) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServle tManager.java:224) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebA ppServletManager.java:455) at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:646) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.calculateInfo(Web AppRequestDispatcherInfo.java:172) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.init(WebAppRequ estDispatcherInfo.java:59) at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1455) at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1414) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker .java:197) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C achedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq uestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene r.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav a:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593) Begin backtrace for Nested Throwables java.lang.NoSuchMethodError: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 839) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:82) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycle Servlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecy cleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleS ervlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:18 9) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServlet Manager.java:870) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServle tManager.java:224) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebA ppServletManager.java:455) at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:646) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.calculateInfo(Web
Re: 1.2.2 validator problem in websphere
The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:23 PM Subject: Re: 1.2.2 validator problem in websphere What steps did you take when you upgraded? What library and files did you replace? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:51 AM Subject: 1.2.2 validator problem in websphere I'm getting this error migrating to 1.2.2 from 1.1 in Websphere 5.0.x which is running in the 1.3 JVM. [8/31/04 11:42:19:686 EDT] 5d4abeff ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml' [8/31/04 11:42:20:139 EDT] 5d4abeff ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:99) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycle Servlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecy cleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleS ervlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:18 9) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServlet Manager.java:870) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServle tManager.java:224) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebA ppServletManager.java:455) at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:646) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.calculateInfo(Web AppRequestDispatcherInfo.java:172) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.init(WebAppRequ estDispatcherInfo.java:59) at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1455) at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1414) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker .java:197) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C achedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq uestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene r.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav a:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593) Begin backtrace for Nested Throwables java.lang.NoSuchMethodError: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java: 839) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:82) at
Re: Identifying the 'clicked' line when iterating over collection
Rick Reumann wrote: To do what you want above would take a slightly different approach. Say you had your ArrayList of Contacts in Session scope and after the user clicked on a link you wanted to edit one of those objects. In this case you wouldn't use the ID to look him up you'd have to use the index of where you were in the Collection so that when you submit to the Action you can then pull the user out (Unless of course you stored the Contacts in a Map with maybe the ID as the key, then of course you could pull them out by key. I still recommend the other approach I mentioned where you get a fresh Contact from the backend based on an ID or some other unique identifier.) -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.2.2 validator problem in websphere
Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:37 PM Subject: Re: 1.2.2 validator problem in websphere The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:23 PM Subject: Re: 1.2.2 validator problem in websphere What steps did you take when you upgraded? What library and files did you replace? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:51 AM Subject: 1.2.2 validator problem in websphere I'm getting this error migrating to 1.2.2 from 1.1 in Websphere 5.0.x which is running in the 1.3 JVM. [8/31/04 11:42:19:686 EDT] 5d4abeff ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml' [8/31/04 11:42:20:139 EDT] 5d4abeff ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:99) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycle Servlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecy cleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleS ervlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:18 9) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServlet Manager.java:870) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServle tManager.java:224) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebA ppServletManager.java:455) at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:646) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.calculateInfo(Web AppRequestDispatcherInfo.java:172) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcherInfo.init(WebAppRequ estDispatcherInfo.java:59) at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1455) at com.ibm.ws.webcontainer.webapp.WebApp.getRequestDispatcher(WebApp.java:1414) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker .java:197) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C achedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq uestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene r.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav a:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593) Begin backtrace for Nested Throwables java.lang.NoSuchMethodError: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at
Initial invocation (HTTP GET) Instantiates an Action, but does no t invoke execute(...)
Good Afternoon, An instance of a my Action class only has its' constructor firing when the ActionServlet first loads it, when the execute(...) function should be invoked at some point afterward. I do not have any need for a ActionForm with this specific request; only that the request must pull information out of the database, which would occur if the execute(..) function happened. My struts-config file is very small; this is the beginning of my integration work with a application that does not use Struts (soon to change if I make some progress :-) ) Here is my struts-config.xml: ?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 action-mappings action path=/planning type=smartt.planning.benefit.action.ViewBenefit scope=request /action /action-mappings /struts-config Again, I have not declared any ActionForm's, since this particular request is pulling data out of the database, and there are no form elements being sent over. My web.xml has the standard mappings for ActionServlet, and any URI with /*.do map to it. What does happen is the browser returns with a blank page. I did read up on possible causes (misspellings, missing declarations and/or attributes and that sort, but didn't find any related solution in the forums or via searches in Google. I appreciate it. -Andy
[OT] Sorry could not resist [was RE: [OT] Tomcat MD5 Authenticati on ]
-Original Message- From: klute [mailto:[EMAIL PROTECTED] ==///== have not done it myself but hopefully this thread is of some help.. [ Now, I remember ... ] Klute Weren't you the tearful little girl who found herself left alone after all the settlers had been murdered on the primordial rimworld? Didn't Ripley plead and finally tease you out of your cubby nestlay in between the ducts and pipes. ``Aliens: In space no one could hear you scream''. Or maybe it was the film with Jane Fonda, back in the seventies ... -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.2.2 validator problem in websphere
I would propose this as the fix [EMAIL PROTECTED] ~/cvs/jakarta-struts $ cvs diff -u src/share/org/apache/struts/validator/ValidatorPlugIn.java Index: src/share/org/apache/struts/validator/ValidatorPlugIn.java === RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlug In.java,v retrieving revision 1.26 diff -u -r1.26 ValidatorPlugIn.java --- src/share/org/apache/struts/validator/ValidatorPlugIn.java 7 Aug 2004 04:17:52 - 1.26 +++ src/share/org/apache/struts/validator/ValidatorPlugIn.java 31 Aug 2004 17:43:50 - @@ -167,7 +167,7 @@ resources); servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.' + config.getPrefix(), - Boolean.valueOf(this.stopOnFirstError)); + new Boolean(this.stopOnFirstError)); } catch (Exception e) { log.error(e.getMessage(), e); ...someone with more knowledge with validator, please look this over and let me know. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:41 PM Subject: Re: 1.2.2 validator problem in websphere Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:37 PM Subject: Re: 1.2.2 validator problem in websphere The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:23 PM Subject: Re: 1.2.2 validator problem in websphere What steps did you take when you upgraded? What library and files did you replace? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:51 AM Subject: 1.2.2 validator problem in websphere I'm getting this error migrating to 1.2.2 from 1.1 in Websphere 5.0.x which is running in the 1.3 JVM. [8/31/04 11:42:19:686 EDT] 5d4abeff ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml' [8/31/04 11:42:20:139 EDT] 5d4abeff ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:99) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycle Servlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecy cleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleS ervlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:18 9) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServlet Manager.java:870) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServle tManager.java:224) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.getServletReference(WebA ppServletManager.java:455) at com.ibm.ws.webcontainer.webapp.WebApp.getServletReference(WebApp.java:646)
Re: 1.2.2 validator problem in websphere
This is the only difference from 1.25 to 1.26 (file version) http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlugIn.java?r1=1.25r2=1.26diff_format=h BTW, the log for 1.26 says: * Use Boolean.valueOf() instead of creating new instances. That is why early optimization is the root of all evil ;-) PS: I am a Validator user, but not a commiter :-D []s - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:46 PM Subject: Re: 1.2.2 validator problem in websphere I would propose this as the fix [EMAIL PROTECTED] ~/cvs/jakarta-struts $ cvs diff -u src/share/org/apache/struts/validator/ValidatorPlugIn.java Index: src/share/org/apache/struts/validator/ValidatorPlugIn.java === RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlug In.java,v retrieving revision 1.26 diff -u -r1.26 ValidatorPlugIn.java --- src/share/org/apache/struts/validator/ValidatorPlugIn.java 7 Aug 2004 04:17:52 - 1.26 +++ src/share/org/apache/struts/validator/ValidatorPlugIn.java 31 Aug 2004 17:43:50 - @@ -167,7 +167,7 @@ resources); servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.' + config.getPrefix(), - Boolean.valueOf(this.stopOnFirstError)); + new Boolean(this.stopOnFirstError)); } catch (Exception e) { log.error(e.getMessage(), e); ...someone with more knowledge with validator, please look this over and let me know. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:41 PM Subject: Re: 1.2.2 validator problem in websphere Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:37 PM Subject: Re: 1.2.2 validator problem in websphere The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:23 PM Subject: Re: 1.2.2 validator problem in websphere What steps did you take when you upgraded? What library and files did you replace? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:51 AM Subject: 1.2.2 validator problem in websphere I'm getting this error migrating to 1.2.2 from 1.1 in Websphere 5.0.x which is running in the 1.3 JVM. [8/31/04 11:42:19:686 EDT] 5d4abeff ValidatorPlug I org.apache.struts.validator.ValidatorPlugIn Loading validation rules file from '/WEB-INF/validation.xml' [8/31/04 11:42:20:139 EDT] 5d4abeff ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: java.lang.Boolean: method valueOf(Z)Ljava/lang/Boolean; not found at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletIn stance.java:99) at
RE: Initial invocation (HTTP GET) Instantiates an Action, but does not invoke execute(...)
-Original Message- From: Sheehan, Andrew [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 10:43 AM To: [EMAIL PROTECTED] Subject: Initial invocation (HTTP GET) Instantiates an Action, but does not invoke execute(...) Good Afternoon, An instance of a my Action class only has its' constructor firing when the ActionServlet first loads it, when the execute(...) function should be invoked at some point afterward. I do not have any need for a ActionForm with this specific request; only that the request must pull information out of the database, which would occur if the execute(..) function happened. My struts-config file is very small; this is the beginning of my integration work with a application that does not use Struts (soon to change if I make some progress :-) ) You have no forwards configured, so your action goes nowhere, which happens to be a blank page. Here is my struts-config.xml: ?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 action-mappings action path=/planning type=smartt.planning.benefit.action.ViewBenefit scope=request /action /action-mappings /struts-config Again, I have not declared any ActionForm's, since this particular request is pulling data out of the database, and there are no form elements being sent over. My web.xml has the standard mappings for ActionServlet, and any URI with /*.do map to it. What does happen is the browser returns with a blank page. I did read up on possible causes (misspellings, missing declarations and/or attributes and that sort, but didn't find any related solution in the forums or via searches in Google. I appreciate it. -Andy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ANN] Struts 1.2.2 release is now available for download.
A big thanks to you James for your leadership and all involved your labor :-D Shed. -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 10:19 AM To: Struts Users Mailing List Cc: Struts Developers List Subject: [ANN] Struts 1.2.2 release is now available for download. The Apache Struts team is extremely proud to announce the availability of Struts 1.2.2. This release represents the first official release available for General Availability since Struts 1.1. You can find all of the features, enhancements, and bug fixes in the release notes listed below. I would personally like to send a big _THANK YOU_ to all the users and developers who help make this community project possible and an even bigger _THANK YOU_ to the developers and committers who volunteer their time and talents to this (as well as other) Open Source project. Pat yourselves on the back, you are doing a stellar job Release notes: http://struts.apache.org/userGuide/release-notes.html You can access the binary, source, or library distributions from any of our mirrors http://struts.apache.org/download.cgi The Apache Struts Team -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - 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.2 validator problem in websphere
Ok, so without looking, my proposed fix is basically putting it back to the way it wasnow that's sad. Martin, what should we do with this? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:54 PM Subject: Re: 1.2.2 validator problem in websphere This is the only difference from 1.25 to 1.26 (file version) http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts /validator/ValidatorPlugIn.java?r1=1.25r2=1.26diff_format=h BTW, the log for 1.26 says: * Use Boolean.valueOf() instead of creating new instances. That is why early optimization is the root of all evil ;-) PS: I am a Validator user, but not a commiter :-D []s - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:46 PM Subject: Re: 1.2.2 validator problem in websphere I would propose this as the fix [EMAIL PROTECTED] ~/cvs/jakarta-struts $ cvs diff -u src/share/org/apache/struts/validator/ValidatorPlugIn.java Index: src/share/org/apache/struts/validator/ValidatorPlugIn.java === RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlug In.java,v retrieving revision 1.26 diff -u -r1.26 ValidatorPlugIn.java --- src/share/org/apache/struts/validator/ValidatorPlugIn.java 7 Aug 2004 04:17:52 - 1.26 +++ src/share/org/apache/struts/validator/ValidatorPlugIn.java 31 Aug 2004 17:43:50 - @@ -167,7 +167,7 @@ resources); servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.' + config.getPrefix(), - Boolean.valueOf(this.stopOnFirstError)); + new Boolean(this.stopOnFirstError)); } catch (Exception e) { log.error(e.getMessage(), e); ...someone with more knowledge with validator, please look this over and let me know. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:41 PM Subject: Re: 1.2.2 validator problem in websphere Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:37 PM Subject: Re: 1.2.2 validator problem in websphere The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:23 PM Subject: Re: 1.2.2 validator problem in websphere What steps did you take when you upgraded? What library and files did you replace? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:51 AM Subject: 1.2.2 validator problem in websphere I'm getting this error migrating to 1.2.2 from 1.1 in Websphere 5.0.x which is running in the 1.3 JVM. [8/31/04 11:42:19:686 EDT] 5d4abeff
Re: 1.2.2 validator problem in websphere
I was gonna post this suggestion anyway, but here's something that will work with JDK 1.3 and is in the spirit of avoiding the creation of Boolean instances. Instead of: new Boolean(this.stopOnFirstError) How about something like: (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE) Or create a utility method to do the equivalent. No doubt Commons Lang already has one...yup, BooleanUtils.toBooleanObject(boolean). Quoting James Mitchell [EMAIL PROTECTED]: Ok, so without looking, my proposed fix is basically putting it back to the way it wasnow that's sad. Martin, what should we do with this? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:54 PM Subject: Re: 1.2.2 validator problem in websphere This is the only difference from 1.25 to 1.26 (file version) http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts /validator/ValidatorPlugIn.java?r1=1.25r2=1.26diff_format=h BTW, the log for 1.26 says: * Use Boolean.valueOf() instead of creating new instances. That is why early optimization is the root of all evil ;-) PS: I am a Validator user, but not a commiter :-D []s - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:46 PM Subject: Re: 1.2.2 validator problem in websphere I would propose this as the fix [EMAIL PROTECTED] ~/cvs/jakarta-struts $ cvs diff -u src/share/org/apache/struts/validator/ValidatorPlugIn.java Index: src/share/org/apache/struts/validator/ValidatorPlugIn.java === RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlug In.java,v retrieving revision 1.26 diff -u -r1.26 ValidatorPlugIn.java --- src/share/org/apache/struts/validator/ValidatorPlugIn.java 7 Aug 2004 04:17:52 - 1.26 +++ src/share/org/apache/struts/validator/ValidatorPlugIn.java 31 Aug 2004 17:43:50 - @@ -167,7 +167,7 @@ resources); servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.' + config.getPrefix(), - Boolean.valueOf(this.stopOnFirstError)); + new Boolean(this.stopOnFirstError)); } catch (Exception e) { log.error(e.getMessage(), e); ...someone with more knowledge with validator, please look this over and let me know. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:41 PM Subject: Re: 1.2.2 validator problem in websphere Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:37 PM Subject: Re: 1.2.2 validator problem in websphere The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:23 PM Subject: Re: 1.2.2 validator problem in websphere What
Re: Classloading problem
This is from the JDBC DataSource howto: DBCP uses the Jakarta-Commons Database Connection Pool. It relies on number of Jakarta-Commons componenets: * Jakarta-Commons DBCP 1.0 * Jakarta-Commons Collections 2.0 * Jakarta-Commons Pool 1.0 These jar files along with your the jar file for your JDBC driver should be installed in |$CATALINA_HOME/common/lib|. *NOTE:*Third Party drivers should be in jarfiles, not zipfiles. Tomcat only adds |$CATALINA_HOME/common/lib/*.jar| to the classpath. *NOTE:* Do not install these jarfiles in your |/WEB-INF/lib|, or |$JAVA_HOME/jre/lib/ext|, or anywhere else. You will experience problems if you install them anyplace other than |$CATALINA_HOME/common/lib|. Erik Ivan Vasquez wrote: Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say incorrectly? Erik Ivan Vasquez wrote: We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once again, thanks in advance. Ivan. - 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.2 validator problem in websphere
That works for me. I'll make the change unless anyone disagrees. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Kris Schneider [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:17 PM Subject: Re: 1.2.2 validator problem in websphere I was gonna post this suggestion anyway, but here's something that will work with JDK 1.3 and is in the spirit of avoiding the creation of Boolean instances. Instead of: new Boolean(this.stopOnFirstError) How about something like: (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE) Or create a utility method to do the equivalent. No doubt Commons Lang already has one...yup, BooleanUtils.toBooleanObject(boolean). Quoting James Mitchell [EMAIL PROTECTED]: Ok, so without looking, my proposed fix is basically putting it back to the way it wasnow that's sad. Martin, what should we do with this? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:54 PM Subject: Re: 1.2.2 validator problem in websphere This is the only difference from 1.25 to 1.26 (file version) http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts /validator/ValidatorPlugIn.java?r1=1.25r2=1.26diff_format=h BTW, the log for 1.26 says: * Use Boolean.valueOf() instead of creating new instances. That is why early optimization is the root of all evil ;-) PS: I am a Validator user, but not a commiter :-D []s - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:46 PM Subject: Re: 1.2.2 validator problem in websphere I would propose this as the fix [EMAIL PROTECTED] ~/cvs/jakarta-struts $ cvs diff -u src/share/org/apache/struts/validator/ValidatorPlugIn.java Index: src/share/org/apache/struts/validator/ValidatorPlugIn.java === RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlug In.java,v retrieving revision 1.26 diff -u -r1.26 ValidatorPlugIn.java --- src/share/org/apache/struts/validator/ValidatorPlugIn.java 7 Aug 2004 04:17:52 - 1.26 +++ src/share/org/apache/struts/validator/ValidatorPlugIn.java 31 Aug 2004 17:43:50 - @@ -167,7 +167,7 @@ resources); servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.' + config.getPrefix(), - Boolean.valueOf(this.stopOnFirstError)); + new Boolean(this.stopOnFirstError)); } catch (Exception e) { log.error(e.getMessage(), e); ...someone with more knowledge with validator, please look this over and let me know. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:41 PM Subject: Re: 1.2.2 validator problem in websphere Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:37 PM Subject: Re: 1.2.2 validator problem in websphere The exception is not clear enough, but it contains most info you need to know: Some code in Struts 1.2.2 [probably org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:169)] is using Boolean.valueOf(boolean), which was added in Java 1.4. It is pretty simple to fix that one if that is the case. Regards, - Michael Nascimento Santos JSR 207 Expert
Re: Questions on logging
On 31 Aug 2004 15:43:29 +0800, Sebastian Ho [EMAIL PROTECTED] wrote: Hi I am in the stage of implementing logging in my struts application. I have been reading online but have some questions unanswered. 1. Action class should be thread-safe. Therefore no static variable, I should just use a non-static variable to hold my logger? A more precise definition of the rule is no non-thread-safe static or instance variables that attempt to maintain state associated with a particlar request. Log instances are OK based on that rule, because they are both threadsafe and application-wide. 2. In a multi-user web application, how can I keep logs from the same class (same execution thread or same user request) stays together? I envision them to be all messy in the log file when there's multiple user requesting for the same action class. As Nico points out, you can get the thread id added, that doesn't help segregate log messages by application. A different strategy is to set up a separate logging environment for each webapp -- details will be in, for example, the Log4J information. 3. About the thread safe issue with Actin class, that doesn't apply to the other classes that action execute right? Those are treated as normal java files. Thread safety of the object instances you call depends on whether you created a separate instance for each request, or are reusing the same instance. In the former case, you don't have to worry -- in the latter case (say you grabbed some common utility object out of the application scope attributes), then the class for the instance you are calling does need to be worried about thread safety. Thanks Sebastian Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classloading problem
Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example web app mysteriously does not include a Context XML file at all, despite that pretty much any serious web app is going to need one (unless you declare everything in server.xml). If you have an example of this working, please share it with me. Erik Ivan Vasquez wrote: Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say incorrectly? Erik Ivan Vasquez wrote: We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once again, thanks in advance. Ivan. - 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: Classloading problem
Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example web app mysteriously does not include a Context XML file at all, despite that pretty much any serious web app is going to need one (unless you declare everything in server.xml). If you have an example of this working, please share it with me. Erik Ivan Vasquez wrote: Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say incorrectly? Erik Ivan Vasquez wrote: We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once again, thanks in advance. Ivan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Classloading problem
Thanks for your answer, that explains it all. Yes, we were trying to clean server.xml and to avoid server restarts every time something changes (e.g. db connection pool info). Context was directly cut and pasted into the local META-INF/context.xml. But Tomcat gets it only when you create a .war and then deploy it. If you have a deployed application, create META-INF/context.xml and delete its context entry from server.xml, the context is lost. The only way to make the app work again is to place context.xml in conf/Catalina/localhost/ (that must be part of Tomcat's auto deployment feature). Hope that helps, let me know if that doesn't work for you. Thanks! Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 3:10 PM To: Struts Users Mailing List Subject: Re: Classloading problem Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example web app mysteriously does not include a Context XML file at all, despite that pretty much any serious web app is going to need one (unless you declare everything in server.xml). If you have an example of this working, please share it with me. Erik Ivan Vasquez wrote: Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say incorrectly? Erik Ivan Vasquez wrote: We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once again, thanks in advance. Ivan. - 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: Is Tiles the right way to go?
Hi Craig I am trying to learn Tiles. Is Tiles the right way to go with Struts? Should I study other tool before sticking with Tiles? ... It is impossible to give you any useful help on this question without understanding what you are trying to accomplish with (or without) Tiles, and what alternative tools you might consider instead. Could you please give some indication of what to think about before going with Tiles? I would be interesting... Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classloading problem
Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example web app mysteriously does not include a Context XML file at all, despite that pretty much any serious web app is going to need one (unless you declare everything in server.xml). If you have an example of this working, please share it with me. Erik Ivan Vasquez wrote: Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have been using 5.0.27, putting my JDBC drivers in common/lib, and my struts jars in WEB-INF/lib of each application, and haven't had any problems. Why do you say incorrectly? Erik Ivan Vasquez wrote: We have Tomcat 5.0.16 and were incorrectly placing common jars (such as JDBC drivers) in /common/lib. Now we just moved them to /shared/lib (for truly common stuff) and WEB-INF/lib, but now all applications complain giving a java.lang.ClassNotFoundException, just like if things weren't in Tomcat's classpath anymore. Apps and Tomcat restarts have been done several times. Is there anything in web.xml, server.xml, etc that needs to be set? What are we possibly missing? Tomcat docs are pretty straightforward about it and everything seems right. Once
Re: Classloading problem
I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example web app mysteriously does not include a Context XML file at all, despite that pretty much any serious web app is going to need one (unless you declare everything in server.xml). If you have an example of this working, please share it with me. Erik Ivan Vasquez wrote: Sure, in common/lib it works well. But from Tomcat docs: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html The following rules cover about 95% of the decisions that application developers and deployers must make about where to place class and resource files to make them available to web applications: * For classes and resources specific to a particular web application, place unpacked classes and resources under /WEB-INF/classes of your web application archive, or place JAR files containing those classes and resources under /WEB-INF/lib of your web application archive. * For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib. --Then goes on...--- Common - This class loader contains additional classes that are made visible to both Tomcat internal classes and to all web applications. Normally, application classes should NOT be placed here. All unpacked classes and resources in $CATALINA_HOME/common/classes, as well as classes and resources in JAR files under the $CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib directories, are made visible through this class loader. Shared - This class loader is the place to put classes and resources that you wish to share across ALL web applications (unless Tomcat internal classes also need access, in which case you should put them in the Common class loader instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes, as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib, are made visible through this class loader. In our case we want to share jars common to all applications, but none of them are required by Tomcat. Ivan. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 12:52 PM To: Struts Users Mailing List Subject: Re:
RE: Classloading problem
Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCO L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example web app mysteriously does not include a Context XML file at all, despite that pretty much any serious web app is going to need one (unless you declare everything in server.xml). If you have an example of this working, please share it
File Upload and DynaForms
Is it possible to use dynaforms to setup file upload? If so, any tips? Thanks in advance. R - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 1.2.2 validator problem in websphere
Just for sanity sake, I reconfigured Eclipse to build with 1.3.1 and found one more place with 1.3.1 incompatibilities. Same issue with Boolean, but in a different spot (Tiles). I have fixed that also. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:19 PM Subject: Re: 1.2.2 validator problem in websphere That works for me. I'll make the change unless anyone disagrees. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Kris Schneider [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:17 PM Subject: Re: 1.2.2 validator problem in websphere I was gonna post this suggestion anyway, but here's something that will work with JDK 1.3 and is in the spirit of avoiding the creation of Boolean instances. Instead of: new Boolean(this.stopOnFirstError) How about something like: (this.stopOnFirstError ? Boolean.TRUE : Boolean.FALSE) Or create a utility method to do the equivalent. No doubt Commons Lang already has one...yup, BooleanUtils.toBooleanObject(boolean). Quoting James Mitchell [EMAIL PROTECTED]: Ok, so without looking, my proposed fix is basically putting it back to the way it wasnow that's sad. Martin, what should we do with this? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:54 PM Subject: Re: 1.2.2 validator problem in websphere This is the only difference from 1.25 to 1.26 (file version) http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts /validator/ValidatorPlugIn.java?r1=1.25r2=1.26diff_format=h BTW, the log for 1.26 says: * Use Boolean.valueOf() instead of creating new instances. That is why early optimization is the root of all evil ;-) PS: I am a Validator user, but not a commiter :-D []s - Michael Nascimento Santos JSR 207 Expert Group Member JSR Community Manager - http://community.java.net/jsr Organizacao SouJava - http://www.soujava.org.br Thinlet - http://www.thinlet.com http://www.javablogs.com.br/blogs/page/soujavamisterm http://today.java.net/pub/au/80 - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:46 PM Subject: Re: 1.2.2 validator problem in websphere I would propose this as the fix [EMAIL PROTECTED] ~/cvs/jakarta-struts $ cvs diff -u src/share/org/apache/struts/validator/ValidatorPlugIn.java Index: src/share/org/apache/struts/validator/ValidatorPlugIn.java === RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/validator/ValidatorPlug In.java,v retrieving revision 1.26 diff -u -r1.26 ValidatorPlugIn.java --- src/share/org/apache/struts/validator/ValidatorPlugIn.java 7 Aug 2004 04:17:52 - 1.26 +++ src/share/org/apache/struts/validator/ValidatorPlugIn.java 31 Aug 2004 17:43:50 - @@ -167,7 +167,7 @@ resources); servlet.getServletContext().setAttribute(STOP_ON_ERROR_KEY + '.' + config.getPrefix(), - Boolean.valueOf(this.stopOnFirstError)); + new Boolean(this.stopOnFirstError)); } catch (Exception e) { log.error(e.getMessage(), e); ...someone with more knowledge with validator, please look this over and let me know. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 1:41 PM Subject: Re: 1.2.2 validator problem in websphere Let's get this into bugzilla so we can get it fixed quickly. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Michael Nascimento Santos [EMAIL PROTECTED] To:
After sesion invalidate cannot find bean
Hello Guys i notice this error that when the session expirates, if an action that uses a beanform is requested, and validate is true, the framework normally tries to execute the validate method of the bean, but you know the beanform just doesnt exist anymore, but the request can not be treated for the action, so a cannot find bean quincenaForm in scope session message is presented instead of showing a customized message like your session has expired or whatever similar. How can i solve this problem? -- Ricardo Andrés Quintero R. Ubiquando Ltda. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: After sesion invalidate cannot find bean
How can i solve this problem? You can have some way of catching this so the user won't see this error. I use a meta tag that makes the page redirect to /logon.do after the (configurable) timeout has expired (this happens client side and no javascript required). -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Ricardo Andres Quintero [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 3:51 PM Subject: After sesion invalidate cannot find bean Hello Guys i notice this error that when the session expirates, if an action that uses a beanform is requested, and validate is true, the framework normally tries to execute the validate method of the bean, but you know the beanform just doesnt exist anymore, but the request can not be treated for the action, so a cannot find bean quincenaForm in scope session message is presented instead of showing a customized message like your session has expired or whatever similar. How can i solve this problem? -- Ricardo Andrés Quintero R. Ubiquando Ltda. - 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: Classloading problem
Here is mine, which does not work: Context path=/Foo docBase=Foo debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_Foo_log. suffix=.txt timestamp=true/ Resource name=jdbc/MySQLDB auth=container type=javax.sql.DataSource/ ResourceParams name=jdbc/MySQLDB parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value100/value /parameter parameter namemaxIdle/name value30/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost:3306/FooDB/value /parameter /ResourceParams /Context This same file works when placed in conf/Catalina/localhost, although there I set the docBase to Foo.war, not Foo, but I tried to follow your example here. Erik Ivan Vasquez wrote: Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCO L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my
Re: Classloading problem
[eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war . . . META-INF/context.xml META-INF/MANIFEST.MF . . . Right? Erik Ivan Vasquez wrote: Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCO L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get this to work (I have gotten them to work when placed in the conf directory -- though I had to learn the hard way to take write permissions away from Tomcat after it very rudely deleted one). The documentation is confusing, and the example
Re: SecurityFilter Question?
Thanks robert. Greatly appreciated. Now has anyone tried to put login form on every page of site if user hasn't login with STRUTS? Say, put a small login form on left hand column menu/navigational bar. Is there anything I need to look out for? - Original Message - From: Robert Taylor [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 11:16 PM Subject: RE: SecurityFilter Question? I haven't been following this thread too closely but I know its been some what long so if this solution has already been proposed, I apologize in advance. We use SecurityFilter and an additional filter which checks for the Principal in the request. If the Principal exists, then we can be assured that the user has successfully logged in; at which point we check to see if the required information is in the session. If not, then we persist the required information into the session. If so, then we do nothing. In either case we allow the filter chain to proceed. It has worked quite nicely so far. Principal principal = req.getUserPrincipal(); if (principal != null) { if (req.getSession().getAttribute(requiredInformation) == null) { // do other login stuff here } } chain.doFilter(req, res); hth, robert -Original Message- From: struts Dude [mailto:[EMAIL PROTECTED] Sent: Monday, August 30, 2004 8:19 PM To: Struts Users Mailing List Subject: Re: SecurityFilter Question? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, August 30, 2004 6:07 PM Subject: Re: SecurityFilter Question? Can't u do this using an Action? Say, accessing /admin/LogAction.do invokes SecurityFilter, after authentication by SecurityFilter is passed, go directly to LogAction as below The problem comes if the user bookmarks a url like /user/abc.do, starts up their browser and goes directly to the protected URL. The security filter will take them to the login form, they submit username/password and seucirty filter authenticates them. Once they are authenticated they are redirected back to /users/abc.do - they don't pass through LogAction at all. So I normally have a filter that makes sure the bean is in session from where ever they are called. You don't have to use a filter though, you could make a base action that does puts the bean into session and have all your actions sub-class that one. Using action to put bean in Session after SecurityFilter, how is that possible when after authentication by SecurityFilter, u taken right back to /user/abc.do where u 1st request it and doesn't pass through to action attribute as specified in action-mapping of struts-config.xml? I have tried to use action, after authentication, I am indeed taken back to the page /admin/logon.do or /user/logon.do and got error message in browser: HTTP Status 400 - Invalid path /admin/Logon was requested message Invalid path /admin/Logon was requested description The request sent by the client was syntactically incorrect (Invalid path /admin/Logon was requested). - My action mapping is struts-conf.xml Both action path=/admin/Logon.do type=org.apache.struts.actions.ForwardAction parameter=LogAction.do?action=logon/ action path=/user/Logon.do type=org.apache.struts.actions.ForwardAction parameter=LogAction.do?action=logon/ !-- My LogAction extends DispatchAction and will try to put User bean in session. -- or action path=/admin/Logon.do type=org.apache.struts.actions.ForwardAction parameter=Welcome.do/ action path=/user/Logon.do type=org.apache.struts.actions.ForwardAction parameter=Welcome.do/ won't work. --- BTW, how wud u use html:form to display login fields? I can't get struts tag to work with login fields except for using things like: form action=j_security_check method=POST Username: input type=text name=j_usernamep Password: input type=password name=j_passwordp input type=Submit /form -- Ok, using filter (as u said) after SecurityFilter wud solve this simply but I like to stick with pure Struts approach if possible. Thanks Jason Lea - 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
RE: Classloading problem
Yes. And I just deployed a war with my config to another server to double-check. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 5:17 PM To: Struts Users Mailing List Subject: Re: Classloading problem [eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war . . . META-INF/context.xml META-INF/MANIFEST.MF . . . Right? Erik Ivan Vasquez wrote: Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOC O L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT= 1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever gotten a Context XML file placed within the META-INF directory of your web app to work? I can't get
Re: Classloading problem
You are using Tomcat 5.0.27? Erik Ivan Vasquez wrote: Yes. And I just deployed a war with my config to another server to double-check. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 5:17 PM To: Struts Users Mailing List Subject: Re: Classloading problem [eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war . . . META-INF/context.xml META-INF/MANIFEST.MF . . . Right? Erik Ivan Vasquez wrote: Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOC O L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT= 1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you
RE: Classloading problem
Also, the name under which it gets to conf/Catalina/localhost is app_name_folder.xml Inside, path and docBase are untouched. No war extensions anywhere. BTW, these are tomcat 5.0.16, just in case. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 5:17 PM To: Struts Users Mailing List Subject: Re: Classloading problem [eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war . . . META-INF/context.xml META-INF/MANIFEST.MF . . . Right? Erik Ivan Vasquez wrote: Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOC O L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT= 1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml: Context path=/init Loader delegate=false/ Manager pathname=/ /Context Seems to work fine with TC 5... Quoting Erik Weber [EMAIL PROTECTED]: Also, since you appear to be trying to follow the documenation, have you ever
Re: After sesion invalidate cannot find bean
It sounds good but i dont know how to do it! can u explain to me how to? On Tue, 31 Aug 2004 17:30:44 -0400, Erik Weber wrote Perhaps you could override one of the RequestProcessor methods, and check for the existence of a known Session attribute, before Struts tries to work with the nonexistent form? Erik Ricardo Andres Quintero wrote: Hello Guys i notice this error that when the session expirates, if an action that uses a beanform is requested, and validate is true, the framework normally tries to execute the validate method of the bean, but you know the beanform just doesnt exist anymore, but the request can not be treated for the action, so a cannot find bean quincenaForm in scope session message is presented instead of showing a customized message like your session has expired or whatever similar. How can i solve this problem? -- Ricardo Andrés Quintero R. Ubiquando Ltda. - 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] -- Ricardo Andrés Quintero R. Ubiquando Ltda. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: After sesion invalidate cannot find bean
Seemingly (I haven't done this but actually I need to and probably will try it): 1) extend org.apache.struts.action.RequestProcessor 2) override either the processPreprocess method, or the processMapping method, either of which is invoked *before* processActionForm 3) in processPreprocess, issue redirect to login page or error page and return false if, say, your User object does not exist as a Session attribute or 3) in processMapping, return an alternative ActionMapping (to your login page or error page -- one which does not require a Session-scoped form for setup) if the User object does not exist. 4) edit the controller element of struts-config.xml to install your custom RequestProcessor Hope that helps, Erik Ricardo Andres Quintero wrote: It sounds good but i dont know how to do it! can u explain to me how to? On Tue, 31 Aug 2004 17:30:44 -0400, Erik Weber wrote Perhaps you could override one of the RequestProcessor methods, and check for the existence of a known Session attribute, before Struts tries to work with the nonexistent form? Erik Ricardo Andres Quintero wrote: Hello Guys i notice this error that when the session expirates, if an action that uses a beanform is requested, and validate is true, the framework normally tries to execute the validate method of the bean, but you know the beanform just doesnt exist anymore, but the request can not be treated for the action, so a cannot find bean quincenaForm in scope session message is presented instead of showing a customized message like your session has expired or whatever similar. How can i solve this problem? -- Ricardo Andrés Quintero R. Ubiquando Ltda. - 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] -- Ricardo Andrés Quintero R. Ubiquando Ltda. - 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: Classloading problem
Ivan, as you can see I've tried everything I can think of. Perhaps when I have more time I will mess around with it some more, but it's easier just to use JBoss. I appreciate your help (and Kris's). Erik Ivan Vasquez wrote: Also, the name under which it gets to conf/Catalina/localhost is app_name_folder.xml Inside, path and docBase are untouched. No war extensions anywhere. BTW, these are tomcat 5.0.16, just in case. -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 5:17 PM To: Struts Users Mailing List Subject: Re: Classloading problem [eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war . . . META-INF/context.xml META-INF/MANIFEST.MF . . . Right? Erik Ivan Vasquez wrote: Erik, here goes my context.xml, Tomcat renames it the same as the app's directory. I assume your Tomcat has autodeploy enabled. !--By Ivan: WAR-contained Application Context-- !--Path defines the directory name created when war is deployed-- Context path=/nahrgisdev docBase=nahrgisdev debug=5 reloadable=true crossContext=true !--Development-- Resource name=jdbc/orcl auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/orcl parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter !--By Ivan: Parameters for RAC connection load balancing-- parameter nameurl/name valuejdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOC O L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT= 1 521))(CONNECT_DATA=(SERVICE_NAME=orcl)))/value /parameter parameter nameusername/name value*/value /parameter parameter namepassword/name value*/value /parameter parameter namemaxActive/name value10/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter parameter nameremoveAbandoned/name valuetrue/value /parameter parameter nameremoveAbandonedTimeout/name value60/value /parameter parameter namelogAbandoned/name valuetrue/value /parameter /ResourceParams /Context -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: Classloading problem I have tried this repeatedly. I am using the same Foo.xml file that does work when placed in conf/Catalina/localhost/. I have tried with and without the path and docBase attributes to the Context element. I have renamed the file to context.xml and it is in META-INF in my war file. I have also tried putting Foo.xml or context.xml within a META-INF/context.xml/ *directory* as the documentation suggests. DBCP throws an Exception on startup that it cannot create a JDBC driver of class '' for connect URL 'null'. I am supposing that the context file is never loaded. Also Tomcat creates a Foo.xml directory inside of conf/Catalina/localhost with nothing in it. If I try restarting the server, I also get a FileNotFoundException on Foo.xml, saying it is a directory (good grief). I have tried hot deploy and deploying via the manager web app as well. I basically observed the same behavior that Ivan described. I would love to see that example if you can find it. Erik Kris Schneider wrote: Hang on, my bad - it should be /META-INF/context.xml. So, rename Foo.xml to be context.xml and place it in *META-INF*. Quoting Erik Weber [EMAIL PROTECTED]: Kris, this is from context.html in the Tomcat 5 docs:* Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file.* Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. So here I am, stupidly trying to put my Foo.xml file within /META-INF/context.xml/ (and various variations of that) of my web app. So should I rename Foo.xml to context.xml (I ask because in the conf directory I have been naming it Foo.xml, not context.xml), and put it in *WEB-INF*? Could you show me where you found how to do this in the docs? Am I just completely misreading the above sentence? Thanks for your help, Erik Kris Schneider wrote: Can you provide some more detail on the problems you're running into with using WEB-INF? I've got a simple one lying around here somewhere... WEB-INF/context.xml:
Re: After sesion invalidate cannot find bean
Thank you i will try it later! On Tue, 31 Aug 2004 17:45:29 -0400, Erik Weber wrote Seemingly (I haven't done this but actually I need to and probably will try it): 1) extend org.apache.struts.action.RequestProcessor 2) override either the processPreprocess method, or the processMapping method, either of which is invoked *before* processActionForm 3) in processPreprocess, issue redirect to login page or error page and return false if, say, your User object does not exist as a Session attribute or 3) in processMapping, return an alternative ActionMapping (to your login page or error page -- one which does not require a Session-scoped form for setup) if the User object does not exist. 4) edit the controller element of struts- config.xml to install your custom RequestProcessor Hope that helps, Erik Ricardo Andres Quintero wrote: It sounds good but i dont know how to do it! can u explain to me how to? On Tue, 31 Aug 2004 17:30:44 -0400, Erik Weber wrote Perhaps you could override one of the RequestProcessor methods, and check for the existence of a known Session attribute, before Struts tries to work with the nonexistent form? Erik Ricardo Andres Quintero wrote: Hello Guys i notice this error that when the session expirates, if an action that uses a beanform is requested, and validate is true, the framework normally tries to execute the validate method of the bean, but you know the beanform just doesnt exist anymore, but the request can not be treated for the action, so a cannot find bean quincenaForm in scope session message is presented instead of showing a customized message like your session has expired or whatever similar. How can i solve this problem? -- Ricardo Andrés Quintero R. Ubiquando Ltda. - 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] -- Ricardo Andrés Quintero R. Ubiquando Ltda. - 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] -- Ricardo Andrés Quintero R. Ubiquando Ltda. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tiles and ActionForwards
I would like to use a tile definition in an action forward with request parameters. I have an Action that takes a forward mapped in the Action definition and supplies it with parameters by appending it to the path and then creating a new ActionForward with the supplied parameters. I can't use something like this for some reason: action ... forward name=list path=.apps.list/ /action where .apps.list is defined in my tiles-defs.xml. And then in my Action class I try to do this: forward = mapping.findForward( list ); path = new StringBuffer( forward.getPath() ); path.append( ?page= + page ); path.append( total= + total ); return new ActionForward( path.toString() ); The RequestProcessor tries to do the forward and it can't because the URL is invalid. Why isn't the Tiles Action servlet catching this and make the correct substitution? Albert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tiles and ActionForwards
-Original Message- From: Leung, Albert [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:08 PM To: Struts Users Mailing List Subject: tiles and ActionForwards I would like to use a tile definition in an action forward with request parameters. I have an Action that takes a forward mapped in the Action definition and supplies it with parameters by appending it to the path and then creating a new ActionForward with the supplied parameters. I can't use something like this for some reason: action ... forward name=list path=.apps.list/ /action where .apps.list is defined in my tiles-defs.xml. And then in my Action class I try to do this: forward = mapping.findForward( list ); path = new StringBuffer( forward.getPath() ); path.append( ?page= + page ); path.append( total= + total ); return new ActionForward( path.toString() ); The RequestProcessor tries to do the forward and it can't because the URL is invalid. Why isn't the Tiles Action servlet catching this and make the correct substitution? Because, you're not giving it a tiles definition, you're giving it a url. Why not just put whatever you're trying to put in the path in request scope? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tiles and ActionForwards
That makes sense, but how would I do that? These parameters are not part of a form. I would like to use a tile definition in an action forward with request parameters. I have an Action that takes a forward mapped in the Action definition and supplies it with parameters by appending it to the path and then creating a new ActionForward with the supplied parameters. I can't use something like this for some reason: action ... forward name=list path=.apps.list/ /action where .apps.list is defined in my tiles-defs.xml. And then in my Action class I try to do this: forward = mapping.findForward( list ); path = new StringBuffer( forward.getPath() ); path.append( ?page= + page ); path.append( total= + total ); return new ActionForward( path.toString() ); The RequestProcessor tries to do the forward and it can't because the URL is invalid. Why isn't the Tiles Action servlet catching this and make the correct substitution? Because, you're not giving it a tiles definition, you're giving it a url. Why not just put whatever you're trying to put in the path in request scope? - 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: tiles and ActionForwards
-Original Message- From: Leung, Albert [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 4:14 PM To: Struts Users Mailing List Subject: RE: tiles and ActionForwards That makes sense, but how would I do that? These parameters are not part of a form. request.setAttribute( page, page); Forms have nothing to do with putting things into request, session or application scope. I would like to use a tile definition in an action forward with request parameters. I have an Action that takes a forward mapped in the Action definition and supplies it with parameters by appending it to the path and then creating a new ActionForward with the supplied parameters. I can't use something like this for some reason: action ... forward name=list path=.apps.list/ /action where .apps.list is defined in my tiles-defs.xml. And then in my Action class I try to do this: forward = mapping.findForward( list ); path = new StringBuffer( forward.getPath() ); path.append( ?page= + page ); path.append( total= + total ); return new ActionForward( path.toString() ); The RequestProcessor tries to do the forward and it can't because the URL is invalid. Why isn't the Tiles Action servlet catching this and make the correct substitution? Because, you're not giving it a tiles definition, you're giving it a url. Why not just put whatever you're trying to put in the path in request scope? - 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: tiles and ActionForwards
You're right. Thanks. I'll give that a try. That makes sense, but how would I do that? These parameters are not part of a form. request.setAttribute( page, page); Forms have nothing to do with putting things into request, session or application scope. I would like to use a tile definition in an action forward with request parameters. I have an Action that takes a forward mapped in the Action definition and supplies it with parameters by appending it to the path and then creating a new ActionForward with the supplied parameters. I can't use something like this for some reason: action ... forward name=list path=.apps.list/ /action where .apps.list is defined in my tiles-defs.xml. And then in my Action class I try to do this: forward = mapping.findForward( list ); path = new StringBuffer( forward.getPath() ); path.append( ?page= + page ); path.append( total= + total ); return new ActionForward( path.toString() ); The RequestProcessor tries to do the forward and it can't because the URL is invalid. Why isn't the Tiles Action servlet catching this and make the correct substitution? Because, you're not giving it a tiles definition, you're giving it a url. Why not just put whatever you're trying to put in the path in request scope? - 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]