Re: Basic CRUD
- Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 29, 2003 9:48 PM Subject: Re: Basic CRUD Maybe in 3rd world countries this works, maybe you should spend a few $ with IP Lawyer? You can't make generalization because some open source license requires attribution (this was built using) , or licensing in kind (they own your source), or are only for non commercial use or worse. Anyway, if netspread becomes big enough to sue This will be a good e-mail to use to establish MO. Here is my Algorithms, here it is at NetSpread, and here is my license. Just back and find this thread had gone too far from its original subject. As a lead algorithm engineer with published algorithms on IEEE Transactions and a United States patent granted in 1999, I feel lucky I did not work with 3rd class instructors who do not understand basic research principles. Open source is rarely artistic license. Only artistic license I recall is Doug Lea's fast threaded collections. Any license term can not privide *all* things to *all* people, just like a framework can not do *all* things for *all* people, regardless it is artistic or not. Carrier production license will be designed to encourage smart people to develop advanced algorithms and publish them too. Jing .V [EMAIL PROTECTED] wrote: On Thu, 29 May 2003 22:04:36 -, Eric Miles [EMAIL PROTECTED] wrote : Chicks that don't lay eggs are still good for cooking, eh? ;-) Jing, Your source code is Open Source licensing, right? Not going to sue me when I resell or make $$$ off your code?!? Here are what I did before I created the *general* CRUD algorithm: Performed serious research on existing CRUD algorithms from several vendors, published articles, and mailing lists. Then started to design a *superior* version of my own. I am not worried about vendors will sue me at all because I know it is my own work and I am grateful to those who published their algorithms so that I can design a *better* one. Making my algorithms available in this mailing list is not just for *you*, it is for ones who want to find their own *better* solutions. Innovations benefit from sharing ideas. That is my point of view. If anyone believes he/she has to license a product to get an idea, That is fundamentally wrong if that idea or algorithm has not been patented yet(Stop! this subject is not about license:-) Although, Carrier looks like a nice product, my hope was to do the grunt work myself, to get a feel for persisting objects through struts and to do it via several methods. Once I can get the correct object from the view to the action, everything should work nice. On the backend, I'm persisting objects by using a stateless session EJB talking to Hibernate. Plus, using XDoclet is the best thing since Ant. I'll post back when I get this thing hammered out. Of course, you are welcome to publish your ideas or algorithms! Jing Thanks for the feedback. -Eric -- Vic Cekvenich, Struts Instructor, 1-800-917-JAVA Advanced a href =baseBeans.comStruts Training/a and project recovery in North East. Open Source a href =baseBeans.comContent Management/a basicPortal sofware Best practicea href =baseBeans.comStruts Support/a v.1.1 helper ScafflodingXPress - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DataSource problem
Just a guess on my part, but the connection is probably in the JNDI namespace, not the COMP namespace. To test this you can try either java:/env or just /env (sorry, can't recall which off the top of my head) where you have: java:comp/env As a side point, you should probably put all such logic into a session bean(s) that your action classes can call. Aside from this being a more 3-tier architecture it should allow you query your container (for instance, using the jmx-console in JBoss) to find out exactly what namespace(s) your beans are available in. hth, Joe rainer juenger wrote: Hi Maarten, join the club! There are some more guys having exactliy the same problem as you. To me your configuration looks all right. I saw some samples : parameter namedriverName/name valuejdbc:mysql://localhost/test/value /parameter where the parameter name is not driverName but url. I tried both without luck. Are you using Tomcat 4.x without DBCP from the Jakarta Commons to get the JNDI DB Connection? Please follow the thread Connection pooling dowsn't work for me ... Help !! Hopefully there is someone arround giving us a tip how to get it run Good luck to all of us ;) Rainer - Original Message - From: Maarten Roosendaal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 3:42 PM Subject: DataSource problem Hi, I'm trying to create a simple DataBase app. using Struts. Right now i have a problem with getting the DataSource out of the InitialContext and i'm not sure what i'm doing wrong or maybe it has something to do with the Struts Servlet. In configured the server.xml as follows: Resource name=test auth=CONTAINER type=javax.sql.DataSource/ ResourceParams name=test parameter nameuser/name valueroot/value /parameter parameter namepassword/namevalue/value /parameter parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter parameter namedriverName/name valuejdbc:mysql://localhost/test/value /parameter /ResourceParams and my web.xml includes the following: resource-ref res-ref-nametest/res-ref-name res-typejavax.sql.DataSource/res-type res-authCONTAINER/res-auth /resource-ref In an Action-class i do this: Context env = (Context) new InitialContext().lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(test); Here the DataSource keeps ending up as NULL. When i do this: Connection con = DriverManager.getConnection(Commands.DB_TEST_URL, Commands.DB_TEST_USERNAME, ); things are working fine but i have no idea where to look. The Context does seem to have a reference to the 'test' reference but nothing more. Does this have something to do with Struts or did i forget something? I don't want to use the struts.xml for a database-connection. One of the reasons is that i keep getting the message that it can't find the driver, while it is included in the CLASSPATH. Hope someone can help, Maarten -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multibox value always checked
Hi, I've a problem with using a multibox in that when I uncheck all values and submit my form, the array of selected items is not updated. I've seen this question posted a few times before and the answer always seems to be to perform a reset in the Action class. This sounds like a logical solution but I have a little problem with this due to the architecture we are using. Essentially we are using the Command design pattern with DynaBeans and we only use one generic Action class. As multiple beans are passed through this action class it is not suitable for us to reset the checkboxes here as this means that the Action class becomes specific to the bean that is being submitted. Is there another way around this problem? The only way I can think of is to use JavaScript to populate a hidden value when all checkboes are unchecked (then use this value later on), but I would really prefer not to use JavaScript. Many thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 4.1.24 on windows xp and j2sdk1.4.1_01
Hi, We have installed tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 and since then we couldn't access any jsp file. jasper always fails with the following exception reports. Rgds, Sen Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac options source files [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath path Specify where to find user class files [javac] -sourcepath pathSpecify where to find input source files [javac] -bootclasspath path Override location of bootstrap class files [javac] -extdirs dirs Override location of installed extensions [javac] -d directorySpecify where to place generated class files [javac] -encoding encoding Specify character encoding used by source files [javac] -source release Provide source compatibility with specified release [javac] -target release Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa ndler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja va:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1014) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr ocessor.java:417) at org.apache.struts.action.RequestProcessor.processActionForward(RequestPr ocessor.java:390) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 271) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa lve.java:171)
Validator.xml - mask || mask1 || mask2
Hi All, Have a set of forms in an app that can be used in multiple countries. Is there a way that I can validate a field by one of multiple masks? I.e is the field valid for mask || mask1 || mask2. Relevant fields will be zip codes and phone numbers. ?xml version=1.0 encoding=UTF-8? !DOCTYPE form-validation SYSTEM C:\jakarta-struts-1.1-rc1\lib\validation_1_1.dtd form-validation formset constant constant-nameus-zip/constant-name constant-value^\d{5}(-\d{4})?$/constant-value /constant constant constant-nameaust-zip/constant-name constant-value^\d{4}$/constant-value /constant constant constant-nameuk-zip/constant-name constant-value^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$ /constant-value /constant form name=regionalOfficeForm !-- want to validate by mask || mask1 || mask2. The code below does mask mask1 mask2 (?) -- field property=postalCode depends=required,mask,mask1,mask2 arg0 key=regionalOfficeForm.postalCode/ var var-namemask/var-name var-value${us-zip)/var-value /var var var-namemask1/var-name var-value${aust-zip)/var-value /var var var-namemask2/var-name var-value${uk-zip)/var-value /var /field /form /formset /form-validation Thanks Ross
Re: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01
It seems like your java source files is behind Program Files directory on C:. Problem is path files should not contain any space ( ) character with in. Try to change your java files' location. At 14:36 15/06/2003, you wrote: Hi, We have installed tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 and since then we couldn't access any jsp file. jasper always fails with the following exception reports. Rgds, Sen Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac options source files [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath path Specify where to find user class files [javac] -sourcepath pathSpecify where to find input source files [javac] -bootclasspath path Override location of bootstrap class files [javac] -extdirs dirs Override location of installed extensions [javac] -d directorySpecify where to place generated class files [javac] -encoding encoding Specify character encoding used by source files [javac] -source release Provide source compatibility with specified release [javac] -target release Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa ndler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja va:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1014) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr ocessor.java:417) at org.apache.struts.action.RequestProcessor.processActionForward(RequestPr ocessor.java:390) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 271) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
RE: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01
Greetings Thomas, My source files are in C:\work directory. Tomcat directory is C:\Program Files\Apache Group\jakarta-tomcat-4.1.24 . The same setup was Working till yesterday with Tomcat 4.1.12 , jdk 1.2 and windows 2000 . Thanx Rgds, Sen -Original Message- From: Thomas Cornet [mailto:[EMAIL PROTECTED] Sent: Sunday, June 15, 2003 4:53 PM To: Struts Users Mailing List Subject: Re: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 It seems like your java source files is behind Program Files directory on C:. Problem is path files should not contain any space ( ) character with in. Try to change your java files' location. At 14:36 15/06/2003, you wrote: Hi, We have installed tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 and since then we couldn't access any jsp file. jasper always fails with the following exception reports. Rgds, Sen Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac options source files [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath path Specify where to find user class files [javac] -sourcepath pathSpecify where to find input source files [javac] -bootclasspath path Override location of bootstrap class files [javac] -extdirs dirs Override location of installed extensions [javac] -d directorySpecify where to place generated class files [javac] -encoding encoding Specify character encoding used by source files [javac] -source release Provide source compatibility with specified release [javac] -target release Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH a ndler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.j a va:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j a va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j a va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat c her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDis p atcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispa t cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.ja v a:1014) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP r ocessor.java:417) at org.apache.struts.action.RequestProcessor.processActionForward(RequestP r ocessor.java:390) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java : 271) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at
RE: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01
Hello Sen, I think it would be better if you posted your question on the Tomcat users list. This list is for Struts questions. Jonas -Original Message- From: Senthivel U S [mailto:[EMAIL PROTECTED] Sent: den 15 juni 2003 14:58 To: 'Struts Users Mailing List' Subject: RE: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 Greetings Thomas, My source files are in C:\work directory. Tomcat directory is C:\Program Files\Apache Group\jakarta-tomcat-4.1.24 . The same setup was Working till yesterday with Tomcat 4.1.12 , jdk 1.2 and windows 2000 . Thanx Rgds, Sen -Original Message- From: Thomas Cornet [mailto:[EMAIL PROTECTED] Sent: Sunday, June 15, 2003 4:53 PM To: Struts Users Mailing List Subject: Re: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 It seems like your java source files is behind Program Files directory on C:. Problem is path files should not contain any space ( ) character with in. Try to change your java files' location. At 14:36 15/06/2003, you wrote: Hi, We have installed tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 and since then we couldn't access any jsp file. jasper always fails with the following exception reports. Rgds, Sen Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac options source files [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath path Specify where to find user class files [javac] -sourcepath pathSpecify where to find input source files [javac] -bootclasspath path Override location of bootstrap class files [javac] -extdirs dirs Override location of installed extensions [javac] -d directorySpecify where to place generated class files [javac] -encoding encoding Specify character encoding used by source files [javac] -source release Provide source compatibility with specified release [javac] -target release Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH a ndler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.j a va:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j a va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j a va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat c her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDis p atcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispa t cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.ja v a:1014) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP r ocessor.java:417) at org.apache.struts.action.RequestProcessor.processActionForward(RequestP r ocessor.java:390) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java : 271) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:247) at
html:select and html:options example?
Hello, who can give me an example, how to use the html:select in conjunction with html:options? I had already defined an ActionForm and JSP like follows. The listing of the option-Elements works fine but not the reshowing of the selected elements of the list, because after I have clicked the submit button I've got an IllegalArgumentException (BeanUtils.populate): java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j ava:1789) at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j ava:1684) at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:17 13) at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019) {...} My FormBean looks like this: {...} public final class RoleEditForm extends ActionForm { {...}public void setAllUsers(ArrayList allUsers) this.allUsers = allUsers;}public ArrayList getAllUsers() return this.allUsers;} {...}} The allUsers list contains user objects. The user objects have the accessor methods getId(), getName(). My JSP looks like this: html:form action=/formRole method=get html:select property=allUsers multiple=truehtml:options collection=allUsers property=id labelProperty=name //html:select html:submit/ /html:form After clicking the submit button I've got the Exception. That's wrong? Thank you very much! Regards Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01
I encountered the same problem with Tomcat 4.1.24 on Win2k and J2SE 1.4.1_03. I believe the problem lies in the CLASSPATH and CATALINA\common\lib. Try to remove the duplicate JARs. - Original Message - From: Senthivel U S [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, June 15, 2003 20:36 Subject: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 Hi, We have installed tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 and since then we couldn't access any jsp file. jasper always fails with the following exception reports. Rgds, Sen Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac options source files [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath path Specify where to find user class files [javac] -sourcepath pathSpecify where to find input source files [javac] -bootclasspath path Override location of bootstrap class files [javac] -extdirs dirs Override location of installed extensions [javac] -d directorySpecify where to place generated class files [javac] -encoding encoding Specify character encoding used by source files [javac] -source release Provide source compatibility with specified release [javac] -target release Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa ndler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja va:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1014) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr ocessor.java:417) at org.apache.struts.action.RequestProcessor.processActionForward(RequestPr ocessor.java:390) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 271) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i nvokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4 80) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241 5) at
Re: DataSource problem
Maarten, do you declare the JNDI resource within the context tags for your webapp in server.xml, or within the global-naming-resources tags? I'm using the same setup as you with my JNDI declared in the globalnamingresources and it wouldn't work until I put a resource-link tag in the context tags. Adam Joe @ Team345 wrote: Just a guess on my part, but the connection is probably in the JNDI namespace, not the COMP namespace. To test this you can try either java:/env or just /env (sorry, can't recall which off the top of my head) where you have: java:comp/env As a side point, you should probably put all such logic into a session bean(s) that your action classes can call. Aside from this being a more 3-tier architecture it should allow you query your container (for instance, using the jmx-console in JBoss) to find out exactly what namespace(s) your beans are available in. hth, Joe rainer juenger wrote: Hi Maarten, join the club! There are some more guys having exactliy the same problem as you. To me your configuration looks all right. I saw some samples : parameter namedriverName/name valuejdbc:mysql://localhost/test/value /parameter where the parameter name is not driverName but url. I tried both without luck. Are you using Tomcat 4.x without DBCP from the Jakarta Commons to get the JNDI DB Connection? Please follow the thread Connection pooling dowsn't work for me ... Help !! Hopefully there is someone arround giving us a tip how to get it run Good luck to all of us ;) Rainer - Original Message - From: Maarten Roosendaal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 14, 2002 3:42 PM Subject: DataSource problem Hi, I'm trying to create a simple DataBase app. using Struts. Right now i have a problem with getting the DataSource out of the InitialContext and i'm not sure what i'm doing wrong or maybe it has something to do with the Struts Servlet. In configured the server.xml as follows: Resource name=test auth=CONTAINER type=javax.sql.DataSource/ ResourceParams name=test parameter nameuser/name valueroot/value /parameter parameter namepassword/namevalue/value /parameter parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter parameter namedriverName/name valuejdbc:mysql://localhost/test/value /parameter /ResourceParams and my web.xml includes the following: resource-ref res-ref-nametest/res-ref-name res-typejavax.sql.DataSource/res-type res-authCONTAINER/res-auth /resource-ref In an Action-class i do this: Context env = (Context) new InitialContext().lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(test); Here the DataSource keeps ending up as NULL. When i do this: Connection con = DriverManager.getConnection(Commands.DB_TEST_URL, Commands.DB_TEST_USERNAME, ); things are working fine but i have no idea where to look. The Context does seem to have a reference to the 'test' reference but nothing more. Does this have something to do with Struts or did i forget something? I don't want to use the struts.xml for a database-connection. One of the reasons is that i keep getting the message that it can't find the driver, while it is included in the CLASSPATH. Hope someone can help, Maarten -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator Framework Questions
Hello! Reading a Struts book I wanted to give the validator framework a whirl. Since it's poorly described in the book I checked out Struts website. I wonder if when we speak about automatic form validation, then if do we mean the validator from the website http://home.earthlink.net/~dwinterfeldt or has another validator been integrated into Struts. How doI setup an automatic form validation? I've build a form with 3 fields called field1, field2, field3 and a submit button. I've defined the validation rules in the validation.xml file, but this thing just doesn't work. Below my setup. my validation.xml looks like this: form-validation formset form name=postTestForm field property=field1 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.titlelabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value5/var-value /var /field field property=field2 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.introlabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value2048/var-value /var /field field property=field3 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.bodylabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value10/var-value /var /field /form /formset /form-validation my struts-config.xml lookis like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=postTestForm type=org.apache.struts.validator.DynaActionForm form-property name=field1 type=java.lang.String initial=/ form-property name=field2 type=java.lang.String initial=/ form-property name=field3 type=java.lang.String initial=/ /form-bean /form-beans global-forwards forward name=system.error path=/WEB-INF/jsp/systemError.jsp/ forward name=default.action path=/execute/homePageSetuo/ /global-forwards action-mappings action path=/homePageSetup type=com.mycompany.HomePageSetupAction unknown=true forward name=homepage.success path=/WEB-INF/jsp/homePage.jsp/ /action action path=/postTestSetup type=com.mycompany.PostTestSetupAction name=postTestForm scope=request validate=false forward name=posttest.success path=/WEB-INF/jsp/postTest.jsp / /action action path=/postTest input=/WEB-INF/jsp/postTest.jsp type=com.mycompany.PostTest name=postTestForm scope=request validate=true forward name=posttest.success path=/execute/homePageSetup/ /action /action-mappings plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in /struts-config Thanks in advance for you help! Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator Framework Questions
change your strut config to use org.apache.struts.validator.DynaValidatorForm -Dan - Original Message - From: Thomas Miskiewicz [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, June 15, 2003 9:42 AM Subject: Validator Framework Questions Hello! Reading a Struts book I wanted to give the validator framework a whirl. Since it's poorly described in the book I checked out Struts website. I wonder if when we speak about automatic form validation, then if do we mean the validator from the website http://home.earthlink.net/~dwinterfeldt or has another validator been integrated into Struts. How doI setup an automatic form validation? I've build a form with 3 fields called field1, field2, field3 and a submit button. I've defined the validation rules in the validation.xml file, but this thing just doesn't work. Below my setup. my validation.xml looks like this: form-validation formset form name=postTestForm field property=field1 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.titlelabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value5/var-value /var /field field property=field2 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.introlabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value2048/var-value /var /field field property=field3 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.bodylabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value10/var-value /var /field /form /formset /form-validation my struts-config.xml lookis like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=postTestForm type=org.apache.struts.validator.DynaActionForm form-property name=field1 type=java.lang.String initial=/ form-property name=field2 type=java.lang.String initial=/ form-property name=field3 type=java.lang.String initial=/ /form-bean /form-beans global-forwards forward name=system.error path=/WEB-INF/jsp/systemError.jsp/ forward name=default.action path=/execute/homePageSetuo/ /global-forwards action-mappings action path=/homePageSetup type=com.mycompany.HomePageSetupAction unknown=true forward name=homepage.success path=/WEB-INF/jsp/homePage.jsp/ /action action path=/postTestSetup type=com.mycompany.PostTestSetupAction name=postTestForm scope=request validate=false forward name=posttest.success path=/WEB-INF/jsp/postTest.jsp / /action action path=/postTest input=/WEB-INF/jsp/postTest.jsp type=com.mycompany.PostTest name=postTestForm scope=request validate=true forward name=posttest.success path=/execute/homePageSetup/ /action /action-mappings plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in /struts-config Thanks in advance for you help! Tom - 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 Framework Questions
Dan, change your strut config to use org.apache.struts.validator.DynaValidatorForm That helped. Could you or someone please else answer my questions regarding the validator framework itself? Is it part of Struts framework or not (I'm using the 1.1 rc2). What steps are required to setup and use it? Where do I find more info about it. Thanks Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator Framework Questions
I think it is necessary to include a input property in the action element, so if the data is invalid the controller can recall the form file (or tiles action). action path=/nameOfAction name=nameOfForm type=package.package.class validate=true input=/file.jsp OR .tiles.action forward name=key path=file.jsp OR .tiles.action/ /action Pedro Salgado On 15/06/2003 17:59, Dan Tran [EMAIL PROTECTED] wrote: change your strut config to use org.apache.struts.validator.DynaValidatorForm -Dan - Original Message - From: Thomas Miskiewicz [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, June 15, 2003 9:42 AM Subject: Validator Framework Questions Hello! Reading a Struts book I wanted to give the validator framework a whirl. Since it's poorly described in the book I checked out Struts website. I wonder if when we speak about automatic form validation, then if do we mean the validator from the website http://home.earthlink.net/~dwinterfeldt or has another validator been integrated into Struts. How doI setup an automatic form validation? I've build a form with 3 fields called field1, field2, field3 and a submit button. I've defined the validation rules in the validation.xml file, but this thing just doesn't work. Below my setup. my validation.xml looks like this: form-validation formset form name=postTestForm field property=field1 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.titlelabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value5/var-value /var /field field property=field2 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.introlabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value2048/var-value /var /field field property=field3 depends=required,maxlength msg name=required key=error.posttest.field.null/ msg name=maxlength key=error.posttest.field.length/ arg0 key=myapp.posttest.form.bodylabel/ arg1 name=maxlength key=${var:maxlength} resource=false/ var var-namemaxlength/var-name var-value10/var-value /var /field /form /formset /form-validation my struts-config.xml lookis like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans form-bean name=postTestForm type=org.apache.struts.validator.DynaActionForm form-property name=field1 type=java.lang.String initial=/ form-property name=field2 type=java.lang.String initial=/ form-property name=field3 type=java.lang.String initial=/ /form-bean /form-beans global-forwards forward name=system.error path=/WEB-INF/jsp/systemError.jsp/ forward name=default.action path=/execute/homePageSetuo/ /global-forwards action-mappings action path=/homePageSetup type=com.mycompany.HomePageSetupAction unknown=true forward name=homepage.success path=/WEB-INF/jsp/homePage.jsp/ /action action path=/postTestSetup type=com.mycompany.PostTestSetupAction name=postTestForm scope=request validate=false forward name=posttest.success path=/WEB-INF/jsp/postTest.jsp / /action action path=/postTest input=/WEB-INF/jsp/postTest.jsp type=com.mycompany.PostTest name=postTestForm scope=request validate=true forward name=posttest.success path=/execute/homePageSetup/ /action /action-mappings plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ /plug-in /struts-config Thanks in advance for you help! Tom - 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 Framework Questions
The Validator framework (commons-validator) comes with the struts distribution. To install it you will need: jakarta-oro, commons-beanutils, commons-logging, commons-collections, commons-digester. Put these files (.jar) on your WEB-INF/lib (if you already installed struts it will only be missing the jakarta-oro.jar and commons-validator.jar). Configure your validation-rules.xml , validation.xml (better have an example to start with... And download the dtds of these files... You may need them.) and configure your struts-config.xml (the one had you seemed ok). Place the dtd files on a webapp directory (for example: /WEB-INF/dtd). Change the validation-rules.xml and validation.xml DOCTYPE element (in case you are developing without an internet connection, at the server startup it tries to validate the 2 files - tries to retrive http://jakarta.apache.org.../file.dtd - if the container doesnt find these files an error occurs )... Example: for validation.xml ?xml version=1.0? !DOCTYPE form-validation SYSTEM /Library/Tomcat/Home/webapps/mywebapp/WEB-INF/dtds/validation_1_1.dtd form-validation ... /form-validation You also have to include some properties on your webapp message resources: errors.required={0} is required. errors.minlength={0} can not be less than {1} characters. errors.maxlength={0} can not be greater than {1} characters. errors.invalid={0} is invalid. errors.byte={0} must be a byte. errors.short={0} must be a short. errors.integer={0} must be an integer. errors.long={0} must be a long. errors.float={0} must be a float. errors.double={0} must be a double. errors.date={0} is not a date. errors.range={0} is not in the range {1} through {2}. errors.creditcard={0} is an invalid credit card number. errors.email={0} is an invalid e-mail address. These were all the steps I had to make... Good luck :) Pedro Salgado On 15/06/2003 18:09, Thomas Miskiewicz [EMAIL PROTECTED] wrote: Dan, change your strut config to use org.apache.struts.validator.DynaValidatorForm That helped. Could you or someone please else answer my questions regarding the validator framework itself? Is it part of Struts framework or not (I'm using the 1.1 rc2). What steps are required to setup and use it? Where do I find more info about it. Thanks Tom - 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]
Making Controllers Aware of Views' Structural Information
We have spent much thoughts on MVC, and very good J2EE web frameworks, Struts being the foremost, have been developed as a result. We have best practices and clean way of generating views. Yet, IMHO, the V part of MVC, especially managing views, has not been bestowed with the same amount of attention. Here is one example: I am consulting for a company which has a large web application. The application has been organized around different products of the company. On the server-side, we use Struts and similar web application frameworks. Many features have been added to the application and the M and C portions of the web application are under control and I think we have done a good job there. However the view itself has de-evolved into a Big Ball of Mud. The following: 1. Tab highlighting based on the product an user is currently viewing. 2. TOC highlighting based on the feature of the product an user is currently viewing. 3. Frames management. 4. Context-sensitive help. are working fine but have been implemented using intricate gestalt of JavaScript/Cookie/Inter-frame communication. Adding to the complexity is the abstraction between various product applications. We are trying to develop a new view and I realise that trying to manage all the complexity of the view's navigational structure in client-side will result in the same BBOM. It seems logical that some kind of server-side framework can best aid in facilitating a smooth navigational experience. Given that, I need a mechanism to represent the environmental information of the view component that sends a request to the controller and that of view component that will display the response to the user. I call this the ViewContext. The principal responsibility of such a ViewContext is to provide contextual and structural information above a view component. This ViewContext may be from the source of a request or for a destination. The main uses are: 1. Peripheral info such as context-sensitive help, Tab/Context highlighting can be easily managed. 2. Minimise inter-frame communication. 3. Ability to place views in different contexts with just configuration change. The View Context itself can be customized per-application basis. I view this as an invaluable scheme to bring some kind of order into the view chaos. I proposed this to some of my colleagues. They understand the idea but some are principally opposed to this as this one brings the context of view into Controllers. What they fail to understand is that currently the fundamental navigational flow is etched into View-Controller-View interaction and the views make lot of assumptions and hard-coded bindings with other views. ViewContext makes the Controllers context-aware and helps flexible contracts between views. I checked JavaServer Faces and it too lacks such kind of view context support. Your thoughts? Your experiences? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Documentation correction
Warning: on the struts documentation about multiple module support when it says: -- Now, to change to ModuleB, we would use a URI like this: http://localhost:8080/toModule.do?prefix=moduleBpage=index.do That's all there is to it! Happy module-switching! -- It should be: http://localhost:8080/toModule.do?prefix=/moduleBpage=/index.do Pedro Salgado - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator Framework Questions
Thomas, I have seen may developers struggling with Struts Validation (IMHO, it is a GIFT to us). The best way is to read some good book like the one from Chuck Cavaness. I read it once and my validation never fail me. Or you can view his article http://jakarta.apache.org/struts/resources/articles.html -Dan - Original Message - From: Thomas Miskiewicz [EMAIL PROTECTED] Newsgroups: Struts Sent: Sunday, June 15, 2003 10:09 AM Subject: Re: Validator Framework Questions Dan, change your strut config to use org.apache.struts.validator.DynaValidatorForm That helped. Could you or someone please else answer my questions regarding the validator framework itself? Is it part of Struts framework or not (I'm using the 1.1 rc2). What steps are required to setup and use it? Where do I find more info about it. Thanks Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:text Error?...
I have been able to get one app working then when I tore it down and trying to start from stratch again to see if could finally figure it out I am getting the same error message. I am pasting the code below to see if you see anything I am doing wrong. Thanks for the help. I really appreciate it. === Logon Page Form === %@ taglib uri=/tags/struts-html prefix=html % %@ taglib uri=/tags/struts-logic prefix=logic % %@ taglib uri=/tags/struts-bean prefix=bean % html head titleLogon/title /head body html:form action=/LogonSubmit focus=username/ table tr tdUsername:/td tdhtml:text property=username//td /tr tr tdPassword:/td tdhtml:text property=password//td /tr tr td/td tdhtml:submit/html:reset//td /tr /table /html:form /body /html === LogonForm Bean === package app; import org.apache.struts.action.*; public class LogonForm extends ActionForm { private String username; private String password; private String passwordMatch; public void setUsername(String aUsername) { this.username = aUsername; } // end setUsername() public String getUsername() { return(this.username); } // end getUsername() public void setPassword(String aPassword) { this.password = aPassword; } // end setPassword() public String getPassword() { return(this.password); } // end getPassword() public void setPasswordMatch(String aPassword) { this.passwordMatch = aPassword; } // end setPasswordMatch() public String getPasswordMatch() { return(this.passwordMatch); } // end getPasswordMatch } // end class LogonForm === Struts config === ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- Configure the Form Beans -- form-beans form-bean name=logonForm type=app.LogonForm/ /form-beans !-- Configure the Global Forwards -- global-forwards forward name=welcome path=/welcome.do/ forward name=logon path=/logon.do/ /global-forwards !-- Configure Action Mappings -- action-mappings action parameter=/jsp/welcome.jsp path=/welcome type=org.apache.struts.actions.ForwardAction/ action action path=/logon type=org.apache.struts.actions.ForwardAction parameter=/jsp/logon.jsp /action action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request forward name=success path=/jsp/myhome.jsp/ /action /action-mappings /struts-config Thanks again for the help.. Regards, Sloan Bowman Take a look at the struts-example. For subscriptions and registration tasks, there are 2 parts to the flow. 1. Setup 2. Save In a general sense Setup is usually an edit or a new when using the application. The only difference being that edit uses some values from persistence to allow the user to edit them. new just presents the user with a blank form so that they can fill it out from scratch. In both cases, the setup is handled by one action and uses a request parameter to determine if this is a a new subscription or editing an existing one. That parameter is called (coincidentally) action. Here's the struts-config entry to handle that: !-- Edit mail subscription -- actionpath=/editSubscription type=org.apache.struts.webapp.example.EditSubscriptionAction attribute=subscriptionForm scope=request validate=false forward name=failure path=/mainMenu.jsp/ forward name=success path=/subscription.jsp/ /action ..notice that this action uses attribute=subscriptionForm instead of name=subscriptionForm as is done when saving the subsciption... !-- Save mail subscription -- actionpath=/saveSubscription type=org.apache.struts.webapp.example.SaveSubscriptionAction name=subscriptionForm scope=request input=subscription forward name=subscriptionpath=/subscription.jsp/ forward name=success path=/editRegistration.do?action=Edit/ /action What this essentially saying is...let me setup the form on the way into the page, and let me tell struts which form I used when it gets submitted. I hope this clears it up for you. -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org - Original Message - From: Sloan Bowman [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 9:54 AM Subject: Re: html:text Error?... Do you
[OT] RE: Making Controllers Aware of Views' Structural Information
The notion of a view helper object that is inserted by your Action into the appropriate context is something that has been around for a while. In my opinion making the Controller portion or worst the Model portion aware of the View breaks the whole idea of MVC. You are right in that most of the times, there is logic that is needed in the View to do things like what you stated. However that logic is View centric only. In other words, presentation logic. There are several mechanisms to implement presentation logic. Struts gives you plenty of objects that help you deal with it. The Tag libraries that Struts gives you coupled with the new JSTL tags, should be more the sufficient to tackle almost all sorts of presentation logic that is unique to a specific presentation. If a case comes up when either tag usage is becoming overly complex, or there is a lot of as you call it Big Ball of Mud, then that indicates problems in the overall design of the application. This can come from two reasons. One, a lot of what should be application logic is seeping through to the view, which indicates that the model portion of the application is not well factored or designed. Two, the usage of HTML itself in the design of the pages, is not properly used, which is usually an indication to me whenever I see a framed site or a site that relies heavily in client side scripting. In my opinion, frames should not be the basis of a front end design. Almost every web application that I've come across that uses frames has done so because of improper front end design and a general lack of knowledge of simple Web principles and design guidelines. HTTP and the Web are simple, that's what makes it so popular. So why make it over complicated? I suggest reading up on Usability design for the web, especially Jakob Nielsen's works. Even though I don't agree with everything that Jakob and other usability experts preach, there are valuable lessons and just plain common sense ideas that can be gained from learning about web usability. Now, what to do if even after you do have a good front end design and usability guidelines established, and your view is still becoming overly complex? Going back to what I stated in the beginning of this email, you can design a View helper type object, which can take the form of a custom tag or a JavaBean or a combination of the two. This view helper would know how to render a tab for example, or a menu. But those decisions and logic would happen inside this object, without much if any work done, in say the Action class. Just instantiate it, pass it some objects, and stuff it into one of the scopes. If you are doing anything more then that, then you're doing too much. Again the key here is that it is a _View_ Helper. As you can probably tell, I don't like frames. There are very few use cases when frames truly make sense. In my opinion Frames should be your very last alternative to a UI problem and only after you exhaust all other design possibilities, should it then be considered. Sometimes this isn't a easy decision because it usually indicates an overall problem with the usability design of a web application. I'm sure there will be a lot of people that disagree with this view. And that's just too bad for them :) To end, the idea of a ViewContext object as you describe it is probably flawed in thinking. There are times where you do need more then Tags to handle your presentation logic. Those cases however should be the exception and not the rule. Best of luck, John -Original Message- From: Vikram B Kumar [mailto:[EMAIL PROTECTED] Sent: Sunday, June 15, 2003 1:50 PM To: Struts Users Mailing List Subject: Making Controllers Aware of Views' Structural Information We have spent much thoughts on MVC, and very good J2EE web frameworks, Struts being the foremost, have been developed as a result. We have best practices and clean way of generating views. Yet, IMHO, the V part of MVC, especially managing views, has not been bestowed with the same amount of attention. Here is one example: I am consulting for a company which has a large web application. The application has been organized around different products of the company. On the server-side, we use Struts and similar web application frameworks. Many features have been added to the application and the M and C portions of the web application are under control and I think we have done a good job there. However the view itself has de-evolved into a Big Ball of Mud. The following: 1. Tab highlighting based on the product an user is currently viewing. 2. TOC highlighting based on the feature of the product an user is currently viewing. 3. Frames management. 4. Context-sensitive help. are working fine but have been implemented using intricate gestalt of JavaScript/Cookie/Inter-frame communication. Adding to the complexity is the abstraction between various product applications. We are trying to develop a
Re: [OT] MVC / Model 2 for Microsoft ???
I am curious if anyone is aware of an MVC-type framework for .NET. I am NOT looking for a Struts port to .NET. I started doing a little research, searching for things like Best Practices or .NET Patterns etc. I found almost nothing... no best practices guides. Not even a single recommendation about builing Object-based backend systems. In fact, most books I've read on ASP.NET and .NET in general have focused on database access code directly in the ASPX page itself(in the Code Behind section). I'm in a similar boat. The department I'm working with is fairly far along (iteration 10 of 17) with a deployment of a application using Struts. Meanwhile, other departments in the enterprise are being put on .NET for new development. At some point, we may have to jump on the bandwagon and migrate our application too. Since we heard this train coming, we've been watching the .NET ports of some of our favorite components: Mavnet - Production/stable (final release 15/may/03). http://mavnet.sourceforge.net/ NVelocity - Production/stable (version 0.4 shipped 10/jan/03). http://sourceforge.net/projects/nvelocity NHibernate - Alpha - Good start, but now awaiting release Hibernate 2 (RC2 - 09/may/03). http://sourceforge.net/projects/nhibernate NUnit - Production/Stable - 2.0 02/oct/02 - new beta in active development http://sourceforge.net/projects/nunit/ Log4Net - Production/Stable - 1.1.1 13/apr/02, 1.2 B7 06/may/03 http://sourceforge.net/projects/log4net/ NAnt - Beta - 0.8.2 23/apr/03 http://sourceforge.net/projects/nant/ NLucene - Beta - Shipped b2 16/jul/02, inactive since. http://sourceforge.net/projects/nlucene I toyed with the idea of porting Struts to .NET, but decided to give Maverick a fair shake first. (Why reinvent the wheel?) Maverick is very Struts-like, and my stuff should plug right in. My project's current iteration is scheduled to ship at the end of the month, at which point we're migrating to the Java Maverick (simply to put us in a better position for a jump to the .NET Maverick). This will be a bit of fun for me, since there are some things available in Struts that are not available in Maverick. But not so many, and most are already based on Commons packages. So, this will be a very nice proof-of-concept in adapting Struts-bred Commons pasckages, like the Validator, to another framework. This is my primary development contract now, but I have others for training and such that still use Struts, so I'll be using Maverick and Struts side-by-side for awhile. -Ted. Aaron Longwell wrote: I hope I don't start a huge debate with that intro, here goes. I am a freelance web developer. I've been struggling lately with not being able to use the Struts framework on ALL projects. Specifically, I do work with a number of Microsoft Devotees. For several sites, this has meant developing in old ASP like playing with Duplos compared to Struts. I have been spending some time learning the .NET framework. So far it looks great... er, the features that look like Java look great. But then, why wouldn't I just use the more open, polished, community-oriented, original... Java? So now to the point... I don't have a choice for some projects... I have to use .NET. I am curious if anyone is aware of an MVC-type framework for .NET. I am NOT looking for a Struts port to .NET. I started doing a little research, searching for things like Best Practices or .NET Patterns etc. I found almost nothing... no best practices guides. Not even a single recommendation about builing Object-based backend systems. In fact, most books I've read on ASP.NET and .NET in general have focused on database access code directly in the ASPX page itself(in the Code Behind section). Am I: 1) Naive to not notice that Java Enterprise developers are light-years ahead of MS developers in terms of programming practices, design patterns, and role separation? 2) Mistaken? There really are MVC frameworks in .NET... but they are all internal... and no community oriented projects exist. Thanks for the input. Aaron Longwell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dates
use GregorianCalendar like this GregorianCalendar cal = new GregorianCalendar(); cal.setTime(new java.util.Date()); int month=cal.get(Calendar.MONTH); int day=cal.get(Calendar.DAY_OF_MONTH); int year=cal.get(Calendar.YEAR); On Thursday 12 June 2003 11:22 pm, Ludovic Maitre wrote: Hello, I have a question about the Date objects and struts : My users want to have a form for selecting a date with one selector for the date, one for the month, and one for the year. I want to know if there is existing facilities for doing this in struts. Actually i have attempted to use the (deprecated) methods getDate,getMonth and getYear of java.util.Date but it seems that there is a little verbose (see above). Is there a better solution ? -- Ludovic Maître Factory Productions | Tél: (33) 04 93 07 08 00 149, avenue des mimosas | Fax: (33) 04 93 07 04 02 06700 Saint-Laurent-du-Var (France) | Web: http://www.factory.fr PS : the script code for the form i want to have is : in page one : nested:nest property=dateBirthday jsp:directive.include file=/nests/DateNest.jsp/ /nested:nest in DateNest.jsp : td nowrap=true nested:select property=date html:option value=0--/html:option c:forEach var=i begin=1 end=31 html-el:option value=${i}c:out value=${i}//html-el:option /c:forEach /nested:select nested:select property=month html:option value=0--/html:option c:forEach var=i begin=1 end=12 html-el:option value=${i}c:out value=${i}//html-el:option /c:forEach /nested:select nested:select property=year html:option value=0/html:option c:forEach var=i begin=1980 end=2020 html-el:option value=${i}c:out value=${i}//html-el:option /c:forEach /nested:select /td - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Frances Aleah Z. De Guzman SA/Programmer Ingenium Technology, Inc. http://www.ingenium.com.ph Disclaimer : This message is intended only for the named recipient. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01
try moving your tomcat folder to c:\tomcat. it should work Senthivel U S wrote: Greetings Thomas, My source files are in C:\work directory. Tomcat directory is C:\Program Files\Apache Group\jakarta-tomcat-4.1.24 . The same setup was Working till yesterday with Tomcat 4.1.12 , jdk 1.2 and windows 2000 . Thanx Rgds, Sen -Original Message- From: Thomas Cornet [mailto:[EMAIL PROTECTED] Sent: Sunday, June 15, 2003 4:53 PM To: Struts Users Mailing List Subject: Re: tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 It seems like your java source files is behind Program Files directory on C:. Problem is path files should not contain any space ( ) character with in. Try to change your java files' location. At 14:36 15/06/2003, you wrote: Hi, We have installed tomcat 4.1.24 on windows xp and j2sdk1.4.1_01 and since then we couldn't access any jsp file. jasper always fails with the following exception reports. Rgds, Sen Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: -1 in the jsp file: null Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] javac: invalid flag: C:\Program [javac] Usage: javac options source files [javac] where possible options include: [javac] -gGenerate all debugging info [javac] -g:none Generate no debugging info [javac] -g:{lines,vars,source}Generate only some debugging info [javac] -nowarn Generate no warnings [javac] -verbose Output messages about what the compiler is doing [javac] -deprecation Output source locations where deprecated APIs are used [javac] -classpath path Specify where to find user class files [javac] -sourcepath pathSpecify where to find input source files [javac] -bootclasspath path Override location of bootstrap class files [javac] -extdirs dirs Override location of installed extensions [javac] -d directorySpecify where to place generated class files [javac] -encoding encoding Specify character encoding used by source files [javac] -source release Provide source compatibility with specified release [javac] -target release Generate class files for specific VM version [javac] -help Print a synopsis of standard options at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorH a ndler.java:130) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.j a va:293) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.j a va:473) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j a va:190) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295 ) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat c her.java:684) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDis p atcher.java:432) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispa t cher.java:356) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.ja v a:1014) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestP r ocessor.java:417) at org.apache.struts.action.RequestProcessor.processActionForward(RequestP r ocessor.java:390) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java : 271) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. i nvokeNext(StandardPipeline.java:643) at
Re: UML diagrams in Struts source
Aaron Longwell wrote: Rob Leland wrote: Rahul wrote: Greetings All, As for the source, it's well-documented, explained and with UML diagrams. ah ! that reminds me .. I would like to know if these UML diagrams are being generated by an open source tool. May be I could use something like that to get some neat UML diagrams for other few java project trees sitting on my PC and whose number of source files is dreary enuff to make me dizzzy. The UML in the Java Doc was created with Silver Stream 1.1 which is a free UML tool. The ones in Ted's Book was created with Together J. Has anyone used ArgoUML? I've been wanting to try it for a while... is it worth the 10 second download? http://argouml.tigris.org Argo was a mess last time I used it, about a year. The application was huge and very buggy. I made a mistake it was SilverRun JD 1.1, not silver stream. Also, Do you have URLs for SilverStream and Together J? TogetherJ is only an evaliation, and you will have to go to borland.com now to get an evaluation copy. For SilverRun 'Google' it. -Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: executing statements on subsets of actions without code duplication
Rob wrote: Rob Leland wrote: Rob wrote: I have a set of statements I would like executed every time an action is executed. I would also like to only have to code these set of statements once and have them transparently executed for all actions (except for a small subset). When we were using a Servlet 2.2 container we derived a class from Action named SecureAction, which checked that the user was logged in. Can you explain how this was done in a little more detail, particularly what methods were used, where they were used etc..? I have the current arrangement where I extend Action with a BaseAction, which implements my common method (the one to be called always) and then from subclasses of BaseAction.execute() I call the common method. Find out what method in Action calls the execute() method, which is empty. I forget. Override that method in BaseAction, then place a call to your common method in that method. That way no Action can be called unless your common method says it can. -Rob It is this having to manually call the common method I would like to eliminate and just have it transparently occur higher in the hierarchy. As for your suggestion of using filters could you direct me to more information regarding that method I'm interested in exploring it. Thanks Then all the applications Actions would be SecureAction Children. If struts had events then the event could be hooked instead, this is easy enough to do. Under Servlet 2.3 filters could be used. -Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] FRIDAY: HTML Checkboxes SUCK!!!
+1 Im thinking of doing the same. Checkboxes are evil. Another bonus to using dropdowns instead is that if you really need the user to think about whether that field should be true or false then you can add an extra empty choice that doesnt pass validation. That way they will be forced to set a value in that field whereas with a checkbox they can easily forget to tick it and submit a false value by mistake... My theory on what the w3c specs guys were thinking tends to involve them down the pub having a few too many beers and one of them saying hey guys! Ive got an idea - wouldnt it be funny if we... -Original Message- From: Viggio, Alex [mailto:[EMAIL PROTECTED] Sent: Saturday, 14 June 2003 04:17 To: 'Struts Users Mailing List' Subject: [OT] FRIDAY: HTML Checkboxes SUCK!!! Is it just me?!? ;) In our last release, I replaced all of the checkboxes with YES/NO dropdowns (select and options tags using a Collection for the YES=true/NO=false mapping). The users seem to prefer this user interface (no one's complained at least) and I can still tie these to a ActionForm boolean property thanks to aforementioned Collection (via define tag)! We have a complex, multi-part/layer wizard workflow using the nesting tablib extensively so the code was begging for refactorings. This UI change allowed us to get rid of all of the kludgy code to support these retarded HTML checkboxes (cya ActionForm reset()). What were you thinking W3C spec gurus! Apologies if you momma worked on the HTML checkbox spec, but it's Friday the 13th and I'm flying to a warm, tropical beach tomorrow!!! - Alex p.s. I'm sure that there is a more elegant solution -- feel free to share... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: OT FRIDAY: Take a break with struts users
Yeh yeh yeh. I make 6 figures a month mate... 7 if you count the decimal point... -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Friday, 13 June 2003 22:59 To: 'Struts Users Mailing List' Subject: RE: OT FRIDAY: Take a break with struts users I feel your pain, man! I won't tell you that I've been working from home for the past 6 months making 6 figures, then. ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2003 10:39 AM To: Struts Users Mailing List Subject: Re: OT FRIDAY: Take a break with struts users - Original Message - From: Mark Galbreath [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, June 13, 2003 9:34 AM Subject: RE: OT FRIDAY: Take a break with struts users Some people complained that Yahoo! and AIM were not compatible with Unix and Linux. Get special dispensation for port 6667 and claim it's indispensable for your work. We can even discuss LISP, if you want. ;-) No can do. I'm so far removed from the network operations group here, that I don't even know who they are. They block every available port except web, ftp, and telnet. I used to be able to use gotomypc.com from home, which uses default port 80 and http to communicate, so that I was able to work from home on occasion. Suddenly about 3 weeks ago, it stopped working. Apparently they added both the web site and poll server to their blocked list (probably because of me) so now I guess I'm just screwed. It's times like this when I hate this fu##king place!!! Micro-manage the SH## out of everyone. -- James Mitchell Software Developer/Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple request / query parameters in struts-config.xml
Thats odd. Im using this technique for multiple parameters in my actionforwards without any problem. When you say its null, is that in an actionform in the action you are forwarding to or for a request.getParameter(id). If the former, try outputting the result of the latter in your action - and if that shows the value instaed of null then its most likely an actionform problem (with one likely culprit being multiple getter/setter for same property with different signatures). -Original Message- From: Rob [mailto:[EMAIL PROTECTED] Sent: Friday, 13 June 2003 20:36 To: Struts Users Mailing List Subject: Re: multiple request / query parameters in struts-config.xml hmm, actually I just looked at my config file and I didn't forget the ';'. I only forgot it when posting this question. Any other suggestions? Andrew Hill wrote: forward name=foo path=/do/foo?bar=10amp;id=10/ Note the ';' in the above. (proper xml terminates its entities with ; while html doesnt need it) -Original Message- From: Rob [mailto:[EMAIL PROTECTED] Sent: Friday, 13 June 2003 14:23 To: Struts Users Mailing List Subject: multiple request / query parameters in struts-config.xml I have the following arrangement for some of my forwards. forward name=foo path=/do/foo?bar=10/ Now it's come time where I want to have more than one parameter specified in the struts-config.xml file. I tried: forward name=foo path=/do/foo?bar=10ampid=10/ However the second parameter ends up being null. How do you correctly specify more than one parameter? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Documentation correction
Pedro Emanuel de Castro Faria Salgado wrote: Warning: on the struts documentation about multiple module support when it says: -- Now, to change to ModuleB, we would use a URI like this: http://localhost:8080/toModule.do?prefix=moduleBpage=index.do That's all there is to it! Happy module-switching! -- It should be: http://localhost:8080/toModule.do?prefix=/moduleBpage=/index.do Fixed, Thanks ! Pedro Salgado - 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]
GenericDataSource looping
Im use to use DBCP in Struts 1.1RC1 but then mo back to GenericDataSource in Struts 1.1RC2 but it seem's im having a problem with it. According to my console it seem's generic source is lopping endlessly... 429796 [tcp-accept-6802] INFO util.GenericDataSource -createConnection() 429812 [tcp-accept-6802] INFO util.GenericDataSource -Return new connection, activeCount=5, useCount=123 429812 [tcp-accept-6802] INFO util.GenericDataSource - getConnection() 429812 [tcp-accept-6802] INFO util.GenericDataSource -Check for timeout, activeCount=4, useCount=123 my data-source configuration in my struts-config.xml looks like this: data-source key=DATASOURCE set-property property=driverClass value=com.mysql.jdbc.Driver / set-property property=url value=jdbc:mysql://localhost/crmdev / set-property property=maxCount value=10 / set-property property=minCount value=5 / set-property property=user value=root / set-property property=password value=password / /data-source has anybody experienced this before? what do i have to do to make it work? or should i really change my datasource? i was thinking og using DBConnectionBroker? any ideas? thanks.
Re: [OT] MVC / Model 2 for Microsoft ???
Ted, Thanks for the detailed info on .NET ports. Keep us posted on how you like Maverick! I've downloaded the docs and code and I'll be taking a look over the next few months. Not too sure what I think yet. Aaron Ted Husted wrote: I am curious if anyone is aware of an MVC-type framework for .NET. I am NOT looking for a Struts port to .NET. I started doing a little research, searching for things like Best Practices or .NET Patterns etc. I found almost nothing... no best practices guides. Not even a single recommendation about builing Object-based backend systems. In fact, most books I've read on ASP.NET and .NET in general have focused on database access code directly in the ASPX page itself(in the Code Behind section). I'm in a similar boat. The department I'm working with is fairly far along (iteration 10 of 17) with a deployment of a application using Struts. Meanwhile, other departments in the enterprise are being put on .NET for new development. At some point, we may have to jump on the bandwagon and migrate our application too. Since we heard this train coming, we've been watching the .NET ports of some of our favorite components: Mavnet - Production/stable (final release 15/may/03). http://mavnet.sourceforge.net/ NVelocity - Production/stable (version 0.4 shipped 10/jan/03). http://sourceforge.net/projects/nvelocity NHibernate - Alpha - Good start, but now awaiting release Hibernate 2 (RC2 - 09/may/03). http://sourceforge.net/projects/nhibernate NUnit - Production/Stable - 2.0 02/oct/02 - new beta in active development http://sourceforge.net/projects/nunit/ Log4Net - Production/Stable - 1.1.1 13/apr/02, 1.2 B7 06/may/03 http://sourceforge.net/projects/log4net/ NAnt - Beta - 0.8.2 23/apr/03 http://sourceforge.net/projects/nant/ NLucene - Beta - Shipped b2 16/jul/02, inactive since. http://sourceforge.net/projects/nlucene I toyed with the idea of porting Struts to .NET, but decided to give Maverick a fair shake first. (Why reinvent the wheel?) Maverick is very Struts-like, and my stuff should plug right in. My project's current iteration is scheduled to ship at the end of the month, at which point we're migrating to the Java Maverick (simply to put us in a better position for a jump to the .NET Maverick). This will be a bit of fun for me, since there are some things available in Struts that are not available in Maverick. But not so many, and most are already based on Commons packages. So, this will be a very nice proof-of-concept in adapting Struts-bred Commons pasckages, like the Validator, to another framework. This is my primary development contract now, but I have others for training and such that still use Struts, so I'll be using Maverick and Struts side-by-side for awhile. -Ted. Aaron Longwell wrote: I hope I don't start a huge debate with that intro, here goes. I am a freelance web developer. I've been struggling lately with not being able to use the Struts framework on ALL projects. Specifically, I do work with a number of Microsoft Devotees. For several sites, this has meant developing in old ASP like playing with Duplos compared to Struts. I have been spending some time learning the .NET framework. So far it looks great... er, the features that look like Java look great. But then, why wouldn't I just use the more open, polished, community-oriented, original... Java? So now to the point... I don't have a choice for some projects... I have to use .NET. I am curious if anyone is aware of an MVC-type framework for .NET. I am NOT looking for a Struts port to .NET. I started doing a little research, searching for things like Best Practices or .NET Patterns etc. I found almost nothing... no best practices guides. Not even a single recommendation about builing Object-based backend systems. In fact, most books I've read on ASP.NET and .NET in general have focused on database access code directly in the ASPX page itself(in the Code Behind section). Am I: 1) Naive to not notice that Java Enterprise developers are light-years ahead of MS developers in terms of programming practices, design patterns, and role separation? 2) Mistaken? There really are MVC frameworks in .NET... but they are all internal... and no community oriented projects exist. Thanks for the input. Aaron Longwell - 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]