Re: Capturing an outgoing response.
Are you running a Servlet 2.3 compliant app. server? If so, Filters are what you are looking for. If not, you could add some scriptlet to the end of each JSP (perhaps?) that could post-process the response before it is finalized. Erik - Original Message - From: Brandon Goodin [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 9:34 PM Subject: Capturing an outgoing response. Is it possible to capture the html page that is generated by a jsp page before it is sent to the client who requested it? Brandon Goodin Phase Communications P (406)862-2245 F (406)862-0354 http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: reset() in FormBean
Hi, check in the code... first: reset() then: populate() at last: validate() You need to do it, if you have checkboxes on your form, cause their value is only transmitted if they are set. Without the reset-methode you have no knowledge when the user deselects them. Easy to try and then you know why the reset() is there. Whether you use setXXX() or just do xXX = any_value does not harm. hope this helps Alexander -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 1:30 AM To: [EMAIL PROTECTED] Subject: reset() in FormBean When is the reset() method of the FormBean called? I know the FormBean's fields are first populated, then it's validate() method is called (if validate=true in the struts-config.xml), and then the perform() method of the associated Action class is called. -But when is the reset() called? -If I override the method, do I call a series of set() methods to default values. -Is it not a good idea to override the method? Should I leave it at the default behavior? Any help would be much appreciated. Thanks. -T- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles/Orion(Oracle)
Hi, Does the ignore=true not reset bug in Orion still remain with the latest Tiles distribution ? I think I have corrected it. Can someone confirm it ? For the Orion problem (submenu failed after second access), I am aware of it and will try to correct it asap. A workaround is to set Orion webserver in development mode (force it to generate java classes for pages). If you have already tested your application, you should force Orion to regenerate your java classes. The simplest way is to remove all previously generated classes and serialized beans (in application-deployments). Cedric Stephen Gissendaner wrote: Octavio, I am using tiles with oc4j. the only bug issue that I ran into is that if you have an tiles:get ... ignore=true and you don't pass the item in via the tiles:put.. then from the tiles:get... on all of the tiles tags are ignored! Since you are using a submenu, It sounds like you may have this issue. (I am assuming that you can get basic stuff to work) My work around was to have a put name=submenu value=/common/blank.jsp/ in the master definition and then override it when needed in the extended definitions. Hope that this helps. Stephen W. Gissendaner Senior Application Engineer, EPL -Original Message- From: Otavio C. Decio [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 10:22 AM To: Struts Users Mailing List Subject: Tiles/Orion(Oracle) Hi all, Did anybody successfully installed an ran Tiles on Oracle's flavor of Orion? We have a new project starting, I wanted to use Tiles but so far I couldn't solve a problem with the submenu. If someone got it running, would you please tell me which platform and version are you using. Thanks!! Otavio -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tiles/Orion(Oracle)
Hi Cedric, So is there (was there) a known bug with Orion then? This sounds very much like the problem I had with Orion where a search form worked the first time, and then subsequently only returned the page of the first search's results. The JSP seemed to hang at the template:insert... start tag. Could you please explain what the problem was? I only recently rejoined the mailing list so I'm not privy to previous discussions. Also, will the latest Struts nightly build have your fix in it? thanks, Darryl -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: 02 November 2001 12:21 To: Struts Users Mailing List Subject: Re: Tiles/Orion(Oracle) Hi, Does the ignore=true not reset bug in Orion still remain with the latest Tiles distribution ? I think I have corrected it. Can someone confirm it ? For the Orion problem (submenu failed after second access), I am aware of it and will try to correct it asap. A workaround is to set Orion webserver in development mode (force it to generate java classes for pages). If you have already tested your application, you should force Orion to regenerate your java classes. The simplest way is to remove all previously generated classes and serialized beans (in application-deployments). Cedric Stephen Gissendaner wrote: Octavio, I am using tiles with oc4j. the only bug issue that I ran into is that if you have an tiles:get ... ignore=true and you don't pass the item in via the tiles:put.. then from the tiles:get... on all of the tiles tags are ignored! Since you are using a submenu, It sounds like you may have this issue. (I am assuming that you can get basic stuff to work) My work around was to have a put name=submenu value=/common/blank.jsp/ in the master definition and then override it when needed in the extended definitions. Hope that this helps. Stephen W. Gissendaner Senior Application Engineer, EPL -Original Message- From: Otavio C. Decio [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 10:22 AM To: Struts Users Mailing List Subject: Tiles/Orion(Oracle) Hi all, Did anybody successfully installed an ran Tiles on Oracle's flavor of Orion? We have a new project starting, I wanted to use Tiles but so far I couldn't solve a problem with the submenu. If someone got it running, would you please tell me which platform and version are you using. Thanks!! Otavio -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Duplication of Template Files Solution
Hi Darryl, Two problems with Tiles and Orion have been discovered : * If you was using ignore=true, other tags in the page don't behave as expected. This bug is corrected in the latest distribution * If you try the Tiles example, the submenu fail after the second access to the page. A workaround is to put Orion in development mode (don't forget to erase all previously generated classes and serialized beans in application-deployments). All this problems come because Orion do some optimizations by serializing beans, contexts and generated classes. This implies that tag handlers and used classes/beans should accept serialization. This is not required by jsp spec ! But, this is not so difficult to provide, just a question of time to localize faulty classes. Tracking the problem is not so easy, because when you put Orion in development mode, the problem disapear and all run as expected ;-( Cedric Darryl Pentz wrote: Sandeep, Can you post an example of a struts-config mapping using Tiles. I tried to use Tiles but couldn't get it to run a page twice. In other words, I had a search function which worked fine the first time with Tiles, but when I changed the search criteria and resubmitted, the Action class ran, but when it forwarded the result to the JSP, the application hung at the insert tag. This is what prompted me to try the inline thing with the original Struts template tags and it worked, without any changes, so I deduced that Tiles is buggy. I'm running Orion on Win2K with a nightly build from about 10 days ago. I didn't know about being able to reference the Tiles definition from the struts-config action mapping, hence my request above. thanks, Darryl -Original Message- From: Sandeep Takhar [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 18:05 To: Struts Users Mailing List Subject: Re: Duplication of Template Files Solution man i suck, i did it again. finish the thought, than send the mail. ok -- what I meant was that unlike what your initial e-implies: that tiles works exactly like template-tags, what I meant was that you can create the duplicate definition in the xml file and than reference this layout definition/component in the action forward of a struts-config file. I like this solution better because you have clearly defined all the layouts and are just forwarding to the correct one. This means that you don't need the duplicated jsp which is a pain to maintain. So either solution (the one you described) and this one will get rid of that duplicate jsp. - Sandeep --- Sandeep Takhar [EMAIL PROTECTED] wrote: Tiles allows you to do this as well. btw: I have replied to another reply in this same thread about other things I like about tiles. In my usual haste I deleted the original message when I realized there was something more I wanted to say. - sandeep --- Darryl Pentz [EMAIL PROTECTED] wrote: I've discovered quite by accident that the Struts templating framework allows me to eliminate duplication of my JSP pages by simply including the body page inline to the template definition page. By this I mean I combine both pages into one as follows: template:insert ... template:put name=header ... / template:put name=nav ... / template:put name=body ... / ... BODY HTML GOES HERE ... /template:put /template:insert I'd previously enquired on this list how I could eliminate the duplication of the pages where the main body HTML exists in a separate JSP page that is simply referred to from the definition file i.e. template:put name=body content=/blah/blah/body.jsp/. Strangely nobody responded with the above solution so I'm wondering is this simply a side-effect of the PutTag class or Craig, did you intend for it to work this way? I'm quite surprised I haven't seen this technique used in any of the examples. Rather, the duplication is suggested. The new Tiles extension allows the above which prompted me to try it with the Struts template tag library just for grins, and it worked! Is there a problem with doing it inline like I illustrate above? I looked at the source code and I see the PutTag class does extend BodyTagSupport so everything should work fine. So far, the stuff I've played around with seems to work fine with no problems. Any feedback would be appreciated. thanks, Darryl Pentz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL
Re: TILES components in a select box
Hi, I don't really understand what you want to do : Can you describe a little bit more what the resulting page should look like, and what is the expected behavior when you select an option ? Also, is there a set of select for each adress, or one for all adresses ... Cedric iT meDic wrote: Hi Cedric, I am using your editaddress.jsp component(TILES) to create instances of addresses. I am tyring to create a Single Select box and populate that with instances of the component. Eg using this tag html:select property=singleSelect for address components: mailing address billing address etc. Under the select box i would like to have three options, Edit, delete and add. My concepts are as follows: For the edit i think i can map the edit action to openup editaddress.jsp and set the value to what was selected in the form. Eg. comp:put name:compname value=getvaluefromform / comp:put name:address value=%=invoiceForm.getvaluefromform / something like the above. For the delete and add parts i am completely baffled. Basically i am trying to devise a page which will allow users to edit add remove components in a single select box, eg if i wanted to add my mother's address components, i would be able to do so from the web page. I would appreciate any help! Thank you! From: Don Saxton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: issue Date: Tue, 30 Oct 2001 10:11:41 -0800 Iterate is not the way to go on Options. Here are two examples where value (ids) and labels are separate Lists: html:select name=ActorForm property=permissionID html:options name=ActorForm property=permissionKit.ids labelName=ActorForm labelProperty=permissionKit.labels/ /html:select where each item of a List has an value and label: bean:define id=AQs name=QuestionForm property=questionKit.collection/ html:select name=QuestionForm property=altQuestion html:options collection=AQs property=id labelProperty=label / /html:select/td - Original Message - From: Mahesh Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 5:17 AM Subject: issue hi all Inside the value of the option tag I want to dynamically get the value of the bean element. If embed the same bean tag inside the value then it says Attribute has no value. The following is the code. html:select property=selected size=10 multiple=true logic:iterate id=element name=supplierList scope=request html:option value= bean:write name=element property=supplierUser.company.name/ /html:option /logic:iterate /html:select the alternative i used is html:select property=selected size=10 multiple=true logic:iterate id=element name=supplierList scope=request html:option value=bean:write name=element property=supplierUser.company.name/ bean:write name=element property=supplierUser.company.name/ /html:option /logic:iterate /html:select but its giving error can i help me out thanks in lot in advance mahesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Cookie problem
Hi I making my first Struts application that uses cookies, but it doesn't seems to send the cookies to the client. If I use cookie.setMaxAge(60*60*24*30); to set the max age for 30 days, the cookie is not send to the client, but if I doesn't set the max age at all, the cookie is send allright but not kept on the client as descriped i the J2EE api. I use the response.addCookie(cookie); after initializing the cookie itself. Is there anyone having the same problem and maybe knows a way to solve it?? Regards Peter Norsker
Problem with EAR file
Hi guys, This isn't strictly a struts question but I have been wracking my brains trying to solve it with no luck. I wondered if any of you guys could help I am deploying an ear file under weblogic 6.1 and in part of the code I need to parse an xml file however, I can't figure out how to specify the path to the file. Whatever I try I always get an exception telling me the file cannot be found. The file itself resides within WEB-INF in the applications jar file which itself resides within the ear. I have tried using the action servlets ServletContext.getRealPath(thefilename.xml) but always get null returned. I don't know how to specify the files location. Please help! Simon. For optimum solutions that save you time, visit www.ds-s.com. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Duplication of Template Files Solution
Well, I agree that this is not well documented. I need to find time to do it. But if someone have something, any help is welcome ! Cedric Sandeep Takhar wrote: Here you need to understand the api of tiles. It is quite powerful. I wrote something about this for internal use. I will paste it here: // Read definition from factory, but we can create it here. ComponentDefinition definition = DefinitionsUtil.getDefinition(mapping.findForward(success).getPath(), request, getServlet().getServletContext()); // change the title attribute definition.putAttribute(title, title); DefinitionsUtil.setActionDefinition(request, definition); definition = DefinitionsUtil.getActionDefinition(request); //create a new component context -- required by ActionComponentServlet ComponentContext context = new ComponentContext(definition.getAttributes()); //set it into request ComponentContext.setContext(context,request); } catch (FactoryNotFoundException ex) { request.setAttribute(actionError, Can't get definition factory.); return (mapping.findForward(failure)); } catch (NoSuchDefinitionException ex) { request.setAttribute(actionError, Can't get definition test.layout.test1.); return (mapping.findForward(failure)); } catch (DefinitionsFactoryException ex) { request.setAttribute(actionError, General error ' + ex.getMessage() + '.); return (mapping.findForward(failure)); } catch (Exception e) { cat.debug(perform(): exception when loading definition: + e); } // do not return null, because ActionComponentServlet will not trigger the forwarding which will read the definition from the context return mapping.findForward(success); sorry if it is all messed up after the cut paste. But the idea is that if you know what each layout has a parameters, you can simply replace the parameters dynamically in the perform() method. It is not hard to find out the parameters using the api. A more practical example would be the vertical box layout has a components parameter and you can just add items to this array list. The items can be jsp names or can be definition/component names. Shouldn't really use jsp names here for the same reason why struts doesn't hardcode them. I would reference definition/component names instead and centralize the descriptions in a layout xml definition file (tiles descriptor). Also note that this was just an attempt to get something to work and not necessarily the best approach. - Sandeep --- Darryl Pentz [EMAIL PROTECTED] wrote: Cool. That's interesting. And you mentioned something about being able to manipulate placement of tiles from within the Action class. How is that done? - Darryl -Original Message- From: Sandeep Takhar [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 18:23 To: Struts Users Mailing List Subject: RE: Duplication of Template Files Solution When I tested it (a very simple test) I used the following in the struts-config.xml file: action path=/test/sandeepTestAction type=org.apache.struts.example.tiles.test.SandeepTestAction forward name=success path=doc.mainLayout/ /action Here was the tiles definition for the path attribute above (it can be any definition): definition name=doc.mainLayout path=/layout/classicLayout.jsp put name=title value=Tiles Library Documentation / put name=header value=/common/header.jsp / put name=menu value=doc.menu.main / put name=footer value=/common/footer.jsp / put name=body value=doc.portal.body / /definition I used the tiles-docs.war file for my testing. sorry if my cut paste is all messed up. - Sandeep --- Darryl Pentz [EMAIL PROTECTED] wrote: Sandeep, Can you post an example of a struts-config mapping using Tiles. I tried to use Tiles but couldn't get it to run a page twice. In other words, I had a search function which worked fine the first time with Tiles, but when I changed the search criteria and resubmitted, the Action class ran, but when it forwarded the result to the JSP, the application hung at the insert tag. This is what prompted me to try the inline thing with the original Struts template tags and it worked, without any changes, so I deduced that Tiles is buggy. I'm running Orion on Win2K with a nightly build from about 10 days ago. I didn't know about being able to reference the Tiles definition from the struts-config action
RE: Check session/BO @ the view without using Java
In the struts-example that comes with stuts 1.0 they use a tag for this. I can imagine however that some people find creating their own taglib for such a trivial task a bit too much work. -Original Message- From: Marc L. de Bruin [mailto:[EMAIL PROTECTED]] Sent: donderdag 1 november 2001 21:48 To: [EMAIL PROTECTED] Subject: Check session/BO @ the view without using Java lo, I'm a new Struts user (not new on MVC tho). Before starting my own Struts-based webapp, I thought it would be wise to study some tutorials first. One of these is http://www.jspinsider.com/tutorials/jsp/struts/strutsintro.view . It is the common logon.jsp/homepage.jsp example. However, I don't feel very comfortable with their resulting MVC, because they have Java-code within the homepage.jsp to avoid 'deep linking'. It looks like this: */%@page contentType=text/html%/* *jsp:useBean **id**=*User* scope**=*session* **class**=*com.jspinsider.struts.User* /* */% if (User.isActive() == false){%/* *jsp:forward page**=*'logon.jsp'* /* */%}%/* ***html** *My question: - Is this the proper way to do it? I didn't expect Java-code to appear @ the view; - If not, what is the proper way to accomplish such a result? Tnx, Marc. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts-example.war
After a week of banging my head on my desk I am still no closer to getting any struts example to work. I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example file.nI have tried it on 2 macheines with the same result. I displays the first Jsp but the image on it is missing as it has been given a stupid url (sturtspower.gif;jsessionid=837983). When i try to submit any form in the example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever number. If i click on registration i am redirected to .../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create. I realise i have brought this up before but i thought i should re-itterate the problem before asking any questions. Does anyone know of any prerequisite software i might be missing in order for this to be happening? It happens with any strusts application i try. Thanks for your time Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts-example.war - url correction
Slight correction When i try to submit any form in the example, my browser is redirected to logon.do;jsessionid=454333 or whatever number. Im my haste and frustration I got it wrong, sorry guys :) Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-example.war
Hi Andy, First of all, don't break your head on the desk, use a pillow! Now, to your problem: Did you instal all the prerequisite software, how it is described on http://jakarta.apache.org/struts/installation-1.0.html? Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:09 PM To: [EMAIL PROTECTED] Subject: struts-example.war After a week of banging my head on my desk I am still no closer to getting any struts example to work. I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example file.nI have tried it on 2 macheines with the same result. I displays the first Jsp but the image on it is missing as it has been given a stupid url (sturtspower.gif;jsessionid=837983). When i try to submit any form in the example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever number. If i click on registration i am redirected to .../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create. I realise i have brought this up before but i thought i should re-itterate the problem before asking any questions. Does anyone know of any prerequisite software i might be missing in order for this to be happening? It happens with any strusts application i try. Thanks for your time Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-example.war
Indeed I did. The only thing I dont have is the: JDBC 2.0 Optional Package Classes - Struts supports an optional implementation of javax.sql.DataSource, so it requires the API classes to be compiled. They can be downloaded from http://java.sun.com/products/jdbc/download.html. I want sure if these were compulsory, but i downloaded the class files, i just dont know where to put them, but i dont think this is the problem. Andy -Original Message- From: Marcel Andres [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:34 PM To: struts-user Subject: RE: struts-example.war Hi Andy, First of all, don't break your head on the desk, use a pillow! Now, to your problem: Did you instal all the prerequisite software, how it is described on http://jakarta.apache.org/struts/installation-1.0.html? Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:09 PM To: [EMAIL PROTECTED] Subject: struts-example.war After a week of banging my head on my desk I am still no closer to getting any struts example to work. I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example file.nI have tried it on 2 macheines with the same result. I displays the first Jsp but the image on it is missing as it has been given a stupid url (sturtspower.gif;jsessionid=837983). When i try to submit any form in the example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever number. If i click on registration i am redirected to .../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create. I realise i have brought this up before but i thought i should re-itterate the problem before asking any questions. Does anyone know of any prerequisite software i might be missing in order for this to be happening? It happens with any strusts application i try. Thanks for your time Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Check Box,Radio button (Urgent)
It's hard to say without seeing your code. They should automatically select the current value. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ yogesh borse wrote: Hi All, I'm populating a FormBean from action class so that I can open the form(jsp)in edit mode with all values for updating purpose but the problem is, I'm having checkbox or radio button, It's not showing me selected radio or checked chech box if it is checked or selected before. Can any one please tell me the solution for this problem.It's urgent. Regards Yogesh _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Setting bean property with custom tag
If you want to set a value that is part of an ActionForm, you can use html:hidden. Note that the Struts html:form tag will automatically create a bean if it is not already in the expected scope. An Action will also create a ActionForm bean if it is missing. Otherwise, you need to create it yourself. Also note that the Struts bean tags are not coupled to the ActionForm names in the Struts config. They obtain the type through introspection, not by looking things up in Struts config, and work equally well with any bean. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ Graham King wrote: I'm building my first struts App and would appreciate some help with the following: Currently I have a JSP with the following code: jsp:useBean id=nameForm class=com.myapp.NameForm scope=session/ jsp:setProperty name=nameForm property=surname value=bob / *** SUMMARY: Essentially I want to be able to replace the above two lines with a struts tag where I don't have to give it the class name, because my bean is already defined in struts-config hence struts knows the class. Is there such a thing or is the above the recommended way ? More details follow. *** html:link forward=viewdetailsView details/html:link This is in the struts-config as follows: Bean: form-bean name=nameForm type=com.myapp.NameForm / Global forward: forward name=viewdetails path=/admin/nameadmin.do?action=view / Action: action path=/admin/nameadmin type=com.myapp.NameAdminController name=nameForm scope=session input=/admin/admin_list_names.jsp /action The NameAdminController uses the 'surname' as a key into the db to load the details. This works fine, but it means I have the name of the class in my struts-config and in my JSP. Struts already knows the class for 'nameForm' so I'm hoping for a tag of the form: bean:set name=nameForm property=surname value=bob / Is there such a thing ? There is a bean:define tag but it seems to want my nameForm to be a String. Many thanks, Graham King. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Producing an XML document from a form
I'd like to be able to produce an XML document from my form that wraps the bean's values with the method names. Has anyone done this, or should I do it on my own and submit the extension? Thanks, Matt __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts on iPlanet Webserver 4.1
I'm trying to install and run the struts example on iPlanet Webserver 4.1. I've followed the instructions provided on the jakarta website, however, when I try to access the index.jsp page, I get the following error. Has anybody encountered this problem before or have ideas on the cause of the problem? [02/Nov/2001:08:06:28] info ( 7622): Internal Info: loading servlet /index.jsp [02/Nov/2001:08:06:28] info ( 7622): JSP: JSP1x compiler threw exception org.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts-bean.tld : null at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Exception.java:42) at javax.servlet.ServletException.init(ServletException.java:68) at org.apache.jasper.JasperException.init(JasperException.java:73) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(Compile d Code) at org.apache.jasper.compiler.DelegatingListener.handleDirective(Delegating Listener.java:119) at org.apache.jasper.compiler.Parser$Directive.accept(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Compiled Code) at org.apache.jasper.compiler.Parser.parse(Parser.java:1022) at org.apache.jasper.compiler.Parser.parse(Parser.java:1018) at org.apache.jasper.compiler.Compiler.compile(Compiled Code) at com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.ja va:230) at com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity. java:149) at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner .java:469) [02/Nov/2001:08:06:28] warning ( 7622): Internal error: Failed to get GenericServlet. (uri=/index.jsp,SCRIPT_NAME=/index.jsp) Aaron L. Heiner Software Engineer Great Lakes Technologies Group Direct: 248-204-7171 Email: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:errors
Are you using Frames? That could be the problem. I haven't quite figured out why but try removing any frames (if possible). Todd Fulton wrote: I just can't seem to get the html:errors tag to display the errors passed through via my ActionForm object's validate() method. I have confirmed that the validate() method is working correctly -- as I'm getting a forward to the input page as configured. Simply nothing appears with: body bgcolor=#FF text=#00 html:errors/ Read all the docs, but just can't figure this one out. What am I missing in the struts-config, web.xml or what? Anyone? ToFu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Incompatible object error trying to instantiate an Action
Hello I've been successfully forwarding a form submit to an Action (A0) which uses a parameter in the form to forward to another Action (call it A1) which performs business logic and populates a bean to display in a result page. It all works. I now copy that working Action (A1) class to another business logic Action (A2) and rename it where appropriate. I set up the config file for the new Action A2, and change my input form so it offers another parameter such that Action A0 will forward to A2. When the new Action class (A2 is FindBusinessSimple in this case) is forwarded to, I get this weird error in the log: [Servlet LOG]: action: Error creating Action instance for path '/findBusiness', class name '**.inquire.FindBusinessSimple': java.lang.VerifyError: (class: /inquire/FindBusinessSimple, method: perform signature: (Lorg/apache/struts/action/ActionMapping;Lorg/apache/struts/action/ActionForm;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)Lorg/apache/struts/action/ActionForward;) Incompatible object If I select the other parameter in the form, class A1 still works as before. (I've had to * some of the package names for confidentiality reasons but that doesn't change the problem!) Any ideas please? I'm stumped. I'm running in WebSphere App Server 4.0 and up until now, that hasn't been a problem... Thanks Rob Breeds -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Capturing an outgoing response.
I believe there is also a tag that struts uses that can take the output servlet/jsp and place it in a bean. If you look at the code for this tag you will see how they get the output of a servlet and place it in a bean. This should work for any type of output. Unfortunately I don't have the code with me -- or which tag it is, but I remember it as being an xml/xsl tag that could be used to reference a url and placing the output of that url to a bean. The idea being that this bean could then be used as a starting point for an xsl transform. - Sandeep --- Erik Hatcher [EMAIL PROTECTED] wrote: Are you running a Servlet 2.3 compliant app. server? If so, Filters are what you are looking for. If not, you could add some scriptlet to the end of each JSP (perhaps?) that could post-process the response before it is finalized. Erik - Original Message - From: Brandon Goodin [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 9:34 PM Subject: Capturing an outgoing response. Is it possible to capture the html page that is generated by a jsp page before it is sent to the client who requested it? Brandon Goodin Phase Communications P (406)862-2245 F (406)862-0354 http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:errors
Have you defined the tag library in the jsp? --- Todd Fulton [EMAIL PROTECTED] wrote: I just can't seem to get the html:errors tag to display the errors passed through via my ActionForm object's validate() method. I have confirmed that the validate() method is working correctly -- as I'm getting a forward to the input page as configured. Simply nothing appears with: body bgcolor=#FF text=#00 html:errors/ Read all the docs, but just can't figure this one out. What am I missing in the struts-config, web.xml or what? Anyone? ToFu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionForms extending ActionForms
I've been wondering about the best way to go about using struts in this situation I have two types of forms (for different kind of web registrations) which are very similar, but not quite identical. The associated RegistrationAction will perform slightly different tasks depending on which form it is given. So I could go for two actions, one for each of the forms. That'll work. But I was wondering if instead I could do have a base RegistrationForm (containing lots of common stuff), and then extend it to give me say UserRegistrationForm and StaffRegistrationForm. A single action would accept a form of type RegistrationForm and do whatever it needed to do. (For the sake of argument, assume that the JSP form can be shared, so validation is OK). So I tried this, by having a startRegistrationAction that created an instance of either StaffRegistrationForm or UserRegistrationForm , casting it to be of type RegistrationForm, and put it in session scope under the name registrationForm before forwarding on to the JSP form for the end user to complete. When the form is submitted to the RegistrationAction I get a null form passed. The config I have is form-bean name=registrationForm type=RegistrationForm / !-- Register a new user -- action path=/register name=registrationForm type=RegistrationAction unknown=false input=/register.jsp validate=true /action The form tag looks like: html:form action=/register scope=session and of course if I change the form-bean type to be StaffRegistrationForm or UserRegistrationForm it will work for one of those specific instances. Am I right in thinking that because my form is of type (say) StaffRegistraionForm (which happens to extend RegistrationForm), struts won't be able to find a RegistrationForm type object in the session? Which is why my Action sees a null form. So my questions are really (1) is this a sane thing to be trying? (2) is there a way to do this? Many thanks Richard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
I can't find taglib logic:empty nor logic:notEmpty
Hi all, On the http://jakarta.apache.org/struts/struts-logic.html; site page, two very interresting tags are presented : 'empty' and 'notEmpty'. I have downloaded struts v1.0, but I just can't find them neither the declaration in the struts-logic.tld file, nor the corresponding .class files in struts.jar. Where are they ? I absolutely need them ;-) Thanks in advance, Arnaud Chiaberge -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ActionForms extending ActionForms
The problem is that html:form is looking for the ActionForm associated with its ActionMapping. Having one Action handle more than one ActionForm isn't a problem. But getting html:form to handle more than ActionForm is problematic. If the *properties* for each registration type are the same, then you may not need two different ActionForm beans at all. The Action just needs a way to tell the registeration types apart, perhaps by using a hidden property. This is admittedly not a very OOP approach, but HTTP is not a OO protocol, so we have to make allowances on this tier ;-) Interally, you might want to have different beans for the different user types; these should not be ActionForm beans, but some other bean representing your internal model, and not bound to HTTP. You should also omit the scope property from the html:form, since, in this case, it will get all that out of the Struts config. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ Richard Dallaway wrote: I've been wondering about the best way to go about using struts in this situation I have two types of forms (for different kind of web registrations) which are very similar, but not quite identical. The associated RegistrationAction will perform slightly different tasks depending on which form it is given. So I could go for two actions, one for each of the forms. That'll work. But I was wondering if instead I could do have a base RegistrationForm (containing lots of common stuff), and then extend it to give me say UserRegistrationForm and StaffRegistrationForm. A single action would accept a form of type RegistrationForm and do whatever it needed to do. (For the sake of argument, assume that the JSP form can be shared, so validation is OK). So I tried this, by having a startRegistrationAction that created an instance of either StaffRegistrationForm or UserRegistrationForm , casting it to be of type RegistrationForm, and put it in session scope under the name registrationForm before forwarding on to the JSP form for the end user to complete. When the form is submitted to the RegistrationAction I get a null form passed. The config I have is form-bean name=registrationForm type=RegistrationForm / !-- Register a new user -- action path=/register name=registrationForm type=RegistrationAction unknown=false input=/register.jsp validate=true /action The form tag looks like: html:form action=/register scope=session and of course if I change the form-bean type to be StaffRegistrationForm or UserRegistrationForm it will work for one of those specific instances. Am I right in thinking that because my form is of type (say) StaffRegistraionForm (which happens to extend RegistrationForm), struts won't be able to find a RegistrationForm type object in the session? Which is why my Action sees a null form. So my questions are really (1) is this a sane thing to be trying? (2) is there a way to do this? Many thanks Richard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: action forward tag...
If you are not using framesets - I would suggest looking at using tiles or templates. These allow you to include header,footer,menu,body type layouts within the jsp -- here you would just reference the jsp file. sandeep --- John Nikolai [EMAIL PROTECTED] wrote: Hello all! I have an action-mapping with one action element. This action element defines an input attribute used for when an error occurs in the form. I was wondering if it is possible for the action elements forward element can do the same thing as the input attribute? Let me explain: We have a navigation system in place and the navigation is dependent on where the user is located in the web directory hierarchy. http://localhost/dynamic/form.htm - Contains HTML:form and form elements - The navigation is properly created, highlighting form in the left hand navigation When a user submits the form and an error occurs the URL changes to the following: http://localhost/dynamic/formHandler.do params The errors are reported and the form.HTML file is redisplayed. The important thing here is that the navigation remains the same. That is to say that form is still highlighted in the left hand navigation... Now when the form is successfully filled out I want to display a success page BUT keep the left hand navigation intact with form highlighted. I do not want to redisplay the form again, rather just show some simple text saying the form was successfully submitted. I have tried messing around with the forward element, setting the redirect attribute to true/false, as well as changing the path too. - I set the path to /dynamic/form.htm but then the form is redisplayed. - I set the path to /dynamic/success.htm but then the navigation will not display properly. - I set the redirect to false but that did not work either... Is it possible to have the success page be rendered like the error page, minus the form fields? Thanks for your help, - John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ClassCastException when moving extended Action and ActionForm classes in the classpath
Hi folks! I am from Uruguay, South America, so sorry my English :) I am evaluating the Struts framework as an MVC aproach in the web tier in our company product (after attending the entusiastic presentation in the JavaOne conference!). The framework convince us pretty much, but we are very concerned with a situation that we hope is due to our little experience with Struts. PROBLEM: If we move our extended Action or ActionForm classes from WEB-INF/classes to somewhere else in the servlet container classpath (we're using ServletExec 3.0c), an error occurs (ClassCastException) wich prevents the application to continue. DETAIL: I don't want to include further details (such as servlet logs) unless you think it's necesary, but tell you that the error takes the form of a java.lang.ClassCastException in the ActionServlet, when it attemps to cast a new extended Action class (instantiated via reflection) to its superclass Action. We're pretty confussed because the class is found and instantiated when moved, but generates a cast error, even when the log tell us that its superclass is the one Struts is casting to: org.apache.struts.action.Action. The same occurs with ActionForm. The web browser shows a processed error message: The following error occurred: 500 - No action instance for path /logon could be created. Any help will be very appreciated, we hope we're doing some trivial mistake or something else and this is not a limitation on the framework. We think that from a JVM standpoint this make no sense, but... Thanks in advance, Leonardo Mena -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-example.war
Andy, if everything is configured well, I can't think of what is wrong. As much as I understand, you did reiceve the logon form. after signing on you are redirected back to the logon form. Right? As much as I remember the example (it is quiet a long time ago, I used it), it will redirect you to the logon form, as long as you did not logon to the application. Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:31 PM To: [EMAIL PROTECTED] Subject: RE: struts-example.war Indeed I did. The only thing I dont have is the: JDBC 2.0 Optional Package Classes - Struts supports an optional implementation of javax.sql.DataSource, so it requires the API classes to be compiled. They can be downloaded from http://java.sun.com/products/jdbc/download.html. I want sure if these were compulsory, but i downloaded the class files, i just dont know where to put them, but i dont think this is the problem. Andy -Original Message- From: Marcel Andres [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:34 PM To: struts-user Subject: RE: struts-example.war Hi Andy, First of all, don't break your head on the desk, use a pillow! Now, to your problem: Did you instal all the prerequisite software, how it is described on http://jakarta.apache.org/struts/installation-1.0.html? Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:09 PM To: [EMAIL PROTECTED] Subject: struts-example.war After a week of banging my head on my desk I am still no closer to getting any struts example to work. I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example file.nI have tried it on 2 macheines with the same result. I displays the first Jsp but the image on it is missing as it has been given a stupid url (sturtspower.gif;jsessionid=837983). When i try to submit any form in the example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever number. If i click on registration i am redirected to ../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create. I realise i have brought this up before but i thought i should re-itterate the problem before asking any questions. Does anyone know of any prerequisite software i might be missing in order for this to be happening? It happens with any strusts application i try. Thanks for your time Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ClassCastException when moving extended Action and ActionForm classesin the classpath
That's the error message I get in the browser for my current problem too (see earlier post)! I don't think I see a specific ClassCastException though, only 'incompatible object'. You're right - it makes no sense Rob Breeds Leonardo MenaTo: [EMAIL PROTECTED] lmena@swordfi cc: sh.com.uy Subject: ClassCastException when moving extended Action and ActionForm classes in the classpath 02/11/2001 15:51 Please respond to Struts Users Mailing List The web browser shows a processed error message: The following error occurred: 500 - No action instance for path /logon could be created. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbe - problem with Struts-Config.xml
Hello, I am relatively new to Struts and am encountering a problem with the struts-config.xml file. I have set up a global-forwards like below: forward name=menu path=/do/Menu/ Then I set up an action like below: action path=/Menu forward=/WEB-INF/pages/menu.jsp /action Then I wrote the following index.jsp page: %@ page language=java % %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=menu/ Now when I hit index.jsp, I receive a blank page from Tomcat 4.0. If I review the Tomcat logs, I see that it encountered a 404, but why? I thought it should have found the action /Menu and forward it to the menu.jsp. I am sure this is something simple, but I can't seem to see what wrong with the above. This is running under Struts 1.0 and Tomcat 4.0. Any assistance is greatly appreciated. Regards, Todd G. Nist [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Force login...
My appologies for asking something that has probablly been asked and answered before, however, I wasn't able to find the answer in my searches. How do you force someone to login before being allowed to access your application. It doesn't seem right to code this in each action class. Is it possible to search the archives for this list like the SERVLET and the JSP lists? Thanks Scott. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Digester content with elements
Hmmm Is this too easy or too hard of a question to be answered? Bob - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:16 PM Subject: Digester content with elements I was wondering how to digest content that contains additional elements. For example, I have two tags text and date. I want to parse the following: textI want to remember this date, date/, forever!/text Ultimately I want to end up with three objects as follows (I hope you get what I am inferring below): MyText(I want to remember this date, ); MyDate(); MyText(, forever!); Granted, it would be easy enough to do: textI want to remember this date, /textdate/text, forever!/text But, I prefer to do the first way. Thank You, Bob Byron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts-example.war
I'd suggest using Tomcat 4.0. I've installed the struts-example.war on it without any problems at all - and no setup. Matt --- Marcel Andres [EMAIL PROTECTED] wrote: Andy, if everything is configured well, I can't think of what is wrong. As much as I understand, you did reiceve the logon form. after signing on you are redirected back to the logon form. Right? As much as I remember the example (it is quiet a long time ago, I used it), it will redirect you to the logon form, as long as you did not logon to the application. Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:31 PM To: [EMAIL PROTECTED] Subject: RE: struts-example.war Indeed I did. The only thing I dont have is the: JDBC 2.0 Optional Package Classes - Struts supports an optional implementation of javax.sql.DataSource, so it requires the API classes to be compiled. They can be downloaded from http://java.sun.com/products/jdbc/download.html. I want sure if these were compulsory, but i downloaded the class files, i just dont know where to put them, but i dont think this is the problem. Andy -Original Message- From: Marcel Andres [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:34 PM To: struts-user Subject: RE: struts-example.war Hi Andy, First of all, don't break your head on the desk, use a pillow! Now, to your problem: Did you instal all the prerequisite software, how it is described on http://jakarta.apache.org/struts/installation-1.0.html? Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:09 PM To: [EMAIL PROTECTED] Subject: struts-example.war After a week of banging my head on my desk I am still no closer to getting any struts example to work. I am using tomcat verdsion 3.3-m3 and i have unpacked the struts-example file.nI have tried it on 2 macheines with the same result. I displays the first Jsp but the image on it is missing as it has been given a stupid url (sturtspower.gif;jsessionid=837983). When i try to submit any form in the example, my browser is redirected to logon.jsp;jsessionid=454333 or whatever number. If i click on registration i am redirected to ../struts-example/editRegistration.do;jsessionid=nfrwce4s01?action=Create. I realise i have brought this up before but i thought i should re-itterate the problem before asking any questions. Does anyone know of any prerequisite software i might be missing in order for this to be happening? It happens with any strusts application i try. Thanks for your time Andy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Digester content with elements
Could you not use a DOM parser, e.g. xerces, to do this? Regards, Scott - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 02, 2001 3:46 PM Subject: Re: Digester content with elements Hmmm Is this too easy or too hard of a question to be answered? Bob - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:16 PM Subject: Digester content with elements I was wondering how to digest content that contains additional elements. For example, I have two tags text and date. I want to parse the following: textI want to remember this date, date/, forever!/text Ultimately I want to end up with three objects as follows (I hope you get what I am inferring below): MyText(I want to remember this date, ); MyDate(); MyText(, forever!); Granted, it would be easy enough to do: textI want to remember this date, /textdate/text, forever!/text But, I prefer to do the first way. Thank You, Bob Byron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Force login...
Scott, Check out the Struts sample app, it has two features that could solve your problem. Firstly, it has a login form and action. The sample app checks against an XML file for a list of users, but you could code the action to access a business object that verifies the username and password. If the lookup fails, then return them to the login page with an error. It also has a custom tag, checklogin ?, to ensure that the user has logged in before doing anything. Just place this tag in your JSPs and if the user isn't logged in yet, it will return them to the login page. HTH, Princeton -Original Message- From: Scott Watson [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 8:45 AM To: Struts Users Mailing List Subject: Force login... My appologies for asking something that has probablly been asked and answered before, however, I wasn't able to find the answer in my searches. How do you force someone to login before being allowed to access your application. It doesn't seem right to code this in each action class. Is it possible to search the archives for this list like the SERVLET and the JSP lists? Thanks Scott. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Digester content with elements
I don't understand how this is any different than the stuff that comes with the documentation. -sandeep --- Scott Atwell [EMAIL PROTECTED] wrote: Could you not use a DOM parser, e.g. xerces, to do this? Regards, Scott - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 02, 2001 3:46 PM Subject: Re: Digester content with elements Hmmm Is this too easy or too hard of a question to be answered? Bob - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:16 PM Subject: Digester content with elements I was wondering how to digest content that contains additional elements. For example, I have two tags text and date. I want to parse the following: textI want to remember this date, date/, forever!/text Ultimately I want to end up with three objects as follows (I hope you get what I am inferring below): MyText(I want to remember this date, ); MyDate(); MyText(, forever!); Granted, it would be easy enough to do: textI want to remember this date, /textdate/text, forever!/text But, I prefer to do the first way. Thank You, Bob Byron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Force login...
In my opinion, the best method to use is container-managed authentication. You can set this up via your web.xml file and protect your struts action class (*.do). http://www.onjava.com/pub/a/onjava/2001/08/06/webform.html Matt --- Princeton Lau [EMAIL PROTECTED] wrote: Scott, Check out the Struts sample app, it has two features that could solve your problem. Firstly, it has a login form and action. The sample app checks against an XML file for a list of users, but you could code the action to access a business object that verifies the username and password. If the lookup fails, then return them to the login page with an error. It also has a custom tag, checklogin ?, to ensure that the user has logged in before doing anything. Just place this tag in your JSPs and if the user isn't logged in yet, it will return them to the login page. HTH, Princeton -Original Message- From: Scott Watson [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 8:45 AM To: Struts Users Mailing List Subject: Force login... My appologies for asking something that has probablly been asked and answered before, however, I wasn't able to find the answer in my searches. How do you force someone to login before being allowed to access your application. It doesn't seem right to code this in each action class. Is it possible to search the archives for this list like the SERVLET and the JSP lists? Thanks Scott. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Force login...
a common method is to insert a custom tag on each page and a) checks the session, say, for a suitable attribute and value b) presents a login / redirects to login if no such value is found On Friday 02 Nov 2001 3:44 pm, you wrote: My appologies for asking something that has probablly been asked and answered before, however, I wasn't able to find the answer in my searches. How do you force someone to login before being allowed to access your application. It doesn't seem right to code this in each action class. Is it possible to search the archives for this list like the SERVLET and the JSP lists? Thanks Scott. -- Martin Samm MSc, Bsc Hons http://www.readingroom.com Winner : Best Business to Business Website 2000-01 (Internet Business Awards sponsored by ntl) Reading Room Ltd. 77 Dean Street Soho London W1D 3SH UK Tel: +44 (0) 20 7734 9499 Fax: +44 (0) 20 7739 4190 The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Force login...
To do it properly you have to: (1) Write a abstract base class, say `SecureActionBase' that provide security methods checkLogon(). Write a default implementation of `checkLogin' that subclasser can override. If no user is not longer return an action mapping forward that redirects to the login. Otherwise let the user continue. (2) Borrow the `CheckLoginTag' from the Struts example and use it as it is, or modify it. You put the checklogin tag at the beginning of your JSPs. (3) Extend the Struts ActionServlet with a custom class for your project that will enable you to look for instances of `SecureActionBase' and then call the security methods. Like so: protected ActionForward processActionPerform(Action action, ActionMapping mapping, ActionForm formInstance, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ( action instanceof SecureBaseAction ) { SecureBaseAction baseAction = (SecureBaseAction)action; ... if ( baseAction.isSecureAction() ) { // This action needs security ActionForward fwd = baseAction.checkUserSecurityAccess( context, mapping, request ); if ( fwd != null ) { // Redirect to login screen or other warning page return fwd; } // Otherwise we are authenticated, continue } ... // pre-process checking U desire ActionForward forward = action.perform(mapping, formInstance, request, response); ... // post -process checking U desire return forward; } -- Peter Pilgrim ++44 (0)207-545-9923 //_\\ Mathematics is essentially the study of islands of === disparate subjects in a sea of ignorance. || ! || Andrew Wiles _ Message History From: Scott Watson [EMAIL PROTECTED] on 02/11/2001 10:44 EST My appologies for asking something that has probablly been asked and answered before, however, I wasn't able to find the answer in my searches. How do you force someone to login before being allowed to access your application. It doesn't seem right to code this in each action class. Is it possible to search the archives for this list like the SERVLET and the JSP lists? Thanks Scott. -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Digester content with elements
The examples that I have seen only show neat cases where there is no intermixing of text and content.. Case 1: textI want to remember this date,/textdate/text, forever!/text I want to see an example of how to parse the following: Case 2: textI want to remember this date,date/, forever!/text In Case 1, the text is all neatly contained in tags. In Case 2 however, the text mixes with the subtags. The documentation did not show this kind of example. Bob - Original Message - From: Sandeep Takhar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 02, 2001 9:52 AM Subject: Re: Digester content with elements I don't understand how this is any different than the stuff that comes with the documentation. -sandeep --- Scott Atwell [EMAIL PROTECTED] wrote: Could you not use a DOM parser, e.g. xerces, to do this? Regards, Scott - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 02, 2001 3:46 PM Subject: Re: Digester content with elements Hmmm Is this too easy or too hard of a question to be answered? Bob - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:16 PM Subject: Digester content with elements I was wondering how to digest content that contains additional elements. For example, I have two tags text and date. I want to parse the following: textI want to remember this date, date/, forever!/text Ultimately I want to end up with three objects as follows (I hope you get what I am inferring below): MyText(I want to remember this date, ); MyDate(); MyText(, forever!); Granted, it would be easy enough to do: textI want to remember this date, /textdate/text, forever!/text But, I prefer to do the first way. Thank You, Bob Byron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Digester content with elements
Actually, I can use SAX to do this, but I have been hearing good things about the digester and wanted to see if I could utilize any of its advantages. Would you recommend I use SAX instead? Bob - Original Message - From: Scott Atwell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 02, 2001 9:51 AM Subject: Re: Digester content with elements Could you not use a DOM parser, e.g. xerces, to do this? Regards, Scott - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 02, 2001 3:46 PM Subject: Re: Digester content with elements Hmmm Is this too easy or too hard of a question to be answered? Bob - Original Message - From: Bob Byron [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 3:16 PM Subject: Digester content with elements I was wondering how to digest content that contains additional elements. For example, I have two tags text and date. I want to parse the following: textI want to remember this date, date/, forever!/text Ultimately I want to end up with three objects as follows (I hope you get what I am inferring below): MyText(I want to remember this date, ); MyDate(); MyText(, forever!); Granted, it would be easy enough to do: textI want to remember this date, /textdate/text, forever!/text But, I prefer to do the first way. Thank You, Bob Byron -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Force login...
Hello All, by using a JSP tag to check if the user is logged, aren't you mixing somehow logic and presentation? In theory, you should provide a way that is independent of the fact that you store your user in the session (though Struts does it that way). Furthermore, you may need to not only check if the user is logged, but also if he/she has specific permissions/roles... My suggestion would be similar to Peter's: - subclass the Action class with your own with a checkLogon() method that throws an exception if the user is not logged (the extension would be defining a checkAuthorization(auth)) - at the beginning at the main command method of each _Action_ that requires the user to be logged id, do something like public ActionForward perform(...) { try { checkLogon(); // Add here business logic if user is logged in ... } catch (UserNotLoggedException e) { // React to user not logged (or not authorized) // Probably forward to login page... } } What do you think? Andrej -Original Message- From: Peter Pilgrim [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 11:11 AM To: Struts Users Mailing List Subject: Re: Force login... To do it properly you have to: (1) Write a abstract base class, say `SecureActionBase' that provide security methods checkLogon(). Write a default implementation of `checkLogin' that subclasser can override. If no user is not longer return an action mapping forward that redirects to the login. Otherwise let the user continue. (2) Borrow the `CheckLoginTag' from the Struts example and use it as it is, or modify it. You put the checklogin tag at the beginning of your JSPs. (3) Extend the Struts ActionServlet with a custom class for your project that will enable you to look for instances of `SecureActionBase' and then call the security methods. Like so: protected ActionForward processActionPerform(Action action, ActionMapping mapping, ActionForm formInstance, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ( action instanceof SecureBaseAction ) { SecureBaseAction baseAction = (SecureBaseAction)action; ... if ( baseAction.isSecureAction() ) { // This action needs security ActionForward fwd = baseAction.checkUserSecurityAccess( context, mapping, request ); if ( fwd != null ) { // Redirect to login screen or other warning page return fwd; } // Otherwise we are authenticated, continue } ... // pre-process checking U desire ActionForward forward = action.perform(mapping, formInstance, request, response); ... // post -process checking U desire return forward; } -- Peter Pilgrim ++44 (0)207-545-9923 //_\\ Mathematics is essentially the study of islands of === disparate subjects in a sea of ignorance. || ! || Andrew Wiles _ Message History From: Scott Watson [EMAIL PROTECTED] on 02/11/2001 10:44 EST My appologies for asking something that has probablly been asked and answered before, however, I wasn't able to find the answer in my searches. How do you force someone to login before being allowed to access your application. It doesn't seem right to code this in each action class. Is it possible to search the archives for this list like the SERVLET and the JSP lists? Thanks Scott. -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Iterate tag : Object properties not updated to form bean from JSP
Hi again .. I am quite new to struts .. hope someone will take time to go through my query which I am reposting ( if not I am gonna come back with a more catchy subject line !! ;-) ) Thankx in advance (again) Rajoy HI all I've encountered a situation as follows 1. I have a 'UserInfoContainer' form bean which contains a Vector of individual 'UserInfo' objects. 2. Each UserInfo object is iterated through using the 'iterate' tag in the JSP. 3. Some 'UserInfo' data (say 'NickName' ) is displayed in a text box so that the user can modify it. Every thing is going fine till now. The trouble is once I submit the form and retrieve the 'NickName' from each UserInfo object in the UserInfoContainer object passed to the perform method , it doesn't reflect the modifications user entered in the text box. Basicaly the data entered by the user isn't set back to each UserInfo object by the Action servlet. I've read in the struts docs that the iterate tag copies each object in the collection ( in my case the userinfo veactor) to a page scope bean referenced by the value of 'index' attribute. So I guess the values in the text boxes inside the iterate tag never gets set to the original objects in the FormBean. A. Is my understanding correct ? B. Am I doing somethimng wrong here ? C. Is there any way to tackle this problem? I am at present using lots of request.getParameter methods to get the values edited by the user. But it really does increaase dependency between the JSP pages and the action classes. SO I wonder whether that is the correct way to go even ... FYI : 'UserInfoContainer' is a session scope formbean. Thankx in advance Rajoy - Original Message - From: Rajoy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 03, 2001 7:58 PM Subject: Newbie: Iterate tag : Object properties not updated to form bean from JSP HI all I've encountered a situation as follows 1. I have a 'UserInfoContainer' form bean which contains a Vector of individual 'UserInfo' objects. 2. Each UserInfo object is iterated through using the 'iterate' tag in the JSP. 3. Some 'UserInfo' data (say 'NickName' ) is displayed in a text box so that the user can modify it. Every thing is going fine till now. The trouble is when I retrieve the 'NickName' from each UserInfo object in the UserInfoContainer object passed to the perform method , it doesn't reflect the modifications user entered in the text box. Basicaly the data entered by the user isn't set back to each UserInfo object. I've read in the struts docs that the iterate tag copies each object in the collection ( in my case the userinfo veactor) to a page scope bean referenced by the value of 'index' attribute. So I guess the values in the text boxes inside the iterate tag never gets set to the original objects in the FormBean. A. Is my understanding correct ? B. Am I doing somethimng wrong here ? C. Is there any way to tackle this problem? I am at present using lots of request.getParameter methods to get the values edited by the user. But it really does increaase dependency between the JSP pages and the action classes. SO I wonder whether that is the correct way to go even ... FYI : 'UserInfoContainer' is a session scope formbean. Thankx in advance Rajoy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Check Box,Radio button (Urgent)
When you call a page for the first time and you want some values in checkboxes or radiobuttons preselected, just initialise the form bean with the values you want to preselect. Jens Ted Husted wrote: It's hard to say without seeing your code. They should automatically select the current value. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ yogesh borse wrote: Hi All, I'm populating a FormBean from action class so that I can open the form(jsp)in edit mode with all values for updating purpose but the problem is, I'm having checkbox or radio button, It's not showing me selected radio or checked chech box if it is checked or selected before. Can any one please tell me the solution for this problem.It's urgent. Regards Yogesh _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
MessageResources bean - application scope
Can anyone interpret this for me? I'm really at a roadblock here: Re the html:errors tag . . . In order to use this tag successfully, you must have defined an application scope MessageResources bean under the default attribute name, with at least the following message keys: errors.header - Text that will be rendered before the error messages list. Typically, this message text will end with ul to start the error messages list. . . . Where do I define this? Any examples? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Newbe - problem with Struts-Config.xml
Your JSPs should not be in your WEB-INF folder ... try moving it up. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 10:40 AM To: [EMAIL PROTECTED] Subject: Newbe - problem with Struts-Config.xml Hello, I am relatively new to Struts and am encountering a problem with the struts-config.xml file. I have set up a global-forwards like below: forward name=menu path=/do/Menu/ Then I set up an action like below: action path=/Menu forward=/WEB-INF/pages/menu.jsp /action Then I wrote the following index.jsp page: %@ page language=java % %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=menu/ Now when I hit index.jsp, I receive a blank page from Tomcat 4.0. If I review the Tomcat logs, I see that it encountered a 404, but why? I thought it should have found the action /Menu and forward it to the menu.jsp. I am sure this is something simple, but I can't seem to see what wrong with the above. This is running under Struts 1.0 and Tomcat 4.0. Any assistance is greatly appreciated. Regards, Todd G. Nist [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: MessageResources bean - application scope
Take a look at the section on internationalization in the User's Guide, http://jakarta.apache.org/struts/userGuide/building_view.html#i18n -Original Message- From: Todd Fulton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 10:38 AM To: Struts Users Mailing List (E-mail) Subject: MessageResources bean - application scope Can anyone interpret this for me? I'm really at a roadblock here: Re the html:errors tag . . . In order to use this tag successfully, you must have defined an application scope MessageResources bean under the default attribute name, with at least the following message keys: errors.header - Text that will be rendered before the error messages list. Typically, this message text will end with ul to start the error messages list. . . . Where do I define this? Any examples? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: MessageResources bean - application scope
You can also look at http://www.onjava.com/lpt/a//onjava/2001/10/31/struts2.html The fifth and sixth page to be precise. It talks about exactly what you are looking for. HTH Scott. -Original Message- From: Justin Piper [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 11:42 AM To: 'Struts Users Mailing List' Subject: RE: MessageResources bean - application scope Take a look at the section on internationalization in the User's Guide, http://jakarta.apache.org/struts/userGuide/building_view.html#i18n -Original Message- From: Todd Fulton [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 10:38 AM To: Struts Users Mailing List (E-mail) Subject: MessageResources bean - application scope Can anyone interpret this for me? I'm really at a roadblock here: Re the html:errors tag . . . In order to use this tag successfully, you must have defined an application scope MessageResources bean under the default attribute name, with at least the following message keys: errors.header - Text that will be rendered before the error messages list. Typically, this message text will end with ul to start the error messages list. . . . Where do I define this? Any examples? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles/Orion(Oracle)
It is now ok : Tiles run with Orion in both mode (development and production). Otavio, can you tell us if it also works on Oracle's flavor of Orion (I thing yes, but want to be sure). I have try it with Orion 1.5.3. Cedric Otavio C. Decio wrote: Hi all, Did anybody successfully installed an ran Tiles on Oracle's flavor of Orion? We have a new project starting, I wanted to use Tiles but so far I couldn't solve a problem with the submenu. If someone got it running, would you please tell me which platform and version are you using. Thanks!! Otavio -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Newbe - problem with Struts-Config.xml
what if you want to use the JSP in WEB-INF technique so you can rely on container authentication to protect your JSPs from prying eyes? -- Terry Drozdowski Staff, Technology Services SIM Technology - Phoenix Charles Schwab Co. (602)355-8843 Warning: All e-mail sent to this address will be received by the Charles Schwab Corporate e-mail system and is subject to archival and review by someone other than the recipient. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 9:41 AM To: 'Struts Users Mailing List' Subject: RE: Newbe - problem with Struts-Config.xml Your JSPs should not be in your WEB-INF folder ... try moving it up. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 10:40 AM To: [EMAIL PROTECTED] Subject: Newbe - problem with Struts-Config.xml Hello, I am relatively new to Struts and am encountering a problem with the struts-config.xml file. I have set up a global-forwards like below: forward name=menu path=/do/Menu/ Then I set up an action like below: action path=/Menu forward=/WEB-INF/pages/menu.jsp /action Then I wrote the following index.jsp page: %@ page language=java % %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=menu/ Now when I hit index.jsp, I receive a blank page from Tomcat 4.0. If I review the Tomcat logs, I see that it encountered a 404, but why? I thought it should have found the action /Menu and forward it to the menu.jsp. I am sure this is something simple, but I can't seem to see what wrong with the above. This is running under Struts 1.0 and Tomcat 4.0. Any assistance is greatly appreciated. Regards, Todd G. Nist [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Setter method doesn't work with indexed tag
Hi again, Took another look at your code - wondering why there are no setter/getters in your Parameter.java?!! Did I miss something? You obviously need these for the set to work. You still haven't posted your jsp page to show what you are doing there, but if you have something like this: logic:iterate id=parameter name=ParametersForm property=parameterList html:text name=parameter property=value indexed=true onchange=validate(this, true)/ /logic:iterate this will be translated by struts into a call ParametersForm.getParameter(0).setValue(value). So for *each* parameter attribute you use on the page, you must have an appropriate getter/setter. Cheers, Dave L. Yeung [EMAIL PROTECTED] on 11/01/2001 09:52:46 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Setter method doesn't work with indexed tag I use log4j for debugging purposes. My PO number and other po header info do contain edited values, except for the po details (a vector of param) which turned out null even though there are values retrieved from the database. I've been debugging this for about 2 days. I'm currently using request.getParameter() as a temporary workaround. Regards, L. yeung --- [EMAIL PROTECTED] wrote: Hi. You didn't attach your jsp! How far have you got debugging it? What shows up in the log? What about in the request? Dave L. Yeung [EMAIL PROTECTED] on 10/30/2001 09:40:42 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Setter method doesn't work with indexed tag I jsut attached my code below. Regards, L. Yeung --- [EMAIL PROTECTED] wrote: Hi, Can you maybe post some more code? It should work fine. Usually it turns out to be a tiny mistake somewhere. Have you debugged it at all? What is getting added to the request? Are you using your own code, or the example I posted? Cheers, Dave L. Yeung [EMAIL PROTECTED] on 10/29/2001 10:55:58 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Setter method doesn't work with indexed tag Still not working. Got any workaround for this? Regards, L. Yeung --- L. Yeung [EMAIL PROTECTED] wrote: David, Yea I changed my struts-config from request to session . Still didn't work. Jason, I'm designing a web app for next january production release. --- Jason Chaffee [EMAIL PROTECTED] wrote: Actually, I just filed a bug on this agains BeanUtils. There is a bug when the indexed propery you are trying to set is of the type Array. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 10:53 AM To: Struts Users Mailing List Subject: Re: Setter method doesn't work with indexed tag Hi. Have you checked what scope your form bean is in? Try changing it to session and see if that helps... Dave L. Yeung [EMAIL PROTECTED] on 10/29/2001 05:48:38 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Setter method doesn't work with indexed tag I've downloaded the sample from the achive and read the posts on setter methods and indexed tag but find it vague. I followed the sample and the getter methods works fine except the setter methods. I am expecting the vector to contain values from the form but I got null values instead. public final class EditPOForm extends ActionForm { .. public void setParameterList(Vector col) { this.parameterList = col; } public Vector getParameterList() { return parameterList; } public Parameter getParameter(int index) { return (Parameter)parameterList.elementAt(index); } } Thanks in advance. L. Yeung __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] === message truncated === ATTACHMENT part 2 application/zip name=param.zip -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands,
Re: html:errors
And have you done a saveErrors(request, errors); in your action (or wherever the validation is occuring)? -- Posted via jApache.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to use the radio tag inside logic:iterate tag
I have a collection called workrelationships .I have to use radio buttons to select the preferred workrelationship. here is the code for iteration logic:iterate name=WorkRelationshipsForm property=WorkRelationships id=worker/ tr td bean:write name=worker property=faculty/ bean:write name=worker property=institute/ /td td/td td font face=Arial,Helvetica,Sans Serif size=3 bbean:message key=firstlogin.workrelationship.header//b bean:message key=firstlogin.workrelationship.text1/brbr bean:message key=firstlogin.workrelationship.text2/brbr brbr /font /td /tr /logic:iterate I can't understand the use of 'Indexed' attribute in radio tag? Could any one plz help me? thanks Alvin alvin kuttikkat antony Internet und Virtuelle Hochshule Directory Universität München Leopoldstr .3 80802 München Germany Office Tel + 49.89.21025979 Office Fax + 49.89.21025980 BEGIN:VCARD VERSION:2.1 X-GWTYPE:USER FN:Alvin Kutttikkat Antony EMAIL;WORK;PREF;NGW:aantony.RFE-MAIN.RFE N:Antony;Alvin Kutttikkat X-GWUSERID:aantony END:VCARD -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Common User Interface for JSP's
Can anyone enlighten me on the Pros and Cons of using the Struts template taglib as opposed to say CSS or any other common interface rendering utility? Thanks in advance. JBR
RE: html:errors
Yes, I have in my Action subclass. But, I'm doing the validation in the ActionForm subclass -- via the validate() method which returns the populated ActionErrors object (i checked that it is indeed populated) to the ActionServlet. -Original Message- From: Tom Servo [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 7:09 AM To: [EMAIL PROTECTED] Subject: Re: html:errors And have you done a saveErrors(request, errors); in your action (or wherever the validation is occuring)? -- Posted via jApache.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors
I have the following: %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % -Original Message- From: Sandeep Takhar [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 6:20 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: html:errors Have you defined the tag library in the jsp? --- Todd Fulton [EMAIL PROTECTED] wrote: I just can't seem to get the html:errors tag to display the errors passed through via my ActionForm object's validate() method. I have confirmed that the validate() method is working correctly -- as I'm getting a forward to the input page as configured. Simply nothing appears with: body bgcolor=#FF text=#00 html:errors/ Read all the docs, but just can't figure this one out. What am I missing in the struts-config, web.xml or what? Anyone? ToFu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Common User Interface for JSP's
The Tiles version (in the Contrib folder) can be integrated with the Action forwards, eliminating places where another physical file might otherwise be needed. This uses a XML configuration file, which is very Struts-like. CSS can be used along with JSP templates. Other than that, I would say a CUI is a CUI, and you could compare each on its own merits. What other interface rendering utilities did you have in mind? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ John Regan wrote: Can anyone enlighten me on the Pros and Cons of using the Struts template taglib as opposed to say CSS or any other common interface rendering utility? Thanks in advance. JBR -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: Iterate tag : Object properties not updated to form bean from JSP
Rajoy, Please read the archives of this list before posting questions. This problem has been addressed many times. To summarise again, to update in an iteration, the names of the form elements must have the index included eg. name=parameter[0].value. Struts will then use this to make the following call to populate the form bean: FormBean.getParameter(0).setValue(value). In order for this to work, you must have a Parameter getParameter(int index) getter in your form bean, and appropriate get/setters in your parameter object. Various previous messages provide more details, and there is an example I posted at http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html. Cheers, Dave Rajoy [EMAIL PROTECTED] on 09/03/2001 07:22:39 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Newbie: Iterate tag : Object properties not updated to form bean from JSP Hi again .. I am quite new to struts .. hope someone will take time to go through my query which I am reposting ( if not I am gonna come back with a more catchy subject line !! ;-) ) Thankx in advance (again) Rajoy HI all I've encountered a situation as follows 1. I have a 'UserInfoContainer' form bean which contains a Vector of individual 'UserInfo' objects. 2. Each UserInfo object is iterated through using the 'iterate' tag in the JSP. 3. Some 'UserInfo' data (say 'NickName' ) is displayed in a text box so that the user can modify it. Every thing is going fine till now. The trouble is once I submit the form and retrieve the 'NickName' from each UserInfo object in the UserInfoContainer object passed to the perform method , it doesn't reflect the modifications user entered in the text box. Basicaly the data entered by the user isn't set back to each UserInfo object by the Action servlet. I've read in the struts docs that the iterate tag copies each object in the collection ( in my case the userinfo veactor) to a page scope bean referenced by the value of 'index' attribute. So I guess the values in the text boxes inside the iterate tag never gets set to the original objects in the FormBean. A. Is my understanding correct ? B. Am I doing somethimng wrong here ? C. Is there any way to tackle this problem? I am at present using lots of request.getParameter methods to get the values edited by the user. But it really does increaase dependency between the JSP pages and the action classes. SO I wonder whether that is the correct way to go even ... FYI : 'UserInfoContainer' is a session scope formbean. Thankx in advance Rajoy - Original Message - From: Rajoy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 03, 2001 7:58 PM Subject: Newbie: Iterate tag : Object properties not updated to form bean from JSP HI all I've encountered a situation as follows 1. I have a 'UserInfoContainer' form bean which contains a Vector of individual 'UserInfo' objects. 2. Each UserInfo object is iterated through using the 'iterate' tag in the JSP. 3. Some 'UserInfo' data (say 'NickName' ) is displayed in a text box so that the user can modify it. Every thing is going fine till now. The trouble is when I retrieve the 'NickName' from each UserInfo object in the UserInfoContainer object passed to the perform method , it doesn't reflect the modifications user entered in the text box. Basicaly the data entered by the user isn't set back to each UserInfo object. I've read in the struts docs that the iterate tag copies each object in the collection ( in my case the userinfo veactor) to a page scope bean referenced by the value of 'index' attribute. So I guess the values in the text boxes inside the iterate tag never gets set to the original objects in the FormBean. A. Is my understanding correct ? B. Am I doing somethimng wrong here ? C. Is there any way to tackle this problem? I am at present using lots of request.getParameter methods to get the values edited by the user. But it really does increaase dependency between the JSP pages and the action classes. SO I wonder whether that is the correct way to go even ... FYI : 'UserInfoContainer' is a session scope formbean. Thankx in advance Rajoy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Newbe - problem with Struts-Config.xml
You can have your JSPs in the WEB-INF directory - I use that and it works fine. Are you using a html:base/ in your JSP? Rob Breeds |+- || Drozdowski, Terry| || Terry.Drozdowski@s| || chwab.com | || | || 02/11/2001 16:57 | || Please respond to | || Struts Users | || Mailing List | || | |+- ---| | | | To: 'Struts Users Mailing List' [EMAIL PROTECTED] | | cc: | | Subject: RE: Newbe - problem with Struts-Config.xml | | | | | ---| what if you want to use the JSP in WEB-INF technique so you can rely on container authentication to protect your JSPs from prying eyes? -- Terry Drozdowski Staff, Technology Services SIM Technology - Phoenix Charles Schwab Co. (602)355-8843 Warning: All e-mail sent to this address will be received by the Charles Schwab Corporate e-mail system and is subject to archival and review by someone other than the recipient. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 9:41 AM To: 'Struts Users Mailing List' Subject: RE: Newbe - problem with Struts-Config.xml Your JSPs should not be in your WEB-INF folder ... try moving it up. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 10:40 AM To: [EMAIL PROTECTED] Subject: Newbe - problem with Struts-Config.xml Hello, I am relatively new to Struts and am encountering a problem with the struts-config.xml file. I have set up a global-forwards like below: forward name=menu path=/do/Menu/ Then I set up an action like below: action path=/Menu forward=/WEB-INF/pages/menu.jsp /action Then I wrote the following index.jsp page: %@ page language=java % %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=menu/ Now when I hit index.jsp, I receive a blank page from Tomcat 4.0. If I review the Tomcat logs, I see that it encountered a 404, but why? I thought it should have found the action /Menu and forward it to the menu.jsp. I am sure this is something simple, but I can't seem to see what wrong with the above. This is running under Struts 1.0 and Tomcat 4.0. Any assistance is greatly appreciated. Regards, Todd G. Nist [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to use the radio tag inside logic:iterate tag
I have a collection called workrelationships .I have to use radio buttons to select the preferred workrelationship. here is the code for iteration logic:iterate name=WorkRelationshipsForm property=WorkRelationships id=worker/ tr td bean:write name=worker property=faculty/ bean:write name=worker property=institute/ /td td/td td font face=Arial,Helvetica,Sans Serif size=3 bbean:message key=firstlogin.workrelationship.header//b bean:message key=firstlogin.workrelationship.text1/brbr bean:message key=firstlogin.workrelationship.text2/brbr brbr /font /td /tr /logic:iterate I can't understand the use of 'Indexed' attribute in radio tag? Could any one plz help me? thanks Alvin alvin kuttikkat antony Internet und Virtuelle Hochshule Directory Universität München Leopoldstr .3 80802 München Germany Office Tel + 49.89.21025979 Office Fax + 49.89.21025980 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
javax.servlet.ServletException: BeanUtils.populate
Hello. I get the following error 2001-11-02 18:34:42,855 533668 [Thread-4] ERROR (gui.framework.ExceptionHandler) - Handling exception javax.servlet.ServletException with template error.htm 2001-11-02 18:34:42,855 533668 [Thread-4] ERROR (gui.framework.ExceptionHandler) - Exception-Message: BeanUtils.populate 2001-11-02 18:34:42,865 533678 [Thread-4] ERROR (gui.framework.ExceptionHandler) - Stacktrace: javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:486) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:19 10) at de.einsurance.gui.framework.ExtendedActionServlet.processPopulate(ExtendedAc tionServlet.java:79) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521) at de.einsurance.gui.framework.ExtendedActionServlet.process(ExtendedActionServ let.java:51) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:484) at org.apache.tomcat.core.Handler.invoke(Handler.java:322) at org.apache.tomcat.core.Handler.service(Handler.java:235) at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:432) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91 5) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:831) at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I nterceptor.java:161) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:517) at java.lang.Thread.run(Thread.java:484) when I use the below entry in struts-config.xml file. action path=/doInsertEntries type=de.einsurance.backoffice.paybackwizard.actions.WizardPerformAllAction scope=session name=PaybackWizardFormBean input=/view/mainPage.html validate=true forward name=success path=/view/insertPage.html/ /action Could anyone of u can help me out? Best Regards Sudha -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to use the radio tag inside logic:iterate tag
See if this helps... http://www.mail-archive.com/struts-user@jakarta.apache.org/msg16684.html Cheers, Dave Alvin Kutttikkat Antony [EMAIL PROTECTED] on 11/02/2001 12:33:27 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: How to use the radio tag inside logic:iterate tag I have a collection called workrelationships .I have to use radio buttons to select the preferred workrelationship. here is the code for iteration logic:iterate name=WorkRelationshipsForm property=WorkRelationships id=worker/ tr td bean:write name=worker property=faculty/ bean:write name=worker property=institute/ /td td/td td font face=Arial,Helvetica,Sans Serif size=3 bbean:message key=firstlogin.workrelationship.header//b bean:message key=firstlogin.workrelationship.text1/brbr bean:message key=firstlogin.workrelationship.text2/brbr brbr /font /td /tr /logic:iterate I can't understand the use of 'Indexed' attribute in radio tag? Could any one plz help me? thanks Alvin alvin kuttikkat antony Internet und Virtuelle Hochshule Directory Universität München Leopoldstr .3 80802 München Germany Office Tel + 49.89.21025979 Office Fax + 49.89.21025980 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Common User Interface for JSP's
thank you for the quick response Ted. it's quite obvious that you are the man. I will look @ Tiles. I didn't have any other interface rendering utilities in mind, I was just looking for suggestions. thanks again. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 9:17 AM To: Struts Users Mailing List Subject: Re: Common User Interface for JSP's The Tiles version (in the Contrib folder) can be integrated with the Action forwards, eliminating places where another physical file might otherwise be needed. This uses a XML configuration file, which is very Struts-like. CSS can be used along with JSP templates. Other than that, I would say a CUI is a CUI, and you could compare each on its own merits. What other interface rendering utilities did you have in mind? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ John Regan wrote: Can anyone enlighten me on the Pros and Cons of using the Struts template taglib as opposed to say CSS or any other common interface rendering utility? Thanks in advance. JBR -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: action forward tag...
Thanks for your reply Sandeep, We are already using struts templates to render the pages. So we have something like the following: template.jsp - Contains all navigation - Gets the content page content.jsp - Inserts into template.jsp - Puts several items (title, image, etc...) into template.jsp So, as you pointed out, we display the page with the following URL: http://localhost/dynamic/content.jsp The problem is when the content contains a struts form element and the form is successfully submited. We need the success page to render at the same navigation level. So when an ActionFroward object is returned from the process() method, we want the url to look like this, again: http://localhost/dynamic/content.jsp BUT, instead of seeing the form, we want to only see a success message. This is required due to the way our dynamic navigation works. Does it make sense to have another taglib added to the struts html taglib? It would be very similar to the html:error / tag but it would show a successfull message instead -- html:success /. So this would add another couple of classes to struts: ActionSuccess and ActionSuccesses to be consistent with the ActionError classes. Perhapes there can be some logic tags used as well to remove the form elements so that we only display the successfully submited message without the form. Or this all may be possible with the existing classes and taglibs. Any other thoughts or suggestions? Thanks again for your help, - John On Friday 02 November 2001 07:04 am, you wrote: If you are not using framesets - I would suggest looking at using tiles or templates. These allow you to include header,footer,menu,body type layouts within the jsp -- here you would just reference the jsp file. sandeep --- John Nikolai [EMAIL PROTECTED] wrote: Hello all! I have an action-mapping with one action element. This action element defines an input attribute used for when an error occurs in the form. I was wondering if it is possible for the action elements forward element can do the same thing as the input attribute? Let me explain: We have a navigation system in place and the navigation is dependent on where the user is located in the web directory hierarchy. http://localhost/dynamic/form.htm - Contains HTML:form and form elements - The navigation is properly created, highlighting form in the left hand navigation When a user submits the form and an error occurs the URL changes to the following: http://localhost/dynamic/formHandler.do params The errors are reported and the form.HTML file is redisplayed. The important thing here is that the navigation remains the same. That is to say that form is still highlighted in the left hand navigation... Now when the form is successfully filled out I want to display a success page BUT keep the left hand navigation intact with form highlighted. I do not want to redisplay the form again, rather just show some simple text saying the form was successfully submitted. I have tried messing around with the forward element, setting the redirect attribute to true/false, as well as changing the path too. - I set the path to /dynamic/form.htm but then the form is redisplayed. - I set the path to /dynamic/success.htm but then the navigation will not display properly. - I set the redirect to false but that did not work either... Is it possible to have the success page be rendered like the error page, minus the form fields? Thanks for your help, - John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Exception: Cannot retrieve mapping for action
Hello, I have the following Strut-Config file. !-- == Form Bean Definitions === -- form-beans !-- Logon form bean -- form-bean name=logonForm type=com.mlsbuyer.logonform/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=logonpath=/do/logon/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Process a user logon -- actionpath=/logon type=com.mlsbuyer.logonaction name=logonForm scope=request input=/WEB-INF/pages/logon.jsp forward name=homepath=/WEB-INF/pages/home.jsp/ forward name=logon path=/WEB-INF/pages/logon.jsp/ /action My web.xml maps the action to /do/* like below. !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My pages are all located under the WEB-INF directory to prevent prying eyes from looking at the JSP code. The main index checks to see if you have logon to the system and if not forwards you to the logon page as follows: logic:notPresent scope=session name=user logic:forward name=logon/ /logic:notPresent When the forward is called I keep encountering an exception: javax.servlet.ServletException: Exception forwarding for name logon: javax.servlet.ServletException: Cannot retrieve mapping for action /do/logon What am I missing here? Thanks for your assistance. Regards, Todd G. Nist Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Exception: Cannot retrieve mapping for action
try using servlet-mapping servlet-nameaction/servlet-name url-pattern/*.do/url-pattern /servlet-mapping instead of servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping LN -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:26 PM To: [EMAIL PROTECTED] Subject: Exception: Cannot retrieve mapping for action Hello, I have the following Strut-Config file. !-- == Form Bean Definitions === -- form-beans !-- Logon form bean -- form-bean name=logonForm type=com.mlsbuyer.logonform/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=logonpath=/do/logon/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Process a user logon -- actionpath=/logon type=com.mlsbuyer.logonaction name=logonForm scope=request input=/WEB-INF/pages/logon.jsp forward name=homepath=/WEB-INF/pages/home.jsp/ forward name=logon path=/WEB-INF/pages/logon.jsp/ /action My web.xml maps the action to /do/* like below. !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My pages are all located under the WEB-INF directory to prevent prying eyes from looking at the JSP code. The main index checks to see if you have logon to the system and if not forwards you to the logon page as follows: logic:notPresent scope=session name=user logic:forward name=logon/ /logic:notPresent When the forward is called I keep encountering an exception: javax.servlet.ServletException: Exception forwarding for name logon: javax.servlet.ServletException: Cannot retrieve mapping for action /do/logon What am I missing here? Thanks for your assistance. Regards, Todd G. Nist Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Data source
Hi, All, I set up a data source in my struts-config.xml like this: data-sources data-source autoCommit=false description=Tira Database driverClass=sun.jdbc.odbc.JdbcOdbcDriver maxCount=2 mincount=1 password=myPassword url=jdbc.odbc:myDB user=myUser/ /data-sources when I start my Tomcat and try to access jsp under my web app, there are exceptions. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002flogon_0002ejsplogon_jsp_1._jspService(_0002flogon_0002ejsplogon_jsp_1. java:317) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484 Any body knows why ?
RE: Exception: Cannot retrieve mapping for action
Thank you, I realize that the *.do will work, I had it that way initially. However, I was reviewing the Artimus example by Ted Husted and liked how he had the URL mapping setup and the struts-conf.xml file so I thought I would give it a try. But so far, it has not worked at all in my application, but works just fine in the example and I can not see where the difference is at. Again, thanks for the reply. Regards, Todd -Original Message- From: Chilakala, Laxminarsimha [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:32 PM To: 'Struts Users Mailing List' Subject: RE: Exception: Cannot retrieve mapping for action try using servlet-mapping servlet-nameaction/servlet-name url-pattern/*.do/url-pattern /servlet-mapping instead of servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping LN -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:26 PM To: [EMAIL PROTECTED] Subject: Exception: Cannot retrieve mapping for action Hello, I have the following Strut-Config file. !-- == Form Bean Definitions === -- form-beans !-- Logon form bean -- form-bean name=logonForm type=com.mlsbuyer.logonform/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=logonpath=/do/logon/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Process a user logon -- actionpath=/logon type=com.mlsbuyer.logonaction name=logonForm scope=request input=/WEB-INF/pages/logon.jsp forward name=homepath=/WEB-INF/pages/home.jsp/ forward name=logon path=/WEB-INF/pages/logon.jsp/ /action My web.xml maps the action to /do/* like below. !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My pages are all located under the WEB-INF directory to prevent prying eyes from looking at the JSP code. The main index checks to see if you have logon to the system and if not forwards you to the logon page as follows: logic:notPresent scope=session name=user logic:forward name=logon/ /logic:notPresent When the forward is called I keep encountering an exception: javax.servlet.ServletException: Exception forwarding for name logon: javax.servlet.ServletException: Cannot retrieve mapping for action /do/logon What am I missing here? Thanks for your assistance. Regards, Todd G. Nist Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Data source
Barry, This can happen if your data source is improperly configured. The Action mappings aren't processed due to an error while trying to access the datasource. My most frequent cause has been a misconfigured JDBC URL, or a missing JDBC driver. regards, Stephen Owens Corner Software -Original Message- From: Barry Jia [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:41 PM To: '[EMAIL PROTECTED]' Subject: Data source Hi, All, I set up a data source in my struts-config.xml like this: data-sources data-source autoCommit=false description=Tira Database driverClass=sun.jdbc.odbc.JdbcOdbcDriver maxCount=2 mincount=1 password=myPassword url=jdbc.odbc:myDB user=myUser/ /data-sources when I start my Tomcat and try to access jsp under my web app, there are exceptions. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImp l.java:459) at _0002flogon_0002ejsplogon_jsp_1._jspService(_0002flogon_0002ejsplogon_js p_1. java:317) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServle t.ja va:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.ja va:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H ttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416 ) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50 1) at java.lang.Thread.run(Thread.java:484 Any body knows why ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Common User Interface for JSP's
Hi Ted, I joined the Struts Mailing List yesterday and have already learned some valuable information. I have seen Tiles refered to in several different posts and am wondering where I can find out more information about it (I couldn't find a Contrib folder, but wasn't sure where to look for it). If you or someone else could point me in the right direction, I would appreciate it. Thanks, Karen -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 9:17 AM To: Struts Users Mailing List Subject: Re: Common User Interface for JSP's The Tiles version (in the Contrib folder) can be integrated with the Action forwards, eliminating places where another physical file might otherwise be needed. This uses a XML configuration file, which is very Struts-like. CSS can be used along with JSP templates. Other than that, I would say a CUI is a CUI, and you could compare each on its own merits. What other interface rendering utilities did you have in mind? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ John Regan wrote: Can anyone enlighten me on the Pros and Cons of using the Struts template taglib as opposed to say CSS or any other common interface rendering utility? Thanks in advance. JBR -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Newbe - problem with Struts-Config.xml
What application server are u using Rob? Cause unless ur doing something else different. WEB-INF is supposed to be a PRIVATE folder (read the J2EE specifications) nothing public should be in this folder. Not that it cant be.. it just takes more coding. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 2:14 PM To: 'Struts Users Mailing List' Subject: RE: Newbe - problem with Struts-Config.xml I apologize if I gave out incorrect information. I did not realize that you could place the JSPs in the WEB-INF ... learn something new every day. -Original Message- From: Rob Breeds [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:32 PM To: Struts Users Mailing List Subject: RE: Newbe - problem with Struts-Config.xml You can have your JSPs in the WEB-INF directory - I use that and it works fine. Are you using a html:base/ in your JSP? Rob Breeds |+- || Drozdowski, Terry| || Terry.Drozdowski@s| || chwab.com | || | || 02/11/2001 16:57 | || Please respond to | || Struts Users | || Mailing List | || | |+- --- | | | | To: 'Struts Users Mailing List' [EMAIL PROTECTED] | | cc: | | Subject: RE: Newbe - problem with Struts-Config.xml | | | | | --- | what if you want to use the JSP in WEB-INF technique so you can rely on container authentication to protect your JSPs from prying eyes? -- Terry Drozdowski Staff, Technology Services SIM Technology - Phoenix Charles Schwab Co. (602)355-8843 Warning: All e-mail sent to this address will be received by the Charles Schwab Corporate e-mail system and is subject to archival and review by someone other than the recipient. -Original Message- From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 9:41 AM To: 'Struts Users Mailing List' Subject: RE: Newbe - problem with Struts-Config.xml Your JSPs should not be in your WEB-INF folder ... try moving it up. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 10:40 AM To: [EMAIL PROTECTED] Subject: Newbe - problem with Struts-Config.xml Hello, I am relatively new to Struts and am encountering a problem with the struts-config.xml file. I have set up a global-forwards like below: forward name=menu path=/do/Menu/ Then I set up an action like below: action path=/Menu forward=/WEB-INF/pages/menu.jsp /action Then I wrote the following index.jsp page: %@ page language=java % %@ taglib uri=/tags/struts-logic prefix=logic % logic:forward name=menu/ Now when I hit index.jsp, I receive a blank page from Tomcat 4.0. If I review the Tomcat logs, I see that it encountered a 404, but why? I thought it should have found the action /Menu and forward it to the menu.jsp. I am sure this is something simple, but I can't seem to see what wrong with the above. This is running under Struts 1.0 and Tomcat 4.0. Any assistance is greatly appreciated. Regards, Todd G. Nist [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Exception: Cannot retrieve mapping for action
Try global-forwards forward name=logonpath=/do/logon.do/ /global-forwards - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 02, 2001 8:25 AM Subject: Exception: Cannot retrieve mapping for action Hello, I have the following Strut-Config file. !-- == Form Bean Definitions === -- form-beans !-- Logon form bean -- form-bean name=logonForm type=com.mlsbuyer.logonform/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=logonpath=/do/logon/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Process a user logon -- actionpath=/logon type=com.mlsbuyer.logonaction name=logonForm scope=request input=/WEB-INF/pages/logon.jsp forward name=homepath=/WEB-INF/pages/home.jsp/ forward name=logon path=/WEB-INF/pages/logon.jsp/ /action My web.xml maps the action to /do/* like below. !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My pages are all located under the WEB-INF directory to prevent prying eyes from looking at the JSP code. The main index checks to see if you have logon to the system and if not forwards you to the logon page as follows: logic:notPresent scope=session name=user logic:forward name=logon/ /logic:notPresent When the forward is called I keep encountering an exception: javax.servlet.ServletException: Exception forwarding for name logon: javax.servlet.ServletException: Cannot retrieve mapping for action /do/logon What am I missing here? Thanks for your assistance. Regards, Todd G. Nist Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Need help
Hi, I am relatively new to struts..I have a login page on which I fill user name and password and press login button. Then it should go to home.jsp instead browser says Page cannot be displayed. I saw the Tomcat console and error given is No action instance for path /logon could be created My web.xml looks like :- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My struts-config.xml looks like :- actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action Could some body guide me through this? Thanks in Advance Ashoka Murthy _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to use Data source in *.jsp
Hi, All I read the struts document, I config my data source in struts-config.xml, In my action I can use the following code to get Data source and use it. Right now I want to use it in my JSP scriplet, when I use it, it can not be compiled as servlet is a undefined variable or class. I want to know, in my Action, servlet is in which package ? how to use same code in *.jsp file Thanks! DataSource dataSource = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY); conn = dataSource.getConnection(); ... perform required functions as in the previous example ... conn.close();
RE: Need help
did you have this classes in your WEB-INF/classes dir ?com.tgt.d2g.auth.LogonAction -Original Message- From: Ashoka Murthy [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 2:41 PM To: [EMAIL PROTECTED] Subject: Need help Hi, I am relatively new to struts..I have a login page on which I fill user name and password and press login button. Then it should go to home.jsp instead browser says Page cannot be displayed. I saw the Tomcat console and error given is No action instance for path /logon could be created My web.xml looks like :- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My struts-config.xml looks like :- actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action Could some body guide me through this? Thanks in Advance Ashoka Murthy _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need help
Yes I do :-( From: Barry Jia [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Need help Date: Fri, 2 Nov 2001 15:19:42 -0500 did you have this classes in your WEB-INF/classes dir ?com.tgt.d2g.auth.LogonAction -Original Message- From: Ashoka Murthy [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 2:41 PM To: [EMAIL PROTECTED] Subject: Need help Hi, I am relatively new to struts..I have a login page on which I fill user name and password and press login button. Then it should go to home.jsp instead browser says Page cannot be displayed. I saw the Tomcat console and error given is No action instance for path /logon could be created My web.xml looks like :- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My struts-config.xml looks like :- actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action Could some body guide me through this? Thanks in Advance Ashoka Murthy _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ActionMessage classes
There isn't a set schedule, but there are goals set. Below is a link to the To Do List. There will be a Struts 1.1 release when these things are done. http://jakarta.apache.org/struts/todo-1.1.html When is the next release coming out? http://jakarta.apache.org/struts/userGuide/kickstart.html#release David --- John Nikolai [EMAIL PROTECTED] wrote: Hi all, This may or may not be the proper place to ask this question. Please let me know... I noticed that the nightly builds contain new ActionMessage classes and taglibs. Any idea when we might see these updates in a release build? Thanks much, - John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:errors
You have validate=true in your action? Or in your Action if you are definitely getting back an ActionErrors object with messages then you could use the saveErrors method in the Action class to save it. Also, do you have errors.header and errors.footer defined? There is also an html:messages that tag iterates through error messages if you are using a recent nightly build. David --- Todd Fulton [EMAIL PROTECTED] wrote: I just can't seem to get the html:errors tag to display the errors passed through via my ActionForm object's validate() method. I have confirmed that the validate() method is working correctly -- as I'm getting a forward to the input page as configured. Simply nothing appears with: body bgcolor=#FF text=#00 html:errors/ Read all the docs, but just can't figure this one out. What am I missing in the struts-config, web.xml or what? Anyone? ToFu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need help
Are you submitting your form to /login, or /do/login? Alternately, are you using the html:form tag with the action attribute set to /login? -Original Message- From: Ashoka Murthy [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 1:41 PM To: [EMAIL PROTECTED] Subject: Need help Hi, I am relatively new to struts..I have a login page on which I fill user name and password and press login button. Then it should go to home.jsp instead browser says Page cannot be displayed. I saw the Tomcat console and error given is No action instance for path /logon could be created My web.xml looks like :- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My struts-config.xml looks like :- actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action Could some body guide me through this? Thanks in Advance Ashoka Murthy _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to use Data source in *.jsp
The datasource is an attribute in application scope. You can use the pageContext to get this attribute. You may be able to do something with a bean:. tag or a jsp:useBean / tag to expose this attribute... but I could not figure it out. by the way you aren't going to put a business rule in a jsp page are you :-) I try to keep all my sql in a bean then call methods to enforce business rules or pull data to be displayed in a page. Scriptlets bad, taglibs good :-) my $.02 -Mark %@ page import=javax.sql.DataSource, org.apache.struts.action.Action, java.sql.Connection, java.sql.Statement, java.sql.ResultSet % % DataSource dataSource = (DataSource) pageContext.getAttribute(Action.DATA_SOURCE_KEY, PageContext.APPLICATION_SCOPE); Connection connection = dataSource.getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(select bill_grp_code, bill_grp_dsc from bill_grp); /* DO SOMETHING WITH THE DATA */ resultSet.close(); statement.close(); connection.close(); % html body testing /body /html Barry Jia wrote: Hi, All I read the struts document, I config my data source in struts-config.xml, In my action I can use the following code to get Data source and use it. Right now I want to use it in my JSP scriplet, when I use it, it can not be compiled as servlet is a undefined variable or class. I want to know, in my Action, servlet is in which package ? how to use same code in *.jsp file Thanks! DataSource dataSource = (DataSource) servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY); conn = dataSource.getConnection(); ... perform required functions as in the previous example ... conn.close(); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need help
Hi Ashoka, your sample struts config file does not define a form bean. Maybe this is the reason for your problem. actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action You should add something like form-beans form-bean name=logonForm type=com.tgt.d2g.auth.LogonForm/ /form-beans (or whatever name your ActionForm class has) to your file struts-config.xml (before to the action definition). Hope this helps Christian Rosner -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with multilingual submit button with request parameters
Hello struts experts, I can't get a submit button to work which uses a bean:message for a localized button text _and_ a request parameter at the same time. I have browsed the mail archive, but haven't found a solution for this. Maybe one of you can tell me the way to achieve my goal: A form on my page contains several submit buttons, which trigger different actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of a single action target in a form I did add a request parameter to each submit button (as suggested earlier in this mailing list): html:submit property=action value=search Search /html:submit Because my application has to support different languages (like English and German), I also use the bean:message tag to set the button text according the Locale setting in the session: html:submit bean:message key=searchbutton/ /html:submit Each of the above code samples works well, like it's described in the documentation and as I expected it. But if I try to combine both techniques to get a multilingual submit button with a request parameter, like in: html:submit property=action value=search bean:message key=searchbutton/ /html:submit it does not work: Instead of my desired result - a button with a (german) label 'Suchen', which submits a request parameter 'action=search' - I do get a button labeled 'search' (with a lowercase 's'). The 'value' attribute seems to be used used twice _with a different meaning_. The Struts html taglib guide says under 'Common Form Tag Attributes': value : Value of the label to be used with this element. This value will also be submitted as the value of the specified request parameter. As far as I understand this sentence, it says that the 'value' attribute is used twice for different purposes: For the label of the button and for the request parameter value. Have I done something wrong or misunderstood something? Or is this a slight design flaw in the i18n support (using the same attribute twice)? Does someone know a solution or workaround for this problem? Regards Christian Rosner Software Architect -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need help
I think all paths are relative to the root of your application. I am new to struts... so I may be all wrong but make the path in your action /jsp/logon actionpath=/jsp/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action then in your form use /jsp/logon as the action html:form action=/jsp/logon focus=code enctype=multipart/form-data -Mark Ashoka Murthy wrote: Hi, I am relatively new to struts..I have a login page on which I fill user name and password and press login button. Then it should go to home.jsp instead browser says Page cannot be displayed. I saw the Tomcat console and error given is No action instance for path /logon could be created My web.xml looks like :- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My struts-config.xml looks like :- actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action Could some body guide me through this? Thanks in Advance Ashoka Murthy _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with multilingual submit button with request parameters
The problem is actually with HTML itself. The value attribute of a submit button specifies both the button label as well as the value submitted to the server. -Original Message- From: Christian Rosner [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 3:08 PM To: [EMAIL PROTECTED] Subject: Problem with multilingual submit button with request parameters Hello struts experts, I can't get a submit button to work which uses a bean:message for a localized button text _and_ a request parameter at the same time. I have browsed the mail archive, but haven't found a solution for this. Maybe one of you can tell me the way to achieve my goal: A form on my page contains several submit buttons, which trigger different actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of a single action target in a form I did add a request parameter to each submit button (as suggested earlier in this mailing list): html:submit property=action value=search Search /html:submit Because my application has to support different languages (like English and German), I also use the bean:message tag to set the button text according the Locale setting in the session: html:submit bean:message key=searchbutton/ /html:submit Each of the above code samples works well, like it's described in the documentation and as I expected it. But if I try to combine both techniques to get a multilingual submit button with a request parameter, like in: html:submit property=action value=search bean:message key=searchbutton/ /html:submit it does not work: Instead of my desired result - a button with a (german) label 'Suchen', which submits a request parameter 'action=search' - I do get a button labeled 'search' (with a lowercase 's'). The 'value' attribute seems to be used used twice _with a different meaning_. The Struts html taglib guide says under 'Common Form Tag Attributes': value : Value of the label to be used with this element. This value will also be submitted as the value of the specified request parameter. As far as I understand this sentence, it says that the 'value' attribute is used twice for different purposes: For the label of the button and for the request parameter value. Have I done something wrong or misunderstood something? Or is this a slight design flaw in the i18n support (using the same attribute twice)? Does someone know a solution or workaround for this problem? Regards Christian Rosner Software Architect -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need help
Pardon me, I forgot to mention earlier that the form-beans entry is also there. Ashoka Murthy From: Christian Rosner [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Need help Date: Fri, 2 Nov 2001 22:13:39 +0100 Hi Ashoka, your sample struts config file does not define a form bean. Maybe this is the reason for your problem. actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action You should add something like form-beans form-bean name=logonForm type=com.tgt.d2g.auth.LogonForm/ /form-beans (or whatever name your ActionForm class has) to your file struts-config.xml (before to the action definition). Hope this helps Christian Rosner -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors
I finally got it. Was missing the init-param for the 'action' servlet in the web.xml file. init-param param-nameapplication/param-name param-valuecom.spk.ApplicationResources/param-value /init-param Thanks!! -Original Message- From: David Winterfeldt [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:29 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: html:errors You have validate=true in your action? Or in your Action if you are definitely getting back an ActionErrors object with messages then you could use the saveErrors method in the Action class to save it. Also, do you have errors.header and errors.footer defined? There is also an html:messages that tag iterates through error messages if you are using a recent nightly build. David --- Todd Fulton [EMAIL PROTECTED] wrote: I just can't seem to get the html:errors tag to display the errors passed through via my ActionForm object's validate() method. I have confirmed that the validate() method is working correctly -- as I'm getting a forward to the input page as configured. Simply nothing appears with: body bgcolor=#FF text=#00 html:errors/ Read all the docs, but just can't figure this one out. What am I missing in the struts-config, web.xml or what? Anyone? ToFu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problem with multilingual submit button with request parameters
If you have three submit buttons for the same form only the submit button that is pressed will be sent as a parameter... i think. so you could check for the existence of the parameter to find out what button was pressed. The parameter name will not be localized just the value... and who cares what the value is because you only care if it exists. Christian Rosner wrote: Hello struts experts, I can't get a submit button to work which uses a bean:message for a localized button text _and_ a request parameter at the same time. I have browsed the mail archive, but haven't found a solution for this. Maybe one of you can tell me the way to achieve my goal: A form on my page contains several submit buttons, which trigger different actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of a single action target in a form I did add a request parameter to each submit button (as suggested earlier in this mailing list): html:submit property=action value=search Search /html:submit Because my application has to support different languages (like English and German), I also use the bean:message tag to set the button text according the Locale setting in the session: html:submit bean:message key=searchbutton/ /html:submit Each of the above code samples works well, like it's described in the documentation and as I expected it. But if I try to combine both techniques to get a multilingual submit button with a request parameter, like in: html:submit property=action value=search bean:message key=searchbutton/ /html:submit it does not work: Instead of my desired result - a button with a (german) label 'Suchen', which submits a request parameter 'action=search' - I do get a button labeled 'search' (with a lowercase 's'). The 'value' attribute seems to be used used twice _with a different meaning_. The Struts html taglib guide says under 'Common Form Tag Attributes': value : Value of the label to be used with this element. This value will also be submitted as the value of the specified request parameter. As far as I understand this sentence, it says that the 'value' attribute is used twice for different purposes: For the label of the button and for the request parameter value. Have I done something wrong or misunderstood something? Or is this a slight design flaw in the i18n support (using the same attribute twice)? Does someone know a solution or workaround for this problem? Regards Christian Rosner Software Architect -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with multilingual submit button with request parameters
Why don't you separate the value displayed from the action sent using a Javascript method: script language=javascript function submitWithAction(action) { document.yourFormName.action.value=action; } /script input type=hidden name=action (this can be generated with html:hidden) html:submit onclick=submitWithAction('Create'); bean:message key=create / /html:submit html:submit onclick=submitWithAction('Search'); bean:message key=search / /html:submit Your buttons will be multi-language and the value of your hidden action parameter will be a constant that you can reuse (and that is not tied to a language). Just my 2 cents... Andrej -Original Message- From: Mark Gordon [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 4:51 PM To: Struts Users Mailing List Subject: Re: Problem with multilingual submit button with request parameters If you have three submit buttons for the same form only the submit button that is pressed will be sent as a parameter... i think. so you could check for the existence of the parameter to find out what button was pressed. The parameter name will not be localized just the value... and who cares what the value is because you only care if it exists. Christian Rosner wrote: Hello struts experts, I can't get a submit button to work which uses a bean:message for a localized button text _and_ a request parameter at the same time. I have browsed the mail archive, but haven't found a solution for this. Maybe one of you can tell me the way to achieve my goal: A form on my page contains several submit buttons, which trigger different actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of a single action target in a form I did add a request parameter to each submit button (as suggested earlier in this mailing list): html:submit property=action value=search Search /html:submit Because my application has to support different languages (like English and German), I also use the bean:message tag to set the button text according the Locale setting in the session: html:submit bean:message key=searchbutton/ /html:submit Each of the above code samples works well, like it's described in the documentation and as I expected it. But if I try to combine both techniques to get a multilingual submit button with a request parameter, like in: html:submit property=action value=search bean:message key=searchbutton/ /html:submit it does not work: Instead of my desired result - a button with a (german) label 'Suchen', which submits a request parameter 'action=search' - I do get a button labeled 'search' (with a lowercase 's'). The 'value' attribute seems to be used used twice _with a different meaning_. The Struts html taglib guide says under 'Common Form Tag Attributes': value : Value of the label to be used with this element. This value will also be submitted as the value of the specified request parameter. As far as I understand this sentence, it says that the 'value' attribute is used twice for different purposes: For the label of the button and for the request parameter value. Have I done something wrong or misunderstood something? Or is this a slight design flaw in the i18n support (using the same attribute twice)? Does someone know a solution or workaround for this problem? Regards Christian Rosner Software Architect -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Problem with multilingual submit button with request paramete rs
I would say having three properties for the three buttons would be a cleaner solution. Relying on JavaScript anywhere you don't have to is asking for trouble, IMO. -Original Message- From: Sobkowski, Andrej [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 3:49 PM To: 'Struts Users Mailing List' Subject: RE: Problem with multilingual submit button with request paramete rs Why don't you separate the value displayed from the action sent using a Javascript method: script language=javascript function submitWithAction(action) { document.yourFormName.action.value=action; } /script input type=hidden name=action (this can be generated with html:hidden) html:submit onclick=submitWithAction('Create'); bean:message key=create / /html:submit html:submit onclick=submitWithAction('Search'); bean:message key=search / /html:submit Your buttons will be multi-language and the value of your hidden action parameter will be a constant that you can reuse (and that is not tied to a language). Just my 2 cents... Andrej -Original Message- From: Mark Gordon [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 4:51 PM To: Struts Users Mailing List Subject: Re: Problem with multilingual submit button with request parameters If you have three submit buttons for the same form only the submit button that is pressed will be sent as a parameter... i think. so you could check for the existence of the parameter to find out what button was pressed. The parameter name will not be localized just the value... and who cares what the value is because you only care if it exists. Christian Rosner wrote: Hello struts experts, I can't get a submit button to work which uses a bean:message for a localized button text _and_ a request parameter at the same time. I have browsed the mail archive, but haven't found a solution for this. Maybe one of you can tell me the way to achieve my goal: A form on my page contains several submit buttons, which trigger different actions (like 'Create', 'Search' and 'Cancel'). To circumvent the problem of a single action target in a form I did add a request parameter to each submit button (as suggested earlier in this mailing list): html:submit property=action value=search Search /html:submit Because my application has to support different languages (like English and German), I also use the bean:message tag to set the button text according the Locale setting in the session: html:submit bean:message key=searchbutton/ /html:submit Each of the above code samples works well, like it's described in the documentation and as I expected it. But if I try to combine both techniques to get a multilingual submit button with a request parameter, like in: html:submit property=action value=search bean:message key=searchbutton/ /html:submit it does not work: Instead of my desired result - a button with a (german) label 'Suchen', which submits a request parameter 'action=search' - I do get a button labeled 'search' (with a lowercase 's'). The 'value' attribute seems to be used used twice _with a different meaning_. The Struts html taglib guide says under 'Common Form Tag Attributes': value : Value of the label to be used with this element. This value will also be submitted as the value of the specified request parameter. As far as I understand this sentence, it says that the 'value' attribute is used twice for different purposes: For the label of the button and for the request parameter value. Have I done something wrong or misunderstood something? Or is this a slight design flaw in the i18n support (using the same attribute twice)? Does someone know a solution or workaround for this problem? Regards Christian Rosner Software Architect -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need help
Will get back on this. Probably the right track to go. Tnx Ashoka From: Mark Gordon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Need help Date: Fri, 02 Nov 2001 14:30:27 -0700 I think all paths are relative to the root of your application. I am new to struts... so I may be all wrong but make the path in your action /jsp/logon actionpath=/jsp/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action then in your form use /jsp/logon as the action html:form action=/jsp/logon focus=code enctype=multipart/form-data -Mark Ashoka Murthy wrote: Hi, I am relatively new to struts..I have a login page on which I fill user name and password and press login button. Then it should go to home.jsp instead browser says Page cannot be displayed. I saw the Tomcat console and error given is No action instance for path /logon could be created My web.xml looks like :- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping My struts-config.xml looks like :- actionpath=/logon type=com.tgt.d2g.auth.LogonAction name=logonForm input=/jsp/logon.jsp scope=session forward name=home path=/jsp/home.jsp/ forward name=error path=/jsp/error.jsp/ /action Could some body guide me through this? Thanks in Advance Ashoka Murthy _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Professional JSP Site Design BOOK
Anybody knows how much Struts related pages will be in this book ? Nicolas
help: config filter-mapping and struts
Hi all, I wrote an app using struts and it works fine. Now I want to add a filter, so that a pre-defined page will be filtered before return. The question is how to specify filter-mapping. I tried lots of options, it does not work. For the following action, actionpath=/generateBig type=GenerateBigAction name=form scope=request input=/get.jsp validate=false forward name=success path=/success/ /action I want to compress the response when it is forward to success page(/success). When I map filter to generateBig.do, the doFilter method is invoked, but the request page is returned. Even if correct page is return, I think mapping to generateBig.do is not the right way because failure page will be filter too. When I map filter to /success(or the servlet mapping to /success), the doFilter method is not even invoked. please help! ct __ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Professional JSP Site Design BOOK
Lots. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ Nicolas Parisé wrote: Anybody knows how much Struts related pages will be in this book ? Nicolas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Professional JSP Site Design BOOK
Nick ... Don't know about that one, but I like Professionl JSP 2nd Ed. from Wrox ... good foundation on JSP and good coverage of basic Struts with a plus! (custom tag libs section) Paulo -Original Message- From: Nicolas Parisé [mailto:[EMAIL PROTECTED]] Sent: November 2, 2001 5:22 PM To: [EMAIL PROTECTED] Subject: Professional JSP Site Design BOOK Anybody knows how much Struts related pages will be in this book ? Nicolas -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Silverstream, struts and UTF-8 Encoding
Russell, This comes from the SilverStream admin guide on page 90. It tells you how to change it in the httpd.props file, but you might be able to get it to work via the web.xml. _ Specifying character set encoding The SilverStream server uses the following server property when URL-encoding and -decoding form content: http-server.com.sssw.srv.international.UrlEncoding NOTE SilverStream stores the encoding and other server startup properties in the httpd.props configuration file, which is located in the SilverStreamInstallDir\resources directory. For more information, see Appendix A, The httpd.props File. By default, the SilverStream server uses utf-8 (Universal Character Set Transfer Format) for URL encoding and decoding. Because utf-8 can encode ASCII characters without requiring modification, utf-8 works well for English and most western languages. Because languages using multibyte encodings are not a subset of utf-8, character encoding and decoding will not work properly with them. When to change the encoding scheme You typically need to change the encoding scheme only when the majority of client browsers in your environment use character encodings that are not ISO 8859-1 (Latin 1). For example, a Japanese Web site that serves content to its employees using the ShiftJIS encoding may want to change its SilverStream server's encoding property to SJIS. To change the encoding scheme: 1. To change from the default utf-8 to another encoding, add the following line to the httpd.props file (located in the resources directory beneath the SilverStream root directory): http-server.com.sssw.srv.international.UrlEncoding= NewEncoding 2. Enter the language mapping needed at your site in place of the NewEncoding variable. Check the Sun Web site if you are unsure about the Java string mapping for your language. 3. Restart the SilverStream server. URL content will be encoded using the new encoding scheme after you restart the server. Jeff Krueger -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 12:04 PM To: [EMAIL PROTECTED] Subject: Silverstream, struts and UTF-8 Encoding I am having some problems with a struts based application in that the browser does not seem to change to UTF-8 encoding and as a result, i am losing some characters. I have read quite a few postings regarding i18n including this excerpt: 1) Specify the content type for the JSP output: %@ page contentType=text/html; charset=utf-8 % You can also do this by setting the content type header manually, using response.setContentType(). 2) Specify the content type to the browser: meta http-equiv=content-type content=text/html; charset=utf-8 3) Specify the default content type to the container. In our case, we are using Resin, and so do this: web-app id='/' character-encoding='utf-8' ... I have changed the jsp for the first 2 but the browser still doesn't recognise that it is meant to be UTF-8. Has anyone any experience of this or know how to resolve it? I have been unable to do the last step in the web xml as i dont know what the context-param name would be for silverstream - does anyone know? I think the web.xml should look something like: web-app !-- configure input charset to be utf-8 -- context-param param-nameweblogic.httpd.inputCharset./*/param-name param-valueUTF-8/param-value /context-param ... /web-app but with a different param-name. Any clues as to why UTF-8 isn't working would be appreciated. Russell -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Form Bean
Cameron, are you still experiencing this problem? I just ran into the same thing and thought I would share how I solved it. I too was creating a form bean and then adding it to the session. When the corresponding jsp was loaded, all the values were reset to the default. Upon examining my struts-config.xml, I noticed the following in my action mapping for that jsp: Note: irrelevant attributes have been omitted action path=/path scope=request name=formName input=/form.jsp /action Notice the value of the scope attribute... I decided to add my newly created form bean as a request attribute instead of to the session, and my problem was solved. To confirm my suspicions, I changed the value of the scope attribute to session and then saved my form bean in the session, and it still worked. Hope this helps. -Karen -Original Message- From: Cameron Ingram [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 4:57 AM To: [EMAIL PROTECTED] Subject: Re: Form Bean No... should I be? Ted could you enlighten us a bit on how to do this? :) Am I missing some thing? My code to do this consists of a few lines to do this. I figure the problem is probably something pretty small. Ex. ActionForm frm = new ActionForm(); frm.setSomething(Something); session.setAttribute(Form, form); Thanks !! Cameron Ingram [EMAIL PROTECTED] 10/31/01 04:28PM When you create the ActionForm, are you calling setServlet()? Cameron Ingram wrote: Hi all! Ok here is the problem I have a form bean that I create in an action class, I then set the variables in it and then add it to the session. This is before the corresponding jsp has been loaded The jsp is loaded and it appears that the action servlet is then recreating the form bean and re-adding it to the session, thus all of the fields I set are set back to there original values. I overrode the reset method so I know that it's not calling that to clear the variables. As I understand it the action servlet should check to see if it's in the session before it recreates it. The name I am using to define it in the session is the same name that the struts-config file uses to define the name. Any ideas??? form-bean name=editdeleteuserndsForm -This is the name that I am using when the form bean is added to the session. type=net.pscu.ndswebutils.EditDeleteUserNdsForm/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts with tiles
hi Does anybody know when the next version of struts (containing tiles) will be released? Thanks Peter -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts with tiles
I think 1.1 will have tiles in it actually the current nigthly build of 1.1 already have Tile in its source. -Original Message- From: peter [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 4:15 PM To: Struts Users Mailing List Subject: struts with tiles hi Does anybody know when the next version of struts (containing tiles) will be released? Thanks Peter -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Capturing an outgoing response.
Another way is to proxy it yourself. This may or may not work if you are dependent on user state. Basically, you server code plays the role of the web browser ala wget. (not sure if the following code is correct. Let the buyer beware) URL url = new URL(pageToCache); String pageToCacheContent = (string)url.getContent(); If you are dependant on user state, You may need to do some additional hacking Scott Sayles wrote: There are probably numerous ways this can be done. If you just want to easily capture the output from a single page, you could simply make that page an included page and use the bean:include tag to capture it's output. i.e. make the requested page include the real page via the bean:include tag. For example: - page1.jsp - bean:include id=page2Output page=page2.jsp/ % writeFile(page2Output); //or however else you're going to do this % bean:write name=page2Output/ - Where page2.jsp is what you actually want to display to the user. This is not the best solution in all cases, but may suffice for your needs. Scott On Fri, 2001-11-02 at 01:20, Brandon Goodin wrote: I need it to capture the returning html/page on the server side. For example, a client makes a request to a jsp page on my website and an an html page is returned. Is there a way to capture the html being returned to a file on the server side before it is sent to the client or as it is heading out. I would like to capture this output to a static file. Brandon Goodin Phase Communications P (406)862-2245 F (406)862-0354 http://www.phase.ws -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 11:00 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Capturing an outgoing response. You might want to take a look at WebDebug: http://www.cyberclip.com/webdebug/ -- Martin Cooper - Original Message - From: Brandon Goodin [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 6:34 PM Subject: Capturing an outgoing response. Is it possible to capture the html page that is generated by a jsp page before it is sent to the client who requested it? Brandon Goodin Phase Communications P (406)862-2245 F (406)862-0354 http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
exceptions
Design wise . . . do you all tend to propagate exceptions all the way up to the ActionServlet -- centralized like -- or rather grab them in a more granular fashion? For instance, I've got Action classes using a business object layer which has LDAP exceptions possible down deep. This layer is essentially separate and distinct from the web-struts layer. Do I send them through, or deal with them at some juncture in-between? Any opinion? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]