http proxy
Hello, My app will be used (in production) behind a SSO server that adds HTTP headers to incoming requests. I use those headers for user authentication. For tests, I need to emulate those headers and I'm looking for a HttpProxy that can be customized to process incoming HTTP request and add mock HTTP headers. Do you know any opensource (java) proxy that could help me doing this ? This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
prepopulating a dropdown box in a struts way.
I think there are many people asking the same question. But I cannot find the answer. any web sites have more or less coding example of populating a dropdown box or list in a Struts way before the web page displays. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale documentation
2005/12/7, Gary VanMatre [EMAIL PROTECTED]: I'm planning on some Shale white papers that will be available on my employers website (so I can get paid for doing it and promote services :-). Please feel free to ask questions here about Shale. thanks to you -- TREMALNAIK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http proxy
2005/12/8, Nicolas De Loof [EMAIL PROTECTED]: Do you know any opensource (java) proxy that could help me doing this ? i've used muffin for a while: http://muffin.doit.org/ I used it for much simpler tasks then those you need, but I see it's very flexible and maybe it gives you what you need -- TREMALNAIK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: http proxy
Thanks for the link ! Tremal Naik a écrit : 2005/12/8, Nicolas De Loof [EMAIL PROTECTED]: Do you know any opensource (java) proxy that could help me doing this ? i've used muffin for a while: http://muffin.doit.org/ I used it for much simpler tasks then those you need, but I see it's very flexible and maybe it gives you what you need -- TREMALNAIK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sslext
2005/12/6, Jim Reynolds [EMAIL PROTECTED]: If I put a object into the request, and switched protocols, the request object was no longer found? Since most struts work has I see that when sslext switches from a protocol to another what is really happening is: a redirect is sent in the response to the user. So the client performs another request with the swapped protocol. So: 1-The client send a request with the first protocol 2-The server send a redirect to the client 3-The client sends a new request with the second protocol The original request is lost in 2, so if you put something in the request before 2, that may be lost as well. I said 'may' because, if I remeber well, sslext itself saves the request object in the session and when the new user request arrives restores the old request appending it as a query string on the new one. This is a behaviour not always good if you are coming out from a secure page (as may be the case when you perform a login) because I noticed that sometimes, exiting from a secure login session, you can see the username and password in the browser url. I resolve it with an addictional redirect (using a JSP forwarding to another, but there are many ways) to clean the request query string before leaving a secure channel. Even if sometimes the usage of sslext is a bit tricky, I think it works well for many things and I use it in my commercial applications. -- TREMALNAIK - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tabs is struts
Hi, Is there is any way to use tabs in struts. Is there is any html bean tag for this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tabs is struts
Try struts layout tags. They support tabbed inputs. On 12/8/05, Sony Thomas [EMAIL PROTECTED] wrote: Hi, Is there is any way to use tabs in struts. Is there is any html bean tag for this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale-Clay: Error finding Converter for component
Thanks for the help Gary. You sorted out my first problem, but now I have a new one. I'll spend some time investigating it myself before posting (which I'll probably end up doing). Cheers, Mikael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any shortcut to know source jsp in Struts ?
Dave Newton wrote: I got so crabby I wrote a Ruby program that eats the struts and tile configs and spits out a JavaDoc-like listing (screenshot available at http://www.whackamonk.com/strutsdoc/screenshot1.png once my FREAKIN' HOSTING COMPANY GETS ITS SH*T TOGETHER.) The screenshot is up, in case anybody cares. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logout for multiple webapps.
Mathew Joseph wrote: My web application consists of 2 webapps. And these are internally invoking each other. Or the user itself can make calls to any of these webapps using the common menu page. Now, when i try to logout (session.invalidate()), its not logging off from both webapp sessions. Is there any way to logoff from both sessions at a time ? If you're already internally invoking the other web app, can't you internally invoke a logout process? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UnsupportedClassVersionError
Hi, I recently uploaded an updated Struts application to a remote server. Now I get this message (below: UnsupportedClassVersionError). I am using Tomcat 5.0.27. I do have 5.5 on that system, but everything points to 5.0.27 (as far as I can tell). I am running Java 1.4.2_01_b06. I have the same setup on my dev machine--except Tomcat 5.5 is not on that system--and everything works fine. Thanks for your help. 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for jdbc/portal = ResourceParams[name=jdbc/portal, parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, maxWait=1, maxActive=10, password=small1, url=jdbc:mysql://127.0.0.1:3306/fortune?autoReconnect=true, driverClassName=com.mysql.jdbc.Driver, maxIdle=5, username=fortune}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Adding resource ref jdbc/portal 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory ClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shar eable},{type=auth,content=Container},{type=factory,content=org.apache.common s.dbcp.BasicDataSourceFactory},{type=maxWait,content=1},{type=maxActive, content=10},{type=password,content=small1},{type=url,content=jdbc:mysql://12 7.0.0.1:3306/fortune?autoReconnect=true},{type=driverClassName,content=com.m ysql.jdbc.Driver},{type=maxIdle,content=5},{type=username,content=fortune}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for mail/Session = ResourceParams[name=mail/Session, parameters={mail.smtp.host=mars.webappcabaret.net}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Adding resource ref mail/Session 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: ResourceRef[className=javax.mail.Session,factoryClassLocation=null,factoryCl assName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Sharea ble},{type=auth,content=Container},{type=mail.smtp.host,content=mars.webappc abaret.net}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for UserTransaction = null 2005-12-08 04:32:43 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:803) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCom pilerExist(CompilerAdapterFactory.java:140) at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(C ompilerAdapterFactory.java:98) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 11) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 95) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at
Re: Struts Design Question
It sounds like WildCard mappings (since Struts 1.2) might help. You would probably only need one set of mappings for any number of catagories. You would probably only need one ActionForm too. If some of the categories don't use some of the properties, then they just travel null. Just give the base form a different name (or extend it) to add different validations. If you are using DynaActionForms, and the categories share some properties, in the upcoming Struts 1.3, you can use the new extend attribute to create a base DynaActionForm, and then add properties as needed. To get a head start on Struts 1.3, see the nightly build. For the server page, a popular technique would be to use a DispatchAction and represent each product with its own dispatch method. If the products share some fields, you could set a ActionForm property to the dispatch method, and then use logic tags to include or exclude fields for a particular product. -- HTH, Ted. http://www.husted.com/poe/ On 12/7/05, bill [EMAIL PROTECTED] wrote: A bit of a struts newbie here. I have an application with the following page flow: choose Product Category -- choose Product Model -- create/edit chosen model Currently we only have one ActionForm\JSP Edit Form, but we need to expand this to support different Product Categories. Each would be a differnet set of attributes, so, probably, a differnt ActionForm\JSP combo. Should we have a Forward per ProductCategory with a Product Category specific ActionForm and corresponding jsp? Seems like there should be a better/more generic way. Any ideas? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Config in Struts for Forward Action
The reset method would be called in the normal course before the ActionForm is populated. What reset does is up to you. For the base ActionForm, it's an empty method that you can override. In the case of DynaActionForms, you can specify an initial=value and use reset=true to have the property set to that value before any auto population event. -- HTH, Ted. http://www.husted.com/poe/ On 12/7/05, Raghuveer [EMAIL PROTECTED] wrote: How to reset the form bean,If form bean is used in action mapping for ForwardAction. As per below code when ever i click partDataSearch.do i want the formbean to be reset. --- JSP html:form name=cPartDataActionForm type=com.utc.iae.ip.actionforms.CPartDataActionForm action=/partDataSearch.do -- StrutsConfig.xml action path=/partDataSearch scope=request name=cPartDataActionForm type=org.apache.struts.actions.ForwardAction validate=false parameter=/jsp/partsearchpopup.jsp/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Shale-Clay: Are managed beans mandatory in xml view?
Hi, testing some clay templating ( base code from some very helpful posts in this forum), and it seems like I must have a managed bean associated to every view. Is this correct? When running the code below without a managed bean I get an error, but if I declare one for it it works fine. The code I use: text.xml view component jsfid=/test.xml extends=baseLayout symbols set name=title value=Simple Test/ set name=bodyContent value=/pages/test.html/ /symbols /component /view component from clay-config.xml: component jsfid=baseLayout extends=clay attributes set name=clayJsfid value=/layout/layout.html/ /attributes symbols set name=title value=Fasta/ set name=navContent value=/layout/defaultNav.html/ set name=headerContent value=/layout/defaultHeader.html/ set name=bodyContent value=/layout/defaultBody.html/ set name=footerContent value=/layout/defaultFooter.html/ /symbols /component When running this without a managed bean called 'test' in faces-config.xml, I get the following error: ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression '#{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java Regards, Mikael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: prepopulating a dropdown box in a struts way.
You need to make use of the html:optionsCollection tag html:select property=yearOfManufacture html:optionsCollection property=years/ /html:select In your form bean you need an object that has the properties label and value. Like this: public class ComboBoxItem implements Serializable, Comparable { private String label; private String value; // This is the contract for html:optionsCollection, label is what is // displayed on the form, and value is the code behind it. public ComboBoxItem(String label, String value) { this.label = label; this.value = value; } public String getLabel() { return label; } public String getValue() { return value; } public int compareTo(Object o) {...} Then, in your populate action, you'll set a CollectionComboBoxItem on the form. That should to it. On 12/8/05, Leung Ping Cheung [EMAIL PROTECTED] wrote: I think there are many people asking the same question. But I cannot find the answer. any web sites have more or less coding example of populating a dropdown box or list in a Struts way before the web page displays. Thanks -- Keith Sader [EMAIL PROTECTED] http://www.saderfamily.org/roller/page/ksader http://www.jroller.com/page/certifieddanger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UnsupportedClassVersionError
This error occurs when you are running an earlier JVM with code that was compiled with a newer JDK. In your case, I think you might be running a 1.4.2 JVM with code that was compiled with the 1.5 JDK. -Richard e-denton Java Programmer wrote: Hi, I recently uploaded an updated Struts application to a remote server. Now I get this message (below: UnsupportedClassVersionError). I am using Tomcat 5.0.27. I do have 5.5 on that system, but everything points to 5.0.27 (as far as I can tell). I am running Java 1.4.2_01_b06. I have the same setup on my dev machine--except Tomcat 5.5 is not on that system--and everything works fine. Thanks for your help. 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for jdbc/portal = ResourceParams[name=jdbc/portal, parameters={factory=org.apache.commons.dbcp.BasicDataSourceFactory, maxWait=1, maxActive=10, password=small1, url=jdbc:mysql://127.0.0.1:3306/fortune?autoReconnect=true, driverClassName=com.mysql.jdbc.Driver, maxIdle=5, username=fortune}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Adding resource ref jdbc/portal 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: ResourceRef[className=javax.sql.DataSource,factoryClassLocation=null,factory ClassName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Shar eable},{type=auth,content=Container},{type=factory,content=org.apache.common s.dbcp.BasicDataSourceFactory},{type=maxWait,content=1},{type=maxActive, content=10},{type=password,content=small1},{type=url,content=jdbc:mysql://12 7.0.0.1:3306/fortune?autoReconnect=true},{type=driverClassName,content=com.m ysql.jdbc.Driver},{type=maxIdle,content=5},{type=username,content=fortune}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for mail/Session = ResourceParams[name=mail/Session, parameters={mail.smtp.host=mars.webappcabaret.net}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Adding resource ref mail/Session 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: ResourceRef[className=javax.mail.Session,factoryClassLocation=null,factoryCl assName=org.apache.naming.factory.ResourceFactory,{type=scope,content=Sharea ble},{type=auth,content=Container},{type=mail.smtp.host,content=mars.webappc abaret.net}] 2005-12-08 04:30:59 NamingContextListener[/Catalina/localhost]: Resource parameters for UserTransaction = null 2005-12-08 04:32:43 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:803) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:721) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCom pilerExist(CompilerAdapterFactory.java:140) at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(C ompilerAdapterFactory.java:98) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 11) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 95) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237)
please give me some directions. - how can i use tabs in struts,
Hi , i have lot of information to fill in the form. I mean it cannot contain in one page. so i would like to use tabs in my struts application. how can i use tabs in struts, please give me a reply. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: please give me some directions. - how can i use tabs in struts,
On 12/8/05, Sony Thomas [EMAIL PROTECTED] wrote: Hi , i have lot of information to fill in the form. I mean it cannot contain in one page. so i would like to use tabs in my struts application. how can i use tabs in struts, please give me a reply. http://ditchnet.org/tabs I haven't used it. -Rahul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale-Clay: Are managed beans mandatory in xml view?
On 12/8/05, Mikael Andersson [EMAIL PROTECTED] wrote: Hi, testing some clay templating ( base code from some very helpful posts in this forum), and it seems like I must have a managed bean associated to every view. Is this correct? When running the code below without a managed bean I get an error, but if I declare one for it it works fine. The code I use: text.xml view component jsfid=/test.xml extends=baseLayout symbols set name=title value=Simple Test/ set name=bodyContent value=/pages/test.html/ /symbols /component /view component from clay-config.xml: component jsfid=baseLayout extends=clay attributes set name=clayJsfid value=/layout/layout.html/ /attributes symbols set name=title value=Fasta/ set name=navContent value=/layout/defaultNav.html/ set name=headerContent value=/layout/defaultHeader.html/ set name=bodyContent value=/layout/defaultBody.html/ set name=footerContent value=/layout/defaultFooter.html/ /symbols /component When running this without a managed bean called 'test' in faces-config.xml, I get the following error: ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression '#{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java Regards, Mikael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Mikael, I think you could get it down to 1 managed-bean by doing this component jsfid=baseLayout extends=clay attributes set name=clayJsfid value=/layout/layout.html/ /attributes symbols set name=managed-bean-name value=layoutBean/ set name=title value=Fasta/ set name=navContent value=/layout/defaultNav.html/ set name=headerContent value=/layout/defaultHeader.html/ set name=bodyContent value=/layout/defaultBody.html/ set name=footerContent value=/layout/defaultFooter.html/ /symbols /component And declaring layoutBean in your faces-config.xml. Then you would only need to do this once for all your layouts. Gary, can the managed-bean be optional?
RE: Re: checkbox for nested collection
Thanks Laurie, It worked perfectly. Neil Meyer -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: 07 December 2005 12:30 AM To: user@struts.apache.org Subject: Re: checkbox for nested collection Neil Meyer wrote: Good day, I read all the topics on checkboxes in this list but couldn't find a solution for my problem. I hope there is somebody that can shed some light on this to me. I have a dynamic list of menu items that is retrieved from a database into an array property. I have to array properties one with all menu items available and one with the user items allocated. When I render my JSP I need the array list of all items to display. See example below: logic:iterate id=profileListItem indexId=index name=profileListDTO bean:write name=profileListItem property=title/ html:multibox property=menuItemsSelected bean:write name=profileListItem property=menuItemsId/ /html:multibox /logic:iterate What I need now is to pre check the relevant menu items from the array specific to the user. Any help will be appreciated. You need to set the values in the menuItemsSelected form bean property to reflect the array specific to the user. I'm not too sure from your description what that means in practice, but the result you're looking for is for the menuItemsSelected property to contain only those values which should be checked. L. - 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]
A problem about bean:write
In a jsp page, when use bean:write there should be a bean name to be defined, as bean:write name = mybean property = key/. well, here, i come across a problem:how can i define the javabeanmybean to let the tag know it. Because, when i just define a class mybean with property key and method getKey(),setKey(), the system tell me that he can't find the bean with property key. -- Thanks for reading comain chen
Re: Shale-Clay: Are managed beans mandatory in xml view?
Ryan Wynn bigwynnr at gmail.com writes: Mikael, I think you could get it down to 1 managed-bean by doing this component jsfid=baseLayout extends=clay attributes set name=clayJsfid value=/layout/layout.html/ /attributes symbols set name=managed-bean-name value=layoutBean/ set name=title value=Fasta/ set name=navContent value=/layout/defaultNav.html/ set name=headerContent value=/layout/defaultHeader.html/ set name=bodyContent value=/layout/defaultBody.html/ set name=footerContent value=/layout/defaultFooter.html/ /symbols /component And declaring layoutBean in your faces-config.xml. Then you would only need to do this once for all your layouts. Gary, can the managed-bean be optional? Hi, I have experienced trouble when specifying a specific managed bean name, and not using the specific managed bean name naming convention (see my previous post on the 7th of December). Is it currently possible to override the default name for a managed bean? Cheers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale-Clay: Are managed beans mandatory in xml view?
From: Ryan Wynn [EMAIL PROTECTED] On 12/8/05, Mikael Andersson wrote: Hi, testing some clay templating ( base code from some very helpful posts in this forum), and it seems like I must have a managed bean associated to every view. Is this correct? When running the code below without a managed bean I get an error, but if I declare one for it it works fine. [snippet] When running this without a managed bean called 'test' in faces-config.xml, I get the following error: ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression '#{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java This is a stardard faces EL exception. It means that an object identified using token test can not be found as a managed bean or a object in request, session, and application scopes. [snippet] I think you could get it down to 1 managed-bean by doing this component jsfid=baseLayout extends=clay attributes set name=clayJsfid value=/layout/layout.html/ /attributes symbols set name=managed-bean-name value=layoutBean/ set name=title value=Fasta/ set name=navContent value=/layout/defaultNav.html/ set name=headerContent value=/layout/defaultHeader.html/ set name=bodyContent value=/layout/defaultBody.html/ set name=footerContent value=/layout/defaultFooter.html/ /symbols /component And declaring layoutBean in your faces-config.xml. Then you would only need to do this once for all your layouts. Gary, can the managed-bean be optional? Yep, the managed bean is optional and just another symbol that gets applied to the binding expression before the binding is created. If you prefer the symbol myBean, you could add it as a symbol and do something like this, [EMAIL PROTECTED] Full views HTML veiws assume the same association with a ViewController so that you can pick up the extra events in the lifecycle. Gary
Validator and Javascript
Hi, I'm using Struts 1.2.7 and I'm using commons-validator to validate my forms. Can someone tell me why validator includes all the javascript functions when rendering the jsp page? Even including javascript functions that I'm not using in validation.xml, such as creditcard validation or integer validation? Is there anyway to include just the javascript my jsp needs and not all the extra javascript? Thanks __ 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]
RE: Addressformat For Different Countries
I would set up three different JSP Pages and route to them based on them answering which country they are from. I suggest you use the struts method to setLocale to the country and then make a version of the resources file for that locale. In our application we have two sets of properties files. ApplicationResources_es.properties for Spanish ApplicationResources.properties for English If you do a setLocale in struts it will read the key from the appropriate file. so in the English properties file the key is: title.welcome=Hello. How are you? and in the Spanish properties file the key is: title.welcome=Hola. ?Como esta usted? Then in your JSP page all you need to do is do bean:message key=title.welcome/ There are other approaches but this will give you the best results. Let me know if you have any more questions on the above. Shawn -Original Message- From: Shiva Narayana [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 4:10 AM To: Struts Users Mailing List Subject: Addressformat For Different Countries Hi All, I have to implement address format depending on country in JSP. Like For Australia Line1, line2 ,Street,Code For UK Code,Street,Line1,COuntry For IndiaStreet,City,line1,country Likewise i have do display the label and text box based on the country. Please help me how to do this in struts. Thanks in advance. -- Regards Shiva This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any shortcut to know source jsp in Struts ?
Dave- I would look at Ants JavaDoc for creating the necessary html Doc In the meanwhile You may want to look at another hosting solution or host the site yourself- Good Work! M - Original Message - From: Dave Newton [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, December 08, 2005 7:39 AM Subject: Re: Is there any shortcut to know source jsp in Struts ? Dave Newton wrote: I got so crabby I wrote a Ruby program that eats the struts and tile configs and spits out a JavaDoc-like listing (screenshot available at http://www.whackamonk.com/strutsdoc/screenshot1.png once my FREAKIN' HOSTING COMPANY GETS ITS SH*T TOGETHER.) The screenshot is up, in case anybody cares. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator and Javascript
I think Validator Framework internally uses Javascript..You can customise according to you Requirement..Some one correct me if iam wrong.. On 12/8/05, Tony Santinello [EMAIL PROTECTED] wrote: Hi, I'm using Struts 1.2.7 and I'm using commons-validator to validate my forms. Can someone tell me why validator includes all the javascript functions when rendering the jsp page? Even including javascript functions that I'm not using in validation.xml, such as creditcard validation or integer validation? Is there anyway to include just the javascript my jsp needs and not all the extra javascript? Thanks __ 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] -- Thanks Regards Srinivas 732-648-9421(Cell)
Re: Shale-Clay: Are managed beans mandatory in xml view?
Gary VanMatre gvanmatre at comcast.net writes: [snippet] When running this without a managed bean called 'test' in faces-config.xml, I get the following error: ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression #{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java This is a stardard faces EL exception. It means that an object identified using token test can not be found as a managed bean or a object in request, session,and application scopes. Ok. The strange thing is that I don't access any beans in my test.xml view, none at all, just plain html output. I have tried this with two different supper simple views wich doesn't use any beans in any of the included pages, and both get the above exception. [snippet] And declaring layoutBean in your faces-config.xml. Then you would only need to do this once for all your layouts. Gary, can the managed-bean be optional? Yep, the managed bean is optional and just another symbol that gets applied to the binding expression before the binding is created. If you prefer the symbol myBean, you could add it as a symbol and do something like this, #{ atmybean.someValue}. Full views HTML veiws assume the same association with a ViewController so that you can pick up the extra events in the lifecycle. Do you know what I could be doing wrong, I am sure that I am not referencing any beans at all in the pages. And the Excption always specifies that it can't find a value binding for a bean with the same name as the entry url. Gary I really appreciate all your help, I'm a beginner when it comes to web frameworks and have been trying to learn it by myself. It feels good to be able to get some help :) Thanks, Mikael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Online Struts Tutorial
Would someone please recommend a current tutorial that may include iBATIS integration? tia, am
Re: Addressformat For Different Countries
//I would set up three different JSP Pages .. But what happens if there are about 100 countries?? we need 100 JSPs right..Instead he can go for a single JSP with logic tags..but if there are 100 countries...his JSP will be very very long ..option left is to go for tiles... On 12/8/05, Garner, Shawn [EMAIL PROTECTED] wrote: I would set up three different JSP Pages and route to them based on them answering which country they are from. I suggest you use the struts method to setLocale to the country and then make a version of the resources file for that locale. In our application we have two sets of properties files. ApplicationResources_es.properties for Spanish ApplicationResources.properties for English If you do a setLocale in struts it will read the key from the appropriate file. so in the English properties file the key is: title.welcome=Hello. How are you? and in the Spanish properties file the key is: title.welcome=Hola. ?Como esta usted? Then in your JSP page all you need to do is do bean:message key=title.welcome/ There are other approaches but this will give you the best results. Let me know if you have any more questions on the above. Shawn -Original Message- From: Shiva Narayana [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 4:10 AM To: Struts Users Mailing List Subject: Addressformat For Different Countries Hi All, I have to implement address format depending on country in JSP. Like For Australia Line1, line2 ,Street,Code For UK Code,Street,Line1,COuntry For IndiaStreet,City,line1,country Likewise i have do display the label and text box based on the country. Please help me how to do this in struts. Thanks in advance. -- Regards Shiva This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Srinivas 732-648-9421(Cell)
Re: Online Struts Tutorial
Hey there, Mr. Denied, JPetstore 5 is available in the iBATIS SVN repository...more of an example than a tutorial, but it does use Struts and iBATIS ... as well as junit+emma for testing. http://svn.apache.org/repos/asf/ibatis/trunk/java/jpetstore/jpetstore5/ Larry On 12/8/05, Access Denied [EMAIL PROTECTED] wrote: Would someone please recommend a current tutorial that may include iBATIS integration? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online Struts Tutorial
Thanks a lot, Larry! Are there instructions on how to set everything up from scratch? How to get a hello world working? ad 2005/12/8, Larry Meadors [EMAIL PROTECTED]: Hey there, Mr. Denied, JPetstore 5 is available in the iBATIS SVN repository...more of an example than a tutorial, but it does use Struts and iBATIS ... as well as junit+emma for testing. http://svn.apache.org/repos/asf/ibatis/trunk/java/jpetstore/jpetstore5/ Larry On 12/8/05, Access Denied [EMAIL PROTECTED] wrote: Would someone please recommend a current tutorial that may include iBATIS integration? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale-Clay: Are managed beans mandatory in xml view?
From: Mikael Andersson [EMAIL PROTECTED] Gary VanMatre comcast.net writes: [snippet] When running this without a managed bean called 'test' in faces-config.xml, I get the following error: ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression #{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java This is a stardard faces EL exception. It means that an object identified using token test can not be found as a managed bean or a object in request, session,and application scopes. Ok. The strange thing is that I don't access any beans in my test.xml view, none at all, just plain html output. I have tried this with two different supper simple views wich doesn't use any beans in any of the included pages, and both get the above exception. [snippet] And declaring layoutBean in your faces-config.xml. Then you would only need to do this once for all your layouts. Gary, can the managed-bean be optional? Yep, the managed bean is optional and just another symbol that gets applied to the binding expression before the binding is created. If you prefer the symbol myBean, you could add it as a symbol and do something like this, #{ mybean.someValue}. Full views HTML veiws assume the same association with a ViewController so that you can pick up the extra events in the lifecycle. Do you know what I could be doing wrong, I am sure that I am not referencing any beans at all in the pages. And the Excption always specifies that it can't find a value binding for a bean with the same name as the entry url. Make sure that you don't have any expression like [EMAIL PROTECTED] bound to a control. If you are using the @managed-bean-name symbol, make sure it's registered in the faces-config.xml. If you have a more specific exception, HTML/XML config I might be of more help. Gary I really appreciate all your help, I'm a beginner when it comes to web frameworks and have been trying to learn it by myself. It feels good to be able to get some help :) Don't feel alone, we've all been there one time or another. Thanks, Mikael Gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any shortcut to know source jsp in Struts ?
Martin Gainty wrote: I would look at Ants JavaDoc for creating the necessary html Doc Do you mean for the formatting or specific tasks for creating the same documentation? I haven't found much that I liked in terms of documenting overall structure (outside of graphical IDE tools, anyway) that was easily extensible enough to add more functionality. I should add that an even more internal version (which should be in the first 'release') also adds some marginally useful information regarding JSP pages and is fairly flexible in terms of parsing out more info. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Addressformat For Different Countries
He said he only needed it for 3 countries. Seems like my way would be easy for that amount of pages. He could even use tiles for the common parts of the pages. Seems like since the ordering is different that as tiles configuration would need a separate tiles definition for each country so there could possibly be a 100 different tiles definitions. I would be curious to see the tiles version. I'm not that familiar with tiles though. Shawn -Original Message- From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 11:14 AM To: Struts Users Mailing List Subject: Re: Addressformat For Different Countries //I would set up three different JSP Pages .. But what happens if there are about 100 countries?? we need 100 JSPs right..Instead he can go for a single JSP with logic tags..but if there are 100 countries...his JSP will be very very long ..option left is to go for tiles... On 12/8/05, Garner, Shawn [EMAIL PROTECTED] wrote: I would set up three different JSP Pages and route to them based on them answering which country they are from. I suggest you use the struts method to setLocale to the country and then make a version of the resources file for that locale. In our application we have two sets of properties files. ApplicationResources_es.properties for Spanish ApplicationResources.properties for English If you do a setLocale in struts it will read the key from the appropriate file. so in the English properties file the key is: title.welcome=Hello. How are you? and in the Spanish properties file the key is: title.welcome=Hola. ?Como esta usted? Then in your JSP page all you need to do is do bean:message key=title.welcome/ There are other approaches but this will give you the best results. Let me know if you have any more questions on the above. Shawn -Original Message- From: Shiva Narayana [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 4:10 AM To: Struts Users Mailing List Subject: Addressformat For Different Countries Hi All, I have to implement address format depending on country in JSP. Like For Australia Line1, line2 ,Street,Code For UK Code,Street,Line1,COuntry For IndiaStreet,City,line1,country Likewise i have do display the label and text box based on the country. Please help me how to do this in struts. Thanks in advance. -- Regards Shiva This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Srinivas 732-648-9421(Cell) This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any shortcut to know source jsp in Struts ?
I liked it because you setup the doc task depending on a previous task (such as JSPC task) In any case I very look forward to seeing the features your mentioned Give a shout when you have something viable Thanks Martin- - Original Message - From: Dave Newton [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, December 08, 2005 12:40 PM Subject: Re: Is there any shortcut to know source jsp in Struts ? Martin Gainty wrote: I would look at Ants JavaDoc for creating the necessary html Doc Do you mean for the formatting or specific tasks for creating the same documentation? I haven't found much that I liked in terms of documenting overall structure (outside of graphical IDE tools, anyway) that was easily extensible enough to add more functionality. I should add that an even more internal version (which should be in the first 'release') also adds some marginally useful information regarding JSP pages and is fairly flexible in terms of parsing out more info. Dave - 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: Addressformat For Different Countries
single JSP with logic tags If you do this you will get one huge JSP page potentially if you have a hundred countries. I assume with a single huge JSP not only would it take longer to serve the page because of the logic tags but the code itself would be harder to maintain. Also there is a limit to the length of a JSP page so I'm for breaking it up. You could do it this way also for 3 countries. Shawn -Original Message- From: Garner, Shawn Sent: Thursday, December 08, 2005 11:47 AM To: 'Struts Users Mailing List' Subject: RE: Addressformat For Different Countries He said he only needed it for 3 countries. Seems like my way would be easy for that amount of pages. He could even use tiles for the common parts of the pages. Seems like since the ordering is different that as tiles configuration would need a separate tiles definition for each country so there could possibly be a 100 different tiles definitions. I would be curious to see the tiles version. I'm not that familiar with tiles though. Shawn -Original Message- From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 11:14 AM To: Struts Users Mailing List Subject: Re: Addressformat For Different Countries //I would set up three different JSP Pages .. But what happens if there are about 100 countries?? we need 100 JSPs right..Instead he can go for a single JSP with logic tags..but if there are 100 countries...his JSP will be very very long ..option left is to go for tiles... On 12/8/05, Garner, Shawn [EMAIL PROTECTED] wrote: I would set up three different JSP Pages and route to them based on them answering which country they are from. I suggest you use the struts method to setLocale to the country and then make a version of the resources file for that locale. In our application we have two sets of properties files. ApplicationResources_es.properties for Spanish ApplicationResources.properties for English If you do a setLocale in struts it will read the key from the appropriate file. so in the English properties file the key is: title.welcome=Hello. How are you? and in the Spanish properties file the key is: title.welcome=Hola. ?Como esta usted? Then in your JSP page all you need to do is do bean:message key=title.welcome/ There are other approaches but this will give you the best results. Let me know if you have any more questions on the above. Shawn -Original Message- From: Shiva Narayana [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 4:10 AM To: Struts Users Mailing List Subject: Addressformat For Different Countries Hi All, I have to implement address format depending on country in JSP. Like For Australia Line1, line2 ,Street,Code For UK Code,Street,Line1,COuntry For IndiaStreet,City,line1,country Likewise i have do display the label and text box based on the country. Please help me how to do this in struts. Thanks in advance. -- Regards Shiva This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Srinivas 732-648-9421(Cell) This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale-Clay: Are managed beans mandatory in xml view?
Gary VanMatre gvanmatre at comcast.net writes: [snippet] Make sure that you don't have any expression like #{ at managed-bean-name} bound to a control. If you are using the at managed-bean-name symbol, make sure it's registered in the faces-config.xml. If you have a more specific exception, HTML/XML config I might be of more help. Gary I really appreciate all your help, I'm a beginner when it comes to web frameworks and have been trying to learn it by myself. It feels good to be able to get some help :) Don't feel alone, we've all been there one time or another. Thanks, Mikael Gary I'm posting some more information: using myfaces 1.1.1 faces-config.xml doesn't contain a managed bean. test.xml : ?xml version=1.0 encoding=UTF-8? !DOCTYPE view PUBLIC -//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN http://struts.apache.org/dtds/shale-clay-config_1_0.dtd; view component jsfid=/test.xml extends=baseLayout symbols set name=title value=Simple Test/ set name=bodyContent value=/pages/test.html/ /symbols /component /view baseLayout definition from clay-config.xml : component jsfid=baseLayout extends=clay attributes set name=clayJsfid value=/layout/layout.html/ /attributes symbols set name=title value=Default title/ set name=navContent value=/layout/defaultNav.html/ set name=headerContent value=/layout/defaultHeader.html/ set name=bodyContent value=/layout/defaultBody.html/ set name=footerContent value=/layout/defaultFooter.html/ /symbols /component pages/test.html : h3Hello/h3 layout/layout.html: html head title@title/title [ removed css stuff ] /head body div class=centerWrapper div class=headerContent span jsfid=clay clayJsfid=@headerContent allowbody=false/ /div div class=navContent span jsfid=clay clayJsfid=@navContent allowBody=false/ /div div class=bodyContent span jsfid=clay clayJsfid=@bodyContent allowBody=false/ /div div class=footerContent span jsfid=clay clayJsfid=@footerContent allowBody=false/ /div /div /body /html layout/defaultNav.html : div id=tabs ul liHome/li liLinks/li li class=hereContact/li /ul /div layout/defaultHeader.html : center h3Shale-Clay test/h3 /center layout/defaultBody.html: h3default body/h3 layout/defaultFooter.html: center h3default footer/h3 /center Stacktrace from catalina.out: INFO (org.apache.shale.clay.faces.ClayViewHandler) - Clay template restoreView for /test.xml ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression '#{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397) at org.apache.shale.faces.ShaleViewHandler.setupViewController( ShaleViewHandler.java:230) at org.apache.shale.faces.ShaleViewHandler.createView(ShaleViewHandler.java:123) at org.apache.shale.tiles.TilesViewHandler.createView(TilesViewHandler.java:184) at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:127) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.shale.faces.ShaleApplicationFilter.doFilter( ShaleApplicationFilter.java:285) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler. processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at
Re: Addressformat For Different Countries
Another option is to pull your data already translated from a preconfigured Locale specific DB instance (an example is ORA_NLS configutation from Oracle) doc available at http://download-east.oracle.com/docs/cd/A81042_01/DOC/server.816/a76966/ch1.htm#41077 HTH, M- - Original Message - From: Garner, Shawn [EMAIL PROTECTED] To: 'Struts Users Mailing List' user@struts.apache.org Sent: Thursday, December 08, 2005 12:46 PM Subject: RE: Addressformat For Different Countries He said he only needed it for 3 countries. Seems like my way would be easy for that amount of pages. He could even use tiles for the common parts of the pages. Seems like since the ordering is different that as tiles configuration would need a separate tiles definition for each country so there could possibly be a 100 different tiles definitions. I would be curious to see the tiles version. I'm not that familiar with tiles though. Shawn -Original Message- From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 11:14 AM To: Struts Users Mailing List Subject: Re: Addressformat For Different Countries //I would set up three different JSP Pages .. But what happens if there are about 100 countries?? we need 100 JSPs right..Instead he can go for a single JSP with logic tags..but if there are 100 countries...his JSP will be very very long ..option left is to go for tiles... On 12/8/05, Garner, Shawn [EMAIL PROTECTED] wrote: I would set up three different JSP Pages and route to them based on them answering which country they are from. I suggest you use the struts method to setLocale to the country and then make a version of the resources file for that locale. In our application we have two sets of properties files. ApplicationResources_es.properties for Spanish ApplicationResources.properties for English If you do a setLocale in struts it will read the key from the appropriate file. so in the English properties file the key is: title.welcome=Hello. How are you? and in the Spanish properties file the key is: title.welcome=Hola. ?Como esta usted? Then in your JSP page all you need to do is do bean:message key=title.welcome/ There are other approaches but this will give you the best results. Let me know if you have any more questions on the above. Shawn -Original Message- From: Shiva Narayana [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 4:10 AM To: Struts Users Mailing List Subject: Addressformat For Different Countries Hi All, I have to implement address format depending on country in JSP. Like For Australia Line1, line2 ,Street,Code For UK Code,Street,Line1,COuntry For IndiaStreet,City,line1,country Likewise i have do display the label and text box based on the country. Please help me how to do this in struts. Thanks in advance. -- Regards Shiva This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Srinivas 732-648-9421(Cell) This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - 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: Addressformat For Different Countries
You are correct garner , with 3 pages its easy to maintain and understand. On 12/8/05, Garner, Shawn [EMAIL PROTECTED] wrote: single JSP with logic tags If you do this you will get one huge JSP page potentially if you have a hundred countries. I assume with a single huge JSP not only would it take longer to serve the page because of the logic tags but the code itself would be harder to maintain. Also there is a limit to the length of a JSP page so I'm for breaking it up. You could do it this way also for 3 countries. Shawn -Original Message- From: Garner, Shawn Sent: Thursday, December 08, 2005 11:47 AM To: 'Struts Users Mailing List' Subject: RE: Addressformat For Different Countries He said he only needed it for 3 countries. Seems like my way would be easy for that amount of pages. He could even use tiles for the common parts of the pages. Seems like since the ordering is different that as tiles configuration would need a separate tiles definition for each country so there could possibly be a 100 different tiles definitions. I would be curious to see the tiles version. I'm not that familiar with tiles though. Shawn -Original Message- From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED] Sent: Thursday, December 08, 2005 11:14 AM To: Struts Users Mailing List Subject: Re: Addressformat For Different Countries //I would set up three different JSP Pages .. But what happens if there are about 100 countries?? we need 100 JSPs right..Instead he can go for a single JSP with logic tags..but if there are 100 countries...his JSP will be very very long ..option left is to go for tiles... On 12/8/05, Garner, Shawn [EMAIL PROTECTED] wrote: I would set up three different JSP Pages and route to them based on them answering which country they are from. I suggest you use the struts method to setLocale to the country and then make a version of the resources file for that locale. In our application we have two sets of properties files. ApplicationResources_es.properties for Spanish ApplicationResources.properties for English If you do a setLocale in struts it will read the key from the appropriate file. so in the English properties file the key is: title.welcome=Hello. How are you? and in the Spanish properties file the key is: title.welcome=Hola. ?Como esta usted? Then in your JSP page all you need to do is do bean:message key=title.welcome/ There are other approaches but this will give you the best results. Let me know if you have any more questions on the above. Shawn -Original Message- From: Shiva Narayana [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 4:10 AM To: Struts Users Mailing List Subject: Addressformat For Different Countries Hi All, I have to implement address format depending on country in JSP. Like For Australia Line1, line2 ,Street,Code For UK Code,Street,Line1,COuntry For IndiaStreet,City,line1,country Likewise i have do display the label and text box based on the country. Please help me how to do this in struts. Thanks in advance. -- Regards Shiva This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Srinivas 732-648-9421(Cell) This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks Regards Srinivas 732-648-9421(Cell)
Re: A problem about bean:write
all explained here http://struts.apache.org/struts-doc-1.2.7/userGuide/struts-bean.html#write Good Luck, M- - Original Message - From: Comain Chen [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, December 08, 2005 10:55 AM Subject: A problem about bean:write In a jsp page, when use bean:write there should be a bean name to be defined, as bean:write name = mybean property = key/. well, here, i come across a problem:how can i define the javabeanmybean to let the tag know it. Because, when i just define a class mybean with property key and method getKey(),setKey(), the system tell me that he can't find the bean with property key. -- Thanks for reading comain chen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shale-Clay: Are managed beans mandatory in xml view?
Well, I'm not sure what to make of this one. The RI doesn't throw and exception when a managed bean is not found, just returns a null object. // Retrieve an existing instance, or one created and configured by // the managed bean facility ValueBinding vb = context.getApplication().createValueBinding(#{ + viewName + }); ViewController vc = null; try { Object vcObject = vb.getValue(context); if (vcObject == null) { log.warn(messages.getMessage(view.noViewController, new Object[] { viewId, viewName })); return; } vc = (ViewController) vcObject; } catch (ClassCastException e) { log.warn(messages.getMessage(view.notViewController, new Object[] { viewId, viewName })); return; } I think this is new behavior. What version of myfaces are you using? I'll include Sean in this thread to see if he as any insights. Gary -- Original message -- From: Mikael Andersson [EMAIL PROTECTED] Gary VanMatre comcast.net writes: [snippet] Make sure that you don't have any expression like #{ managed-bean-name} bound to a control. If you are using the managed-bean-name symbol, make sure it's registered in the faces-config.xml. If you have a more specific exception, HTML/XML config I might be of more help. Gary I really appreciate all your help, I'm a beginner when it comes to web frameworks and have been trying to learn it by myself. It feels good to be able to get some help :) Don't feel alone, we've all been there one time or another. Thanks, Mikael Gary I'm posting some more information: using myfaces 1.1.1 faces-config.xml doesn't contain a managed bean. test.xml : -//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN http://struts.apache.org/dtds/shale-clay-config_1_0.dtd; baseLayout definition from clay-config.xml : pages/test.html : Hello layout/layout.html: [ removed css stuff ] layout/defaultNav.html : Home Links Contact layout/defaultHeader.html : Shale-Clay test layout/defaultBody.html: default body layout/defaultFooter.html: default footer Stacktrace from catalina.out: INFO (org.apache.shale.clay.faces.ClayViewHandler) - Clay template restoreView for /test.xml ERROR (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/estoolweb]. [Faces Servlet]) - Servlet.service() for servlet Faces Servlet threw exception javax.faces.el.EvaluationException: Cannot get value for expression '#{test}' at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397) at org.apache.shale.faces.ShaleViewHandler.setupViewController( ShaleViewHandler.java:230) at org.apache.shale.faces.ShaleViewHandler.createView(ShaleViewHandler.java:123) at org.apache.shale.tiles.TilesViewHandler.createView(TilesViewHandler.java:184) at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:127) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.shale.faces.ShaleApplicationFilter.doFilter( ShaleApplicationFilter.java:285) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler. processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at
Re: Online Struts Tutorial
In the wiki, I think there's a rick reuman Struts and iBatis tutorial Access Denied wrote: Would someone please recommend a current tutorial that may include iBATIS integration? tia, am - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apply multiple validator to the same field
Hello all, I have a struts 1.1 app that I want to use Validator Framework to validate the user input on the browser. This app will need user to enter username and password. These two fields are both required fields and the minlength and maxlength of password is 5 and 8. I have myEclipse generate the validator-rules.xml, which means the validator of required, minlength and maxlength are generated automatically. And the validation.xml is like this: form-validation formset form name=logonForm field property=username depends=required arg0 key=LOGIN.FORM.USERNAME/ /field field property=password depends=required,minlength,maxlength arg0 key=LOGIN.FORM.PASSWORD/ arg1 name=minlength key=${var:minlength} resource=false/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-nameminlength/var-name var-value5/var-value /var var var-namemaxlength/var-name var-value8/var-value /var /field /form /formset /form-validation When I test my app, only the required validator is working, and I got a popup which says The user name is required. The password is required.. The problem is I did not get any message about the minlength and maxlength validation in the popup when I input a password with length 3 and 11. Why only the requred validator work? I appreciate for nay answer! Lucy - Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping
Re: Shale-Clay: Are managed beans mandatory in xml view?
On 08/12/05, Gary VanMatre [EMAIL PROTECTED] wrote: Well, I'm not sure what to make of this one. The RI doesn't throw and exception when a managed bean is not found, just returns a null object. // Retrieve an existing instance, or one created and configured by // the managed bean facility ValueBinding vb = context.getApplication().createValueBinding(#{ + viewName + }); ViewController vc = null; try { Object vcObject = vb.getValue(context); if (vcObject == null) { log.warn(messages.getMessage(view.noViewController, new Object[] { viewId, viewName })); return; } vc = (ViewController) vcObject; } catch (ClassCastException e) { log.warn(messages.getMessage(view.notViewController, new Object[] { viewId, viewName })); return; } I think this is new behavior. What version of myfaces are you using? I'll include Sean in this thread to see if he as any insights. Gary I have tested my code with myfaces version 1.1.0 and 1.1.1 , get the same error with both. In my previous problem you helped me with yesterday I had a similar issue, the specified manged bean name was ignored and the default name was used by the framework. I am using a nightly shale build from 20051202 Mikael
Re: Online Struts Tutorial
Rick's is old old old - version 1.x ibatis...I keep hounding the slacker to update it, but he says he's busy. ;-) Larry On 12/8/05, netsql [EMAIL PROTECTED] wrote: In the wiki, I think there's a rick reuman Struts and iBatis tutorial Access Denied wrote: Would someone please recommend a current tutorial that may include iBATIS integration? tia, am - 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: Online Struts Tutorial
Ha I was just going to say that is definitely outdated:) I'll get around to updating it... I keep saying that I know:) (By the way, I just started using gmail for my struts stuff now.. why does it include the sender also when I click reply and not just the [EMAIL PROTECTED] address? Does that happen for other gmail users also?) On 12/8/05, Larry Meadors [EMAIL PROTECTED] wrote: Rick's is old old old - version 1.x ibatis...I keep hounding the slacker to update it, but he says he's busy. ;-) Larry On 12/8/05, netsql [EMAIL PROTECTED] wrote: In the wiki, I think there's a rick reuman Struts and iBatis tutorial Access Denied wrote: Would someone please recommend a current tutorial that may include iBATIS integration? tia, am - 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] -- Rick
Handling config files
Hi, I have a config file in WEB-INF/classes/ directory. This file has the information for database connection. How can I make this file accessible in all Action classes? I guess there must be a unified way to access such a file. Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apply multiple validator to the same field
In your validator-rules.xml you need to identify a java classname as well as a method which will handle that specific contingency e.g. form-validation global validator name=minlength classname=org.apache.struts.util.StrutsValidator method=validateMinLength methodparams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=required msg=errors.minlength/ Martin- - Original Message - From: yuhong Qian [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, December 08, 2005 3:15 PM Subject: Apply multiple validator to the same field Hello all, I have a struts 1.1 app that I want to use Validator Framework to validate the user input on the browser. This app will need user to enter username and password. These two fields are both required fields and the minlength and maxlength of password is 5 and 8. I have myEclipse generate the validator-rules.xml, which means the validator of required, minlength and maxlength are generated automatically. And the validation.xml is like this: form-validation formset form name=logonForm field property=username depends=required arg0 key=LOGIN.FORM.USERNAME/ /field field property=password depends=required,minlength,maxlength arg0 key=LOGIN.FORM.PASSWORD/ arg1 name=minlength key=${var:minlength} resource=false/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-nameminlength/var-name var-value5/var-value /var var var-namemaxlength/var-name var-value8/var-value /var /field /form /formset /form-validation When I test my app, only the required validator is working, and I got a popup which says The user name is required. The password is required.. The problem is I did not get any message about the minlength and maxlength validation in the popup when I input a password with length 3 and 11. Why only the requred validator work? I appreciate for nay answer! Lucy - Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online Struts Tutorial
On 12/8/05, Rick R [EMAIL PROTECTED] wrote: (By the way, I just started using gmail for my struts stuff now.. why does it include the sender also when I click reply and not just the [EMAIL PROTECTED] address? Does that happen for other gmail users also?) Yes, but not always. On 12/8/05, Larry Meadors [EMAIL PROTECTED] wrote: Rick's is old old old - version 1.x ibatis...I keep hounding the slacker to update it, but he says he's busy. ;-) Is 1.x usage so different from 2.0 ? Does it make sense to start from 1.x and then move to 2.0 features or it is better to start from 2.0 right away? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tabs is struts
On web page, there are two kinds of tabs, 1. Tab-looking pages with the different style for active tab, there is nothing special for this kind of tab, you can just treat them as the POHA (Plain Old HTML Application), well you need design the styles. Please check CSS-2 document. Page refresh will be observed for tab switch. 2. DHTML Tabs, this is dynamic and you won't see page refresh, it is really like the POWA(Plain Old Windows Application), to achieve this, you may need hidden frames for data transmission or you can use AJAX. If you client can afford to use JavaScript, the option 2 is definitely a preferred choice, it gives the user real time experience. If the application has to be W3C Accessibility complaint, you have no choice to use option 1. So the tab is just a different look and feel, not really different from other kind of page. From one example of Struts Recipe by George Franciscus, I can tell the Tabs generated by Struts Layout Tag are JavaScript driven so it is not W3C Accessibility complaint. Regards On 12/8/05, Raghu Kanchustambham [EMAIL PROTECTED] wrote: Try struts layout tags. They support tabbed inputs. On 12/8/05, Sony Thomas [EMAIL PROTECTED] wrote: Hi, Is there is any way to use tabs in struts. Is there is any html bean tag for this ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Yujun Liang [EMAIL PROTECTED]
Re: Handling config files
Hi Sebastain, There are probably many ways of doing this (I don't know of any standard way though). Here's some code which i use to populate a Properties object from a file: String xpdlPropertiesFileName = xpdl.properties; //file should be in the class path.. InputStream is = null; ClassLoader loader = Thread.currentThread().getContextClassLoader(); is = loader.getResourceAsStream(xpdlPropertiesFileName); //read the properties.. if (!initialized ) { if (is != null) { processVariables = new Properties(); processVariables.load(is); initialized = true; } else log.error(Aaaarrgghhh!! xpdl.properties file dne!!!); } Regards, Geeta Sebastian Stein [EMAIL PROTECTED] wrote on 12/08/2005 04:45:15 PM: Hi, I have a config file in WEB-INF/classes/ directory. This file has the information for database connection. How can I make this file accessible in all Action classes? I guess there must be a unified way to access such a file. Sebastian
Re: Online Struts Tutorial
there not even 1.3, hold on early adators. .V Is 1.x usage so different from 2.0 ? Does it make sense to start from 1.x and then move to 2.0 features or it is better to start from 2.0 right away? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online Struts Tutorial
I have one I wrote for a internal developer class I gave. If you're interest let me know and I'll send it to you. 2005/12/8, Access Denied [EMAIL PROTECTED]: Would someone please recommend a current tutorial that may include iBATIS integration? tia, am
Re: Handling config files
[EMAIL PROTECTED] [EMAIL PROTECTED] [051208 23:27]: String xpdlPropertiesFileName = xpdl.properties; //file should be in the class path.. Sorry for the stupid question, but what are possible class paths in a webapp? I guess it is the WEB-INF/lib directory, but any other directory? Can this be configured? Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online Struts Tutorial
Vic, I am sorry I did not get this one ;) On 12/8/05, netsql [EMAIL PROTECTED] wrote: there not even 1.3, hold on early adators. Is 1.x usage so different from 2.0 ? Does it make sense to start from 1.x and then move to 2.0 features or it is better to start from 2.0 right away? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling config files
Sebastian Stein [EMAIL PROTECTED] wrote on 12/08/2005 05:31:36 PM: [EMAIL PROTECTED] [EMAIL PROTECTED] [051208 23:27]: String xpdlPropertiesFileName = xpdl.properties; //file should be in the class path.. Sorry for the stupid question, but what are possible class paths in a webapp? I guess it is the WEB-INF/lib directory, but any other directory? I believe it is WEB-INF/classes that is the default class path for the web app. Of course you could put the file anywhere and then write the path to the file as a context-wide parameter in your web.xml. The reason I didn't like this is I had to change it when we moved from dev to prod - and I always ended up forgetting. I later changed my ant build file so my prod war had the correct version, but finally I just preferred the simple solution of putting it under WEB-INF/classes..:) Sebastian Regards, Geeta
Re: Online Struts Tutorial
There is no concreate Struts 2.0 afaik! So you can't use it to build. There's hardly a 1.3 you can download yet to even try. Lots of changes are yet to happen to Ti even at high level. No Api has been set. And no date set for it. Look how long 1.3 has been baking. .V Michael Jouravlev wrote: Is 1.x usage so different from 2.0 ? Does it make sense to start from 1.x and then move to 2.0 features or it is better to start from 2.0 right away? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online Struts Tutorial
Er... Actually, I was asking about IBatis 1.x vs. IBatis 2.x. Thanks for giving me insight on Struts versions, though ;-) Michael. On 12/8/05, netsql [EMAIL PROTECTED] wrote: There is no concreate Struts 2.0 afaik! So you can't use it to build. There's hardly a 1.3 you can download yet to even try. Lots of changes are yet to happen to Ti even at high level. No Api has been set. And no date set for it. Look how long 1.3 has been baking. .V Michael Jouravlev wrote: Is 1.x usage so different from 2.0 ? Does it make sense to start from 1.x and then move to 2.0 features or it is better to start from 2.0 right away? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Online Struts Tutorial
Opps. We used iBatis 2.0 on a project 2 years ago, 1up.com. The main difference is that it does not need to map as much, looked similar to me, minor things. So 2.x all the way. .V Michael Jouravlev wrote: Er... Actually, I was asking about IBatis 1.x vs. IBatis 2.x. Thanks for giving me insight on Struts versions, though ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to refer to a previous ActionForm that is in a session scope?
I am developing a web application that goes from one page to another using two different Action classes. The initial page is connected to a session scoped ActionForm. On the second page which is handled by another Action (and its corresponding ActionForm that is request scoped), I want to access the variables on the first session scoped ActionForm. Is there a way to directly refer to the first ActionForm? Right now, I save the first ActionForm as a session attribute so that I can refer to it in the second Action. I hope that I am stating this clearly. Thanks, Jun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to refer to a previous ActionForm that is in a session scope?
On 12/8/05, Jun Bihag [EMAIL PROTECTED] wrote: I am developing a web application that goes from one page to another using two different Action classes. The initial page is connected to a session scoped ActionForm. On the second page which is handled by another Action (and its corresponding ActionForm that is request scoped), I want to access the variables on the first session scoped ActionForm. Is there a way to directly refer to the first ActionForm? Right now, I save the first ActionForm as a session attribute so that I can refer to it in the second Action. I hope that I am stating this clearly. ActionForm is just a regular Java class that is stored in request or session or app context object depending on the scope that you set in the struts-config.xml file. The name that you use to define a form bean in the struts-config.xml file is the key under which the form bean is stored in respective scope. Struts uses the same objects that are defined in servlet spec. The bottom line: the reference is already saved for you, you do not need to create another reference to an action form. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to refer to a previous ActionForm that is in a session scope?
On 12/8/05, Jun Bihag [EMAIL PROTECTED] wrote: I am developing a web application that goes from one page to another using two different Action classes. The initial page is connected to a session scoped ActionForm. On the second page which is handled by another Action (and its corresponding ActionForm that is request scoped), I want to access the variables on the first session scoped ActionForm. Is there a way to directly refer to the first ActionForm? Right now, I save the first ActionForm as a session attribute so that I can refer to it in the second Action. I hope that I am stating this clearly. Does it make sense in your app to consolidate the ActionForms and use the same one for both Actions? That way you can use the 'form' that's passed into either Action's execute method, and all the fields will be there. If not, you can just retrieve the first form from session scope. As Michael mentioned, you don't need to store it there, the framework will have done that for you. (If you're not sure what's in scope, include a scriptlet or c:forEach to write out the contents of the request and session at the bottom of your JSPs during development.) -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to refer to a previous ActionForm that is in a session scope?
Thanks, Michael. A simple attribute name change frees up the redundant memory used in my previous approach. Michael Jouravlev wrote: On 12/8/05, Jun Bihag [EMAIL PROTECTED] wrote: I am developing a web application that goes from one page to another using two different Action classes. The initial page is connected to a session scoped ActionForm. On the second page which is handled by another Action (and its corresponding ActionForm that is request scoped), I want to access the variables on the first session scoped ActionForm. Is there a way to directly refer to the first ActionForm? Right now, I save the first ActionForm as a session attribute so that I can refer to it in the second Action. I hope that I am stating this clearly. ActionForm is just a regular Java class that is stored in request or session or app context object depending on the scope that you set in the struts-config.xml file. The name that you use to define a form bean in the struts-config.xml file is the key under which the form bean is stored in respective scope. Struts uses the same objects that are defined in servlet spec. The bottom line: the reference is already saved for you, you do not need to create another reference to an action form. Michael. - 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: [Shale] Clay - Not serving .css and .png
Hi Been away for a couple of days, but now I'm back at it. I finally figured out why it was not serving resources like .css files etc. In my web.xml file, I had a filterfilter mapping like this: !-- Shale Application Controller Filter -- filter filter-nameshale/filter-name filter-class org.apache.shale.faces.ShaleApplicationFilter /filter-class /filter !-- Shale Application Controller Filter Mapping -- filter-mapping filter-nameshale/filter-name url-pattern/*/url-pattern /filter-mapping Now changing the filter mapping to this solved it: !-- Shale Application Controller Filter Mapping -- filter-mapping filter-nameshale/filter-name url-pattern*.xml/url-pattern /filter-mapping filter-mapping filter-nameshale/filter-name url-pattern*.html/url-pattern /filter-mapping filter-mapping filter-nameshale/filter-name url-pattern*.faces/url-pattern /filter-mapping So now I am able to use link tags for including stylesheets, and any images declared in the stylesheet gets served. Hermod -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, December 02, 2005 3:03 PM To: Struts Users Mailing List Subject: Re: [Shale] Clay - Not serving .css and .png [EMAIL PROTECTED] wrote on 12/02/2005 03:23:58 AM: Hi I my continued persuit of Shale and Clay and have now started to apply my standard style (lquid) to the template application. What I discovered was that Clay will not serve .css files. I noticed in Geeta's ShaleNShark1 demo that the style sheet was named .html. Hermod, just an fyi, but right now I do have a Shale/Tiles web app working against a style sheet with a .css name. Like you I too noticed that having .css in filter (in command-config.xml) didn't do the trick. Things started working when I downloaded a later version of Shale and/or Tiles. Having other issues to deal with, I didn't question it any further..:) Reagrds, Geeta * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that the DnB NOR Group cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with bean:write
If you are using bean:write name = mybean property = key/ then you must define mybean using bean:define tag. for e.g If you set your javabean as myBean in request and want to display it's property key's value then just define it as bean:define id=bean name=myBean / and to display it use bean:write tag bean:write name=bean property=key/ Regards, Vishakha -- Forwarded message -- From: Comain Chen [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Date: Thu, 8 Dec 2005 23:55:02 +0800 Subject: A problem about bean:write In a jsp page, when use bean:write there should be a bean name to be defined, as bean:write name = mybean property = key/. well, here, i come across a problem:how can i define the javabeanmybean to let the tag know it. Because, when i just define a class mybean with property key and method getKey(),setKey(), the system tell me that he can't find the bean with property key. -- Thanks for reading comain chen