passing property as attribute to simple tag
Hello, I've stared blind on this one, please anyone help me. I have a "simple tag" in which I iterate through the property of a bean: This works: it calls the getWensenGebruiker method of the "persistentie" bean Now I want the property to be called as an attribute to the simple tag, so that in the calling JSP I can do something like: I catch the property with: <%@ attribute name="categorie" required="true" type="java.lang.String" %> Now I want to use this attribute as the property to be called on the bean. I tried lots of variations, like: or: etc (I tried more than you can imagine) Please anyone tell me how I can do it, hopefully with a clean solution Regards, Jeroen mail2web - Check your email from the web at http://mail2web.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot call more than once!
> > There is a simple solution. In the c:import specify an absolute URL. > I am having the same issue as you were last month. I am using OC4J (AS > 10g) and can not nor more than one Struts >action > on the same JSP. I saw that you worked around the issue by using an > absolute URL with . I tried this too and it does indeed work > however this results in a distinct request scope such that the request > scope of the calling JSP is not visible in the included Struts action >(and > vice versa). Did you find this too? Have you found any other >workarounds > to this issue? Do you think this is an OC4J issue, a Struts issue, a >JSTL > issue? Why do you suppose there is so little written about this problem > considering that what we are doing seems like it would be an ideal > architecture? It does say in the jstl spec for import that if the url is within the same application context then the environment variables will be pass on, ie request, response, etc. Struts actions commit to the response so you cannot use them to include additional data in this way. It worked out well with an absolute url because we are using a webcache so that the import was fast enough. I guess your options are to either change the struts action into just including a jsp page or servlet, or importing an absolute url and putting the required information in as request parameters to the url. Mick. ps. please post your question to the mailing list, and then, only if the thread is old, email me a copy. -- "To be young, really young, takes a very long time." Picasso --- www.vetproducts.com.au --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re:Hi
Hi , what i understand from your original problem is you want to capture on change event and want a mechanins to idenify each "option" uniquely..right. Whatever u r doing using struts is correct..and need not to make "indexed=true" . All you need to do is just write a javascript code some what like this : function callMe(objSelect){ alert(objSelect); //it should show "[object]" { function callMe(objSelect){ if(objSelect.option[objSelect.options.selectedIndex].value="a"){ //do this }else if (objSelect.option[objSelect.options.selectedIndex].value="b"){ //do this; } } } Select A Action >No you don't need 11 different methods, if you read through this it >(hopefully) should be clearer > >http://struts.apache.org/faqs/indexedprops.html > >Niall > >- Original Message - >From: "Srilatha Salla" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Sent: Friday, November 05, 2004 5:49 PM >Subject: Re: Hi > Hi, > > i tried using indexed="true" for > > > > > > > > > > > > > Select A Action > > > > > > > > I have a menuentry[] menuEntries property in formbean. > so i need to index for description and key also. > There is indexed attribute for html:text but not for bean:write > So i used html:hidden indexed="true" > > I have get and set methods in menuEntry class for key, description and menuaction. > MenuEntry[] menuEntries = form.getMenuEntries(); in action class. > > tried retrieving the menuEntries[] in the action class. > I get java.lang.NullPointerException > at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils. java:515) > > > > so if I use indexed, should there be 11 different get and set methods because name of the property changes . > > Is there anyother way without using indexed, but send index of the property to the onchange method. > > Thanks, > Latha. > > > > > Niall Pemberton <[EMAIL PROTECTED]> wrote: > Using indexed="true" will generate names such as menuAction[0], > menuAction[1] etc... > > indexed="true"> > > Niall > > - Original Message - > From: "Srilatha Salla" > To: > Sent: Friday, November 05, 2004 4:41 PM > Subject: Hi > > > > Hi, > > > > I have a logic:iterate tag in my jsp. > > > > > > > > > > > > > > > > > > > > size="15" maxlength="15"/> > > > > > > > > Select A Action > > labelName="actionNames"/> > > > > > > > > I have 11 rows to iterate. > > for each html:select i have to invoke onchange method such that depending > on the selection(for example if have options a,b,c,d in dropdownlist, i have > to display a textfield called phonenumber only for options a,c.). My problem > is i have to send some parameter in the onchange method, but since it is > iteration every iteration has same propertyname, > > I have "menuAction" as property name for htmlselect. > > > > I should be able to get the phonenumber only for the options i sent when > i load the page.(Iike edit page) > > > > I would appreciate if anyone can help me. > > > > Thanks, > > Latha > > > > __ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > Do you Yahoo!? > Check out the new Yahoo! Front Page. www.yahoo.com/a // Tushar Agrawal Software Engineer Seclore Technology Pvt Ltd. IIT Powai, Bombay (Mah) Cell : +919819804870 website:www.seclore.com /*/ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Using Tiles outside of an ActionServlet
David, thanks for your help. I figured out a simple solution to the problem which looks like it will work. BTW the "Tiles Advanced Features PDF" is an excellent resource - thanks. Lots of good patterns and examples. William - Original Message - From: "David G. Friedman" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Saturday, November 06, 2004 12:27 AM Subject: RE: Using Tiles outside of an ActionServlet > If you are only serving HTML pages and want to wrap them in your standard > layout, forget tiles and check out SiteMesh: > www.opensymphony.com/sitemesh > > The Tiles mapping I suggested can do more complex things for you than > SiteMesh. It would require setting up a tiles controller. They are > explained well, and with examples, in the Tiles Advanced Features PDF. See > the Struts' site's UserGuide on Tiles for a link at the bottom of the page > to that PDF. > > Regards, > David > > -Original Message- > From: William Ferguson [mailto:[EMAIL PROTECTED] > Sent: Friday, November 05, 2004 5:39 AM > To: Struts Users Mailing List > Subject: Re: Using Tiles outside of an ActionServlet > > > Doh - I guess I wasn't clear enough. > > I want to have the Requests for the html pages (Section2) forwarded to a > standardLayout page which uses tiles to provide consistent screens. The > originally targetted html page needs to be included/embedded within the > standardLayout page. > > David, I guess I could be missing something (wouldn't be the first time), > but I don't think your solution will give me that will it? Its more about > allowing the html files to themselves contain a tile. > > If I could somehow get the html requests to be forwarded to a single page, > then I could do it. > But I can't see how to do this without using a 2nd ActionServlet which > brings me back in the original pain. > > > William > > > - Original Message - > From: "David G. Friedman" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, November 05, 2004 3:35 PM > Subject: RE: Using Tiles outside of an ActionServlet > > > > William, > > > > For Section 2, IF you are using the same webapp, you can make a tile show > up > > in a JSP without using the Actionservlet (you just need to have the Struts > > plugIn initialize the tiles from the tiles xml configuration. Try > creating > > a JSP with this type of syntax: > > > > <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %> > > > > > > Now, to get the *.html mapping to work, you'd have to reonfigure yout > > application server to map *.html pages so they are handled by the JSP > > engine. In tomcat, you can do that like this: > > > > > >jsp > >*.jsp > > > > > > Regards, > > David > > > > -Original Message- > > From: William Ferguson [mailto:[EMAIL PROTECTED] > > Sent: Thursday, November 04, 2004 10:36 PM > > To: [EMAIL PROTECTED] > > Subject: Using Tiles outside of an ActionServlet > > > > > > I'm trying to create a WebApp with 2 sections. > > > > Section1 consists of Struts Actions managed by an ActionServlet and using > > Tiles for consistent layout. The incoming requests will always be '*.do'. > > > > Section2 is a bunch of generated html fragments (each is a page's worth) > > that I would like to embed in the Tiles I'm already using in Section1. Ie > > Request for html page comes in and it is forwarded to the Tile page which > > embeds the originally requested page. The incoming requests will always be > > 'foo/.html' > > > > I thought I had it nailed. > > > > Attempt1: Have the request for Section2 be handled by its own > ActionServlet, > > with a very simple custom RequestProcessor. But Struts only allows a > single > > instance of ActionServlet (or subclass) within a WebApp. > > > > Atempt2: Use a single ActionServlet and either use a separate Module for > > each section, or use a wildcard ActionMapping to catch all of Section2's > > html requests. But Struts only allows a single servlet-mapping element for > > the controller-servlet and I would need 2 (*.do and foo/*.html). NB > further > > Struts restriction is that when using Modules you can only use extension > > paths in your servlet-mappings. > > > > > > Attempt3: ??? I'm looking for ideas. > > At the moment the only solution I can see is to implement my own Servlet > > (not an ActionServlet subclass) which then uses the Tiles config and > > mechanism to render the Section2 response with the required layout. > > > > Is there a better way? > > > > thanks in advance. > > > > William > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - >
Re: Tomcat/5.5.3 with jdk1.5.0 DONOT run on port 5555.
Why not post on the Tomcat list? .V Amit Gupta wrote: Hi , I have configured Tomcat/5.5.3 with jdk1.5.0. When I configure tomcat to run on then it DONOT work. On 8080 port tomcat work fine. What May be the reason? Amit Gupta - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat/5.5.3 with jdk1.5.0 DONOT run on port 5555.
Hi , I have configured Tomcat/5.5.3 with jdk1.5.0. When I configure tomcat to run on then it DONOT work. On 8080 port tomcat work fine. What May be the reason? Amit Gupta