Struts Validator question
All, I posted this a few hours ago on the jakarta-commons list and have not come up with a solution yet. I decided to commit the sin of x-posting it here since this may very well be a struts issue. I hope this is not a newbie question. I have RTFM several times. I suspect I must be missing something simple. I have installed Tomcat 4.1.29 and Struts 1.1 with the Validator included. I have configured my installation as follows struts-config.xml: form-bean name=orgForm type=com.hp.ipg.ne.pgpm.forms.orgForm/ . . . !-- Insert a new Org into the database -- action path=/org_insert name=orgForm type=com.hp.ipg.ne.pgpm.actions.orgInsertAction scope=request validate=true input=org_edit.jsp forward name=show_list path=/org_list.do / forward name=error path=/GeneralError.do / /action . . . message-resources parameter=com.hp.ipg.ne.pgpm.application/ . . . plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in Validation.xml: form-validation formset form name=orgForm field property=orgCode depends=required arg0 key=orgForm.OrgCode/ /field /form /formset /form-validation Application:properties: errors.required={0} is required. In the org_edit.jsp file contains the following code snippet: logic:messagesPresent bean:message key=errors.header/ ul html:messages id=error libean:write name=error//li /html:messages /ulhr /logic:messagesPresent I have stepped through the execution several times and see the validator being activated. I even see the failed validation (empty field). However, after the failed validation, it seems validator is unable to construct a proper forward to send me back to the JSP page where the error was entered (or not entered in this case). I am simply forwarded to a nearly blank page with minimal html and body tags. I have tried changing the input parameter to point at a global local forward as well as an Action forward. None of them succeed. However, when pointed at a forward the browser does display a message indicating that the server was unable to look up a mapping for an action named /misc. The characters misc do not appear anywhere in my struts-config.xml file. I am guessing this must be some kind of default behavior. Any thoughts would be appreciated. David Lackey [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Backend Issues
Joe, Nope. I was writing to you about that but you found your solution faster than I could type (my poor aching fingers at 2AM!). When you said your 'formName=UserLoginForm', that suggests you're keying off the action's ActionForm name 'name='UserLoginForm' for your validation. That's why you would use DynaValidatorForm. Using DynaValidatorActionForm is just like a DynaValidatorForm with one exception: it validates of the name of the action. So if your action is called /edit.do, it would need a form name of '/edit' such as: form name=/edit field ... ... /field /form I also got stuck on this when I first started using the Struts Validator. I hope this explanation helps. Regards, David -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:07 AM To: 'Struts Users Mailing List' Subject: RE: Validator Backend Issues Curious. Changing the ActionForm from a DynaValidatorActionForm to a DynaValidatorForm gets me backend validation. Have I just stumbled onto a bug? -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 1:46 AM To: 'Struts Users Mailing List' Subject: Validator Backend Issues I'm probably misunderstanding this woefully. Hope someone can set me straight. For my login, I'm using a UserLoginForm class that extends DynaValidatorActionForm. The Action class is an extension of DispatchAction (it handles all User related actions). If in my Login.jsp, I remove the html:javascript formName=UserLoginForm/ tag,I get no javascript validations happening, which I would expect, but I also find that I *never* get any back end validation checks happening. Nothing shows up where the html:errors / tag was. Is there something I have to do to get the validator to do it's magic outside of the client? -Joe - 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: Struts Validator question
Two questions immediately come to mind from what you documented: 1. Does com.hp.ipg.ne.pgpm.forms.orgForm extend org.apache.struts.validator.ValidatorForm or org.apache.struts.validator.ValidatorActionForm 2. The 'input=org_edit.jsp is context sensitive. Can you reach org_edit.jsp from the same level as your /org_insert.do action? *** This sounds like the problem since you wrote you're seeing a blank html page, as if it cannot find the JSP page. Regards, David -Original Message- From: LACKEY,DAVID (HP-PaloAlto,ex1) [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 1:58 AM To: Struts Users Mailing List Subject: Struts Validator question All, I posted this a few hours ago on the jakarta-commons list and have not come up with a solution yet. I decided to commit the sin of x-posting it here since this may very well be a struts issue. I hope this is not a newbie question. I have RTFM several times. I suspect I must be missing something simple. I have installed Tomcat 4.1.29 and Struts 1.1 with the Validator included. I have configured my installation as follows struts-config.xml: form-bean name=orgForm type=com.hp.ipg.ne.pgpm.forms.orgForm/ . . . !-- Insert a new Org into the database -- action path=/org_insert name=orgForm type=com.hp.ipg.ne.pgpm.actions.orgInsertAction scope=request validate=true input=org_edit.jsp forward name=show_list path=/org_list.do / forward name=error path=/GeneralError.do / /action . . . message-resources parameter=com.hp.ipg.ne.pgpm.application/ . . . plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in Validation.xml: form-validation formset form name=orgForm field property=orgCode depends=required arg0 key=orgForm.OrgCode/ /field /form /formset /form-validation Application:properties: errors.required={0} is required. In the org_edit.jsp file contains the following code snippet: logic:messagesPresent bean:message key=errors.header/ ul html:messages id=error libean:write name=error//li /html:messages /ulhr /logic:messagesPresent I have stepped through the execution several times and see the validator being activated. I even see the failed validation (empty field). However, after the failed validation, it seems validator is unable to construct a proper forward to send me back to the JSP page where the error was entered (or not entered in this case). I am simply forwarded to a nearly blank page with minimal html and body tags. I have tried changing the input parameter to point at a global local forward as well as an Action forward. None of them succeed. However, when pointed at a forward the browser does display a message indicating that the server was unable to look up a mapping for an action named /misc. The characters misc do not appear anywhere in my struts-config.xml file. I am guessing this must be some kind of default behavior. Any thoughts would be appreciated. David Lackey [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: Validator Backend Issues
David, Yes it does. Thank you. I wanted to use the DynaActionValidatorForm (ow! Ow! Ow! :-) because I do want it validated off of the Action, but when I saw the formName property, I didn't want to lie to it on general principles. Tx again. -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:03 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Validator Backend Issues Joe, Nope. I was writing to you about that but you found your solution faster than I could type (my poor aching fingers at 2AM!). When you said your 'formName=UserLoginForm', that suggests you're keying off the action's ActionForm name 'name='UserLoginForm' for your validation. That's why you would use DynaValidatorForm. Using DynaValidatorActionForm is just like a DynaValidatorForm with one exception: it validates of the name of the action. So if your action is called /edit.do, it would need a form name of '/edit' such as: form name=/edit field ... ... /field /form I also got stuck on this when I first started using the Struts Validator. I hope this explanation helps. Regards, David -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:07 AM To: 'Struts Users Mailing List' Subject: RE: Validator Backend Issues Curious. Changing the ActionForm from a DynaValidatorActionForm to a DynaValidatorForm gets me backend validation. Have I just stumbled onto a bug? -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 1:46 AM To: 'Struts Users Mailing List' Subject: Validator Backend Issues I'm probably misunderstanding this woefully. Hope someone can set me straight. For my login, I'm using a UserLoginForm class that extends DynaValidatorActionForm. The Action class is an extension of DispatchAction (it handles all User related actions). If in my Login.jsp, I remove the html:javascript formName=UserLoginForm/ tag,I get no javascript validations happening, which I would expect, but I also find that I *never* get any back end validation checks happening. Nothing shows up where the html:errors / tag was. Is there something I have to do to get the validator to do it's magic outside of the client? -Joe - 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: Validator Backend Issues
Joe, When using a Struts Validator based on the Action name, you usually need to add the 'method=validateSomeName' because the Struts Validator wants to use the exact name in your validation xml file. In your case, that is /Login which matches your action. So, change your html:javascript and html:form along these lines: html:form action=/Login.do focus=emailAddress onsubmit=return validateLogin(this) html:javascript formName=/Login method=validateLogin For more details see html:javascript and html:form in the Struts docs: http://jakarta.apache.org/struts/userGuide/struts-html.html#javascript Regards, David -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:37 AM To: 'David Friedman' Subject: RE: Validator Backend Issues Don't laugh. Now I remember the problem I first encountered. I'm getting a generated javascript function of validate/Login(form) Do I have to escape the slash in the generated js function name or something to call it? html:form action=/Login.do focus=emailAddress onsubmit=return validate/Login(this) -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:03 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: Validator Backend Issues Joe, Nope. I was writing to you about that but you found your solution faster than I could type (my poor aching fingers at 2AM!). When you said your 'formName=UserLoginForm', that suggests you're keying off the action's ActionForm name 'name='UserLoginForm' for your validation. That's why you would use DynaValidatorForm. Using DynaValidatorActionForm is just like a DynaValidatorForm with one exception: it validates of the name of the action. So if your action is called /edit.do, it would need a form name of '/edit' such as: form name=/edit field ... ... /field /form I also got stuck on this when I first started using the Struts Validator. I hope this explanation helps. Regards, David -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:07 AM To: 'Struts Users Mailing List' Subject: RE: Validator Backend Issues Curious. Changing the ActionForm from a DynaValidatorActionForm to a DynaValidatorForm gets me backend validation. Have I just stumbled onto a bug? -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 1:46 AM To: 'Struts Users Mailing List' Subject: Validator Backend Issues I'm probably misunderstanding this woefully. Hope someone can set me straight. For my login, I'm using a UserLoginForm class that extends DynaValidatorActionForm. The Action class is an extension of DispatchAction (it handles all User related actions). If in my Login.jsp, I remove the html:javascript formName=UserLoginForm/ tag,I get no javascript validations happening, which I would expect, but I also find that I *never* get any back end validation checks happening. Nothing shows up where the html:errors / tag was. Is there something I have to do to get the validator to do it's magic outside of the client? -Joe - 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: Struts Validator question
Answer to Question 1: public final class orgForm extends ValidatorForm Answer to Question 2: I have double checked the case and spelling of the file name. Both the action and org_edit.jsp can be reached in the same directory. I assume the question you are posing has to do with the URL used to access either. Both can be reached in the http://localhost:8080/app_root directory. I have looked at this too long so I may not be seeing something but I did go through the exercise validating each of the configuration items against a couple of struts books and the Validator document on the Struts site. Its late and I know I must be staring at the issue and just not realizing it. David -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2003 11:09 PM To: Struts Users Mailing List Subject: RE: Struts Validator question Two questions immediately come to mind from what you documented: 1. Does com.hp.ipg.ne.pgpm.forms.orgForm extend org.apache.struts.validator.ValidatorForm or org.apache.struts.validator.ValidatorActionForm 2. The 'input=org_edit.jsp is context sensitive. Can you reach org_edit.jsp from the same level as your /org_insert.do action? *** This sounds like the problem since you wrote you're seeing a blank html page, as if it cannot find the JSP page. Regards, David -Original Message- From: LACKEY,DAVID (HP-PaloAlto,ex1) [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 1:58 AM To: Struts Users Mailing List Subject: Struts Validator question All, I posted this a few hours ago on the jakarta-commons list and have not come up with a solution yet. I decided to commit the sin of x-posting it here since this may very well be a struts issue. I hope this is not a newbie question. I have RTFM several times. I suspect I must be missing something simple. I have installed Tomcat 4.1.29 and Struts 1.1 with the Validator included. I have configured my installation as follows struts-config.xml: form-beanname=orgForm type=com.hp.ipg.ne.pgpm.forms.orgForm/ . . . !-- Insert a new Org into the database -- action path=/org_insert name=orgForm type=com.hp.ipg.ne.pgpm.actions.orgInsertAction scope=request validate=true input=org_edit.jsp forward name=show_list path=/org_list.do / forward name=error path=/GeneralError.do / /action . . . message-resources parameter=com.hp.ipg.ne.pgpm.application/ . . . plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in Validation.xml: form-validation formset form name=orgForm field property=orgCode depends=required arg0 key=orgForm.OrgCode/ /field /form /formset /form-validation Application:properties: errors.required={0} is required. In the org_edit.jsp file contains the following code snippet: logic:messagesPresent bean:message key=errors.header/ ul html:messages id=error libean:write name=error//li /html:messages /ulhr /logic:messagesPresent I have stepped through the execution several times and see the validator being activated. I even see the failed validation (empty field). However, after the failed validation, it seems validator is unable to construct a proper forward to send me back to the JSP page where the error was entered (or not entered in this case). I am simply forwarded to a nearly blank page with minimal html and body tags. I have tried changing the input parameter to point at a global local forward as well as an Action forward. None of them succeed. However, when pointed at a forward the browser does display a message indicating that the server was unable to look up a mapping for an action named /misc. The characters misc do not appear anywhere in my struts-config.xml file. I am guessing this must be some kind of default behavior. Any thoughts would be appreciated. David Lackey [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: Inheritance in tile definitions II
Ed, The list archives describe this problem. I didn't understand it until I tested it. Inside the main definition, /layouts/formLayout.jsp, you'd normally have a segment like this: tiles:get name=header/ Instead, they say to pass any tile-defined attribute, you must use an insert and put in the place where you include that included page such as: tiles:insert attribute=header tiles:put name=title beanName=title beanScope=tile / /tiles:insert This is odd but did indeed work for me a second ago to show my title in my header.jsp using tile:getAsString name=title / It came from here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg61368.html Regards, David -Original Message- From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2003 12:32 PM To: Struts Users Mailing List Subject: Re: Inheritance in tile definitions II When I simply place a getAsString in the header.jsp, I get an error message which says that title can not be found in the context. I get the same for useAttribute. Ed - Original Message - From: David Friedman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, November 23, 2003 12:22 PM Subject: RE: Inheritance in tile definitions II Ed, The tile definition is initialized before the pages/jsp's/actions are called. You can therefore access any name in any component as long as that component is tiles aware. In the case of your JSP's, juse use the tiles taglib and do what you did in header.jsp to obtain the title (a getAsString, if I recall correctly). In the case of an action, you'd need to subclass the TilesAction to manipulate it directly (i.e. to set the title from within the Action directly, or perhaps set a content section if the page is dynamic). Regards, David -Original Message- From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2003 9:19 AM To: Struts Users Mailing List Subject: Inheritance in tile definitions II My thanks to all those who offered suggestions for my first problem. Let's say that I have the following in a definitions file: !-- = -- -- !-- Form -- -- !-- = -- definition name=form.layout page=/layouts/formLayout.jsp put name=system-short-name value=TDL/ put name=user-name value=Guest/ put name=title value=Form Page Layout/ put name=header value=/common/header.jsp/ put name=content value=${content}/ put name=footer value=/common/footer.jsp/ put name=debug value=/debug.jsp/ /definition definition name=login.form extends=form.layout put name=title value=Login Form/ put name=content value=/security/login.jsp/ /definition When I access title using GetAsString from formLayout.jsp, I get the expected value of Login Form. How do I access the value of title from header.jsp? Thank you, Ed - 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 upload functionalities
Hi all, Is there reference documentation or code available which explains the upload (uploading of documents) functionality? Thanks in advance. Regards, Viral - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts upload functionalities
The struts distributions should all have a sample .war application with code and jsp's called struts-upload.war. It's often in the webapps folder. :) -David -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 4:12 AM To: Struts Users Mailing List Subject: Struts upload functionalities Hi all, Is there reference documentation or code available which explains the upload (uploading of documents) functionality? Thanks in advance. Regards, Viral - 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]
System Exception Handling in Struts
Hello, How can I handle a system exception in Struts? Is Logging an internal part of Struts if yes how to configure it. Please help with an example if possible. Alok Garg Polaris Software Lab Ltd. ( + 91 - 022 - 28290019 Ext. # 1308 ) This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit Us at http://www.polaris.co.in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tiles - setup
I'm trying to use tiles with my existing struts application, but I can't get the definitions to work. I've tryed using the following procedure: Add the tiles plugin to the struts-config.xml file by writing the following just after the action mappings: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tileDefinitions.xml / set-property property=definitions-debug value=2 / set-property property=definitions-parser-details value=2 / set-property property=definitions-parser-validate value=true / /plug-in This causes the following errors to occur in tomcat: 1) Parse Fatal Error ... The processing instuction target matching [xX][mM][lL] is not allowed. 2) SEVERE: Can't create Tiles definition factory for module ''. I think the latter is an effect from the first... But all I did was to copy-paste!... Morten Andersen Master of applied mathematics and computer science Amanuensis Interest areas: -e-learning -software engineering -applied math The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: System Exception Handling in Struts
hi As such you cannot control when system exception occur not in EJB also. THough using follwoing code you can always transfer the user to the well formed error page if in case it occurs. public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ if (this.isCancelled(request)){ System.out.println(*The user pressed cancelled!!!); return (mapping.findForward(poststory.success)); } PostStoryForm postStoryForm = (PostStoryForm) form; //org.apache.struts.action.DynaActionForm postStoryForm = (org.apache.struts.action.DynaActionForm) form; HttpSession session = request.getSession(); MemberVO memberVO = (MemberVO) session.getAttribute(memberVO); try{ System.out.println(I am in post story**); StoryVO storyVO = new StoryVO(); storyVO.setStoryIntro(postStoryForm.getStoryIntro()); storyVO.setStoryTitle(postStoryForm.getStoryTitle()); storyVO.setStoryBody(postStoryForm.getStoryBody()); /*storyVO.setStoryIntro((String)postStoryForm.get(storyIntro)); storyVO.setStoryTitle((String)postStoryForm.get(storyTitle)); storyVO.setStoryBody((String)postStoryForm.get(storyBody));*/ storyVO.setStoryAuthor(memberVO); storyVO.setSubmissionDate(new java.sql.Date(System.currentTimeMillis())); storyVO.setComments(new Vector()); StoryManagerBD storyManager = new StoryManagerBD(); storyManager.addStory(storyVO); System.out.println(I am done with post story**); } catch(Exception e){ System.err.println(An application exception has been raised in PostStory.perform(): + e.toString()); return (mapping.findForward(system.failure)); } return (mapping.findForward(poststory.success)); } Hoope this will help Cheers Gary - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:12 PM Subject: System Exception Handling in Struts Hello, How can I handle a system exception in Struts? Is Logging an internal part of Struts if yes how to configure it. Please help with an example if possible. Alok Garg Polaris Software Lab Ltd. ( + 91 - 022 - 28290019 Ext. # 1308 ) - 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: Inheritance in tile definitions II
Thank you very much David. That solved the problem. Ed - Original Message - From: David Friedman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:23 AM Subject: RE: Inheritance in tile definitions II Ed, The list archives describe this problem. I didn't understand it until I tested it. Inside the main definition, /layouts/formLayout.jsp, you'd normally have a segment like this: tiles:get name=header/ Instead, they say to pass any tile-defined attribute, you must use an insert and put in the place where you include that included page such as: tiles:insert attribute=header tiles:put name=title beanName=title beanScope=tile / /tiles:insert This is odd but did indeed work for me a second ago to show my title in my header.jsp using tile:getAsString name=title / It came from here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg61368.html Regards, David -Original Message- From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2003 12:32 PM To: Struts Users Mailing List Subject: Re: Inheritance in tile definitions II When I simply place a getAsString in the header.jsp, I get an error message which says that title can not be found in the context. I get the same for useAttribute. Ed - Original Message - From: David Friedman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, November 23, 2003 12:22 PM Subject: RE: Inheritance in tile definitions II Ed, The tile definition is initialized before the pages/jsp's/actions are called. You can therefore access any name in any component as long as that component is tiles aware. In the case of your JSP's, juse use the tiles taglib and do what you did in header.jsp to obtain the title (a getAsString, if I recall correctly). In the case of an action, you'd need to subclass the TilesAction to manipulate it directly (i.e. to set the title from within the Action directly, or perhaps set a content section if the page is dynamic). Regards, David -Original Message- From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] Sent: Sunday, November 23, 2003 9:19 AM To: Struts Users Mailing List Subject: Inheritance in tile definitions II My thanks to all those who offered suggestions for my first problem. Let's say that I have the following in a definitions file: !-- = -- -- !-- Form -- -- !-- = -- definition name=form.layout page=/layouts/formLayout.jsp put name=system-short-name value=TDL/ put name=user-name value=Guest/ put name=title value=Form Page Layout/ put name=header value=/common/header.jsp/ put name=content value=${content}/ put name=footer value=/common/footer.jsp/ put name=debug value=/debug.jsp/ /definition definition name=login.form extends=form.layout put name=title value=Login Form/ put name=content value=/security/login.jsp/ /definition When I access title using GetAsString from formLayout.jsp, I get the expected value of Login Form. How do I access the value of title from header.jsp? Thank you, Ed - 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]
optionsCollection with another default value
Hallo, i´ve made a select from an optionsCollection Tag. The values are read from a hashmap like value1 = one value2 = two value3 = three Now i´d like to set a default value for this select, which is NOT PART of my HashMap, f.e please select... The rendered select should look like this: option selectedplease select.../option optionone/option optiontwo/option optionthree/option is there any way to achieve this result in struts ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:submit and html:button componant : value and text label
hi, i'm dispatch action addicted developper and I go a recurent problem with html:button and html:submit componant. With these componants it's impossible to separate their label and their submitted value. I managed with some javascript like this to invoke the dispatch method i want : // submit form function submitForm(form, parameter) { form.action = form.action + ? + parameter; form.submit(); } // valid and submit a form function validAndSubmitForm(form, parameter) { if (window.confirm('Are tou sure you want to delete the selected samples?')) { submitForm(form, parameter); } } So my question is why can't we separate the label and sumitted value of buttons in struts? Sorry if it's a déjà vu. = Eric BELLARD [EMAIL PROTECTED] mobile: 0614952791 __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Save actionform modifications
Hi, I have a question concerning a mode of use of the framework : My standard use is: 1- the html form is sent to the server by calling a '.do' url 2- the actionform reset() method is called 3- the actionform setXyz() method are called (for each 'xyz' parameters of the html form) 4- the actionform validate() method is called 5- the action execute() method is called 6- the action forwards the to a jsp page My problem occurs when the 6th step is replaced by the action forwards the to a '.do' url because in that case the following behaviour occurs 1- the html form is sent to the server by calling a '.do' url 2- the actionform named 'af_1' reset() method is called 3- the 'af_1' setXyz() method are called (for each 'xyz' parameters of the html form) 4- the 'af_1' validate() method is called 5- the action execute() method is called IN THIS JAVA CODE I MODIFY THE CONTENT OF THE 'af_1' actionform and I store the modified actionform with a 'request.setAttribute(actionform,my_af1)' (I guess that the actionform key name permits to store the modified data in the current actionform. Am I right ?) 6- the action forwards the to a '.do' url (the actionform declared for this 2nd '.do' is still named 'af_1': I need to share the data) 7- the actionform 'af_1' reset() method is called 8- the actionform setXyz() method are called = HERE IS THE PROBLEM : the actionform modifications that I made in the 5th step are lost ! (overwritten by the initial html form values of the 1st step 9- the actionform validate() method is called ... I have tried to store the modified data in a copied actionform but they are lost also. Thanx for your answers. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Developed Sites and Google
URL's with session state information will cause search engines problems in trying to index the content. (Makes sense -- the generated URLs wont be valid for anyone else). Google isn't about to store cookies as it indexes content, I'm sure. So doesn't this make Struts a poor choice for developing a site when Search Engine visibility is important? As I understand it, if your client doesn't support cookies, you will get a jsessionid in your urls, which is the embodiment of the above scenario. Am I mistaken? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles - setup
well all i can say is just check you have following lines of code in web and struts-config xml files. These are my configurations IN web.xml file taglib taglib-uri/struts-tiles/taglib-uri taglib-location/WEB-INF/tlds/struts-tiles.tld/taglib-location /taglib IN struts-config.xml FILE plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml / set-property property=definitions-debug value=0 / set-property property=definitions-parser-details value=0 / set-property property=definitions-parser-validate value=true / /plug-in Also, try to open your tiles-defs.xml file in your browser to check if it showing any error?? Raman Garg - Original Message - From: Morten Andersen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:34 PM Subject: tiles - setup I'm trying to use tiles with my existing struts application, but I can't get the definitions to work. I've tryed using the following procedure: Add the tiles plugin to the struts-config.xml file by writing the following just after the action mappings: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tileDefinitions.xml / set-property property=definitions-debug value=2 / set-property property=definitions-parser-details value=2 / set-property property=definitions-parser-validate value=true / /plug-in This causes the following errors to occur in tomcat: 1) Parse Fatal Error ... The processing instuction target matching [xX][mM][lL] is not allowed. 2) SEVERE: Can't create Tiles definition factory for module ''. I think the latter is an effect from the first... But all I did was to copy-paste!... Morten Andersen Master of applied mathematics and computer science Amanuensis Interest areas: -e-learning -software engineering -applied math The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: [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: html:submit and html:button componant : value and text label
This is an html issue, rather than a struts one. Read up on how input type=submit/ works for an in depth explanation. Struts provides the LookupDispatchAction which is designed to deal with this issue. Paul -Original Message- From: Eric BELLARD [mailto:[EMAIL PROTECTED] Sent: 24 November 2003 11:21 To: [EMAIL PROTECTED] Subject: html:submit and html:button componant : value and text label hi, i'm dispatch action addicted developper and I go a recurent problem with html:button and html:submit componant. With these componants it's impossible to separate their label and their submitted value. I managed with some javascript like this to invoke the dispatch method i want : // submit form function submitForm(form, parameter) { form.action = form.action + ? + parameter; form.submit(); } // valid and submit a form function validAndSubmitForm(form, parameter) { if (window.confirm('Are tou sure you want to delete the selected samples?')) { submitForm(form, parameter); } } So my question is why can't we separate the label and sumitted value of buttons in struts? Sorry if it's a déjà vu. = Eric BELLARD [EMAIL PROTECTED] mobile: 0614952791 __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - 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]
JSTL
Hi everyone, I'm getting ready to move from Struts 1.0.2 to Struts 1.1. Since, also, I now guarantee a J2EE 1.3 container, I'm considering replacing Struts tag libraries with the JSTL. Before I make this move, I wanted to know whether, from your experiences, the JSTL gives the same capabilities as the tag libraries provided with Struts, especially that I know that the tag libs shipped with Struts 1.1 fix a lot of the shortcomings of the tag libs shipped with 1.0.2. So, is going with the standards worth the move? Please advise. Regards, Tarek M. Nabil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: System Exception Handling in Struts
Logging is not part of struts. You can configure any logging api with struts. Struts doesnt assume any thing. For eg. put your log4.properties/xml file in classpath and log4.jar and start using the way you do it with other applications /Ashwani -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:12 PM To: Struts Users Mailing List Subject: System Exception Handling in Struts Hello, How can I handle a system exception in Struts? Is Logging an internal part of Struts if yes how to configure it. Please help with an example if possible. Alok Garg Polaris Software Lab Ltd. ( + 91 - 022 - 28290019 Ext. # 1308 ) This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised 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: tiles - setup
Thanks a lot. I checked the xml files and found the following errors: * The ?xml version... part on the tilesDefinitions.xml file was on line 2.. Should have been on line 1 * There was no DOCTYPE declaration in the tilesDefinitions.xml file... * The tiles taglib- was not included... I wonder whether the error messages couldn't have been a bit more informative... Thanks a lot Morten Andersen At 12:21 24-11-2003, you wrote: well all i can say is just check you have following lines of code in web and struts-config xml files. These are my configurations IN web.xml file taglib taglib-uri/struts-tiles/taglib-uri taglib-location/WEB-INF/tlds/struts-tiles.tld/taglib-location /taglib IN struts-config.xml FILE plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml / set-property property=definitions-debug value=0 / set-property property=definitions-parser-details value=0 / set-property property=definitions-parser-validate value=true / /plug-in Also, try to open your tiles-defs.xml file in your browser to check if it showing any error?? Raman Garg - Original Message - From: Morten Andersen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:34 PM Subject: tiles - setup I'm trying to use tiles with my existing struts application, but I can't get the definitions to work. I've tryed using the following procedure: Add the tiles plugin to the struts-config.xml file by writing the following just after the action mappings: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tileDefinitions.xml / set-property property=definitions-debug value=2 / set-property property=definitions-parser-details value=2 / set-property property=definitions-parser-validate value=true / /plug-in This causes the following errors to occur in tomcat: 1) Parse Fatal Error ... The processing instuction target matching [xX][mM][lL] is not allowed. 2) SEVERE: Can't create Tiles definition factory for module ''. I think the latter is an effect from the first... But all I did was to copy-paste!... Morten Andersen Master of applied mathematics and computer science Amanuensis Interest areas: -e-learning -software engineering -applied math The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: [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] Morten Andersen Master of applied mathematics and computer science Amanuensis Interest areas: -e-learning -software engineering -applied math The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: [EMAIL PROTECTED]
Some doubts.
Hi all, I am starting to learn Struts. On going throgh the documentation I have some doubts. 1. Is a form bean is an ActionForm.? 2. It says that data is stored in JavaBeans. In the presentation layer I have to display several select boxes whose value is fetched from database eg. states,postal codes etc.. How to do it in Struts. There are other values which is to be dispalyed in text boxes which can be get from a JvaBean. I dont see any other way than putting scriptlet in View. Custom tags or creating a JavaBean and executing it is another option.(Currently I am using JavaBean). 3. Where the Business Logic is implemented. That is accessing database and updating data. Is it ok to do it in ActionForm. Thanks in advance Rgds Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Developed Sites and Google
This thread may be of interest: http://marc.theaimsgroup.com/?t=10691766306r=1w=2 You may also want to immediately invalidate any sessions created this way, or at least set the max inactive interval to a small number. BTW, this isn't unique to Struts, it's how web apps work. Quoting Joe Hertz [EMAIL PROTECTED]: URL's with session state information will cause search engines problems in trying to index the content. (Makes sense -- the generated URLs wont be valid for anyone else). Google isn't about to store cookies as it indexes content, I'm sure. So doesn't this make Struts a poor choice for developing a site when Search Engine visibility is important? As I understand it, if your client doesn't support cookies, you will get a jsessionid in your urls, which is the embodiment of the above scenario. Am I mistaken? -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some doubts.
hi, You can read 1 ) http://javaboutique.internet.com/tutorials/Struts/ article to get some idea about struts + MVC ( just for a startup .. ) 2 ) http://jakarta.apache.org/struts/resources/1st.html article to get a better perspective . chao .. Shakti - Original Message - From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:21 PM Subject: Some doubts. Hi all, I am starting to learn Struts. On going throgh the documentation I have some doubts. 1. Is a form bean is an ActionForm.? 2. It says that data is stored in JavaBeans. In the presentation layer I have to display several select boxes whose value is fetched from database eg. states,postal codes etc.. How to do it in Struts. There are other values which is to be dispalyed in text boxes which can be get from a JvaBean. I dont see any other way than putting scriptlet in View. Custom tags or creating a JavaBean and executing it is another option.(Currently I am using JavaBean). 3. Where the Business Logic is implemented. That is accessing database and updating data. Is it ok to do it in ActionForm. Thanks in advance Rgds Antony Paul. - 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]
Announce: JPlates 3.0 released - a powerful alternative to JSP for Struts
JPlates Inc has announced the general availability of JPlates 3.0. The JPlates 3.0 template language supports complete object-oriented template processing with template objects and template methods. JPlates 3.0 offers a powerful, high performance alternative to JSP and XSLT and Velocity for Java programmers and Struts developers. For more information, visit http://www.jplates.com. JPlates 3.0 is a fully object-oriented template processing language designed to be used by Java programmers, along with Java, for building template-based applications. It offers the most usable and powerful technology for dynamic content generation on the web, for XML transformation, for source code generation, for generating personalized email, or for any other application involving template-based text generation. JPlates 3.0 syntax extends Java 1.4 syntax with JPlates template methods. Template methods are called just like other methods, but use JPlates template syntax for their method bodies. The template syntax combines template literal text with substitution and i18n, control flow statements, declarations, and output format control statements. JPlates classes can use 100% of Java, plus JPlates template methods. JPlates classes are compiled into Java to ensure 100% compatibility with Java. The JPlates compiler is fast and robust, and maintains line numbers to support easy debugging. The JPlates 3.0 runtime provides high performance template processing support for Servlets, Struts, J2EE, and J2SE applications. Use JPlates 3.0 in place of JSP, XSLT, and other template processors, wherever you generate stylized text, whether in a web-application, a code-generator, or any other kind of Java application.
Re: tiles - setup
Pls see the sample tiles-def.xml file attached with this mail. check if theis can help you !! - Original Message - From: Morten Andersen [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:02 PM Subject: Re: tiles - setup Thanks a lot. I checked the xml files and found the following errors: * The ?xml version... part on the tilesDefinitions.xml file was on line 2.. Should have been on line 1 * There was no DOCTYPE declaration in the tilesDefinitions.xml file... * The tiles taglib- was not included... I wonder whether the error messages couldn't have been a bit more informative... Thanks a lot Morten Andersen At 12:21 24-11-2003, you wrote: well all i can say is just check you have following lines of code in web and struts-config xml files. These are my configurations IN web.xml file taglib taglib-uri/struts-tiles/taglib-uri taglib-location/WEB-INF/tlds/struts-tiles.tld/taglib-location /taglib IN struts-config.xml FILE plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml / set-property property=definitions-debug value=0 / set-property property=definitions-parser-details value=0 / set-property property=definitions-parser-validate value=true / /plug-in Also, try to open your tiles-defs.xml file in your browser to check if it showing any error?? Raman Garg - Original Message - From: Morten Andersen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:34 PM Subject: tiles - setup I'm trying to use tiles with my existing struts application, but I can 't get the definitions to work. I've tryed using the following procedure: Add the tiles plugin to the struts-config.xml file by writing the following just after the action mappings: plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tileDefinitions.xml / set-property property=definitions-debug value=2 / set-property property=definitions-parser-details value=2 / set-property property=definitions-parser-validate value=true / /plug-in This causes the following errors to occur in tomcat: 1) Parse Fatal Error ... The processing instuction target matching [xX][mM][lL] is not allowed. 2) SEVERE: Can't create Tiles definition factory for module ''. I think the latter is an effect from the first... But all I did was to copy-paste!... Morten Andersen Master of applied mathematics and computer science Amanuensis Interest areas: -e-learning -software engineering -applied math The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: [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] Morten Andersen Master of applied mathematics and computer science Amanuensis Interest areas: -e-learning -software engineering -applied math The Maersk Institute of Production technology at Southern Danish University www.mip.sdu.dk Campusvej 55 DK-5230 Odense M Denmark +45 6550-3654 +45 6171-1103 Jabber id: [EMAIL PROTECTED] ?xml version=1.0 encoding=UTF-8? !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd; !-- !DOCTYPE tiles-definitions SYSTEM dtds/tiles-config_1_1.dtd -- tiles-definitions !-- LAYOUTS -- !-- MAIN LAYOUT -- definition name=main-layout path=/WEB-INF/jsp/layouts/mainTLCLayout.jsp put name=title value= type=string/ put name=menuBar value=top-bar-layout type=definition/ put name=leftBar value= type=string/ put name=rightBar value= type=string/ put name=topBar value=/WEB-INF/jsp/common/MenuBar.jsp type=page/ put name=content value= type=string/ put name=footer value= type=string/ put name=dateControl value= type=string/ /definition !-- VIEWES -- !-- NON USER HOME VIEW -- definition name=non-user-home extends=main-layout put name=title value=Welcome to EFIT.The only Lifestyle Management Tool type=string/ put name=menuBar value=/WEB-INF/jsp/common/nonUserHomeMenuBar.jsp type=page/ put name=topBar value=/WEB-INF/jsp/common/homeStandardMenuBar.jsp type=page/
Tiles problem with / in action forward since struts 1.1
Hello In latest revisions of struts it seemes to be required to have an action forward start with a /. This is ok under normal situations, however, it seemes to cause troubles with tiles, at least for me. When forwarding to a tile defind in the xml configureation file for tiles it seemes to be required to forward to a location not starting with / or it won't find the tile. Are you aware of this and can confirm it? Some people to deem to try to bypass this by setting the referrer url in another parameter rather then the action forward, but I think this not a good solution, especially if you need many forward locations. Do you know a solution for this? Lukas /index.jsp gets translated (as needed) to account for the context path automatically. The paths that start with / are evaluated relative to your web app. You can use the /index.jsp style paths and deploy your app with any context path without having to change anything. -Max On Thu, 2003-02-27 at 22:01, Affan Qureshi wrote: I have been using Struts 1.1b2 and tiles in my application and have defined forwards like: forward name=Success path=index.jsp?selected=1 redirect=false/ where forward paths were JSP pages, whithout the starting / for paths and it worked ok. But this does not work when I installed Strut 1.1rc1 coz it gave the exception: java.lang.IllegalArgumentException: Path index.jsp?selected=1 does not start with a / character Have I been doing it wrong until now? Is this a TilesRequestProcessor issue? I had done so, so that I can deploy my app under any context/module etc. and have no dependency on root path. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Some doubts.
all inline Hi all, I am starting to learn Struts. On going throgh the documentation I have some doubts. 1. Is a form bean is an ActionForm.? Yes 2. It says that data is stored in JavaBeans. In the presentation layer I have to display several select boxes whose value is fetched from database eg. states,postal codes etc.. How to do it in Struts. There are other values which is to be dispalyed in text boxes which can be get from a JvaBean. I dont see any other way than putting scriptlet in View. Custom tags or creating a JavaBean and executing it is another option.(Currently I am using JavaBean). I dont know the best practice. But you can you DTO(Data transfer objects which u are calling java beans) to gather data from DB and display in jsp using tag libraries provided by Struts. 3. Where the Business Logic is implemented. That is accessing database and updating data. Is it ok to do it in ActionForm. No. It should be done in action classes. Ie where you business logic is executed. Thanks in advance Rgds Antony Paul. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised 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]
Inheritence and tile definitions III
My previous problems with title have been solved, but now I have an analogous problem with "content". The idea of the definitions below is that I want to have a base.layout that determines the header and footer for all pages. Base layout contains a "body" which can be replaced by different format JSPs, as in the form.layout and page.layout definitions. login.form extends form.layout and passes it a "title" and "content". Title is working fine, but I am getting an error saying that content can not be found in context. I have added the following lines to baseLayout.jsp to attempt to resolve the issue. tiles:insert attribute="body" logic:present name="content"tiles:put name="content" beanName="content" beanScope="tile"//logic:present logic:present name="menu"tiles:put name="menu" beanName="menu" beanScope="tile"//logic:present /tiles:insert The above did not work. Any suggestions would be welcome. Ed Dowgiallo !-- = -- !-- -- !-- Base Layout -- !-- -- !-- = -- definition name="base.layout" page="/layouts/baseLayout.jsp" put name="system-short-name" value="TDL"/ put name="title" value="Base Page Layout"/ put name="user-name" value="Guest"/ put name="header" value="/common/header.jsp"/ put name="body" value="${body}"/ put name="footer" value="/common/footer.jsp"/ /definition !-- = -- !-- -- !-- Form Layout -- !-- -- !-- = -- definition name="form.layout" extends="base.layout" put name="title" value="Form Page Layout"/ put name="content" value="${content}"/ put name="body" value="/layouts/formLayout.jsp"/ /definition !-- = -- !-- -- !-- Page Layout -- !-- -- !-- = -- definition name="page.layout" extends="base.layout" put name="title" value="Page Layout"/ put name="menu" value="${menu}"/ put name="content" value="${content}"/ put name="body" value="/layouts/menuContentLayout.jsp"/ /definition !-- = -- !-- -- !-- Security Module Pages -- !-- -- !-- = -- definition name="login.form" extends="form.layout" put name="title" value="Login Form"/ put name="content" value="/security/login.jsp"/ /definition - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Prelogon Action to init a List
Hello To initialize a list for a drop-down element at our logonpage (logon.jsp), we need a prelogon action. The problem i have is that the connection i use to fill this list is stored in the session, so i cant init the list in our logonform. Question: How would you do that? Is it possible to forward from the CheckLogonTag (Same as the CheckLogonTag in the struts example webapp) to another action? Kind regards Dennis Hunziker
Type double does not work in the validator.
Hi, I am using struts 1.1 Is anybody using validator with type double? It' s not working, but integer or float works. Why? - field property=totalTestCost depends=double msg name=double key=errors.double/ arg0 key=testDetail.data.totalTestCost/ /field - Laurent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some doubts.
In terms of best practice design patterns for where and how to deal with business logic and database access, I have found the following two O'Reilly books to be invaluable: Programming Jakarta Struts by Chuck Cavaness Building Java Enterprise Applications, Volume I: Architecture I'm sure there are lots of others as well. Ed - Original Message - From: Kalra, Ashwani [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:15 AM Subject: RE: Some doubts. all inline Hi all, I am starting to learn Struts. On going throgh the documentation I have some doubts. 1. Is a form bean is an ActionForm.? Yes 2. It says that data is stored in JavaBeans. In the presentation layer I have to display several select boxes whose value is fetched from database eg. states,postal codes etc.. How to do it in Struts. There are other values which is to be dispalyed in text boxes which can be get from a JvaBean. I dont see any other way than putting scriptlet in View. Custom tags or creating a JavaBean and executing it is another option.(Currently I am using JavaBean). I dont know the best practice. But you can you DTO(Data transfer objects which u are calling java beans) to gather data from DB and display in jsp using tag libraries provided by Struts. 3. Where the Business Logic is implemented. That is accessing database and updating data. Is it ok to do it in ActionForm. No. It should be done in action classes. Ie where you business logic is executed. Thanks in advance Rgds Antony Paul. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disable binary files in upload
Hi all, I would like to prevent the user from upload binary files from an upload form, but to allow him to download any kind of ascii files. What is the better way to do that? Is it something i can do with the configuration.? Or should I add a test on the content-type value received ? Thanks, Ludo. This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. - Ce message et toutes les pieces jointes (ci-apres le message) sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: System Exception Handling in Struts
[EMAIL PROTECTED] wrote: Hello, How can I handle a system exception in Struts? Is Logging an internal part of Struts if yes how to configure it. Please help with an example if possible. http://www.kreutzersoft.de/java/servlets/servlet-jsp/log4j/ksct-log4j.pdf HTH gerhard -- KreutzerSoft Bärenbühlgraben 76, 90475 Nürnberg Tel: +49-911-8324-57 Fax: +49-911-8324-61 mailto:[EMAIL PROTECTED] http://www.KreutzerSoft.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Prelogon Action to init a List
Hi, your best be would be to make a /GoTo/LoginPage action (using whatever nomenclature you have) that makes this list for you. This is a good design principle anyway because you should avoid exposing jsp pages directly to the end user. For example, I have an index.jsp page at the root of my applications (where users are directed by apache), that is empty except for a logic:forward tag which sends every user to this action. The actual login jsp page is then in a separate location that the user is never aware of. does that help? c ps yes, you could also modify the checklogontag to forward to an action. pps never put business logic in a form. On Monday 24 November 2003 15:16, Hunziker Dennis wrote: Hello To initialize a list for a drop-down element at our logonpage (logon.jsp), we need a prelogon action. The problem i have is that the connection i use to fill this list is stored in the session, so i cant init the list in our logonform. Question: How would you do that? Is it possible to forward from the CheckLogonTag (Same as the CheckLogonTag in the struts example webapp) to another action? Kind regards Dennis Hunziker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionForm field not changing when forwarded to Action
Hi all I have an application which exhibits two similar, yet distinct, behaviours. Behaviour 1: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to JSP J. Behaviour 2: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to Action B. Action B then forwards to JSP J. The two behaviours are the same with the exception of the final forwards. The problem is that while the field value that's changed during Behaviour 1 remains changed when JSP J is presented, the field value does not change during Behaviour 2. Does anyone know why? TIA bort - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Prelogon Action to init a List
thx for your thoughts. i made a forward in the checklogontag. the problem was that there was a type definition for our prelogon action. after removing that it worked properly. -Original Message- From: Caoilte O'Connor [mailto:[EMAIL PROTECTED] Sent: Montag, 24. November 2003 15:46 To: [EMAIL PROTECTED] Subject: Re: Prelogon Action to init a List Hi, your best be would be to make a /GoTo/LoginPage action (using whatever nomenclature you have) that makes this list for you. This is a good design principle anyway because you should avoid exposing jsp pages directly to the end user. For example, I have an index.jsp page at the root of my applications (where users are directed by apache), that is empty except for a logic:forward tag which sends every user to this action. The actual login jsp page is then in a separate location that the user is never aware of. does that help? c ps yes, you could also modify the checklogontag to forward to an action. pps never put business logic in a form. On Monday 24 November 2003 15:16, Hunziker Dennis wrote: Hello To initialize a list for a drop-down element at our logonpage (logon.jsp), we need a prelogon action. The problem i have is that the connection i use to fill this list is stored in the session, so i cant init the list in our logonform. Question: How would you do that? Is it possible to forward from the CheckLogonTag (Same as the CheckLogonTag in the struts example webapp) to another action? Kind regards Dennis Hunziker - 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]
[OT] Stress Test
Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Stress Test
I stress-tested our app with a combination of HttpUnit and JUnitPerf. My test was designed to see what the maximum throughput was, rather than testing longevity, but the basic principles should be the same. I had multiple simulated users, logging in. each in independent sessions, and then running unique data through the application. Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Wisdom is not the prerogative of the academics. - Peter Chappell -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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: [OT] Stress Test
I use JMeter for this sort of thing. It's JSession aware which makes life a bit easier. Paul -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: 24 November 2003 15:05 To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - 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: Hibernate plugin
Hi David, We are in the process of choosing the Hibernate for one of my applications. Can you let me know, how does it help us, and under what circumstances, we use this tool. I have gone thru the Hibernate docs, but have not got the clear idea. Please help me in this regard. Regards, gopal -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Mon 11/24/2003 12:02 AM To: Struts Users Mailing List Cc: Subject: RE: Hibernate plugin Mark, I have a simpler approach for Hibernate (v2.0.3 or v2.1 under Struts v1.0 or v1.1) 1. Start with the Hibernate example Struts PlugIn code and struts-config.xml configuration text at: http://www.hibernate.org/105.html 2. Do NOT put any context entries in server.xml or web.xml! 3. Choose any name OTHER than the example java:comp/env/jdbc/mn-test. Any name under java:/comp in Tomcat is read-only and cannot be used. I selected one using my initial and some related hibernate words dgf:/hibernate/SessionFactory. Put that in your hibernate.cfg.xml file as the 'name=...' parameter of the session-factory tag, along the lines of this example: session-factory name=dgf:/hibernate/SessionFactory !-- properties -- !-- mapping files -- mapping resource=hibernate/Misc.hbm.xml/ /session-factory If you use a hibernate.properties file, what you need is described here: http://www.hibernate.org/hib_docs/api/net/sf/hibernate/cfg/Environment.html Since I use hibernate.cfg.xml instead of hibernate.properties, I'm guessing you'll need something like this in your hibernate.properties file: hibernate.jndi.url dgf:/hibernate hibernate.jndi.class javax.naming.Context hibernate.session_factory_name SessionFactory 4. Hibernate creates the non-existent JNDI context for me on webapp start and puts the session-factory in it. My facade class opens the session this way: Content ctx = new InitialContext(); SessionFactory sf = (SessionFactory) ctx.lookup(jndiLocation); Session session = sf.openSession(); That's all I do. Oh, I'm using hibernate 2.1beta6 now for my facade because it allows me to use named parameters in queries and hide the hibernate types more easily. (sorry, I think I read too much into Ted Husted's Struts in Action book, I'm trying to facade EVERYTHING! LOL). Feel free to email me off-list if you need futher help. Regards, David -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 12:32 AM To: Struts Users Mailing List Subject: Hibernate plugin After spending all night pissing around with various hibernate plugins to provide a datasource to use with hibernate? My JNDI datasource reports being okay in my container log, Context path=/mn-test docBase=mn-test debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=mn-test suffix=.log timestamp=true / Resource name=jdbc/mn-test scope=Shareable type=javax.sql.DataSource / ResourceParams name=jdbc/mn-test .. then in my hibernate.cfg.xml property name=connection.datasource java:comp/env/jdbc/mn-test /property ... Every-time i try and get the datasource from the servlet context I get a null pointer exception.. While this of course is a life changing experience for me, i novelty is waring thin. If anyone has is working in reality , then any input would be greatly appreciated. Cheers Mark - 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: [OT] Stress Test
OpenSTA works for me. Jerry Jalenak wrote: Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Stress Test
Simon, Paul, and Vic - Thanks for the suggestions. One initial glance it looks like JMeter will do what I want, so I'm going to head down that path 8-) Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate plugin
Hello Gopal-, Hibernate is OR/Mapping tool which allows you to map java data objects to relational database. The documentation found in the hibernate.org is the best documentation I have ever seen for a open source project so going thru that will help you a lot. Basically everyone thinking that JDO is replacement for entity beans in J2ee but each of them have theor own pros and cons it depends on which way you gonna go.If you need further help in this one feeel free to mail me off the list. Thanks Karuna -Original Message- From: Gopal Venkata Achi [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:12 AM To: Struts Users Mailing List Subject: RE: Hibernate plugin Hi David, We are in the process of choosing the Hibernate for one of my applications. Can you let me know, how does it help us, and under what circumstances, we use this tool. I have gone thru the Hibernate docs, but have not got the clear idea. Please help me in this regard. Regards, gopal -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Mon 11/24/2003 12:02 AM To: Struts Users Mailing List Cc: Subject: RE: Hibernate plugin Mark, I have a simpler approach for Hibernate (v2.0.3 or v2.1 under Struts v1.0 or v1.1) 1. Start with the Hibernate example Struts PlugIn code and struts-config.xml configuration text at: http://www.hibernate.org/105.html 2. Do NOT put any context entries in server.xml or web.xml! 3. Choose any name OTHER than the example java:comp/env/jdbc/mn-test. Any name under java:/comp in Tomcat is read-only and cannot be used. I selected one using my initial and some related hibernate words dgf:/hibernate/SessionFactory. Put that in your hibernate.cfg.xml file as the 'name=...' parameter of the session-factory tag, along the lines of this example: session-factory name=dgf:/hibernate/SessionFactory !-- properties -- !-- mapping files -- mapping resource=hibernate/Misc.hbm.xml/ /session-factory If you use a hibernate.properties file, what you need is described here: http://www.hibernate.org/hib_docs/api/net/sf/hibernate/cfg/Environment.h tml Since I use hibernate.cfg.xml instead of hibernate.properties, I'm guessing you'll need something like this in your hibernate.properties file: hibernate.jndi.url dgf:/hibernate hibernate.jndi.class javax.naming.Context hibernate.session_factory_name SessionFactory 4. Hibernate creates the non-existent JNDI context for me on webapp start and puts the session-factory in it. My facade class opens the session this way: Content ctx = new InitialContext(); SessionFactory sf = (SessionFactory) ctx.lookup(jndiLocation); Session session = sf.openSession(); That's all I do. Oh, I'm using hibernate 2.1beta6 now for my facade because it allows me to use named parameters in queries and hide the hibernate types more easily. (sorry, I think I read too much into Ted Husted's Struts in Action book, I'm trying to facade EVERYTHING! LOL). Feel free to email me off-list if you need futher help. Regards, David -Original Message- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 12:32 AM To: Struts Users Mailing List Subject: Hibernate plugin After spending all night pissing around with various hibernate plugins to provide a datasource to use with hibernate? My JNDI datasource reports being okay in my container log, Context path=/mn-test docBase=mn-test debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=mn-test suffix=.log timestamp=true / Resource name=jdbc/mn-test scope=Shareable type=javax.sql.DataSource / ResourceParams name=jdbc/mn-test .. then in my hibernate.cfg.xml property name=connection.datasource java:comp/env/jdbc/mn-test /property ... Every-time i try and get the datasource from the servlet context I get a null pointer exception.. While this of course is a life changing experience for me, i novelty is waring thin. If anyone has is working in reality , then any input would be greatly appreciated. Cheers Mark
Re: [OT] Stress Test
Simon Do you prefer JunitPerf to JProbe or Clover? Thanks, Martin - Original Message - From: Chappell, Simon P [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:11 AM Subject: RE: [OT] Stress Test I stress-tested our app with a combination of HttpUnit and JUnitPerf. My test was designed to see what the maximum throughput was, rather than testing longevity, but the basic principles should be the same. I had multiple simulated users, logging in. each in independent sessions, and then running unique data through the application. Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Wisdom is not the prerogative of the academics. - Peter Chappell -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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: [OT] Stress Test
I must admit that I have not tried JProbe or Clover, so I can't help there. I liked JUnitPerf for the task that I had. I originally wanted to use JMeter, but was unable to figure out quickly enough how to have unique test data for each simulated user, which was crucial for the test that I wanted to run. Also, the tool had to work from within Ant, which both JUnitPerf and JMeter will do. Simon -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 2:32 PM To: Struts Users Mailing List Subject: Re: [OT] Stress Test Simon Do you prefer JunitPerf to JProbe or Clover? Thanks, Martin - Original Message - From: Chappell, Simon P [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:11 AM Subject: RE: [OT] Stress Test I stress-tested our app with a combination of HttpUnit and JUnitPerf. My test was designed to see what the maximum throughput was, rather than testing longevity, but the basic principles should be the same. I had multiple simulated users, logging in. each in independent sessions, and then running unique data through the application. Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 Wisdom is not the prerogative of the academics. - Peter Chappell -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Stress Test
Go for it. JMeter is a nice tool and the guys on the mailing list are as helpful as you could wish. I'm looking to try JMeter for some functional testing in the near future. Simon -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:26 AM To: 'Struts Users Mailing List' Subject: RE: [OT] Stress Test Simon, Paul, and Vic - Thanks for the suggestions. One initial glance it looks like JMeter will do what I want, so I'm going to head down that path 8-) Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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]
Logic Iterate problem:
Logic Iterate problem: Can we have nested logic iterates? e.g. if I want to show list of products under all Categories. how can i implement that? I am having problem in setting the values of attributes for inner logic iterate loop logic:iterate id=category name=categorylist bean:write name=category property=categoryname/ logic:iterate id=products bean:write name=products / /logic:iterate /logic:iterate I have a bean catergory class which has productlist[] and catergoryname as its properties Thanks in advance Raman Garg
RE: [OT] Stress Test
So after 6 hours, what do your log files (web server and java application server) show? Do they show struts actions being performed? Does it show out of memory errors? Anything like that? Regards, David -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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: Logic Iterate problem:
Look at the nested:iterate tag. Nice http://jakarta.apache.org/struts/userGuide/struts-nested.html -jeff On Monday, November 24, 2003, at 09:44 AM, Raman wrote: Logic Iterate problem: Can we have nested logic iterates? e.g. if I want to show list of products under all Categories. how can i implement that? I am having problem in setting the values of attributes for inner logic iterate loop logic:iterate id=category name=categorylist bean:write name=category property=categoryname/ logic:iterate id=products bean:write name=products / /logic:iterate /logic:iterate I have a bean catergory class which has productlist[] and catergoryname as its properties Thanks in advance Raman Garg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Stress Test
David, Nothing. Nada. Zip. ZIlch. The logs show basically no response; from the client perspective the web app simply stops responding. I suspect I've either got a memory leak, or a database connectivity issue. Hopefully I can stress test this thing enough today to identify where in the code it fails. Once I know where it fails I should be able to fix it. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:52 AM To: Struts Users Mailing List Subject: RE: [OT] Stress Test So after 6 hours, what do your log files (web server and java application server) show? Do they show struts actions being performed? Does it show out of memory errors? Anything like that? Regards, David -Original Message- From: Jerry Jalenak [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:05 AM To: '[EMAIL PROTECTED]' Subject: [OT] Stress Test Hi All, I've got a problem with my current web app where it stops responding after about 6 hours. I need to set up a test environment and simulate multiple logon's so I can trap my way through the code and figure out where it is failing. I think there is a tool available that can be used to do this - HTTPerf (I think), but I'm not sure if this will do what I want. Does anyone have any experience with this? Thanks. Jerry Jalenak Development Manager, Web Publishing LabOne, Inc. 10101 Renner Blvd. Lenexa, KS 66219 (913) 577-1496 [EMAIL PROTECTED] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [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] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at the following email address: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
indexed iterated nested radio buttonbuttons
I am getting unexpected results with indices when iterating nested indexed radiobuttons. The form bean is applicationForm. It has an ArrayList of SkillCategory objects called skillCategories. Each SkillCategory in turn has an ArrayList of StudentSkill objects called skillsList. Here is the jsp code fragment: nested:iterate name=applicationForm id=category property=skillCategories fieldset legendnested:write property=skillCategoryName //legend nested:iterate id=skill property=skillsList indexId=skillIndex p label for=skill_namenested:write name=skill property=skillName //labelbr / nested:radio property=selectedSkillLevelName value=Unfamiliar indexed=true/Unfamiliar nested:radio property=selectedSkillLevelName value=Familiar indexed =true /Familiar nested:radio property=selectedSkillLevelName value=Proficient indexed=true/Proficient nested:radio property=selectedSkillLevelName value=Expert indexed=true/Expert /p /nested:iterate /fieldset /nested:iterate The resulting HTML source code looks like: p label for=skill_namePhotoshop/labelbr / input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p I really want to get something like this: p label for=skill_namePhotoshop/labelbr / input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p In other words, I don't want applicationForm pre-pended onto the property name, and I certainly don't want it to be indexed (the applicationForm index matches whatever the skill index is, which is pretty weird).
Re: indexed iterated nested radio buttonbuttons
Not sure if this will fix it, but you don't need the name attribute in nested:iterate. It should pick it up from the enclosing html:form or nested:form. Quoting Denise Ketcham [EMAIL PROTECTED]: I am getting unexpected results with indices when iterating nested indexed radiobuttons. The form bean is applicationForm. It has an ArrayList of SkillCategory objects called skillCategories. Each SkillCategory in turn has an ArrayList of StudentSkill objects called skillsList. Here is the jsp code fragment: nested:iterate name=applicationForm id=category property=skillCategories fieldset legendnested:write property=skillCategoryName //legend nested:iterate id=skill property=skillsList indexId=skillIndex p label for=skill_namenested:write name=skill property=skillName //labelbr / nested:radio property=selectedSkillLevelName value=Unfamiliar indexed=true/Unfamiliar nested:radio property=selectedSkillLevelName value=Familiar indexed =true /Familiar nested:radio property=selectedSkillLevelName value=Proficient indexed=true/Proficient nested:radio property=selectedSkillLevelName value=Expert indexed=true/Expert /p /nested:iterate /fieldset /nested:iterate The resulting HTML source code looks like: p label for=skill_namePhotoshop/labelbr / input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p I really want to get something like this: p label for=skill_namePhotoshop/labelbr / input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p In other words, I don't want applicationForm pre-pended onto the property name, and I certainly don't want it to be indexed (the applicationForm index matches whatever the skill index is, which is pretty weird). -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable binary files in upload
Ludo, You might want to use a FormFile in your ActionForm bean to make the file easier to deal with. Then, you can do things like this: 1. FormFile.getContentType() and see if it is a MIME type you allow. 2. FormFile.getInputStream() and save it in an ascii, not binary mode. So, binary data would probably be saved corrupted and they'd know it was bad the next time they asked for it not to upload binary data. 3. FormFile.getFileName() and see if it is one of a handful of file extensions you might allow (.html, .txt, etc.) Regards, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:35 AM To: [EMAIL PROTECTED] Subject: Disable binary files in upload Hi all, I would like to prevent the user from upload binary files from an upload form, but to allow him to download any kind of ascii files. What is the better way to do that? Is it something i can do with the configuration.? Or should I add a test on the content-type value received ? Thanks, Ludo. This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. - Ce message et toutes les pieces jointes (ci-apres le message) sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. - 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: Inheritence and tile definitions III
Ed, From the previous tiles problem, it seems as though the base definition is key and must list everything that needs to be 'global'. So, it might fix your problem if you make sure all elements are in it. I.e. in base.layout, try including your content, which is defined everywhere EXTENDING the base.layout but not IN the base.layout: put name=content value=${content}/ Regards, David -Original Message- From: Ed Dowgiallo [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:08 AM To: Struts Users Mailing List Subject: Inheritence and tile definitions III My previous problems with title have been solved, but now I have an analogous problem with content. The idea of the definitions below is that I want to have a base.layout that determines the header and footer for all pages. Base layout contains a body which can be replaced by different format JSPs, as in the form.layout and page.layout definitions. login.form extends form.layout and passes it a title and content. Title is working fine, but I am getting an error saying that content can not be found in context. I have added the following lines to baseLayout.jsp to attempt to resolve the issue. tiles:insert attribute=body logic:present name=contenttiles:put name=content beanName=content beanScope=tile//logic:present logic:present name=menutiles:put name=menu beanName=menu beanScope=tile//logic:present /tiles:insert The above did not work. Any suggestions would be welcome. Ed Dowgiallo !-- = -- -- !-- Base -- -- !-- = -- definition name=base.layout page=/layouts/baseLayout.jsp put name=system-short-name value=TDL/ put name=title value=Base Page Layout/ put name=user-name value=Guest/ put name=header value=/common/header.jsp/ put name=bodyvalue=${body}/ put name=footer value=/common/footer.jsp/ /definition !-- = -- -- !-- Form -- -- !-- = -- definition name=form.layout extends=base.layout put name=title value=Form Page Layout/ put name=content value=${content}/ put name=bodyvalue=/layouts/formLayout.jsp/ /definition !-- = -- -- !-- Page -- -- !-- = -- definition name=page.layout extends=base.layout put name=title value=Page Layout/ put name=menuvalue=${menu}/ put name=content value=${content}/ put name=bodyvalue=/layouts/menuContentLayout.jsp/ /definition !-- = -- -- !-- Security Module -- -- !-- = -- definition name=login.form extends=form.layout put name=title value=Login Form/ put name=content value=/security/login.jsp/ /definition
RE: Tiles problem with / in action forward since struts 1.1
Lukas, How are you trying to 'forward' to your tile? Certain logic:tags don't foward to tiles - it's in their documentation. Please provide examples of your forward tags, relevant action .../ tags, and how you are trying to 'forward' to it. Regards, David -Original Message- From: Lukas sterreicher [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 8:33 AM To: [EMAIL PROTECTED] Subject: Tiles problem with / in action forward since struts 1.1 Hello In latest revisions of struts it seemes to be required to have an action forward start with a /. This is ok under normal situations, however, it seemes to cause troubles with tiles, at least for me. When forwarding to a tile defind in the xml configureation file for tiles it seemes to be required to forward to a location not starting with / or it won't find the tile. Are you aware of this and can confirm it? Some people to deem to try to bypass this by setting the referrer url in another parameter rather then the action forward, but I think this not a good solution, especially if you need many forward locations. Do you know a solution for this? Lukas /index.jsp gets translated (as needed) to account for the context path automatically. The paths that start with / are evaluated relative to your web app. You can use the /index.jsp style paths and deploy your app with any context path without having to change anything. -Max On Thu, 2003-02-27 at 22:01, Affan Qureshi wrote: I have been using Struts 1.1b2 and tiles in my application and have defined forwards like: forward name=Success path=index.jsp?selected=1 redirect=false/ where forward paths were JSP pages, whithout the starting / for paths and it worked ok. But this does not work when I installed Strut 1.1rc1 coz it gave the exception: java.lang.IllegalArgumentException: Path index.jsp?selected=1 does not start with a / character Have I been doing it wrong until now? Is this a TilesRequestProcessor issue? I had done so, so that I can deploy my app under any context/module etc. and have no dependency on root path. - 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: indexed iterated nested radio buttonbuttons
Hm, I'm pretty sure you can also skip the indexed attribute on nested:radio. Quoting Kris Schneider [EMAIL PROTECTED]: Not sure if this will fix it, but you don't need the name attribute in nested:iterate. It should pick it up from the enclosing html:form or nested:form. Quoting Denise Ketcham [EMAIL PROTECTED]: I am getting unexpected results with indices when iterating nested indexed radiobuttons. The form bean is applicationForm. It has an ArrayList of SkillCategory objects called skillCategories. Each SkillCategory in turn has an ArrayList of StudentSkill objects called skillsList. Here is the jsp code fragment: nested:iterate name=applicationForm id=category property=skillCategories fieldset legendnested:write property=skillCategoryName //legend nested:iterate id=skill property=skillsList indexId=skillIndex p label for=skill_namenested:write name=skill property=skillName //labelbr / nested:radio property=selectedSkillLevelName value=Unfamiliar indexed=true/Unfamiliar nested:radio property=selectedSkillLevelName value=Familiar indexed =true /Familiar nested:radio property=selectedSkillLevelName value=Proficient indexed=true/Proficient nested:radio property=selectedSkillLevelName value=Expert indexed=true/Expert /p /nested:iterate /fieldset /nested:iterate The resulting HTML source code looks like: p label for=skill_namePhotoshop/labelbr / input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p I really want to get something like this: p label for=skill_namePhotoshop/labelbr / input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p In other words, I don't want applicationForm pre-pended onto the property name, and I certainly don't want it to be indexed (the applicationForm index matches whatever the skill index is, which is pretty weird). -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
File path validation in formfile.
Hi I am using the org.apache.struts.upload.FormFile. Now i want to validate wheather a file path entered by user is valid or not. Thanks and Regards Deepak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MessageResources in ActionForm
Hi there, I'm able to read values from MessageResources in JSP files. But in special case I need to read such values in java-classes. Unfortunatelly I need it in ActionForm in validate() method... To understand me I'm attaching my vision of how it could be very easy (it doesn't work): public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){ MessageResources mr = request.getMessageResources(); ActionErrors errors = new ActionErrors(); if (anyReasonToFailValidation){ errors.add(Error found, new ActionError(key.to.this.error, mr.getMessage(key.to.errorMessageParameter))); return errors; } I think it's clear why I need to have an object of Messageresources in ValidatorForm. Please, could anybody help me? Thanks a lot. Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation.xml and validate() method
Hi there, as I can see, when I implement the validate() method in the ActionForm, it means, that validation throught validation.xml file (inner struts validation) stops to work. ??? Am I right ??? This seems to me so... Am I doing something wrong? How can I walk throught both validation? If it is able, which one is first performed? Thanks for answers. Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validation.xml and validate() method
Hello Sporak, call super.validate(). *** HS Hi there, HS as I can see, when I implement the validate() method in the ActionForm, it HS means, that validation throught validation.xml file (inner struts HS validation) stops to work. HS ??? Am I right ??? HS This seems to me so... Am I doing something wrong? How can I walk throught HS both validation? If it is able, which one is first performed? HS Thanks for answers. HS Sporak HS - HS To unsubscribe, e-mail: [EMAIL PROTECTED] HS For additional commands, e-mail: [EMAIL PROTECTED] Regards, Dirk +--- Quality leads ---+ | Dirk Markert [EMAIL PROTECTED] | | Dr. Markert Softwaretechnik AG | | Joseph-von-Fraunhofer-Str. 20 | | 44227 Dortmund | +-- to success! -+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hibernate plugin
Gopal, I like hibernate for a few simple things: 1. Auto-population of objects. I hate copying SQL columns or adding a second step by calling beanutils.copyproperties. 2. Describe your object and hibernate can: A) Auto-generate my java object code (hbm2java) B) Auto-update my database tables if my fields change type or new ones are added (SchemaUpdate) C( Describe on auto-code-generation what interfaces or 'extends' to use for that class. (*.hbm.xml 'meta' attributes). D) Auto-load any subsets or sub-tables it refers to. Got an author who has one or more 'works'? You could have it load that data automatically. Got a login/pw/id in one table but want it to load the customer data in another table automatically? Link them with a type of component so when you ask for the user with login 'fred', it populates the object from both tables. 3. Time-savers: a) Plug-ins for caches (EhCache, OSCache, JCS, etc.) b) It's own query language can auto-translate to various database brands/types so you can have multiple database products and your query will be automatically translated and use the right userid/password/database/table for what you're looking for (DB2, Firebird, FrontBase, HSQLD, Informix, Ingres, Interbase, Mckoi, MySQL, Oracle, Pointbase, PostgreSQL, Postgress, SAPDB, Sybase, etc.), which it calls Dialects. c) Auto-logins to each database (no need for DataSource configurations or anything like that) d) Can automatically install each data souce as a JNDI name (I use this in Tomcat+Struts+Hibernate) so I can use it without passing the session back and forth (good for hiding your database access object. 4. The mapping file(s) describes objects and relationships so it can auto-log any one-to-one, one-to-many, many-to-one, many-to-many, bidirectional, and even tridirectional relationships in the object. I can make it auto-load that information if I want as well. This are my favorite reasons, thought I've never used 3.b (yet). :) I'm sure there are more reasons so check out http://www.hibernate.org and it's forum http://forum.hibernate.org, which answers a load of questions. Did I mention that I think Hibernate was just taken over by JBoss so they have at least one dedicated programmer (full-time, 9-5 daily). That might comfort you knowing there is one person who's probably on their message boards 9-5 every day. :) Feel free to off-list me if you have more questions. I'm probably driving everyone CRAZY with my incessant posting the last day or two. Regards, David -Original Message- From: Gopal Venkata Achi [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 10:12 AM To: Struts Users Mailing List Subject: RE: Hibernate plugin Hi David, We are in the process of choosing the Hibernate for one of my applications. Can you let me know, how does it help us, and under what circumstances, we use this tool. I have gone thru the Hibernate docs, but have not got the clear idea. Please help me in this regard. Regards, gopal -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Mon 11/24/2003 12:02 AM To: Struts Users Mailing List Cc: Subject: RE: Hibernate plugin Mark, I have a simpler approach for Hibernate (v2.0.3 or v2.1 under Struts v1.0 or v1.1) 1. Start with the Hibernate example Struts PlugIn code and struts-config.xml configuration text at: http://www.hibernate.org/105.html 2. Do NOT put any context entries in server.xml or web.xml! 3. Choose any name OTHER than the example java:comp/env/jdbc/mn-test. Any name under java:/comp in Tomcat is read-only and cannot be used. I selected one using my initial and some related hibernate words dgf:/hibernate/SessionFactory. Put that in your hibernate.cfg.xml file as the 'name=...' parameter of the session-factory tag, along the lines of this example: session-factory name=dgf:/hibernate/SessionFactory !-- properties -- !-- mapping files -- mapping resource=hibernate/Misc.hbm.xml/ /session-factory If you use a hibernate.properties file, what you need is described here: http://www.hibernate.org/hib_docs/api/net/sf/hibernate/cfg/Environment.html Since I use hibernate.cfg.xml instead of hibernate.properties, I'm guessing you'll need something like this in your hibernate.properties file: hibernate.jndi.url dgf:/hibernate hibernate.jndi.class javax.naming.Context hibernate.session_factory_name SessionFactory 4. Hibernate creates the non-existent JNDI context for me on webapp start and puts the session-factory in it. My facade class opens the session this way: Content ctx = new InitialContext();
RE: Disable binary files in upload
Thanks David for your answer. I was searching for something more generic. I use a FormFile, like you suggested. And I tought filtering on the contentType, but I'am afraid not be able to managing all the case. At the beginning, I tested il content-type equals octetstream or bianry, it is so sufficnet: what about zip file? what about jpeg? But I agree with your second proposal: even it saves wrong datas; it will prevent us from inserting executable script in our system. Extranet [EMAIL PROTECTED] - 11/24/2003 05:23 PM Please respond to [EMAIL PROTECTED] To:struts-user cc: Subject:RE: Disable binary files in upload Ludo, You might want to use a FormFile in your ActionForm bean to make the file easier to deal with. Then, you can do things like this: 1. FormFile.getContentType() and see if it is a MIME type you allow. 2. FormFile.getInputStream() and save it in an ascii, not binary mode. So, binary data would probably be saved corrupted and they'd know it was bad the next time they asked for it not to upload binary data. 3. FormFile.getFileName() and see if it is one of a handful of file extensions you might allow (.html, .txt, etc.) Regards, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:35 AM To: [EMAIL PROTECTED] Subject: Disable binary files in upload Hi all, I would like to prevent the user from upload binary files from an upload form, but to allow him to download any kind of ascii files. What is the better way to do that? Is it something i can do with the configuration.? Or should I add a test on the content-type value received ? Thanks, Ludo. This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. - Ce message et toutes les pieces jointes (ci-apres le message) sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. - 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] This message and any attachments (the message) is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. - Ce message et toutes les pieces jointes (ci-apres le message) sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A Dynamic Action handler Opinons wanted.
I've been using struts for over two years now and enjoy the benefits that it has brought to my code. An issue that I have always had with it is the struts-config.xml file. We have a custom built registration and survey system that struts is the controller for. The backend engine supports most of our surveys and contests as well as other backend processes. For contests we have a process where a new contest requires a creative designer to create a signin, registration and thank you page for their contest and then they include the standard signin and registration templates on their pages. The thank you page is simply a final page that everything can resolve to. When I originally started using struts the configuration file had to be set up with 2 action-mappings pointing to each contest. With 24 sites running contests the file rapidly became unmaintainable. The DynaAction was created to solve this problem. Through a hashtable created by each action object the DynaAction is able to redirect a single action to many different pages. I still use the state definitions as a communication method, but I typically don't even define the states in the struts-config.xml document any more. The process is fairly simply, if there is a field in the request that matches the state, then the value of that field is used to redirect on that state. If it is missing, the action looks to the config file, and if that is missing then there is typically a default page coded into the action itself. I'm curious to know what the group thinks about this extension and how it fits in/breaks the struts architecture. I'm surprised that something like this doesn't already exist, I've found it to be a great addition to the API. Any feedback or opinions about using a class like this in struts would be appreciated. package com.belo.struts.action; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.util.MessageResources; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import java.util.Hashtable; /** * @class DynaAction * * Extends Action to support dynamic forwarding, basic email mechanism, * and hashtable creation. * * @author Brian McClung * @version $Revision: 1.5 $Date: 2003/11/19 23:24:26 $ **/ public class DynaAction extends Action { /** * the hashtable for class level mappings **/ protected Hashtable stateHash; /** * Any path that should be prepended to the URL in the stateHash **/ protected String forward = ; /** * Tells the new Forward action to handle URL's as a page redirect instead * of a return; **/ protected boolean redirect = false; /** * Allows a fw= queryString parameter to either pass through to the next page * or be used to redirect the current page. **/ protected boolean useFW = false; /** * Default constructor **/ public DynaAction() { stateHash = new Hashtable(); } /** * * Adds a state to the hashtable * * @param stateID - the key to reference this state by * @param URL - the value to associate with this state **/ public void addState(String stateID, String URL) { stateHash.put(stateID, URL); } /** * Sets the redirect flag for forwarding. **/ public void setRedirect(boolean redirect) { this.redirect = redirect; } /** * Sets the path to be prepended to a URL before forwarding to a page **/ public void setForward(String forward) { if(forward == null) { return; } this.forward = forward; } /** * Returns the boolean value of useFW. * * @return current boolean value of useFW **/ public boolean getUseFW() { return useFW; } /** * Sets the boolean value of useFW * * @param useFW - boolean value to set useFW to. **/ public void setUseFW(boolean useFW) { this.useFW = useFW; } /** * * Pulls the appropriate URL to forward to based on the state received. * * @param state - the state this object is currently in. Used to look up the appropriate * path for this object * @param mappings - the ActionMapping associated with this object. * @param request -
Re: indexed iterated nested radio buttonbuttons
Thanks, Taking the indexed attribute off was the key. Hm, I'm pretty sure you can also skip the indexed attribute on nested:radio. Quoting Kris Schneider [EMAIL PROTECTED]: Not sure if this will fix it, but you don't need the name attribute in nested:iterate. It should pick it up from the enclosing html:form or nested:form. Quoting Denise Ketcham [EMAIL PROTECTED]: I am getting unexpected results with indices when iterating nested indexed radiobuttons. The form bean is applicationForm. It has an ArrayList of SkillCategory objects called skillCategories. Each SkillCategory in turn has an ArrayList of StudentSkill objects called skillsList. Here is the jsp code fragment: nested:iterate name=applicationForm id=category property=skillCategories fieldset legendnested:write property=skillCategoryName //legend nested:iterate id=skill property=skillsList indexId=skillIndex p label for=skill_namenested:write name=skill property=skillName //labelbr / nested:radio property=selectedSkillLevelName value=Unfamiliar indexed=true/Unfamiliar nested:radio property=selectedSkillLevelName value=Familiar indexed =true /Familiar nested:radio property=selectedSkillLevelName value=Proficient indexed=true/Proficient nested:radio property=selectedSkillLevelName value=Expert indexed=true/Expert /p /nested:iterate /fieldset /nested:iterate The resulting HTML source code looks like: p label for=skill_namePhotoshop/labelbr / input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[0].skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=applicationForm[1].skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p I really want to get something like this: p label for=skill_namePhotoshop/labelbr / input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[0].selectedSkillLevelName value=ExpertExpert /p p label for=skill_nameInDesign/labelbr / input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=Unfamiliar checked=checkedUnfamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=FamiliarFamiliar input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ProficientProficient input type=radio name=skillCategories[0].skillsList[1].selectedSkillLevelName value=ExpertExpert /p In other words, I don't want applicationForm pre-pended onto the property name, and I certainly don't want it to be indexed (the applicationForm index matches whatever the skill index is, which is pretty weird). -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Denise Harrington Ketcham Technology Integration Group Center for Instructional Technologies Division of Instructional Innovation and Assessment http://www.utexas.edu/academic/diia/ 475-6089 University of Texas at Austin
Re: MessageResources in ActionForm
Hi Use following MessageResources mr = ((MessageResources) request.getAttribute(Globals.MESSAGES_KEY)); Instaed of MessageResources mr = request.getMessageResources(); HTH Manish Singla Honza Spurn wrote: Hi there, I'm able to read values from MessageResources in JSP files. But in special case I need to read such values in java-classes. Unfortunatelly I need it in ActionForm in validate() method... To understand me I'm attaching my vision of how it could be very easy (it doesn't work): public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){ MessageResources mr = request.getMessageResources(); ActionErrors errors = new ActionErrors(); if (anyReasonToFailValidation){ errors.add(Error found, new ActionError(key.to.this.error, mr.getMessage(key.to.errorMessageParameter))); return errors; } I think it's clear why I need to have an object of Messageresources in ValidatorForm. Please, could anybody help me? Thanks a lot. Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: optionsCollection with another default value
Use one html:option ... tag followed by the html:optionsCollection ... tag. - Dan -Original Message- From: Frank Schaare [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 3:15 AM Hallo, i´ve made a select from an optionsCollection Tag. The values are read from a hashmap like value1 = one value2 = two value3 = three Now i´d like to set a default value for this select, which is NOT PART of my HashMap, f.e please select... The rendered select should look like this: option selectedplease select.../option optionone/option optiontwo/option optionthree/option is there any way to achieve this result in struts ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm field not changing when forwarded to Action
Because when you forward to Action B, at that time Struts Request Processor again processes Action Form. (FYI: In Action B, request is still having old values from Form F. Thus, values are reset and populated) HTH Manish Singla bort wrote: Hi all I have an application which exhibits two similar, yet distinct, behaviours. Behaviour 1: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to JSP J. Behaviour 2: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to Action B. Action B then forwards to JSP J. The two behaviours are the same with the exception of the final forwards. The problem is that while the field value that's changed during Behaviour 1 remains changed when JSP J is presented, the field value does not change during Behaviour 2. Does anyone know why? TIA bort - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getParameter() returns null on multipart requests
Thank you very much.. some good ideas! I'll give it shot. __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL
You may replace most of Logic tags/Bean tags with JSTL. You may still want to use HTML tags of struts Your decision may get affected in few cases if you are thinking of migrating to JSF in future Tarek M. Nabil wrote: Hi everyone, I'm getting ready to move from Struts 1.0.2 to Struts 1.1. Since, also, I now guarantee a J2EE 1.3 container, I'm considering replacing Struts tag libraries with the JSTL. Before I make this move, I wanted to know whether, from your experiences, the JSTL gives the same capabilities as the tag libraries provided with Struts, especially that I know that the tag libs shipped with Struts 1.1 fix a lot of the shortcomings of the tag libs shipped with 1.0.2. So, is going with the standards worth the move? Please advise. Regards, Tarek M. Nabil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm field not changing when forwarded to Action
Thanks for this answer Manish, what would you do if you need to change the value of one form parameter in action A and you want to avoid this value to be lost after the forward to action B ? Is it possible to duplicate the actionform object in a copy object that the Struts Request Processor wil not overwrite in Action B ? BR Eric - Original Message - From: Manish Singla [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:53 PM Subject: Re: ActionForm field not changing when forwarded to Action Because when you forward to Action B, at that time Struts Request Processor again processes Action Form. (FYI: In Action B, request is still having old values from Form F. Thus, values are reset and populated) HTH Manish Singla bort wrote: Hi all I have an application which exhibits two similar, yet distinct, behaviours. Behaviour 1: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to JSP J. Behaviour 2: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to Action B. Action B then forwards to JSP J. The two behaviours are the same with the exception of the final forwards. The problem is that while the field value that's changed during Behaviour 1 remains changed when JSP J is presented, the field value does not change during Behaviour 2. Does anyone know why? TIA bort - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - 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: multiple modules cannot retrieve mapping not fun!
Use this /author/loginAuthor.do in html-el:form HTH Manish Singla Matt Pease wrote: Hi all -- I'm trying to move to struts 1.1 multiple application modules am getting a very frustrating error that I can't seem to move around. I've searched the archives haven't found a solution. Bummer! When I try to access a very simple JSP (/author/login.jsp) with a html:form, Struts gives an error saying Cannot retrieve mapping for action /loginAuthor. What is strange though is that I can go to /author/loginAuthor.do struts finds the mapping then. It seems like the login.jsp page doesn't realize that it is in the author sub-application. How do I make the JSP know which sub-app it is part of? The documentation wasn't very clear on this (or at least I couldn't find it) The error, a description of my setup, important parts of various files are below. Has anyone seen this before? What am I doing wrong? Thanks very much- Matt http://localhost/together/author/login.jsp -- this gives: 500 Servlet Exception javax.servlet.jsp.JspException: Cannot retrieve mapping for action /loginAuthor at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:810) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506) at org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:324) at _author._login__jsp._jspService(/author/login.jsp:9) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.pageservice(Page.java:553) etc. http://localhost/together/author/loginAuthor.do -- this works!! -- my setup I've set up my main web.xml file for multiple applications as instructed in the struts user guide. DTD refs in all the struts-config files are 1.1 versions. The webapp itself is under the /together context. App server is Caucho Resin. Struts is the latest 1.1 release. ---from web.xml servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value !-- just one mapping in here -- /init-param init-param param-nameconfig/author/param-name param-value/WEB-INF/struts-author-config.xml/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping url-pattern='*.do' servlet-name='action'/ --- from struts-author-config.xml --- action-mappings action path=/loginAuthor type=com.fullscreen.web.pubtool.author.LoginAuthorAction input=/login.jsp forward name=next path=/loadAuthorItems.do redirect=true/ /action /action-mappings - from uthor/login.jsp --- %@ page language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-html-el; prefix=html-el % html-el:html html-el:form action=/loginAuthor.do method=POST email address: input type=text name=email Password: input type=password name=password html-el:submit/ /html-el:form /html-el:html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Message Resources and Struts Modules (Partially Solved)
No, there is no bug. You can access message resources of of default module and ( message resources of other modules also if required). alvin antony wrote: Hello, I just tried to copy all message resources definitions to the default struts-config.xml and now they are no message resource definitions on the submodule struts config, everything is working, but a little bit unhandy to define message resources for a sub module some where else . Is this a bug in the current version or does it has some reasons for being so. If some of you have a better insight, please share. Thanks, Alvin alvin antony [EMAIL PROTECTED] wrote: Hi friends, I write a modularised Struts Application, which has one default module and an another with prefix 'admin'. I have defined a default message resource for the default module as given below, # struts-con fig.xml ## OK, it works fine. i use the resource with Now I am trying to add a new admin module and tried all the possible ways to make the following definition working, #struts-config-admin.xml -- when I try this gets an exception [ServletException in:/admin/verwaltung/index.jsp] Cannot find message resources under key messageresourcesadmin' I couldn't figure what I got here wrong. any help is very much appreciated. Thanks in advance, Alvin Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now. Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now. -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm field not changing when forwarded to Action
You may not specify ActionForm in Action B. Thus struts request Processor will not reset values in Acion B. This implies you have to create an instance of CommonActionForm in Action B. (See in which scope you are storing CommonActionForm in Action A). Alterbate You may also specify attribute in ActionMapping (for Action A) which will store bean in request/session scope. After that you have to create instance in Action B HTH Manish Singla Eric Saya wrote: Thanks for this answer Manish, what would you do if you need to change the value of one form parameter in action A and you want to avoid this value to be lost after the forward to action B ? Is it possible to duplicate the actionform object in a copy object that the Struts Request Processor wil not overwrite in Action B ? BR Eric - Original Message - From: Manish Singla [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 6:53 PM Subject: Re: ActionForm field not changing when forwarded to Action Because when you forward to Action B, at that time Struts Request Processor again processes Action Form. (FYI: In Action B, request is still having old values from Form F. Thus, values are reset and populated) HTH Manish Singla bort wrote: Hi all I have an application which exhibits two similar, yet distinct, behaviours. Behaviour 1: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to JSP J. Behaviour 2: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to Action B. Action B then forwards to JSP J. The two behaviours are the same with the exception of the final forwards. The problem is that while the field value that's changed during Behaviour 1 remains changed when JSP J is presented, the field value does not change during Behaviour 2. Does anyone know why? TIA bort - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - 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] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm field not changing when forwarded to Action
Thank you for your response Manish. Manish Singla [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Because when you forward to Action B, at that time Struts Request Processor again processes Action Form. (FYI: In Action B, request is still having old values from Form F. Thus, values are reset and populated) HTH Manish Singla bort wrote: Hi all I have an application which exhibits two similar, yet distinct, behaviours. Behaviour 1: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to JSP J. Behaviour 2: Submit Form F to Action A. In Action A change 1 (or more) of the fields in Form F. Forward to Action B. Action B then forwards to JSP J. The two behaviours are the same with the exception of the final forwards. The problem is that while the field value that's changed during Behaviour 1 remains changed when JSP J is presented, the field value does not change during Behaviour 2. Does anyone know why? TIA bort - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Manish Singla x73166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
links without underline/border
I'm trying to get the image be a link and not be underlined, but the following still renders an image with with a border. html:link href=javascript:setSaveUrl('save'); style={text-decoration: none;} img src=../../images/save_journal.gif/ /html:link If anyone can tell me how I can get the link image to display just on it's own, I'd appreciate it. Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: links without underline/border
Sonam, You do not want to kill a text-decoration simply because images do not have text decorations. Instead, on your image add this property border=0 So your image tag should be: img src=../../images/save_journal.gif border=0/ I hope this helps. You can delete the style tag all together. - Original Message - From: Sonam Belbase [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 24, 2003 1:38 PM Subject: links without underline/border I'm trying to get the image be a link and not be underlined, but the following still renders an image with with a border. html:link href=javascript:setSaveUrl('save'); style={text-decoration: none;} img src=../../images/save_journal.gif/ /html:link If anyone can tell me how I can get the link image to display just on it's own, I'd appreciate it. Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - 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: validation.xml and validate() method
Your form-bean should expand org.apacher.struts.validator.ValidatorForm, not just ActionForm, and your validate() should call validate() from super class (ValidatorForm) to have validation.xml involved. Honza Spurný [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, as I can see, when I implement the validate() method in the ActionForm, it means, that validation throught validation.xml file (inner struts validation) stops to work. ??? Am I right ??? This seems to me so... Am I doing something wrong? How can I walk throught both validation? If it is able, which one is first performed? Thanks for answers. Sporak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Most productive Struts Framework :
Which of the Struts framworks would you think is the most productive for doing administrative screens over a database? Mike The information in this message is confidential and may be legally privileged. It is intended solely for the addressee; access to this email by anyone else is unauthorised. If you are not the intended recipient: (1) you are kindly requested to return a copy of this message to the sender indicating that you have received it in error, and to destroy the received copy; and (2) any disclosure or distribution of this message, as well as any action taken or omitted to be taken in reliance on its content, is prohibited and may be unlawful. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Change default forward class
Good afternoon... I realise I can change the class of my forward using className=... but is there a way I can change the default from org.apache.struts.action.ActionForward in parameter (ie.: without extending anything in the servlet)? I like my worms tightly canned. I need to do this because all (or almost all) of my forwards will have a property called pegList. Schultz. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:iterate help
Hi All I have a Vector called as testScoresVector (Vector of testScores Objects) stored in the session I am trying this logic:iterate id=tsv name=testScoresVector html:select property=tsv.testName html:option value=SAT-1SAT-1/html:option html:option value=SAT-2SAT-2/html:option : : /html:select /logic:iterate The idea is to add the selected value into the TestScores Object for each object in the Vector. This gives an error saying :No getter method available for property tsv.testName for bean under name org.apache.struts.taglib.html.BEAN I think the tsv holds a TestScoresVector object for each iteration. Am i right or not. Please let me know Thank you --Mohan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: links without underline/border
Just an FYI - to remove the border, you wouldn't use the CSS for text-decoration, you'd use border: none; ... :) Sonam Belbase wrote: I'm trying to get the image be a link and not be underlined, but the following still renders an image with with a border. html:link href=javascript:setSaveUrl('save'); style={text-decoration: none;} img src=../../images/save_journal.gif/ /html:link If anyone can tell me how I can get the link image to display just on it's own, I'd appreciate it. Thanks, SB -- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
disable submit button unless all required fields are filled
Hi, I want to have the submit button disabled unless the required text field is filled by the user. I have two buttons in the form, submit and cancel. The cancel button should always be enabled. Can anybody help me? Please! Thanks in advance! - Do you Yahoo!? Free Pop-Up Blocker - Get it now
Re: disable submit button unless all required fields are filled
How about having JavaScript only perform submission of the form when all fields are entered (using validation) ... that would make a bit more sense. Otherwise, you'd have to put a method in the handlers for every field that fires when that field loses focus, to determine if the submit button should be enabled ... you'd be opening yourself up for a nightmare of maintenance ... [EMAIL PROTECTED] wrote: Hi, I want to have the submit button disabled unless the required text field is filled by the user. I have two buttons in the form, submit and cancel. The cancel button should always be enabled. Can anybody help me? Please! Thanks in advance! - Do you Yahoo!? Free Pop-Up Blocker - Get it now -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getParameter() returns null on multipart requests
Terry Brick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, When I submit a multipart form to my action I am unable to get use getParameter() on the request object to get my form field values. As I understand it struts is supposed to automatically create a MultipartRequestWrapper which allows you to do this for multipart requests... I've seen some postings regarding this, but I still don't understand what I need to do. I think there was some mention that MultipartRequestWrapper doesn't work right if you're not utilizing the ActionForm? It still works, but it won't do as much for you behind the scenes. ;-) From within an Action, using getParameter() should still work for regular (i.e. non-file) items, because the request object passed to the Action is the wrapped request. If you're calling that method from somewhere else, it may or may not work, depending on whether or not you have a wrapped request. (In many places, you will not have a wrapped request, because the Servlet 2.2 spec does not permit such a thing, and Struts 1.x is Servlet 2.2 compatible.) -- Martin Cooper I also tried instantiating my own MultipartRequestWrapper by doing new MultipartRequestWrapper(request). That doesn't solve the problem either. Any ideas? I'm using the latest nightly build (Struts 1.2). Thanks! __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Types supported by DynaActionForm (or DynaValidatorForm)
OK, in the Struts manual, it says: The types supported by DynaActionForm include: - java.sql.Date - java.sql.Time - java.sql.Timestamp ...(among others)... What does supported mean though? Cause if I try to specify a java.sql.Date field in my form in struts-config: form-bean name=commissionReport type=org.apache.struts.validator.DynaValidatorForm form-property name=payDate type=java.sql.Date/ /form-bean ...and then submit a form, I get a ConversionException: org.apache.commons.beanutils.ConversionException at org.apache.commons.beanutils.converters.SqlDateConverter.convert(SqlDateConv erter.java:162) And upon searching the archives, I found suggestions to use SimpleDateFormat to do convert Strings--Dates manually. So what does support mean? Is there any automated (non-custom) way to do this, so I can just say (Date) dynaForm.get('dateField') :-) Thanks! -Sasha Borodin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: getParameter() returns null on multipart requests
Martin, I don't know if Terry got it working, but I don't see why he (or anyone) couldn't keep it simple by using a CommonsMultiPartRequestWrapper's getTextElements() or getAllElements() methods, liks so: // Assuming wrapper is the initialized CommonsMultiPartRequestWrapper Hashtable textElements = wrapper.getTextElements(); String paramOne[] = (String)textElements.get(One); // OR (Note the String array in both examples) Hashtable allElements = wrapper.getAllElements(); String paramOne[] = (String)allElements.get(One); Both code works if you add it to the example code I uploaded Saturday: www.mail-archive.com/[EMAIL PROTECTED]/msg87269.html Regards, David -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper Sent: Monday, November 24, 2003 6:03 PM To: [EMAIL PROTECTED] Subject: Re: getParameter() returns null on multipart requests Terry Brick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, When I submit a multipart form to my action I am unable to get use getParameter() on the request object to get my form field values. As I understand it struts is supposed to automatically create a MultipartRequestWrapper which allows you to do this for multipart requests... I've seen some postings regarding this, but I still don't understand what I need to do. I think there was some mention that MultipartRequestWrapper doesn't work right if you're not utilizing the ActionForm? It still works, but it won't do as much for you behind the scenes. ;-) From within an Action, using getParameter() should still work for regular (i.e. non-file) items, because the request object passed to the Action is the wrapped request. If you're calling that method from somewhere else, it may or may not work, depending on whether or not you have a wrapped request. (In many places, you will not have a wrapped request, because the Servlet 2.2 spec does not permit such a thing, and Struts 1.x is Servlet 2.2 compatible.) -- Martin Cooper I also tried instantiating my own MultipartRequestWrapper by doing new MultipartRequestWrapper(request). That doesn't solve the problem either. Any ideas? I'm using the latest nightly build (Struts 1.2). Thanks! __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - 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: getParameter() returns null on multipart requests
David Friedman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Martin, I don't know if Terry got it working, but I don't see why he (or anyone) couldn't keep it simple by using a CommonsMultiPartRequestWrapper's getTextElements() or getAllElements() methods, liks so: Why is duplicating the work keep[ing] it simple? Struts does all of the parsing behind the scenes for you, and makes all of the parameters available to you. The example code you posted does pretty much the same things that the Struts code does behind the scenes, but by the time your action is invoked, Struts has done it already, without you having to implement any file upload functionality in your actions. (In fact, I'm not sure I understand how your code can work, given that Struts will already have parsed the input stream, making it unavailable to a second parse.) -- Martin Cooper // Assuming wrapper is the initialized CommonsMultiPartRequestWrapper Hashtable textElements = wrapper.getTextElements(); String paramOne[] = (String)textElements.get(One); // OR (Note the String array in both examples) Hashtable allElements = wrapper.getAllElements(); String paramOne[] = (String)allElements.get(One); Both code works if you add it to the example code I uploaded Saturday: www.mail-archive.com/[EMAIL PROTECTED]/msg87269.html Regards, David -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper Sent: Monday, November 24, 2003 6:03 PM To: [EMAIL PROTECTED] Subject: Re: getParameter() returns null on multipart requests Terry Brick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, When I submit a multipart form to my action I am unable to get use getParameter() on the request object to get my form field values. As I understand it struts is supposed to automatically create a MultipartRequestWrapper which allows you to do this for multipart requests... I've seen some postings regarding this, but I still don't understand what I need to do. I think there was some mention that MultipartRequestWrapper doesn't work right if you're not utilizing the ActionForm? It still works, but it won't do as much for you behind the scenes. ;-) From within an Action, using getParameter() should still work for regular (i.e. non-file) items, because the request object passed to the Action is the wrapped request. If you're calling that method from somewhere else, it may or may not work, depending on whether or not you have a wrapped request. (In many places, you will not have a wrapped request, because the Servlet 2.2 spec does not permit such a thing, and Struts 1.x is Servlet 2.2 compatible.) -- Martin Cooper I also tried instantiating my own MultipartRequestWrapper by doing new MultipartRequestWrapper(request). That doesn't solve the problem either. Any ideas? I'm using the latest nightly build (Struts 1.2). Thanks! __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - 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: getParameter() returns null on multipart requests
Martin, I agree Terry could have had it so much easier using an ActionForm. But, I recall that wasn't what Terry wanted to do back in the first post, hence the wrapper example, then the follow-ups about keeping everything in one place, that wrapper. Is there a way I missed to get the MultiPartRequestWrapper for that action in Terry's no-ActionForm case instead of initializing it all over again sans ActionForm? Personally, I prefer adding FormFiles to my ActionForm and getting uploaded files that way. Regards, David -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper Sent: Monday, November 24, 2003 7:13 PM To: [EMAIL PROTECTED] Subject: Re: getParameter() returns null on multipart requests David Friedman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Martin, I don't know if Terry got it working, but I don't see why he (or anyone) couldn't keep it simple by using a CommonsMultiPartRequestWrapper's getTextElements() or getAllElements() methods, liks so: Why is duplicating the work keep[ing] it simple? Struts does all of the parsing behind the scenes for you, and makes all of the parameters available to you. The example code you posted does pretty much the same things that the Struts code does behind the scenes, but by the time your action is invoked, Struts has done it already, without you having to implement any file upload functionality in your actions. (In fact, I'm not sure I understand how your code can work, given that Struts will already have parsed the input stream, making it unavailable to a second parse.) -- Martin Cooper // Assuming wrapper is the initialized CommonsMultiPartRequestWrapper Hashtable textElements = wrapper.getTextElements(); String paramOne[] = (String)textElements.get(One); // OR (Note the String array in both examples) Hashtable allElements = wrapper.getAllElements(); String paramOne[] = (String)allElements.get(One); Both code works if you add it to the example code I uploaded Saturday: www.mail-archive.com/[EMAIL PROTECTED]/msg87269.html Regards, David -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Martin Cooper Sent: Monday, November 24, 2003 6:03 PM To: [EMAIL PROTECTED] Subject: Re: getParameter() returns null on multipart requests Terry Brick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, When I submit a multipart form to my action I am unable to get use getParameter() on the request object to get my form field values. As I understand it struts is supposed to automatically create a MultipartRequestWrapper which allows you to do this for multipart requests... I've seen some postings regarding this, but I still don't understand what I need to do. I think there was some mention that MultipartRequestWrapper doesn't work right if you're not utilizing the ActionForm? It still works, but it won't do as much for you behind the scenes. ;-) From within an Action, using getParameter() should still work for regular (i.e. non-file) items, because the request object passed to the Action is the wrapped request. If you're calling that method from somewhere else, it may or may not work, depending on whether or not you have a wrapped request. (In many places, you will not have a wrapped request, because the Servlet 2.2 spec does not permit such a thing, and Struts 1.x is Servlet 2.2 compatible.) -- Martin Cooper I also tried instantiating my own MultipartRequestWrapper by doing new MultipartRequestWrapper(request). That doesn't solve the problem either. Any ideas? I'm using the latest nightly build (Struts 1.2). Thanks! __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - 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]
Unable to load class link
Hello, I am getting this error that is driving me nuts--it seems to be referring to a class named 'link', which first off, I don't know of, and secondly, doesn't have its initial letter capitalized as per usual. This isn't one of my classes, so I have no idea what Tomcat is referring to, and I'm just guessing that it's Struts, since I'm only using Struts EL and a hand full of JSTL tags. This arose when I upgraded to JBuilder X. The full error displayed in the browser (and logs) is: org.apache.jasper.JasperException: /showUserCases.jsp(35,0) Unable to load class link at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219) at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:712) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) Thanks for any help! -c - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to load class link
So, care to share what's in showUserCases.jsp at, say, line 35 or so? Sounds like you've got something like: jsp:useBean id=... class=link/ or maybe: %@ page import=link % or...? C. Grierson wrote: Hello, I am getting this error that is driving me nuts--it seems to be referring to a class named 'link', which first off, I don't know of, and secondly, doesn't have its initial letter capitalized as per usual. This isn't one of my classes, so I have no idea what Tomcat is referring to, and I'm just guessing that it's Struts, since I'm only using Struts EL and a hand full of JSTL tags. This arose when I upgraded to JBuilder X. The full error displayed in the browser (and logs) is: org.apache.jasper.JasperException: /showUserCases.jsp(35,0) Unable to load class link at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219) at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:712) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619) at java.lang.Thread.run(Thread.java:534) Thanks for any help! -c -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe,
[ANNOUNCE] Struts Console v4.1
Struts Console version 4.1 is now available. http://www.jamesholmes.com/struts/ Download Now: http://www.jamesholmes.com/struts/struts-console-4.1.zip -- OR -- http://www.jamesholmes.com/struts/struts-console-4.1.tar.gz Struts Console is FREE software. At long last there is a new release. This release has some bug fixes and some enhancements. Changes with Struts Console v4.1 *) Fixed JDeveloper Addin to properly recognize Struts config files in JDeveloper 9.0.3+. *) Added drop down list of values for Plugin's Configuration Class field. *) Added drop down list of values for Action's Type field. *) Added support for Struts 1.2 config files. *) Added support for Validator 1.1 config files. *) Added ability to set output options from JBuilder plugin. Thanks, -James [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is CornerStone?
Hi, Does anybody have any idea about Apache Cornerstone framework . I am in the process of choosing a MVC implementation and somebody told me about it. Can anybody shed some light about it. How is it similar/dissimilar to Struts or is it not an MVC framework at all. Thanks in advance Raaj - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Re: struts and PHP
Quoting Christian Bollmeyer [EMAIL PROTECTED]: Am Montag, 17. November 2003 22:48 schrieb Daniel Blumenthal: Hi, i've been looking into adding blogging functionality to my website (which uses struts), and one which was suggested was pmachine (http://www.pmachine.com/index.php). however, this uses php, and this raised the question of how/if it was possible to use php with struts. (obviously, i can just specify a php page instead of a jsp, but how do i get dynamic data without relying on the jsp tags?) As soon as you leave the Java world, the only means of passing dynamic content is the 'traditional' way, i.e. parameters. You lose everything from page to application scopes and won't be able to use attributes (Objects) in particular, as those reside inside the VM's memory and thus are inaccessible from PHP. Alas, this is pretty much the case today. However, there is a JSR in progress that is excplicitly designed to define a standard way that scripting languages and Java can interact (and share access to Java objects, and the HttpSession instance, along the way). Keep an eye out for progress on: http://jcp.org/en/jsr/detail?id=223 Note that the Zend folks are actively involved in this effort, so we can expect that support for PHP in particular should be pretty well planned. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sorry.. Need of blood of B Negative
Very Very Sorry to all , But I have a major requirement of ( B Negative )blood for the heart operation of My Uncle at Ruby hospital PUNE, Maharashtra State INDIA. All those who are localite Puneties and have a blood group B Negative, (Maharashtra State, INDIA) I request them to donate the blood to Uday at Ruby hospital. The operation will take place on thursday 27th Nov. 2003. the contact No. for the Uday is ...91-020-9422320155 or me. Abhijeet: 91-020-9822410348 One more thing. We need fesh blood or blood taken within last 24 hrs. Maximum. I feel that this is the best way to request such things. Sorry again for out of disscussion Request... regards Abhijeet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Server manged vs. struts managed db pools
Quoting Edgar P Dollin [EMAIL PROTECTED]: I like struts managed db pools, however, the struts developers aren't too happy about the quality and the dependency on the commons-pooling library and are attempting to phase it out. The existing connection pool in struts-legacy.jar (and the one in commons-dbcp.jar nowdays) works fine. However, there are several important pros for using container managed connection pools: * A connection pool implementation provided by your app server is likely to be optimized for better performance on that particular app server than a generic pool included with the app. * A connection pool implementation provided by your app server is likely to be supported by the graphical admin tools of that app server, versus having to be hand configured in struts-config.xml. * On some app servers, you can dynamically tweak the characteristics of the connection pool (such as how many active connections are allowed) without restarting the app. That's not the case for a pool included inside the app, where you have to go tweak struts-config.xml and restart. * A connection pool provided by your app server vendor is accessible (via JNDI) *anywhere* in your application, versus having to be passed in as a parameter to any method that needs it (or making your business logic dependent on the servlet API in order to access application scope attributes). * In environments where you have two or three different deployment scenarios (say, development, test, and production) you can deploy exactly the same WAR file in all three places, yet have each of them talk to the correct database simply by administering the server. No tweaking of the struts-config.xml file to reflect which environment you are deploying to. The only reason Struts ever included a connection pool in the first place is that most standalone servlet containers at that time didn't support JNDI-based pools. Now, that is no longer an issue, and I would always recommend using the container's facilities for that purpose. Edgar Craig -Original Message- From: Nathan Maves [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 2:52 PM To: Struts Users Mailing List Subject: Server manged vs. struts managed db pools Are there any pro/con 's for either? Nathan - 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: Server manged vs. struts managed db pools
Tomcat has exceptionally clear documentation in this area: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html Mike --- Craig R. McClanahan [EMAIL PROTECTED] wrote: Quoting Edgar P Dollin [EMAIL PROTECTED]: I like struts managed db pools, however, the struts developers aren't too happy about the quality and the dependency on the commons-pooling library and are attempting to phase it out. The existing connection pool in struts-legacy.jar (and the one in commons-dbcp.jar nowdays) works fine. However, there are several important pros for using container managed connection pools: * A connection pool implementation provided by your app server is likely to be optimized for better performance on that particular app server than a generic pool included with the app. * A connection pool implementation provided by your app server is likely to be supported by the graphical admin tools of that app server, versus having to be hand configured in struts-config.xml. * On some app servers, you can dynamically tweak the characteristics of the connection pool (such as how many active connections are allowed) without restarting the app. That's not the case for a pool included inside the app, where you have to go tweak struts-config.xml and restart. * A connection pool provided by your app server vendor is accessible (via JNDI) *anywhere* in your application, versus having to be passed in as a parameter to any method that needs it (or making your business logic dependent on the servlet API in order to access application scope attributes). * In environments where you have two or three different deployment scenarios (say, development, test, and production) you can deploy exactly the same WAR file in all three places, yet have each of them talk to the correct database simply by administering the server. No tweaking of the struts-config.xml file to reflect which environment you are deploying to. The only reason Struts ever included a connection pool in the first place is that most standalone servlet containers at that time didn't support JNDI-based pools. Now, that is no longer an issue, and I would always recommend using the container's facilities for that purpose. Edgar Craig -Original Message- From: Nathan Maves [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 2:52 PM To: Struts Users Mailing List Subject: Server manged vs. struts managed db pools Are there any pro/con 's for either? Nathan - 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] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Sorry.. Need of blood of B Negative
On Tue, 25 Nov 2003, Abhijeet Mahalkar wrote: You should label this as [OT] in the subject heading. I hope your Uncle is ok. Very Very Sorry to all , But I have a major requirement of ( B Negative )blood for the heart operation of My Uncle at Ruby hospital PUNE, Maharashtra State INDIA. All those who are localite Puneties and have a blood group B Negative, (Maharashtra State, INDIA) I request them to donate the blood to Uday at Ruby hospital. The operation will take place on thursday 27th Nov. 2003. the contact No. for the Uday is ...91-020-9422320155 or me. Abhijeet: 91-020-9822410348 One more thing. We need fesh blood or blood taken within last 24 hrs. Maximum. I feel that this is the best way to request such things. Sorry again for out of disscussion Request... regards Abhijeet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- James Mitchell Software Developer / Struts Evangelist http://www.struts-atlanta.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: logic:iterate help
I recommend you drop the Struts logic tags and switch to JSTL combined with the Struts-el tags. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization and locale-sensitive formatting tags, and SQL tags. It also introduces a new expression language to simplify page development... http://java.sun.com/products/jsp/jstl/ Core JSTL: Mastering the JSP Standard Tag Library by David M. Geary http://www.amazon.com/exec/obidos/tg/detail/-/0131001531/qid=1069734758/sr=1-2/ref=sr_1_2/002-2465270-5458431?v=glances=books By combing Struts-el with JSTL a select tag with options can be written as: html-el:select property=moduleTypeCode c:forEach items='${applicationScope[constants.moduleTypeCodeTypeLabelMapKey]}' var='mapItem' html-el:option value=${mapItem.key}c:out value='${mapItem.value}'//html-el:option /c:forEach /html-el:select The map of module types is loaded from a data store by a Struts plug-in at system start up. Mike --- [EMAIL PROTECTED] wrote: Hi All I have a Vector called as testScoresVector (Vector of testScores Objects) stored in the session I am trying this logic:iterate id=tsv name=testScoresVector html:select property=tsv.testName html:option value=SAT-1SAT-1/html:option html:option value=SAT-2SAT-2/html:option : : /html:select /logic:iterate The idea is to add the selected value into the TestScores Object for each object in the Vector. This gives an error saying :No getter method available for property tsv.testName for bean under name org.apache.struts.taglib.html.BEAN I think the tsv holds a TestScoresVector object for each iteration. Am i right or not. Please let me know Thank you --Mohan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]