RE: workflow?
Hi ronel A good idea to find out more about 'workflow' is the Workflow Management Coalition http://www.wfmc.org/. There are a lot of links and publications to this topic. Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 10:21 PM To: [EMAIL PROTECTED] Subject: workflow? I've seen some talk about this in the struts-dev group can somebody point me to where i can read more about it. I'm working on a framework that allows a struts developer to reuse certain wizard based pages where the wizard doesn't change, but the start and end points do i.e. Basically a way to plug in a use case into other use cases. The result of the wizard would be a bean (foreign key) that would be assigned to a bean that requested the service of the wizard. I would like to find out if the 'workflow' stuff is for this situation Thanks. -ronel
Indexed property of ActionForm
I want to get value for an attribute named vehicleTypes in my ActionForm. This is an array of Strings. But I don't know how to do it. Struts always reports internel server error(500) when I try to submit the form. Please help me! This is my ActionForm: -- public final class SearchVehicleForm extends ActionForm { private String[] vehicleTypes; public String[] getVehicleTypes() { return vehicleTypes; } public void setVehicleTypes(String[] vehicleTypes) { this.vehicleTypes = vehicleTypes; } } This is the exception from Tomcat's log file --- 2001-06-25 15:22:54 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 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(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:225) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 875) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952) at java.lang.Thread.run(Thread.java:484) - Root Cause - java.lang.IllegalArgumentException: argument type mismatch at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98 8) at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90 4) at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932) at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 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(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
RE: Struts Question
Charles, This is a known problem. Websphere has a bug (inherited from the old version of Tomcat they used) that does not remove attributes from request scope, even though this is perfectly legal. Until Websphere fixes this, the only solution is to remove two lines from the doEndTag() method (the two pageContext.removeAttribute() calls) and rebuild Struts. Stephen. -Original Message- From: Rick Smith [SMTP:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 11:41 PM To: [EMAIL PROTECTED] Subject: Re: Struts Question Charles, I ran into the same problem trying to run struts on Tomcat 3.1. Removing attributes isn't supported in the older jsp specification or something like that. Try running the test page using Tomcat 3.2 if you can. Rick Charles Baker wrote: Quick question, I?m using VA ?s Web Test Env and I?m getting an error using a simple test page from the IBM web site. I?m still new to Struts so can someone let me know if this is a simple mistake that I?m making? The single page JSP and full error message are following. Message: Server caught unhandled exception from servlet [jsp]: cant remove Attributes from request scope Thanks in advance for any help. CEB JSP Page %@taglib uri=/WEB-INF/struts-html.tld prefix=html% html:html locale=false html:errors/ html:form action=processNewEmployee.do *First Name: html:text property=firstName/BR *Last Name: html:text property=lastName/BR *Phone Number: html:text property=phoneNumber/BR Office Number: html:text property=officeNumber/BR Backup: html:text property=backup/BR Backup Phone Number: html:text property=backupPhoneNumber/BR html:submit / /html:form /html:html Error 500 An error has occured while processing request:http://localhost:8080/employeelist/processNewEmployee.do Message: Server caught unhandled exception from servlet [action]: Server caught unhandled exception from servlet [jsp]: cant remove Attributes from request scope Target Servlet: action StackTrace: Root Error-1: cant remove Attributes from request scope java.lang.IllegalArgumentException: cant remove Attributes from request scope java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) java.lang.RuntimeException(java.lang.String) java.lang.IllegalArgumentException(java.lang.String) void org.apache.jasper.runtime.PageContextImpl.removeAttribute(java.lang.String , int) int org.apache.struts.taglib.html.FormTag.doEndTag() void jsp._employeeEdit_xjsp._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) void org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServl etRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servl et.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean) void org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.Htt pServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.Throwable, boolean) void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServle tRequest, javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servle t.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servle t.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.ServicingServletState.service(com.ibm.servle t.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Digester
Hi, I am using Digester to transform my own xml file which looks like : first-tag text 1 second-tag text 2 /second-tag /first-tag Rules are set with digester in the following way : digester.addObjectCreate(xmlpath,classname); digester.addSetProperties(xmlpath); digester.addSetNext(xmlpath, addProduct, classname); digester.addCallMethod(xmlpath+/first-tag, setFirsttag, 0); digester.addCallMethod(xmlpath+/first-tag/second-tag), setSecond-tag, 0); As a result I have for both setMethods the text 2, I did not manage to get text 1. As I am a new user of struts, I would be very grateful if someone could help me. Sandrine
RE: IAS 6.0 SP2 and struts TAGLIB error
Hi Matt, Indeed I'm running on iPlanet, but I've got a question about your solution below. After deploying my app, iPlanet has extracted all jar files under the Web-Inf\classes and Web-inf\lib folders. The struts.jar file has been extracted to the web-inf\lib location. Should iPlanet unjar all these jar files here? Or should iPlanet just deploy the jar file without unjarring it? Because the jar files have been extracted, there's no jar file to point to. Instead I could add the web-inf\classes AND the web-inf\lib location to the classpaths but I find this very strange to do so... Thanks in advance, Raymond -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 14:10 To: [EMAIL PROTECTED] Subject: Re: IAS 6.0 SP2 and struts TAGLIB error It looks like you might be running iPlanet, if so, make sure struts.jar is in your classpath in kregedit. Also, if you have any ActionClass or FormClasses that you're calling from action, you'll need to make sure the full path to \iPlanet\ias6\...\APPS\...\WEB-INF\classes is in your classpath. It's a bug in iPlanet, but this workaround works like a charm. Let me know if you have any other iPlanet issues, as I have spent a fair amount of time getting struts to work on iPlanet. Hope this helps, Matt --- Brandon, Raymond [EMAIL PROTECTED] wrote: Hi everyone, Does anyone recognize the error message below? It happens at runtime. [20/Jun/2001 11:33:18:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Setting locale 'en_US' [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Looking for Action instance for class OrderSample.web.MyOrderSetProfileAction [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Double checking for Action instance already there [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Creating new Action instance [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:28:7] error: Exception: SERVLET-compile_failed: Failed in compiling template: /web/MyOrderQuery.jsp, JSP Error: Class was not found for :html Exception Stack Trace: java.lang.Exception: JSP Error: Class was not found for :html at com.netscape.jsp.JSP.addTagdata(Unknown Source) at com.netscape.jsp.JSP.parseUserTag(Unknown Source) at com.netscape.jsp.JSP.parseTag(Unknown Source) at com.netscape.jsp.JSP.parseNext(Unknown Source) at com.netscape.jsp.JSP.parseBlock(Unknown Source) at com.netscape.jsp.JSP.parse(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletRe sponse.callJsp Compiler(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletRe sponse.callUri (Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletRe sponse.callUri RestrictOutput(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformRequestDispat cher.forward(U nknown Source) at org.apache.struts.action.ActionServlet.processActionForward(Ac tionServlet.ja va:1697) at org.apache.struts.action.ActionServlet.process(ActionServlet.j ava:1540) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:865) at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execut e(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.applogic.AppLogic.execute(Unknown Source) at com.kivasoft.thread.ThreadBasic.run(Native Method) at java.lang.Thread.run(Thread.java:479) Regards, Raymond P. Brandon
RE: Digester
I tried to retrieve texts like you. I think it is impossible because Digester uses Sax underneath, and it is not a intern Sax functionality. What you can do, is either to rewrite your own Digester using Sax by adding a layer that is able to accumulate text within nested tags (PCDATA) OR to redefine your XML (because I personnally think that if you need this functionnality, your XML struture is a little bit weird ). - Sébastien Noel - -Original Message- From: BANAS,SANDRINE (Non-HP-France,ex1) [SMTP:[EMAIL PROTECTED]] Sent: lundi 25 juin 2001 10:35 To: '[EMAIL PROTECTED]' Subject: Digester Hi, I am using Digester to transform my own xml file which looks like : first-tag text 1 second-tag text 2 /second-tag /first-tag Rules are set with digester in the following way : digester.addObjectCreate(xmlpath,classname); digester.addSetProperties(xmlpath); digester.addSetNext(xmlpath, addProduct, classname); digester.addCallMethod(xmlpath+/first-tag, setFirsttag, 0); digester.addCallMethod(xmlpath+/first-tag/second-tag), setSecond-tag, 0); As a result I have for both setMethods the text 2, I did not manage to get text 1. As I am a new user of struts, I would be very grateful if someone could help me. Sandrine - An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. - - Un courrier électronique n'engage pas son émetteur. Tout message susceptible de comporter un engagement doit être confirmé par un écrit dûment signé. An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. Ein elektronischer Brief bzw. eine elektronische Nachricht ist für den Absender nicht verbindlich. Jede Nachricht, welche eine Verpflichtung beinhaltet, muß schriftlich bestätigt und ordnungsgemäß unterzeichnet werden. -
RE: Multiple Action Per Form and Image Html link questions
For the Answer to second question, use the following tag: input type=image src=image.gif This works as good as a submit button. -Original Message- From: Andreas Amundin [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 6:45 AM To: '[EMAIL PROTECTED]' Subject: Multiple Action Per Form and Image Html link questions I am looking in to using Struts as the development framework for generating pages. I have two questions: 1. How can I submit two different actions for the same form? 2. How can I submit a form using an image and html link instead of a submit button. Some elaboration for each question is in order lest I be misunderstood. Question 1: How can I submit two different actions for the same form? I'll use a somewhat contrived example to make my point. Assume that the page with the form contains user profile information. The two actions that are desired from this page are Save Changes to existing profile and Create new profile using data in form. Each action needs to be mapped to a completely different Action class. Any information about how this can be done is greatly appreciated. In previous environments I usually accomplished this with a little bit of javascript and a hidden input variable combined with the fact that I wrote the controlling servlet. Question 2: How can I submit a form using an image and html link instead of a submit button. REASON: Business user can't stand the look of the generic submit button and wants an image that matches the site in general. No chance in h--l that I can change their mind. Got any good ideas? Please let me know if I have made to many assumptions and need to add some more information to clarify any of the two questions. Thanks in advance, Andreas -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
Re: Indexed property of ActionForm
Hi!! Try to use a vector instead of String[]! /Linnéa - Original Message - From: Thai Thanh Ha [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 10:16 AM Subject: Indexed property of ActionForm I want to get value for an attribute named vehicleTypes in my ActionForm. This is an array of Strings. But I don't know how to do it. Struts always reports internel server error(500) when I try to submit the form. Please help me! This is my ActionForm: -- public final class SearchVehicleForm extends ActionForm { private String[] vehicleTypes; public String[] getVehicleTypes() { return vehicleTypes; } public void setVehicleTypes(String[] vehicleTypes) { this.vehicleTypes = vehicleTypes; } } This is the exception from Tomcat's log file --- 2001-06-25 15:22:54 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 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(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:225) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 875) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952) at java.lang.Thread.run(Thread.java:484) - Root Cause - java.lang.IllegalArgumentException: argument type mismatch at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98 8) at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90 4) at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932) at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 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(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:225) at
RE: Indexed property of ActionForm
Hi, Have you tried something like this? bean:write name=SearchVehicleForm property='%= vehicleTypes[ + index + ] %'/ Jon. -Original Message- From: Thai Thanh Ha [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 09:16 To: '[EMAIL PROTECTED]' Subject: Indexed property of ActionForm I want to get value for an attribute named vehicleTypes in my ActionForm. This is an array of Strings. But I don't know how to do it. Struts always reports internel server error(500) when I try to submit the form. Please help me! This is my ActionForm: -- public final class SearchVehicleForm extends ActionForm { private String[] vehicleTypes; public String[] getVehicleTypes() { return vehicleTypes; } public void setVehicleTypes(String[] vehicleTypes) { this.vehicleTypes = vehicleTypes; } } This is the exception from Tomcat's log file --- 2001-06-25 15:22:54 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 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(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:225) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 875) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952) at java.lang.Thread.run(Thread.java:484) - Root Cause - java.lang.IllegalArgumentException: argument type mismatch at java.lang.reflect.Method.invoke(Native Method) at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98 8) at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90 4) at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932) at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20 61) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1563) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 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(Application FilterChain.java:254) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:194) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:255) at
RE: Running Struts in J2EE Server
Hi Ihin, Which J2EE server are you using? Jon. -Original Message- From: ihin [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 05:59 To: [EMAIL PROTECTED] Subject: Running Struts in J2EE Server how can i run struts in J2EE Server...? is there any special setting to running it...? i trayed to running the example but it dosn't work the error like this A Servlet Exception Has Occurred org.apache.jasper.compiler.CompileException: c:\j2sdkee1.3\public_html\bugtracking\index.jsp(4,0) Unable to load class org.apache.struts.taglib.html.HtmlTag at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:137 ) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa rseEventListener.java:808) thank's for your attantion regards ihin
RE: Running Struts in J2EE Server
J2EE 1.3 Beta Version (j2sdkee1.3) from SUN microsystem TIA ihin -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:12 PM Subject: RE: Running Struts in J2EE Server Hi Ihin, Which J2EE server are you using? Jon. -Original Message- From: ihin [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 05:59 Subject: Running Struts in J2EE Server how can i run struts in J2EE Server...? is there any special setting to running it...? i trayed to running the example but it dosn't work the error like this A Servlet Exception Has Occurred org.apache.jasper.compiler.CompileException: c:\j2sdkee1.3\public_html\bugtracking\index.jsp(4,0) Unable to load class org.apache.struts.taglib.html.HtmlTag at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:137 ) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa rseEventListener.java:808)
Re: Build fails on style
If you are building it using Netbeans, Ant uses the Xerces in Netbeans class path, my solution was to add xalan.jar(from jaxp1.1) to \netbeans\lib\ext joachim gjesdal Kief Morris wrote: Howdy, I'm trying to compile the struts build from CVS, and am having major xml parser headaches. My base system is: Win2000 SP2 Sun JDK 1.3.0-C Ant 1.3.0 (bin) For XML parser libraries I've tried JAXP 1.1 and Xerces 1.4.0, but I can't seem to get Struts to compile with either one. In either case it fails in line 186 of build.xml, which is the style task. With Xerces I get a NoClassDefFoundError: javax/xml/transform/Source, which is logical since xerces.jar doesn't contain this class. I gather Ant's style task doesn't work with xerces. Fine, so I tried it with JAXP, but I get sealing violations. I tried different combinations of crimson.jar, jaxp.jar, and xalan.jar in my classpath; I put all 3 in, as instructed by JAXP's install.html, and then tried each by itself to see what happens. Anything that didn't include xalan.jar failed due to lack of the org.apache.xalan.processor.TransformerFactoryImpl class. Anything that did include xalan.jar failed with a sealing violation. WITHOUT XALAN.JAR (partial): javax.xml.transform.TransformerFactoryConfigurationError: java.lang.ClassNotFoundException: org.apache.xalan.processor.TransformerFactoryImpl at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:121) at org.apache.tools.ant.taskdefs.optional.TraXLiaison.init(TraXLiaison.java:87) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.tools.ant.taskdefs.XSLTProcess.setProcessor(XSLTProcess.java:231) WITH XALAN.JAR: compile.library: [javac] Compiling 132 source files to C:\src\oss\struts\target\library\classes [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -deprecation for details. [copy] Copying 7 files to C:\src\oss\struts\target\library\classes [copy] Copying 3 files to C:\src\oss\struts\target\library [style] Transforming into C:\src\oss\struts\target\library BUILD FAILED C:\src\oss\STRUTS\build.xml:186: java.lang.SecurityException: sealing violation --- Nested Exception --- java.lang.SecurityException: sealing violation at java.net.URLClassLoader.defineClass(URLClassLoader.java:234) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:117) at org.apache.tools.ant.taskdefs.optional.TraXLiaison.init(TraXLiaison.java:87) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.tools.ant.taskdefs.XSLTProcess.setProcessor(XSLTProcess.java:231) at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:137) at org.apache.tools.ant.Target.execute(Target.java:153) at org.apache.tools.ant.Project.runTarget(Project.java:898) at org.apache.tools.ant.Project.executeTarget(Project.java:536) at org.apache.tools.ant.Project.executeTargets(Project.java:510) at org.apache.tools.ant.Main.runBuild(Main.java:421) Does anybody have a spare clue? Thanks, Kief
RE: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags
None taken. I dont have a feel for the overhead - could you expand more. Niall -Original Message- From: Wong Kok Wai [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 06:41 To: [EMAIL PROTECTED] Subject: Re: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags No offense, but I feel it is much better in performance to use Java scriptlets for these cases. The overhead of the tags is just too high to justify using them. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags
But tags have one main advantage, the view builder doesn't have to understand Java and it is easy to intergrate the tags in a wysiwyg jsp editor. We use that kind of tags to make our webpages, eg see jsp and all we have to do is to make a xml based editor... with scriplets this is impossible. * begin jsp template:insert template=/document/html.homepage.jsp template:put name=banner content=/element/banner/html.standard.jsp/ wf:choose wf:whenUser level=2 template:put name=leftbar content=/element/leftbar/html.standard_level2.jsp / /wf:whenUser wf:whenUser level=1 template:put name=leftbar content=/element/leftbar/html.standard_level1.jsp / /wf:whenUser wf:otherwise template:put name=leftbar content=/element/leftbar/html.standard.jsp / /wf:otherwise /wf:choose template:put name=content content=/element/content/html.homepage.jsp/ template:put name=menu content=/element/menu/html.homepage.jsp/ /template:insert * end jsp - Original Message - From: Wong Kok Wai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 7:41 AM Subject: Re: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags No offense, but I feel it is much better in performance to use Java scriptlets for these cases. The overhead of the tags is just too high to justify using them. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Running Struts in J2EE Server
Hi Ihin, I have checked the archive for this list and can find no suggestions/fixes, so I'll need to look into this one a bit more Jon. -Original Message- From: ihin [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 10:22 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Running Struts in J2EE Server J2EE 1.3 Beta Version (j2sdkee1.3) from SUN microsystem TIA ihin -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:12 PM Subject: RE: Running Struts in J2EE Server Hi Ihin, Which J2EE server are you using? Jon. -Original Message- From: ihin [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 05:59 Subject: Running Struts in J2EE Server how can i run struts in J2EE Server...? is there any special setting to running it...? i trayed to running the example but it dosn't work the error like this A Servlet Exception Has Occurred org.apache.jasper.compiler.CompileException: c:\j2sdkee1.3\public_html\bugtracking\index.jsp(4,0) Unable to load class org.apache.struts.taglib.html.HtmlTag at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:137 ) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa rseEventListener.java:808)
Re: Query string in struts-config.xml
Ted I'm not following entirely, or something may be missing here. Where is the parameter name, in your case task specified? I don't see it in the action specification. Also, where is this feature in the documentation? TIA Tom Miller Ted Husted wrote: Another approach is to pass the query string options using the parameter property of the action mapping, and then looking for them in your action. So, passing a parameter like task=select could also be represented as: action parameter=select path=/lot/Search type=org.wxxi.gavel.lot.http.Access name=lotForm scope=request validate=false input=/do/lot/Done forward name=continue path=/WEB-INF/pages/lot/Result.jsp/ /action and in the Action // -- Acquire other parameters String task mapping.getParameter(); if (task==null) task = request.getParameter(task); Of course, if you need to pass several parameters, the query string approach (using amp; for ) will let the servlet parse them out for you. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Jacob Thomas wrote: Hi Jon, I was trying this out earlier using the Struts beta 1 release and found that query strings with multiple parameters caused the XML parser to give errors when it encountered either the '' or '?' character. forward name=command path=/context/page.jsp?param1=value1param2=value2/ Based on your and Craig's feedback, I take it that this is now supported. -- Thanks Jacob -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX
Re: Query string in struts-config.xml
The parameter property is not mentioned in the Users Guide (yet), but it is in the JavaDocs. The parameter here was just the value select. I call it task inside the Action, to leave the option of passing ?task=select as a query string. Of course, you could also call it parameter internally, and make the query string alternative parameter=select, which would probably be a better convention: String parameter = mapping.getParameter(); if (parameter==null) parameter = request.getParameter(parameter); Tom Miller wrote: Ted I'm not following entirely, or something may be missing here. Where is the parameter name, in your case task specified? I don't see it in the action specification. Also, where is this feature in the documentation? TIA Tom Miller Ted Husted wrote: Another approach is to pass the query string options using the parameter property of the action mapping, and then looking for them in your action. So, passing a parameter like task=select could also be represented as: action parameter=select path=/lot/Search type=org.wxxi.gavel.lot.http.Access name=lotForm scope=request validate=false input=/do/lot/Done forward name=continue path=/WEB-INF/pages/lot/Result.jsp/ /action and in the Action // -- Acquire other parameters String task = mapping.getParameter(); if (task==null) task = request.getParameter(task); Of course, if you need to pass several parameters, the query string approach (using amp; for ) will let the servlet parse them out for you. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Jacob Thomas wrote: Hi Jon, I was trying this out earlier using the Struts beta 1 release and found that query strings with multiple parameters caused the XML parser to give errors when it encountered either the '' or '?' character. forward name=command path=/context/page.jsp?param1=value1param2=value2/ Based on your and Craig's feedback, I take it that this is now supported. -- Thanks Jacob -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
Re: not in target list (struts - postgresql db)
Hi, i have created a table and recored in PostgreSql i have exstablished a link with a previous example test thus i have 8 columns with 7 rows/tuples of information and i want to show severn records at a time. Therefore i want to sort data with the ORDER BY. I have set ORDER BY position 8 for my multiple column names (to represent the 8 colmuns in PostgreSql) albeit the 8 is not in target any suggestions. Location: /bbnpa/planningdb.jsp Internal Servlet Error: javax.servlet.ServletException: java.sql.SQLException: ERROR: ORDER BY position 8 is not in target list Here is a extract copy of my getColumn Code. >B>Opening connection to PostgreSql Database Prototype /B>/P> %-- open database connction--%> table order ="5" > sql:connection id="conn1"> sql:url>jdbc:postgresql://1**.16.1.**/test1/sql:url> sql:driver>org.postgresql.Driver/sql:driver> sql:userId>chucka/sql:userId> sql:password>/sql:password> /sql:connection> sql:statement id="stmt1" conn="conn1"> sql:query> select app_code, app_date, grid_ref , location, community, proposal,comment from planning_application order by 8 /sql:query> %-- loop through the rows of your query--%> sql:resultSet id="rset1"> tr bgcolor="#cc" > th>APP No/th>th> Application Date/th>th>Application/Agent/th>th>GridRef/th>th>Location/th>th>Community/th>th>Proposal/th>th> Comment/> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="1"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="2"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="3"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="4"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="5"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="6"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="7"/>/td> /tr> tr bgcolor="#cc"> td>br>sql:getColumn position="8"/>sql:wasNull>[no description]/sql:wasNull>/td> /tr> /sql:resultSet> /sql:statement> %-- close a database connection --%> sql:closeConnection conn="conn1"/> /table> /body> /html> -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
Re: Query string in struts-config.xml
Very good! Is there a way to pass a Map of parameters in this way, or is it just a single one? Tom Ted Husted wrote: The parameter property is not mentioned in the Users Guide (yet), but it is in the JavaDocs. The parameter here was just the value select. I call it task inside the Action, to leave the option of passing ?task=select as a query string. Of course, you could also call it parameter internally, and make the query string alternative parameter=select, which would probably be a better convention: String parameter = mapping.getParameter(); if (parameter==null) parameter = request.getParameter(parameter); Tom Miller wrote: Ted I'm not following entirely, or something may be missing here. Where is the parameter name, in your case task specified? I don't see it in the action specification. Also, where is this feature in the documentation? TIA Tom Miller Ted Husted wrote: Another approach is to pass the query string options using the parameter property of the action mapping, and then looking for them in your action. So, passing a parameter like task=select could also be represented as: action parameter=select path=/lot/Search type=org.wxxi.gavel.lot.http.Access name=lotForm scope=request validate=false input=/do/lot/Done forward name=continue path=/WEB-INF/pages/lot/Result.jsp/ /action and in the Action // -- Acquire other parameters String task = mapping.getParameter(); if (task==null) task = request.getParameter(task); Of course, if you need to pass several parameters, the query string approach (using amp; for ) will let the servlet parse them out for you. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Jacob Thomas wrote: Hi Jon, I was trying this out earlier using the Struts beta 1 release and found that query strings with multiple parameters caused the XML parser to give errors when it encountered either the '' or '?' character. forward name=command path=/context/page.jsp?param1=value1param2=value2/ Based on your and Craig's feedback, I take it that this is now supported. -- Thanks Jacob -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX
Re: Query string in struts-config.xml
It's a string, so you would have to parse it to extract multiple values. Tom Miller wrote: Very good! Is there a way to pass a Map of parameters in this way, or is it just a single one? Tom
SERVLET-compile_failed: Failed in compiling template: /web/SampleClassQuery.jsp, JSP Error: Class was not found for :html
Hi everyone, I get: SERVLET-compile_failed: Failed in compiling template: /web/SampleClassQuery.jsp, JSP Error: Class was not found for :html. For the complete trace see attached file. I tried to track it down where it happens and according to what I see in my struts-config file, the error looks to occur when the action path=/SampleClassSetProfile is executed. action path=/SampleClassSetProfile type = SamplePackage.web.SampleClassSetProfileAction scope=request validate=false forward name=success path=/SampleClassQuery.jsp redirect=false / forward name=failure path=/SampleClassBrowse.do redirect=false / /action To my understanding, the moment the error occurs is the first time that taglib is referenced in the struts library. After deployment, The struts.jar file has been extracted to the web-inf\lib location. (By the way, Should iPlanet unjar all these jar files here? Or should iPlanet just deploy the jar file without unjarring it?) Because the jar files have been extracted, there's no jar file to point to. So, instead I've added the web-inf\classes AND the web-inf\lib location to the classpaths but I find this very strange to do so... Anyway, this did not help to solve the problem. Does anybody know? runtime-error.txt Thanks in advance, Raymond P. Brandon Software EngineerCompuware Europe BV Product Development Hoogoorddreef 5 Uniface Technology P.O.Box 12933 Mailto:[EMAIL PROTECTED] 1100 AX Amsterdam The Netherlands Tel: +31 - 20 - 3126510 Fax: +31 - 20 - 3116364 [25/Jun/2001 11:01:49:7] info: -- [25/Jun/2001 11:01:49:7] info: action: init [25/Jun/2001 11:01:49:7] info: -- init [25/Jun/2001 11:01:49:8] info: -- [25/Jun/2001 11:01:49:8] info: action: Loading application resources from resource SamplePackage.web.webResources [25/Jun/2001 11:01:49:8] info: -- Loading application resources from resource SamplePackage.web.webResources [25/Jun/2001 11:01:49:8] info: -- [25/Jun/2001 11:01:49:8] info: action: Initializing configuration from resource path /WEB-INF/struts-config.xml [25/Jun/2001 11:01:49:8] info: -- Initializing configuration from resource path /WEB-INF/struts-config.xml register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/E:/Optimal-J/libDeploy/alturalib.jar!/org/apache/struts/resources/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/E:/Optimal-J/libDeploy/alturalib.jar!/org/apache/struts/resources/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/E:/Optimal-J/libDeploy/alturalib.jar!/org/apache/struts/resources/web-app_2_3.dtd' resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'http://java.sun.com/j2ee/dtds/web-app_2_2.dtd') Resolving to alternate DTD 'jar:file:/E:/Optimal-J/libDeploy/alturalib.jar!/org/apache/struts/resources/web-app_2_2.dtd' Call com.compuware.strutsext.ControllerServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String) [25/Jun/2001 11:01:53:3] info: -- [25/Jun/2001 11:01:53:3] info: action: Process servletName=action, urlPattern=*.do [25/Jun/2001 11:01:53:3] info: -- Process servletName=action, urlPattern=*.do [25/Jun/2001 11:01:53:3] info: -- [25/Jun/2001 11:01:53:3] info: action: Mapping for servlet 'action' = '*.do' [25/Jun/2001 11:01:53:3] info: -- Mapping for servlet 'action' = '*.do' [25/Jun/2001 11:01:53:3] info: -- [25/Jun/2001 11:01:53:3] info: logger: init [25/Jun/2001 11:01:53:3] info: -- [25/Jun/2001 11:01:55:0] info: -- [25/Jun/2001 11:01:55:0] info: JSPRunnerSticky: init [25/Jun/2001 11:01:55:0] info: -- [25/Jun/2001 11:02:03:1] info: -- [25/Jun/2001 11:02:03:1] info: jsp.APPS.web.mainMenu: init [25/Jun/2001 11:02:03:1] info: -- [25/Jun/2001 11:02:21:0] info: -- [25/Jun/2001 11:02:21:0] info: action: Processing a GET for /SampleClassSetProfile [25/Jun/2001 11:02:21:0] info: -- Processing a GET for /SampleClassSetProfile [25/Jun/2001 11:02:21:2] info: -- [25/Jun/2001 11:02:21:2] info: action: Looking for Action instance
Re: Can anyone help with solving the BACK button problem, in th e browser?
Hi Smith Could u please send the javascript code related to back button problem. Thanks Eda Spencer Smith [EMAIL PROTECTED] wrote: That won't work. I solved the problem using javascript. Javascript doesn't cache like JSP pages does, so you can get around this problem using javascript. If you want, I can send you the code I use. - Original Message - From: Thane Eisener To: '[EMAIL PROTECTED]' Sent: Thursday, June 07, 2001 10:12 AM Subject: RE: Can anyone help with solving the "BACK" button problem, in th e browser? Oops, I guess I should test before I post. It looks like newer browsers don't support this as a META tag only as a header. I added the following to one of my action classes and the perform() method was called when I pressed 'Back': response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); Hope it helps, Thane -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: Re: Can anyone help with solving the "BACK" button problem, in th e browser? Thane , I am using: META http-equiv="Expires" content="now" in my header, and my action is not re-executed when I use the browser back button. Is there another option I should be using? thanks, Pete Thane Eisener wrote: I seem to recall a META tag called something like pragma-no-cache that you can embed in your page which will force the page to reload (not just display a snapshot). This should enable handling the situation in scriptlets or your action class. -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: Re: Can anyone help with solving the "BACK" button problem, in the browser? Depending on which browser you use, and the data on the page, the back button may cause (or ask) the page to reload. However, some browsers (like IE) only display a snapshot of what the last page rendered to. Therefore, you cannot use scriptlets or the action class. However, you are able to kick-off javascript. If you can gaurantee that your users will have javascript enabled, you can write a simple test to see if this page was already displayed to the user. You could check a flag (hidden field) when the page loads. If the flag is true, then use the javascript to reload to your desired page. HTH, Pete "Dudley Butt@i-Commerce" wrote:Please help, When the user pushes the back button, I want the page to redirect or refresh to a different page, please, any ideas? Thanx guys and gals Dudley Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year!http://personal.mail.yahoo.com/
Implementing 2 new scopes using Struts
I will be implementing new scopes using Struts for our unique needs, and they need to be application server independent. Onescope will work across (between) web-applications: Ex.user logs on, and an object representing the users values and state is placed into a scope where ALL WEB APPLICATIONS can see it. Another scope is restricted to specified directoriesinside of an application: Ex. data saved would only be visible when inside a specific sub-directory. I am currently examining the 2.3 servlet spec. Does anyone have any advice as to what to watch out for inimplementing this considering I want to be able to be compatible with servlet containers in general and leverage container management and web.xml configuration. Couldanyone refer me to some specific sections in the servlet spec that you feel I should pay specific attention to while I am doing this. Thank you Jonathan
RE: Implementing 2 new scopes using Struts
Jonathan, Onescope will work across (between) web-applications: Ex.user logs on, and an object representing the users values and stateis placed into a scope where ALL WEB APPLICATIONS can see it. Use JNDI and throw the user info up the jndi tree I didn't understand your second scope. Can you elaborate. Thanks. cheers, Amar.. -Original Message-From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]Sent: Monday, June 25, 2001 8:24 AMTo: [EMAIL PROTECTED]Subject: Implementing 2 new scopes using Struts I will be implementing new scopes using Struts for our unique needs, and they need to be application server independent. Onescope will work across (between) web-applications: Ex.user logs on, and an object representing the users values and state is placed into a scope where ALL WEB APPLICATIONS can see it. Another scope is restricted to specified directoriesinside of an application: Ex. data saved would only be visible when inside a specific sub-directory. I am currently examining the 2.3 servlet spec. Does anyone have any advice as to what to watch out for inimplementing this considering I want to be able to be compatible with servlet containers in general and leverage container management and web.xml configuration. Couldanyone refer me to some specific sections in the servlet spec that you feel I should pay specific attention to while I am doing this. Thank you Jonathan
Re: Implementing 2 new scopes using Struts
JNDI is expensive. Then second one is a restriction of data storage visibility to a sub-directory of a Web app. Ex.I have a web app called myWebApp, which has its own WEB-INF directory with a web.xml inside.Below myWebApp I hav 3 directories called Jon, Nanduri, and Ted. I want to store things that pertain to the Jon branch which neither the Ted branch nor the Nanduri branch can see. - Original Message - From: Nanduri, Amarnath To: '[EMAIL PROTECTED]' Sent: Monday, June 25, 2001 8:21 AM Subject: RE: Implementing 2 new scopes using Struts Jonathan, Onescope will work across (between) web-applications: Ex.user logs on, and an object representing the users values and stateis placed into a scope where ALL WEB APPLICATIONS can see it. Use JNDI and throw the user info up the jndi tree I didn't understand your second scope. Can you elaborate. Thanks. cheers, Amar.. -Original Message-From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]Sent: Monday, June 25, 2001 8:24 AMTo: [EMAIL PROTECTED]Subject: Implementing 2 new scopes using Struts I will be implementing new scopes using Struts for our unique needs, and they need to be application server independent. Onescope will work across (between) web-applications: Ex.user logs on, and an object representing the users values and state is placed into a scope where ALL WEB APPLICATIONS can see it. Another scope is restricted to specified directoriesinside of an application: Ex. data saved would only be visible when inside a specific sub-directory. I am currently examining the 2.3 servlet spec. Does anyone have any advice as to what to watch out for inimplementing this considering I want to be able to be compatible with servlet containers in general and leverage container management and web.xml configuration. Couldanyone refer me to some specific sections in the servlet spec that you feel I should pay specific attention to while I am doing this. Thank you Jonathan
newbie question on search forms
Hi, I want to make a lookup screen with on top some input fields when the user pushes the submit button I want to retrieve the data from the database and display it beneath the original search fields ... Is this possible with struts, and if yes, how can I do this ? - Actionmappings ? - how to build the jsp ? - struts-config ? any tips, ideas will be greatly appreciated thanks, Kris [EMAIL PROTECTED]
RE: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags
Lol! I was just sitting here friday complaining Darn I wish Struts' logic tags supported OR and ELSE! :D Thanks! Chris -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 24, 2001 4:28 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags Hi, I have extended the IF, THEN, ELSE functionality I posted a while ago to now include AND, OR and ELSEIF tags. I have also added an enhacement to the original CASE tag which now allows an operator as well as value to be specified. I attach the source code for these tags and would like to propose them to be considered for inclusion in Struts. If you agree with including them in Struts, then send some feedback to the development list ([EMAIL PROTECTED]). 1) Tags which make up the IF/ELSE logic are: IfTag AndTag OrTag ThenTag ElseTag ElseifTag 2) Tags which make up the SWITCH/CASE logic are: SwitchTag CaseTag DefaultTag These tags use the same Struts base tags which the existing logic tags use and are effectively just new wrappers to provide IF/ELSE and SWITCH/CASE functionality. The IfTag, AndTag, OrTag and ElseifTag provides the same functionality as the existing Struts logic tags (e.g. EqualTag etc) by specifying an operator (e.g. op=equal) attribute. Valid operator values are: Equal, NotEqual, LessEqual, LessThan, GreaterThan, GreaterEqual, Match. NoMatch, Present, NotPresent The CaseTag also uses an operator attribute and can have the following values: Equal, NotEqual, LessEqual, LessThan, GreaterThan, GreaterEqual Its obvious that trying to specify complex conditional logic in an XML format is never going to have the same clarity as a programming language, so I hope you bear that in mind when seeing how these tags achieve that. Using the IF/ELSE TAGS - I have included a few examples below to demonstrate how to use the tags and I also try document the key points when laying out these tags: How the tags are ordered and embedded in each other is important: 1) The first tag must be an IfTag which encloses all other tags 2) AndTags and OrTags must be embedded after an IfTag or ElseIfTag and before the ThenTag and ElseTag. 3) AndTags can only have OrTags embedded in them 4) OrTags can only have AndTags embedded in them 5) You can't mix and match AndTags and OrTags at the SAME level - must be all AndTags or all OrTags Niall File: amarda-logic.tldFile: logic-src.jar ** Example 1 - IF, OR, THEN, ELSE logic:if name=calendarBean property=month op=equal value=January logic:or name=calendarBean property=year op=LessEqual value=1999/ logic:or name=calendarBean property=day op=equal value=Monday/ logic:then At least one of the above conditions is true. /logic:then logic:else All of Above conditions are false /logic:else /logic:if ** Example 2 - IF, AND, OR, THEN, ELSE, ELSEIF logic:if name=personBean op=present logic:then No details found for this Person /logic:then logic:elseif name=personBean property=age op=GreaterEqual value=16 logic:and name=personBean property=age op=LessEqual value=65 logic:or name=personBean property=age op=LessEqual value=75 logic:and name=personBean property=job op=equal value=Doctor logic:or name=personBean property=job op=equal value=Dentist/ logic:or name=personBean property=job op=equal value=Lawyer/ /logic:and /logic:or logic:or name=personBean property=job op=equal value=President/ logic:or name=personBean property=job op=equal value=Senator/ /logic:and logic:then This person is of working age - that is between the ages of 16 and 65, except for Doctors, Dentists and Lawyers who retire at 55 and presidents and senators who can be any age over 16. /logic:then logic:else This person is either too young to work or past retirement age. /logic:else /logic:elseif /logic:if ** Example 3 - - IF, OR, THEN, ELSE, ELSEIF logic:ifname=calendarBean property=month op=equal value=January logic:or name=calendarBean property=month op=equal value=February/ logic:or name=calendarBean property=month op=equal value=March/ logic:then This if the first quarter of the year. /logic:then logic:elseif name=calendarBean property=month op=equal value=April
RE: IAS 6.0 SP2 and struts TAGLIB error
It's a bug in iPlanet that will hopefully be fixed in either SP3 or 6.1 (this fall). When deploying, if the app server finds any jars, wars, etc. in your ear or war, it extracts them when it deploys. What I've done is to remove struts.jar from web-inf\lib and put it somewhere else on my hard drive, and reference that location in my classpath. I find it strange as well, but at least there is a workaround! SP3 should be out this week or next - I'll let everyone know what I find in that release. I did find that struts-templates still did not work on an SP3 build on 6.09.01. I notified iPlanet and hopefully they will get this bug fixed. Matt --- Brandon, Raymond [EMAIL PROTECTED] wrote: Hi Matt, Indeed I'm running on iPlanet, but I've got a question about your solution below. After deploying my app, iPlanet has extracted all jar files under the Web-Inf\classes and Web-inf\lib folders. The struts.jar file has been extracted to the web-inf\lib location. Should iPlanet unjar all these jar files here? Or should iPlanet just deploy the jar file without unjarring it? Because the jar files have been extracted, there's no jar file to point to. Instead I could add the web-inf\classes AND the web-inf\lib location to the classpaths but I find this very strange to do so... Thanks in advance, Raymond -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 14:10 To: [EMAIL PROTECTED] Subject: Re: IAS 6.0 SP2 and struts TAGLIB error It looks like you might be running iPlanet, if so, make sure struts.jar is in your classpath in kregedit. Also, if you have any ActionClass or FormClasses that you're calling from action, you'll need to make sure the full path to \iPlanet\ias6\...\APPS\...\WEB-INF\classes is in your classpath. It's a bug in iPlanet, but this workaround works like a charm. Let me know if you have any other iPlanet issues, as I have spent a fair amount of time getting struts to work on iPlanet. Hope this helps, Matt --- Brandon, Raymond [EMAIL PROTECTED] wrote: Hi everyone, Does anyone recognize the error message below? It happens at runtime. [20/Jun/2001 11:33:18:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Setting locale 'en_US' [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Looking for Action instance for class OrderSample.web.MyOrderSetProfileAction [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Double checking for Action instance already there [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:22:2] info: action: Creating new Action instance [20/Jun/2001 11:33:22:2] info: -- [20/Jun/2001 11:33:28:7] error: Exception: SERVLET-compile_failed: Failed in compiling template: /web/MyOrderQuery.jsp, JSP Error: Class was not found for :html Exception Stack Trace: java.lang.Exception: JSP Error: Class was not found for :html at com.netscape.jsp.JSP.addTagdata(Unknown Source) at com.netscape.jsp.JSP.parseUserTag(Unknown Source) at com.netscape.jsp.JSP.parseTag(Unknown Source) at com.netscape.jsp.JSP.parseNext(Unknown Source) at com.netscape.jsp.JSP.parseBlock(Unknown Source) at com.netscape.jsp.JSP.parse(Unknown Source) at com.netscape.jsp.JSP.compile(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.JSPtoJava(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileOrLoadJSP(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.jsp.JSPCompiler.compileInstance(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletRe sponse.callJsp Compiler(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletRe sponse.callUri (Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformHttpServletRe sponse.callUri RestrictOutput(Unknown Source) at com.netscape.server.servlet.platformhttp.PlatformRequestDispat cher.forward(U nknown Source) at org.apache.struts.action.ActionServlet.processActionForward(Ac tionServlet.ja va:1697) at
RE: newbie question on search forms
Hi Kris, Have a look at the struts-example for 'form' examples. Then to accomplish what you wish to achieve, you would have to also use a logic:present tag to look for a bean that would contain you results. You would also have to look at the logic:iterate tag to display the results. I believe the struts-example web app has samples of all the above. Jon. -Original Message- From: Vandenberk, Kris [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 13:37 To: [EMAIL PROTECTED] Subject: newbie question on search forms Hi, I want to make a lookup screen with on top some input fields when the user pushes the submit button I want to retrieve the data from the database and display it beneath the original search fields ... Is this possible with struts, and if yes, how can I do this ? - Actionmappings ? - how to build the jsp ? - struts-config ? any tips, ideas will be greatly appreciated thanks, Kris [EMAIL PROTECTED]
Re: Build fails on style
I've been banging my head on this problem for several days, and have concluded that the problem is in the ordering of the jar files in the classpath. xalan.jar must precede ant's parser.jar in order for script task found in strut's build.xml to be handled correctly. The following command works: c:\jdk1.3.1\bin\java -classpath c:\jdk1.3.1\lib\tools.jar;c:\java\jaxp-1.1\xalan.jar;\ c:\java\jakarta-ant-1.3\lib\parser.jar;c:\java\jakarta-ant-1.3\lib\optional.jar;\ c:\java\jakarta-ant-1.3\lib\jaxp.jar;c:\java\jakarta-ant-1.3\lib\ant.jar \ -Dant.home=c:\java\jakarta-ant-1.3 org.apache.tools.ant.Main Whereas this does not: c:\jdk1.3.1\bin\java -classpath c:\jdk1.3.1\lib\tools.jar;c:\java\jakarta-ant-1.3\lib\parser.jar;\ c:\java\jaxp-1.1\xalan.jar;c:\java\jakarta-ant-1.3\lib\optional.jar;c:\java\jakarta-ant-1.3\lib\jaxp.jar;\ c:\java\jakarta-ant-1.3\lib\ant.jar \ -Dant.home=c:\java\jakarta-ant-1.3 org.apache.tools.ant.Main [note: the backslashes are for readability only] Note that the only difference is whether xalan.jar comes before or after parser.jar. Unfortunately, ant 1.3's ant.bat script prepends the jar files in its own lib directory, including parser.jar (as well as those in the jdk lib directory,) to the classpath, regardless of whether they are already in the classpath. This ensures that it won't compile struts. runant.pl does work, since it only diddles the classpath if JAVA_HOME hasn't been set: ant.bat diddles it either way. Does anyone else get this behavior with ant 1.3, or is there something else I'm missing? Kief
Problem loading DATABASE: org.xml.sax.SAXException
Hello! I am using STRUTS with WEBSPHERE 3.5.3. I try to use the STRUTS EXAMPLE. When I start the Default Server via the Admin Console, I have the following exception: 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0091I: [Servlet LOG]: database: Initializing database servlet 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0091I: [Servlet LOG]: database: Loading database from '/WEB-INF/database.xml' 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0092I: [Servlet LOG]: database: Database load exception: org.xml.sax.SAXException: org.apache.struts.webapp.example.User at com.sun.xml.parser.Parser.parseInternal(Parser.java:461) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.java:251) at org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet.java:175) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.java:604) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleServlet.java:136) at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycleServlet.java:244) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleServlet.java:102) at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:284) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java:76) at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:91) at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:158) at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:806) at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:93) at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:121) at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:82) at com.ibm.servlet.engine.srt.WebGroup.restart(WebGroup.java:155) at com.ibm.servlet.engine.ServletHost.restartWebGroup(ServletHost.java:176) at com.ibm.servlet.engine.ServletEngineDynamicUpdateSupport.restartWebGroup(ServletEngineDynamicUpdateSupport.java:106) at com.ibm.ejs.sm.active.ActiveServletGroup.setRefreshConfigAction(ActiveServletGroup.java:193) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:93) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:487) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:110) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:487) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:110) at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:62) at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(_AdminAgentImpl_Tie.java:80) at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.java:506) at com.ibm.CORBA.iiop.ORB.process(ORB.java:2282) at com.ibm.CORBA.iiop.WorkerThread.run(WorkerThread.java:195) at com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run(ThreadPool.java:535) Could anyone help me? Thanks. MIKAEL
RE: Problem loading DATABASE: org.xml.sax.SAXException
Have you placed Jaxp 1.0.1 (not 1.1.1) jar's in the servlets directory before firing up the server? Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 9:18 AM To: [EMAIL PROTECTED] Subject: Problem loading DATABASE: org.xml.sax.SAXException Hello! I am using STRUTS with WEBSPHERE 3.5.3. I try to use the STRUTS EXAMPLE. When I start the Default Server via the Admin Console, I have the following exception: 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0091I: [Servlet LOG]: database: Initializing database servlet 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0091I: [Servlet LOG]: database: Loading database from '/WEB-INF/database.xml' 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0092I: [Servlet LOG]: database: Database load exception: org.xml.sax.SAXException: org.apache.struts.webapp.example.User at com.sun.xml.parser.Parser.parseInternal(Parser.java:461) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.java:2 51) at org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet.java:1 75) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.ja va:604) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleSe rvlet.java:136) at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycl eServlet.java:244) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleSer vlet.java:102) at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:284) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java: 76) at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServlet Manager.java:91) at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebA ppServletManager.java:158) at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:806) at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:93) at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:121) at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:82) at com.ibm.servlet.engine.srt.WebGroup.restart(WebGroup.java:155) at com.ibm.servlet.engine.ServletHost.restartWebGroup(ServletHost.java:176) at com.ibm.servlet.engine.ServletEngineDynamicUpdateSupport.restartWebGroup(Ser vletEngineDynamicUpdateSupport.java:106) at com.ibm.ejs.sm.active.ActiveServletGroup.setRefreshConfigAction(ActiveServle tGroup.java:193) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.ja va:93) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:4 87) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.ja va:110) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:4 87) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.ja va:110) at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:6 2) at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(_AdminAgentImpl_Tie.java:80 ) at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.ja va:506) at com.ibm.CORBA.iiop.ORB.process(ORB.java:2282) at com.ibm.CORBA.iiop.WorkerThread.run(WorkerThread.java:195) at com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run(ThreadPool.java:535) Could anyone help me? Thanks. MIKAEL
RE: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags
I agree. Add to that the fact that java script functionality is not consistent across all browsers, and some organizations refuse to allow its use in intranet applications. D -Original Message- From: bram [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:46 AM To: [EMAIL PROTECTED] Subject: Re: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags But tags have one main advantage, the view builder doesn't have to understand Java and it is easy to intergrate the tags in a wysiwyg jsp editor. We use that kind of tags to make our webpages, eg see jsp and all we have to do is to make a xml based editor... with scriplets this is impossible. * begin jsp template:insert template=/document/html.homepage.jsp template:put name=banner content=/element/banner/html.standard.jsp/ wf:choose wf:whenUser level=2 template:put name=leftbar content=/element/leftbar/html.standard_level2.jsp / /wf:whenUser wf:whenUser level=1 template:put name=leftbar content=/element/leftbar/html.standard_level1.jsp / /wf:whenUser wf:otherwise template:put name=leftbar content=/element/leftbar/html.standard.jsp / /wf:otherwise /wf:choose template:put name=content content=/element/content/html.homepage.jsp/ template:put name=menu content=/element/menu/html.homepage.jsp/ /template:insert * end jsp - Original Message - From: Wong Kok Wai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 7:41 AM Subject: Re: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags No offense, but I feel it is much better in performance to use Java scriptlets for these cases. The overhead of the tags is just too high to justify using them. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Formless actions?
I'm making my first Struts application, and in keeping with MVC I want to load all of my JSP pages through actions: the Action sets up the data the JSP page needs to display. It seems that the action tag in struts-config.xml requires a form bean for the name= attribute. But what if I have a view which is not a form, merely a view of data? A form bean shouldn't be necessary for this, so how do I structure this? Kief
jsp:include limitations?
Are there any limitations when using jsp:include to include content generated by an ActionServlet? For instance, is it possible to set cookies in an action that is included from another page? Specifically, when jsp:include is called the response is already commited, correct? Thank you. --min
Re: Formless actions?
The name attribute is not required. You can leave it out, however, if you are using the html:form taglib on your page, then it will want an actionform. So in that case, you will either need to have an empty bean, or use the standard HTML FORM tag -- without a bean. HTH, Pete Kief Morris wrote: I'm making my first Struts application, and in keeping with MVC I want to load all of my JSP pages through actions: the Action sets up the data the JSP page needs to display. It seems that the action tag in struts-config.xml requires a form bean for the name= attribute. But what if I have a view which is not a form, merely a view of data? A form bean shouldn't be necessary for this, so how do I structure this? Kief begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
struts-example: newbie question on adding multiple users form
Hi, I've modified the struts example to do a couple of things for me, but now i want to add a main menu entry that will display a form which contains a select box. This select box will contain the usernames of all the users in the database. I am a bit confused on how to approach building this. Here's what i've done so far: I've created a class that extends Serializable named DatabaseList, which contains a Users hashtable. I've also created a DatabaseListForm class that extends ActionForm, and has a getUsers() method which returns the hashtable of users. In the struts-config.xml file, i've added the following to the form bean and action mappings definitions: !-- Database list form bean -- form-bean name=databaseListForm type=org.apache.struts.webapp.example.DatabaseListForm/ !-- View database list -- actionpath=/viewDatabase type=org.apache.struts.webapp.example.ViewDatabaseAction name=databaseListForm scope=request validate=false forward name=success path=/database.jsp/ /action Finally, i have to builtd my ViewDatabaseAction which extends Action, and i presume that this is supposed to populate DatabaseListForm using the DatabaseServlet class that was supplied with the example. This is where I get confused. I have a getUsers() method in my DatabaseServlet which returns an array of users. How do I populate my list of users in the DatabaseListForm, can i use my getUsers() method or do I have to use something else ? Also, is it a good idea to have a hashtable of all users as opposed to an array or a vector of just the usernames ? Any help or any reference to something similar will be greatly appreciated. Thank you, Corneliu - : Espial Inc. : espial.com
Re: workflow?
I am currently looking at IBM's WSFL and Microsofts XLang, about half way through XLang and haven't touched WSFL... I'll keep you posted. Thanks, tataryn:craig / Marcel Andres wrote: Hi ronel A good idea to find out more about 'workflow' is the Workflow Management Coalition http://www.wfmc.org/. There are a lot of links and publications to this topic. Marcel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 10:21 PM To: [EMAIL PROTECTED] Subject: workflow? I've seen some talk about this in the struts-dev group can somebody point me to where i can read more about it. I'm working on a framework that allows a struts developer to reuse certain wizard based pages where the wizard doesn't change, but the start and end points do i.e. Basically a way to plug in a use case into other use cases. The result of the wizard would be a bean (foreign key) that would be assigned to a bean that requested the service of the wizard. I would like to find out if the 'workflow' stuff is for this situation Thanks. -ronel
Re: struts-example: newbie question on adding multiple users form
The Database servlet in the example is for demonstratin purposes only. You would not want to base a production application on it. In general, you would retrieve the list of users from a data access object (in this case the Database servlet), and then set that to your ActionForm. For a select box, there is a handy class in the example that can help you set this up for the html:select control. The accessor in your ActionForm should just get and set properties. It would generally not be recommended that it access any data resources directly. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/HTH Corneliu Rachieru wrote: Hi, I've modified the struts example to do a couple of things for me, but now i want to add a main menu entry that will display a form which contains a select box. This select box will contain the usernames of all the users in the database. I am a bit confused on how to approach building this. Here's what i've done so far: I've created a class that extends Serializable named DatabaseList, which contains a Users hashtable. I've also created a DatabaseListForm class that extends ActionForm, and has a getUsers() method which returns the hashtable of users. In the struts-config.xml file, i've added the following to the form bean and action mappings definitions: !-- Database list form bean -- form-bean name=databaseListForm type=org.apache.struts.webapp.example.DatabaseListForm/ !-- View database list -- actionpath=/viewDatabase type=org.apache.struts.webapp.example.ViewDatabaseAction name=databaseListForm scope=request validate=false forward name=success path=/database.jsp/ /action Finally, i have to builtd my ViewDatabaseAction which extends Action, and i presume that this is supposed to populate DatabaseListForm using the DatabaseServlet class that was supplied with the example. This is where I get confused. I have a getUsers() method in my DatabaseServlet which returns an array of users. How do I populate my list of users in the DatabaseListForm, can i use my getUsers() method or do I have to use something else ? Also, is it a good idea to have a hashtable of all users as opposed to an array or a vector of just the usernames ? Any help or any reference to something similar will be greatly appreciated. Thank you, Corneliu - : Espial Inc. : espial.com
Dynamic Forms
I have a form that has a variable number of fields determined by an XML document. e.g. customerdetails field id=firstName displayName=First Name value=bob field id=lastName displayName=Surname value= etc... /customerdetails I can't think of any ways in which to use the struts framework to handle this. If I am right in thinking that I have to hardcode a form object. Any ideas?? cheers in advance Andrew - To send us encrypted mail, please refer to: http://www.millionhandshakes.com/emailpolicy/pgp.html Million Handshakes
Re: Formless actions?
And, if you leave out the name tag, you should also leave out validate. The minimum Action Mapping then becomes action path=/whatever type=package.WhateverAction /action Assuming ViewAction knows where to go afterwards. If not, you can add local forwards, or use the input or parameter properties to pass more information. Just as an aside, if you are putting Actions in front of all your JSP's, then you can also place them under WEB-INF where only servlets can get them. For the greatest flexibility and MVC compliance, you should also not use html:link page= anywhere, only html:link forward=, and then put a global forward in your struts-config for any link points your JSPs need. This way there are no URI's in any of your JSPs (only forwards and mappings), and you can control everything from the struts-config. Very slick, really. Peter Alfors wrote: The name attribute is not required. You can leave it out, however, if you are using the html:form taglib on your page, then it will want an actionform. So in that case, you will either need to have an empty bean, or use the standard HTML FORM tag -- without a bean. HTH, Pete Kief Morris wrote: I'm making my first Struts application, and in keeping with MVC I want to load all of my JSP pages through actions: the Action sets up the data the JSP page needs to display. It seems that the action tag in struts-config.xml requires a form bean for the name= attribute. But what if I have a view which is not a form, merely a view of data? A form bean shouldn't be necessary for this, so how do I structure this? Kief
Re. : RE: Problem loading DATABASE: org.xml.sax.SAXException
Yes. I followed the instructions from a mail found in the mailing list of struts-user. It was said not to use the JAXP 1.1.1. So, I've installed the JAXP 1.0.1. I don't know if it can help you but, I have modified the database.xml file. I only keep the following lines: database /database And I have no error. I restore the xml file: database user username=user password=pass fullName=John Q. User fromAddress=[EMAIL PROTECTED] subscription host=mail.yahoo.com type=imap username=jquser password=foo/ subscription host=mail.hotmail.com type=pop3 username=user1234 password=bar/ /user /database I get the SAXE exception. Assenza, Chris [EMAIL PROTECTED] le 25/06/2001 15:29:10 Veuillez répondre à [EMAIL PROTECTED] Pour :'[EMAIL PROTECTED]' [EMAIL PROTECTED] cc : Objet : RE: Problem loading DATABASE: org.xml.sax.SAXException Have you placed Jaxp 1.0.1 (not 1.1.1) jar's in the servlets directory before firing up the server? Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 9:18 AM To: [EMAIL PROTECTED] Subject: Problem loading DATABASE: org.xml.sax.SAXException Hello! I am using STRUTS with WEBSPHERE 3.5.3. I try to use the STRUTS EXAMPLE. When I start the Default Server via the Admin Console, I have the following exception: 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0091I: [Servlet LOG]: database: Initializing database servlet 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0091I: [Servlet LOG]: database: Loading database from '/WEB-INF/database.xml' 22/06/01 14:19 : AUDIT [uc2902/Default Server]: SRVE0092I: [Servlet LOG]: database: Database load exception: org.xml.sax.SAXException: org.apache.struts.webapp.example.User at com.sun.xml.parser.Parser.parseInternal(Parser.java:461) at com.sun.xml.parser.Parser.parse(Parser.java:284) at javax.xml.parsers.SAXParser.parse(SAXParser.java:155) at javax.xml.parsers.SAXParser.parse(SAXParser.java:77) at org.apache.struts.digester.Digester.parse(Digester.java:755) at org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.java:2 51) at org.apache.struts.webapp.example.DatabaseServlet.init(DatabaseServlet.java:1 75) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManager.ja va:604) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecycleSe rvlet.java:136) at com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLifecycl eServlet.java:244) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycleSer vlet.java:102) at com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:284) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.java: 76) at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServlet Manager.java:91) at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebA ppServletManager.java:158) at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:806) at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:93) at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:121) at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:82) at com.ibm.servlet.engine.srt.WebGroup.restart(WebGroup.java:155) at com.ibm.servlet.engine.ServletHost.restartWebGroup(ServletHost.java:176) at com.ibm.servlet.engine.ServletEngineDynamicUpdateSupport.restartWebGroup(Ser vletEngineDynamicUpdateSupport.java:106) at com.ibm.ejs.sm.active.ActiveServletGroup.setRefreshConfigAction(ActiveServle tGroup.java:193) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.ja va:93) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:4 87) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.ja va:110) at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:4 87) at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.ja va:110) at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:6 2) at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(_AdminAgentImpl_Tie.java:80 ) at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.ja va:506) at com.ibm.CORBA.iiop.ORB.process(ORB.java:2282) at com.ibm.CORBA.iiop.WorkerThread.run(WorkerThread.java:195) at com.ibm.ejs.oa.pool.ThreadPool$PooledThread.run(ThreadPool.java:535) Could anyone help me? Thanks. MIKAEL
DTD Incompatibility With WebLogic 5.1 and Struts 1.0?
Has anyone ever seen the following Document Type Definition (DTD) error message upon starting the WebLogic 5.1 (SP 8) server using Struts 1.0 on NT? This occurs using both the Struts-Example and Struts-Documentation war files: [ExternalEntity] : Could not resolve entity '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'. Check your dtd reference. The way I fixed this error was modifying the DocType data in the web.xml file. Specifically, the line: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http: //java.sun.com/j2ee/dtds/web-app_2_2.dtd If I change the DTD Web Application 2.2 to DTD Web Application 1.2, the error message no longer occurs. Notice, I only changed the comment portion. Not the URL. Any explanations to this? Thanks, JOHN
More on running Tomcat+Struts w/o internet connection
My coworker posted the original question in the Running Tomcat+Struts w/o internet connection thread, but since I'm the one trying to overcome this particular problem, I thought I'd add some more detail. First off, we're using Tomcat 3.2.1 or 3.2.2 (not sure) and Struts 1.0. The DOCTYPE line of the struts-config.xml by default looks like: !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; If I run tomcat disconnected from the network I get the following: resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Not registered, use system identifier Parse Fatal Error at line 3 column -1: External entity not found: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd. whereupon Tomcat barfs and stops loading. It was suggested to use a 'file://' style URL to fix this. That works fine, (i.e. 'file:///c:/foo/bar/struts-config_1_0.dtd') but it demands an absolute file path. Any attempt to use a relative path (such as 'file://struts-config_1_0.dtd') has failed with the same 'external entity not found' error as above. I've tried various permutations, but either it doesn't work, or I can't figure out what the current working directory is that the URL will base itself off of (tried tomcat/bin, webapps, webapps/myapp, webapps/myapp/WEB-INF). So, how about specifying the file directly, as in: !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN struts-config_1_0.dtd Well, here's the resulting error: Parse Fatal Error at line 3 column -1: Relative URI struts-config_1_0.dtd; can not be resolved without a document URI. Even though XML Spy thinks this is OK, obviously tomcat wants a little more information. I poked around in the XML Bible, but couldn't find anything to tip me off as to what to include in the XML that would make this error go away. All I want to do is have the struts DTD be a local file, referenced with some sort of resolveable relative path. An absolute path just can't be worked with, and we cannot guarantee a network connection. Any more ideas? Thanks! t -- Thomas Burns RiskMetrics Group [EMAIL PROTECTED] 734.945.6428
[Fwd: Struts CodeMarker]
This contribution by Ravindran Ramaiah is now available on the More About Struts page http://husted.com/about/struts . Once I've had a chance to review it, I'll also consider it for the new Contrib branch of the CVS to be added this week. Any other contributions which people have sent along but were buried on the list can also be sent directly to me for review and posting. -Ted. === Ted, I have developed a code generator for struts. It can generate Action and Form class by reading the JSP files. Can you please share this with the STRUTS community. I have been successfuly using it for my project. 1. Introspects all the JSPs (including sub directories) from a root directory specified on the struts.ini (./config/struts.ini) 2. Creates the Form bean elements for the property items in the JSPs (excluding any image and hidden property names). It also generates the Action file. 3. Package Name for the Root level files will be assigned with the name CHANGE THIS LATER. For all other files under sub-directories, package name will be assigned as with the JSP file structures.
Re: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2)SWITCH, CASE, DEFAULT tags
On Sun, 24 Jun 2001, Wong Kok Wai wrote: No offense, but I feel it is much better in performance to use Java scriptlets for these cases. The overhead of the tags is just too high to justify using them. Performance is one of the reasons the JSP Standard Tag Libraries effort was started (JSR-052 in the Java Community Process). Once a set of tags are standardized, the JSP page compiler can be made smart enough to create optimized code to implement them (just as it already understands what jsp:useBean means). In particular, conditionals and iteration are going to be included in the first versions of the standard tag library (early access soon). So, it's probably not worth huge amounts of effort to extend the logic tags in Struts, if the standard versions of the tags will meet our needs. Craig McClanahan
RE: Running Struts in J2EE Server
On Mon, 25 Jun 2001, ihin wrote: J2EE 1.3 Beta Version (j2sdkee1.3) from SUN microsystem If you are using J2EE 1.3-beta-1, there was a nasty error in deploytool that changed the controller servlet mapping from *.do to /*.do. Try it with J2EE 1.3-beta-2. TIA ihin Craig -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:12 PM Subject: RE: Running Struts in J2EE Server Hi Ihin, Which J2EE server are you using? Jon. -Original Message- From: ihin [mailto:[EMAIL PROTECTED]] Sent: 25 June 2001 05:59 Subject: Running Struts in J2EE Server how can i run struts in J2EE Server...? is there any special setting to running it...? i trayed to running the example but it dosn't work the error like this A Servlet Exception Has Occurred org.apache.jasper.compiler.CompileException: c:\j2sdkee1.3\public_html\bugtracking\index.jsp(4,0) Unable to load class org.apache.struts.taglib.html.HtmlTag at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:137 ) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa rseEventListener.java:808)
Re: Multiple Action Per Form and Image Html link questions
On Sun, 24 Jun 2001, Andreas Amundin wrote: 1. How can I submit two different actions for the same form? To change to a different action, you will need to change the destination of the form submit. This requires JavaScript at the client end. Craig
RE: Multiple Action Per Form and Image Html link questions
From: Craig R. McClanahan On Sun, 24 Jun 2001, Andreas Amundin wrote: 1. How can I submit two different actions for the same form? To change to a different action, you will need to change the destination of the form submit. This requires JavaScript at the client end. Thanks for the reply Craig. Is there a common practice for using javascript in combination with struts or is best to not mix the two? How easy would it be to write your own tag to handle it? Thanks, Andreas
RE: Contribution: 1) IF, AND, OR, THEN, ELSE, ELSEIF tags 2) SWITCH, CASE, DEFAULT tags
Just off the top of my head: First, the tag has to be instantiated, then the methods in the Tag interface are called. These already are more than a simple if instruction. Of course, if the JSP compiler can recoqnise these tags and optimises the code generation, then the performance issue will go away. --- Niall Pemberton [EMAIL PROTECTED] wrote: None taken. I dont have a feel for the overhead - could you expand more. Niall __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Can anyone help with solving the BACK button problem, in th e browser?
isn't the init pram of the Action servlet allow you to set no-cache on every out-going response? like this: init-param param-namenocache/param-name param-valuetrue/param-value /init-param -Original Message-From: Eda Srinivasareddy Eda [mailto:[EMAIL PROTECTED]]Sent: Monday, June 25, 2001 5:09 AMTo: [EMAIL PROTECTED]Subject: Re: Can anyone help with solving the "BACK" button problem, in th e browser? Hi Smith Could u please send the javascript code related to back button problem. Thanks Eda Spencer Smith [EMAIL PROTECTED] wrote: That won't work. I solved the problem using javascript. Javascript doesn't cache like JSP pages does, so you can get around this problem using javascript. If you want, I can send you the code I use. - Original Message - From: Thane Eisener To: '[EMAIL PROTECTED]' Sent: Thursday, June 07, 2001 10:12 AM Subject: RE: Can anyone help with solving the "BACK" button problem, in th e browser? Oops, I guess I should test before I post. It looks like newer browsers don't support this as a META tag only as a header. I added the following to one of my action classes and the perform() method was called when I pressed 'Back': response.addHeader("Pragma","no-cache"); response.addHeader("Cache-control","no-cache"); Hope it helps, Thane -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 11:35 AM To: [EMAIL PROTECTED] Subject: Re: Can anyone help with solving the "BACK" button problem, in th e browser? Thane , I am using: META http-equiv="Expires" content="now" in my header, and my action is not re-executed when I use the browser back button. Is there another option I should be using? thanks, Pete Thane Eisener wrote: I seem to recall a META tag called something like pragma-no-cache that you can embed in your page which will force the page to reload (not just display a snapshot). This should enable handling the situation in scriptlets or your action class. -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: Re: Can anyone help with solving the "BACK" button problem, in the browser? Dependin! g on which browser you use, and the data on the page, the back button may cause (or ask) the page to reload. However, some browsers (like IE) only display a snapshot of what the last page rendered to. Therefore, you cannot use scriptlets or the action class. However, you are able to kick-off javascript. If you can gaurantee that your users will have javascript enabled, you can write a simple test to see if this page was already displayed to the user. You could check a flag (hidden field) when the page loads. If the flag is true, then use ! ; the javascript to reload to your desired page. HTH, Pete "Dudley Butt@i-Commerce" wrote: Please help, When the user pushes the back button, I want the page to redirect or refresh to a different page, please, any ideas? Thanx guys and gals Dudley Do You Yahoo!?Get personalized email addresses from Yahoo! Mail - only $35 a year!http://personal.mail.yahoo.com/
Struts runtime failure in custom tag 'message'
I'm trying to run the Struts 1.0 Example application using WebLogic 5.1 (Service Pack 8) on NT. I'm deploying the Struts-Example application as a .war file. I followed all the steps in the ReadMe and Install documentation. However, upon starting the server and trying access the root page, I encounter the following run-time exception: E ServletContext-strutsexample root cause of ServletException javax.servlet.ServletException: runtime failure in custom tag 'message' at jsp_servlet._index._jspService(_index.java, Compiled Code) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :105) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :123) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp l.java:742) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp l.java:686) at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext Manager.java:247) at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361) at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code) I've search the mailing list archives, and it seems that others have had a similar problem. However, I did not find a documented solution that works for me. Here's some more details about my particular situation: 1) As I mentioned in an earlier mail msg sent out today, I had to modify the DocType statement in the web.xml file to use DTD Web Application 1.2 instead of DTD Web Application 2.2. This prevents the following error msg from occurring when starting the webserver. [ExternalEntity] : Could not resolve entity '-//Sun Microsystems, Inc. //DTD Web Application 2.2//EN'. Check your dtd reference. 2) The struts.jar and *.tld files are located in my the webapps/WEB-INF/lib folder. 3) As suggested in another mail msg, I added the following jar as the first statement in my classpath: c\:jakarta-struts\webapps\wlssp8-struts.jar 4) As stated in the Install documentation, I've manually extracted the ApplicationResources.properties from the *.war file and copied it to the _tmp_war folder created by WebLogic. Any help would be greatly appreciated as I am totally stuck. Thanks, JOHN
Struts with a domain name
What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt
RE: HP Bluestone Struts Trailmap
will this be added any time soon? -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 23, 2001 10:11 AM To: [EMAIL PROTECTED] Subject: Re: HP Bluestone Struts Trailmap I believe using request tokens to prevent duplicate submits is not covered by any of the tutorials right now. BONAIUTO,JAMES (HP-NewJersey,ex1) wrote: I will be adding to HP Bluestone's Struts trailmap: http://gallery2.bluestone.com/scripts/SaISAPI.dll/Gallery.class/demos/trailM aps/index.jsp New trails on the trailmap will include Database connections (returning a resultset and connection pooling) and Templates. Does anyone have any other topics that they would like to see added? James Bonaiuto HP Bluestone
html:options tag and localized text as labels...
Hi struts-users, we're trying to create aSELECT element withlabels and values generated by ahtml:options tag. The bean that contains the labeland value properties for thehtml:options tagis initializedwhen a user logs in,providing us with informationabout locale in order to set the labels right for the user locale. We use getResources.getMessage(getLocale(request), aKey) from our action to geta localized message for the label. This works fine with the english language chars. Our label displayscorrectly. We also like to use danish chars, which wewant to put in our localized labelas a numeric entities like #230; in order to stay out of trouble with browsers not displaying danish chars correctly. Unfortunately the labels for danish localearedisplayed incorrectly as the html:options tag replaces the -char in the string from the resource bundle with a amp; A entity like #230; is rendered to the html-page as amp;#230; - which is no good. We also tried with named entities like aelig; whichyieldsequal result. Does anyone have a hint how to solve this problem ? Med venlig hilsen/Best Regards---Jannik Nørgaard SteenSoftware DeveloperDigital Zone Internationalhttp://www.digitalzone.dkmailto:[EMAIL PROTECTED]---
Updating in Components
Cedric and/or other Components cognoscenti I've been experimenting with dynamic templates in the Components proposal code, downloaded this morning. I want to update only one frame (the content frame) without having to forward to a fresh copy of my page, causing the header, menu, and footer to flash in the browser. So far I haven't been able to acheive that by experimenting with the tutorial code. Can anyone give me some perspective as to accomplishing this? TIA -- Tom Miller Miller Associates, Inc. [EMAIL PROTECTED] 641.469.3535 Phone 413.581.6326 FAX
HttpSessionListener
Hi, This question is more to do with servlets not directly related to struts (other than that I am using struts) to develop this application. I was trying to find a way to detect when a session was destroyed either because the user logged out or because of a session time out or something else. I looked at the API and found that 2.3 has lifecycle events, one of them a HttpSessionListener. I am working with 2.2 I was wondering if there is an alternative to this in 2.2 how people handled this when these events didnt exist. Does one have to write a thread that continuously monitors if a session still exists? Thanks Pratima
Re: Struts with a domain name
Hello Rod, When you are working with html:link tag you can use its page attribute instead of href to specify context-relative URI. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Struts with a domain name
I am using the page attribute. This also happens for forms that get posted. If you look at the source that get's sent to the browser, /mycontext is getting inserted into the form actions and the URLs. Rod - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 11:43 AM Subject: Re: Struts with a domain name Hello Rod, When you are working with html:link tag you can use its page attribute instead of href to specify context-relative URI. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Implementing 2 new scopes using Struts
On Mon, 25 Jun 2001, Jonathan Asbell wrote: I will be implementing new scopes using Struts for our unique needs, and they need to be application server independent. One scope will work across (between) web-applications: Ex. user logs on, and an object representing the users values and state is placed into a scope where ALL WEB APPLICATIONS can see it. Another scope is restricted to specified directories inside of an application: Ex. data saved would only be visible when inside a specific sub-directory. I am currently examining the 2.3 servlet spec. Does anyone have any advice as to what to watch out for in implementing this considering I want to be able to be compatible with servlet containers in general and leverage container management and web.xml configuration. Could anyone refer me to some specific sections in the servlet spec that you feel I should pay specific attention to while I am doing this. Thank you Jonathan For the first, the servlet spec is not going to help you much. It has very little to say about cross-application support. In particular, you cannot even assume the existence of a shared library facility (like the $TOMCAT_HOME/lib directory in Tomcat) that makes classes available globally. The standard advice is to use databases or EJBs for data that needs to be available across web applications. For the second, there is nothing the servlet container will do for you to isolate information access *within* an app. You'll have to provide your own data access APIs for that purpose - but, it should be quite easy to make this portable if you rely only on the standard servlet API facilities (like sessions) underneath. Craig
Re: Formless actions?
On Mon, 25 Jun 2001, Kief Morris wrote: I'm making my first Struts application, and in keeping with MVC I want to load all of my JSP pages through actions: the Action sets up the data the JSP page needs to display. It seems that the action tag in struts-config.xml requires a form bean for the name= attribute. But what if I have a view which is not a form, merely a view of data? A form bean shouldn't be necessary for this, so how do I structure this? If you have an action that does not need a form bean, simply omit the name attribute. This will cause the automatic processing that Struts normally performs for form beans to be skipped. Note that all of the bean:xxx and logic:xxx tags work quite well on arbitrary JavaBeans in any scope. Therefore, a common design pattern will be to call an Action that goes and collects all the needed information, and exposes it as one or more beans, followed by a forward to the JSP page that uses those beans to create the dynamic view. Kief Craig
Re: jsp:include limitations?
On Mon, 25 Jun 2001, Mindaugas Idzelis wrote: Are there any limitations when using jsp:include to include content generated by an ActionServlet? For instance, is it possible to set cookies in an action that is included from another page? Specifically, when jsp:include is called the response is already commited, correct? Thank you. The most important restrictions are in the Servlet Specification (and are not specific to Struts). An included servlet or page is not allowed to set response headers, which therefore makes it impossible to set cookies. --min Craig
RE: Multiple Action Per Form and Image Html link questions
On Mon, 25 Jun 2001, Andreas Amundin wrote: From: Craig R. McClanahan On Sun, 24 Jun 2001, Andreas Amundin wrote: 1. How can I submit two different actions for the same form? To change to a different action, you will need to change the destination of the form submit. This requires JavaScript at the client end. Thanks for the reply Craig. Is there a common practice for using javascript in combination with struts or is best to not mix the two? How easy would it be to write your own tag to handle it? The thing to remember is that custom tags are executed as the page is being *created* on the server, while JavaScript is executed later, while the page is being *displayed* on the client. Therefore, you cannot really use a custom tag to execute JavaScript code -- but you can use it to generate JavaScript. For example, the html:form tag does this for the focus attribute. Basically, Javascript in Struts pages is used exactly like you would use it in a static HTML page. Thanks, Andreas Craig
Re: HttpSessionListener
On Mon, 25 Jun 2001, Gogineni, Pratima wrote: Hi, This question is more to do with servlets not directly related to struts (other than that I am using struts) to develop this application. I was trying to find a way to detect when a session was destroyed either because the user logged out or because of a session time out or something else. I looked at the API and found that 2.3 has lifecycle events, one of them a HttpSessionListener. I am working with 2.2 I was wondering if there is an alternative to this in 2.2 how people handled this when these events didnt exist. Does one have to write a thread that continuously monitors if a session still exists? Thanks Pratima In servlet 2.2, the most common approach to this problem involves the use of the HttpSessionBindingListener interface. Basically, you need to arrange that, as part of your user logon processing, you create a session attribute that implements this interface. The valueBound() method will be called at this time. Now, when the session is invalidated or times out, one of the things that happens is that all session attributes are removed. Thus, the valueUnbound() method of your bean will be called, so that you can do whatever processing is required. Craig
RE: HttpSessionListener
Thanks - that helps. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 11:32 AM To: '[EMAIL PROTECTED]' Subject: Re: HttpSessionListener On Mon, 25 Jun 2001, Gogineni, Pratima wrote: Hi, This question is more to do with servlets not directly related to struts (other than that I am using struts) to develop this application. I was trying to find a way to detect when a session was destroyed either because the user logged out or because of a session time out or something else. I looked at the API and found that 2.3 has lifecycle events, one of them a HttpSessionListener. I am working with 2.2 I was wondering if there is an alternative to this in 2.2 how people handled this when these events didnt exist. Does one have to write a thread that continuously monitors if a session still exists? Thanks Pratima In servlet 2.2, the most common approach to this problem involves the use of the HttpSessionBindingListener interface. Basically, you need to arrange that, as part of your user logon processing, you create a session attribute that implements this interface. The valueBound() method will be called at this time. Now, when the session is invalidated or times out, one of the things that happens is that all session attributes are removed. Thus, the valueUnbound() method of your bean will be called, so that you can do whatever processing is required. Craig
RE: problem executing an example provided by bluestone.com
Ameer, I was going through the Struts archive and found out that you had faced similar problem that I am facing. Can you please let me know how you managed to overcome this problem (see your email below). Note, I am using iPlanet Web Server 6.0 and not weblogic as in your error log. I guess this shouldn't matter as long as proper classpath is set. Can you please let me know the fix you did to remove the error. Thanks, Nizar BhamaniProActTechnologiesPowering Human Resourcefulness(770) 291 7180mailto:[EMAIL PROTECTED] -Original Message-From: ameer [mailto:[EMAIL PROTECTED]]Sent: Friday, June 01, 2001 1:53 AMTo: [EMAIL PROTECTED]Subject: problem executing an example provided by bluestone.com im facing problem in excuting an example source provided by the link: http://gallery.bluestone.com/scripts/SaISAPI.dll/StrutsTrailMap.class/struts-trailmap/Trail4.1.htm im running this example in weblogic 6.0 and i get following errors. i have kept struts.jar in server classpath.. still i get following errors. Jun 1, 2001 9:36:22 AM GMT+05:30 Error HTTP [WebAppServletContext(7901117,HelloWorld)] Root cause of ServletExceptionjavax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:703) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441) at jsp_servlet._input._jspService(_input.java:106) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Ameer Hussain SSs/w engineerYashaa Infotech Pvt.Ltd.http://www.yashaa.com
How can I pass extra information on Submit button?
Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List' mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id="element" type="myApp.common.GeoEntity" name="%= Constants.GEO_ENTITY_LIST %"table tr td html:submit property="action" value=" Details" %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? % /html:submit /td tdbean:write name="element" property="id"//td tdbean:write name="element" property="name"//td /tr/table/logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
Re: How can I pass extra information on Submit button?
You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif; adr:;; version:2.1 end:vcard
Re: Struts with a domain name
I'm developing a web-application on my workstation and testing it by going to localhost/whatever and when I'm satisfied with results I copy it to the main server where the application is accessible trough the internet as a www.whatever.com. So my situation is similar to yours and the way to make it happend is a) to use page attribute for html:link b) in struts-config.xml forward tag should have path attribute starts with / - this will ensure relative path (the same implies to input and path attributes of action tag) And whenever you see in your JSP, config or JAVA files a link like mycontext/page.jsp where mycontext is the name of your web-application (web-site), be careful because you may have problems moving the application to another location. In another words, always use relative pathes for local links. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: I am using the page attribute. This also happens for forms that get posted. If you look at the source that get's sent to the browser, /mycontext is getting inserted into the form actions and the URLs. Rod - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 11:43 AM Subject: Re: Struts with a domain name Hello Rod, When you are working with html:link tag you can use its page attribute instead of href to specify context-relative URI. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: How can I pass extra information on Submit button?
Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
Re: How can I pass extra information on Submit button?
Are you going to place a button next to each record in the list? Jerzy Kalat wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
Re: How can I pass extra information on Submit button?
Yes, you can see it already in my piece of code, the first td - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:24 PM Subject: Re: How can I pass extra information on Submit button? Are you going to place a button next to each record in the list? Jerzy Kalat wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
Re: How can I pass extra information on Submit button?
The only problem is, that Value of these buttons are the same, so I have to pass extra information, which record was selected - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:24 PM Subject: Re: How can I pass extra information on Submit button? Are you going to place a button next to each record in the list? Jerzy Kalat wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
Templates and relative paths
I'm using templates, but I would prefer to put relative paths to the template vs. an absolute path. For example, a file using templates might look like: %@ taglib uri=/WEB-INF/struts-template.tld prefix=template % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % headhtml:base//head template:insert template=../templates/template.jsp template:put name=body content =/body/body.jsp/ /template:insert Whereas I'd rather send the realtive path to the template ala: template:put name=body content =body.jsp/ or even template:put name=body content =../body.jsp/ I can't seem to do this as the template always look for the file relative to its own location, and not the location of the calling file. Intestingly, if I put an html:base/ tag in my template, the base it outputs is the location of the calling file. D
Re: How can I pass extra information on Submit button?
I haven't done this, but you might be able to do one of these two things. You could try using JavaScript to change the value of the action and add the params dynamically or each detail button would be a separate form. html:form action=registration name=registrationForm html:submit property=action value=Details onclick=document.form[0].action=registration.do?id=12/ The action will be processed correctly, but since it can't automatically look the corresponding form bean you need to specify it with the name attribute. I think this should work. html:form action=registration.do?id=12 name=registrationForm html:submit property=action value=Details/ /html:form David --- Jerzy Kalat [EMAIL PROTECTED] wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: How can I pass extra information on Submit button?
You could place the id in the name of the submit button... Then the action could parse the name of the submit button that was pressed for the id There must be a better method than this... But I have not come across this before, and that is what popped in my head. Or.. If you can use javascript, you can set the form action (with the id) and submit the form with a simple javascript call. However, you must be able to gaurentee that all users will have javascript enabled. We do this... (But we are able to force our users to enable javascript) Pete Jerzy Kalat wrote: Yes, you can see it already in my piece of code, the first td - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:24 PM Subject: Re: How can I pass extra information on Submit button? Are you going to place a button next to each record in the list? Jerzy Kalat wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif; adr:;; version:2.1 end:vcard
Re: How can I pass extra information on Submit button?
Thank you. I will try it. But I thought that Struts technology tries to eliminate JavaScripts on JSP pages. What I try to figure out is how to use Struts bean tags properly, to pass information back to servlet from form. JK - Original Message - From: David Winterfeldt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:39 PM Subject: Re: How can I pass extra information on Submit button? I haven't done this, but you might be able to do one of these two things. You could try using JavaScript to change the value of the action and add the params dynamically or each detail button would be a separate form. html:form action=registration name=registrationForm html:submit property=action value=Details onclick=document.form[0].action=registration.do?id=12/ The action will be processed correctly, but since it can't automatically look the corresponding form bean you need to specify it with the name attribute. I think this should work. html:form action=registration.do?id=12 name=registrationForm html:submit property=action value=Details/ /html:form David --- Jerzy Kalat [EMAIL PROTECTED] wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: How can I pass extra information on Submit button?
In a similar situation we have used a hidden input to do this. All you would need is a hidden input for your position and then add an onclick event to each submit button that would set the value of the input based on the index of your iterate loop. For example: form hidden - position iterate submit onclick=this.position.value=%index of loop% iterate form Or perhaps it would make more sense to submit the selected if instead of the position in the loop. Hope this helps. Laine -Original Message- From: Peter Alfors [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: Re: How can I pass extra information on Submit button? You could place the id in the name of the submit button... Then the action could parse the name of the submit button that was pressed for the id There must be a better method than this... But I have not come across this before, and that is what popped in my head. Or.. If you can use javascript, you can set the form action (with the id) and submit the form with a simple javascript call. However, you must be able to gaurentee that all users will have javascript enabled. We do this... (But we are able to force our users to enable javascript) Pete Jerzy Kalat wrote: Yes, you can see it already in my piece of code, the first td - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:24 PM Subject: Re: How can I pass extra information on Submit button? Are you going to place a button next to each record in the list? Jerzy Kalat wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
Re: How can I pass extra information on Submit button?
I don't know if this will work in the context of the rest of the page, but how about: td html:form action=/whatever html:submit property=action value= Details/ html:hidden property=id/ /html:form /td Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List' mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? % /html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK
View data
Just to bounce this off of people, the ActionForm is really just for handling Form based input data from the user. What do people do to handle result data which is view only. We are thinking we will just put the model beans into our request object in the action.perform method and pull them out to use in the jsp. Does this make sense? Any reason we should be using forms for output of read only data? Cheers Jay
Re: Struts with a domain name
I'm doing all that. Nowhere to I refer to my context name. The webserver is inserting it into the URLs when it sends the generated page back to the browser. - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Rod Schmidt [EMAIL PROTECTED] Sent: Monday, June 25, 2001 1:24 PM Subject: Re: Struts with a domain name I'm developing a web-application on my workstation and testing it by going to localhost/whatever and when I'm satisfied with results I copy it to the main server where the application is accessible trough the internet as a www.whatever.com. So my situation is similar to yours and the way to make it happend is a) to use page attribute for html:link b) in struts-config.xml forward tag should have path attribute starts with / - this will ensure relative path (the same implies to input and path attributes of action tag) And whenever you see in your JSP, config or JAVA files a link like mycontext/page.jsp where mycontext is the name of your web-application (web-site), be careful because you may have problems moving the application to another location. In another words, always use relative pathes for local links. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: I am using the page attribute. This also happens for forms that get posted. If you look at the source that get's sent to the browser, /mycontext is getting inserted into the form actions and the URLs. Rod - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 11:43 AM Subject: Re: Struts with a domain name Hello Rod, When you are working with html:link tag you can use its page attribute instead of href to specify context-relative URI. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: How can I pass extra information on Submit button?
As already posted to the list, I have been working to change most of the tags to generate indexed names within an iterate loop, for just this kind of situation. I have just changed the code for submit, so that the index of your iterated collection is added to the name ie name=submit[0] etc. In your action you can then check which button was pressed, and display details for this record. Avoids javascript! I am attaching an updated zip file to include this. When I get some time, I will post all this to the dev list, to see about getting it added to Struts. Instructions as per previous posting: Instructions for use: - unpack attached zip file (this mailing list only accepts messages 100K!!) and copy .java files to ../org/apache/struts/taglib/html/ - rebuild struts - add the struts-html.tld to your WEB-INF directory - within an iterate tag, simply add indexed=true to the tag you wish to use. Eg to produce the text tag input type=text name=parameter[0].value value=Mac use: logic:iterate id=parameter name=ParametersForm property=parameterList ... html:text name=parameter property=value indexed=true/ ... /logic:iterate [in this case, simply do: html:submit indexed=true Hope this helps, Dave (See attached file: struts indexed files.ZIP) Peter Alfors [EMAIL PROTECTED] on 06/25/2001 03:39:28 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: How can I pass extra information on Submit button? You could place the id in the name of the submit button... Then the action could parse the name of the submit button that was pressed for the id There must be a better method than this... But I have not come across this before, and that is what popped in my head. Or.. If you can use javascript, you can set the form action (with the id) and submit the form with a simple javascript call. However, you must be able to gaurentee that all users will have javascript enabled. We do this... (But we are able to force our users to enable javascript) Pete Jerzy Kalat wrote: Yes, you can see it already in my piece of code, the first td - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:24 PM Subject: Re: How can I pass extra information on Submit button? Are you going to place a button next to each record in the list? Jerzy Kalat wrote: Thanks, Well, I know about this solution, but they insist on button. - Original Message - From: Peter Alfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 3:18 PM Subject: Re: How can I pass extra information on Submit button? You could use a link rather than the submit button. Then when you iterate through your result-set, you just add the 'id' to the link. Pete Jerzy Kalat wrote: Hi, I list many records on the form. Each record has 'Details' submit button, which suppose to flip form from 'List'mode to 'Details' mode, where only 1 record is visible with all it fields. On my jsp page I have: logic:iterate id=element type=myApp.common.GeoEntity name=%= Constants.GEO_ENTITY_LIST % table tr td html:submit property=action value= Details %! WHAT SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'? %/html:submit /td tdbean:write name=element property=id//td tdbean:write name=element property=name//td /tr /table /logic:iterate I tried different things here but it does not work, or produce error. Any hints how to do it, or is there better way to approach it? Thanks in advance, JK peter.alfors.vcf .ZIP File
RE: Templates and relative paths
I would also like to know why other tags (ie img) use a relative path to the calling file, while the get tags do not. For example the line in a template file: html:img src=../graphics/picture.jpg/ render the path relative to the file that called the template (ex /nested/body/body.jsp), whereas: template:get name='body'/ renders 'body' relative to the location of the template file D -Original Message- From: DHarty [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: Templates and relative paths I'm using templates, but I would prefer to put relative paths to the template vs. an absolute path. For example, a file using templates might look like: %@ taglib uri=/WEB-INF/struts-template.tld prefix=template % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % headhtml:base//head template:insert template=../templates/template.jsp template:put name=body content =/body/body.jsp/ /template:insert Whereas I'd rather send the realtive path to the template ala: template:put name=body content =body.jsp/ or even template:put name=body content =../body.jsp/ I can't seem to do this as the template always look for the file relative to its own location, and not the location of the calling file. Intestingly, if I put an html:base/ tag in my template, the base it outputs is the location of the calling file. D
Re: How can I pass extra information on Submit button?
On Mon, 25 Jun 2001, Jerzy Kalat wrote: Thank you. I will try it. But I thought that Struts technology tries to eliminate JavaScripts on JSP pages. Not really ... the goal is to eliminate the need for *scriptlets* (i.e. Java code that executes on the server side as the page is being created). JavaScript is necessary for whatever dynamic things you want to have happen inside the client browser, such as changing the URI to which a form is submitted dynamically. JK Craig
Re: Formless actions?
Peter Alfors typed the following on 09:37 AM 6/25/2001 -0500 The name attribute is not required. Aha, thanks, I had confused name and type. Kief Morris wrote: It seems that the action tag in struts-config.xml requires a form bean for the name= attribute. Kief
Re: View data
On Mon, 25 Jun 2001, Jay Walters wrote: Just to bounce this off of people, the ActionForm is really just for handling Form based input data from the user. Yes, that is what it's designed for. What do people do to handle result data which is view only. We are thinking we will just put the model beans into our request object in the action.perform method and pull them out to use in the jsp. Does this make sense? Any reason we should be using forms for output of read only data? Model beans will work just fine (with one caveat mentioned below). Simply use things like the bean:write tag, with both name and property attributes, to access the data you need. The caveat relates to entity EJBs. Even though this will technically work (if they follow the usual JavaBean naming patterns for properties), you will not want to do this -- because each property getter call is potentially remote (back to your EJB tier). What most people do for this scenario is to have their EJBs return a Value Object that contains all the property values you might be interested in, in a single call, and then use the value object as a bean within Struts. Cheers Jay Craig McClanahan
RE: View data
The application I am developing uses a lot of view only data. We are doing exactly what you mention. We have DAOs that contact the database and return CachedRowSets. These RowSet objects are stored in the proper context and custom tags on the JSP handle the display. Hope this helps... --John -Original Message- From: Jay Walters [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 1:03 PM To: '[EMAIL PROTECTED]' Subject: View data Just to bounce this off of people, the ActionForm is really just for handling Form based input data from the user. What do people do to handle result data which is view only. We are thinking we will just put the model beans into our request object in the action.perform method and pull them out to use in the jsp. Does this make sense? Any reason we should be using forms for output of read only data? Cheers Jay
RE: View data
On Mon, 25 Jun 2001, Jay Walters wrote: What do people do to handle result data which is view only. We are thinking we will just put the model beans into our request object in the action.perform method and pull them out to use in the jsp. Does this make sense? Any reason we should be using forms for output of read only data? I would only add one word of warning if you plan to use model beans. The purpose of an MVC architecture is to decouple the View and the Model. Passing the Model beans to the jsp breaks this decoupling. One idea would be to create beans just for the jsp. Group them according to the jsp structure. Use the controller to execute and business logic on the model beans and then map only the pertinent data to the jsp input beans. One advantage of this approach is that the beans that are exposed to the jsp developers are limited in their complexity. Andreas
problem with pre-compiling jsp pages with struts custom tags
I am using Tomcat 3.2.2 and Struts 1.0 for translating the jsp pages. When I compile a jsp pages containing reference to struts cutom tag library, I get the following error message: 2001-06-25 04:35:08 - Package name is: jsp 2001-06-25 04:35:08 - Class file name is: D:\web-test\Ems2.0\win\WEB-INF\classes\JspServ_pre\jsp\_0002fjsp_0002findex_ 0002ejspindex.class 2001-06-25 04:35:08 - Java file name is: D:\web-test\Ems2.0\win\WEB-INF\classes\JspServ_pre\jsp\index.java 2001-06-25 04:35:08 - Class name is: index 2001-06-25 04:35:08 - Handling Directive: page{language=java} 2001-06-25 04:35:08 - Accepted org.apache.jasper.compiler.Parser$Directive at D:\web-test\Ems2.0\win\jsp\index.jsp(0,0) 2001-06-25 04:35:08 - Handling Directive: taglib {uri=/WEB-INF/struts-bean.tld, prefix=bean} BUILD FAILED D:\web-test\dev.xml:1141: java.lang.LinkageError: loader constraints violated when linking org/xml/sax/EntityResolver class --- Nested Exception --- java.lang.LinkageError: loader constraints violated when linking org/xml/sax/EntityResolver class at org.apache.jasper.compiler.JspUtil.parseXMLDocJaxp(JspUtil.java:161) at org.apache.jasper.compiler.JspUtil.parseXMLDoc(JspUtil.java:138) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java :170) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:706) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215) at org.apache.jasper.compiler.Parser.parse(Parser.java:1077) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209) at org.apache.jasper.JspC.parseFile(JspC.java:376) at org.apache.jasper.JspC.parseFiles(JspC.java:641) at org.apache.jasper.JspC.main(JspC.java:689) at java.lang.reflect.Method.invoke(Native Method) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:127) at org.apache.tools.ant.taskdefs.Java.run(Java.java:260) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:123) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:87) at org.apache.tools.ant.Target.execute(Target.java:153) at org.apache.tools.ant.Project.runTarget(Project.java:898) at org.apache.tools.ant.Project.executeTarget(Project.java:536) at org.apache.tools.ant.Project.executeTargets(Project.java:510) at org.apache.tools.ant.Main.runBuild(Main.java:421) at org.apache.tools.ant.Main.main(Main.java:149) I made sure I have the tld files in the WEB-INF dir. Here is the snippet of jsp that is producing the error: index.jsp: %@ page language=java % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html locale=true head titlebean:message key=logon.title arg0=2.0//title html:base/ /head body bgcolor=white html:errors/ html:form action=/logon focus=username table border=0 width=100% tr th align=right bean:message key=prompt.username/ /th td align=left html:text property=username size=16 maxlength=16/ /td /tr tr th align=right bean:message key=prompt.password/ /th td align=left html:password property=password size=16 maxlength=16 redisplay=false/ /td /tr tr td align=right html:submit property=submit value=Submit/ /td td align=left html:reset/ /td /tr /table /html:form /body Those jsps without struts custom tag library reference gets precompiled properly. I have the jasper.jar, struts.jar, jaxp.jar, parser.jar and webserver.jar from Tomcat 3.2.2 and Struts 1.0 in the class path of org.apache.jasper.JspC. Any suggestion to fix the problem of pre-compilation would be appreciated. Sibon Barman SS8 Networks, Inc. Suite 500 495 March Road, Kanata, Ontario K2K 3G1 *: (613)592-2100 ext:3281 *: [EMAIL PROTECTED] winmail.dat
Struts installation questions
Hi, I am installing Struts in our company and trying to test it. I followed all the steps mentioned in the installation guide posted at http://jakarta.apache.org/struts/installation.html. I was able to start the server without any exceptions, but I could not open the index.jsp(the first page) after starting the server. The following is the excpetion thrown by the Weblogic App Server(6.0) struts_example)] Root cause of ServletException [nSync:struts_example] javax.servlet.jsp.JspException: Missing message for key index.title [nSync:struts_example] at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242) [nSync:struts_example] at jsp_servlet._index._jspService(_index.java:124) [nSync:struts_example] at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) [nSync:struts_example] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. j ava:213) [nSync:struts_example] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. j ava:246) [nSync:struts_example] at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl e tContext.java:1265) [nSync:struts_example] at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. j ava:1622) [nSync:struts_example] at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) [nSync:struts_example] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Can anyone tell me what am I missing here? Please guide me with all the steps involved in installing and running the struts example. I am using ant to build and run the struts example. Awaiting your response!!! Thanks, Best Regards Ram Palagummi Software Engineer H5technologies [EMAIL PROTECTED] Ph: (415)-625-6700 x613
Form Validation
When and why is form validation called when the form is instantiated. How are others getting around validation issues when a form should pass validation when there's no data, but not on a save?(i.e. when there's data) Thanks Steve Taylor Systems Consultant Pangaea Systems Inc. (250) 360-0111 http://www.pangaeainc.com
Re: Best Practises for using Struts and Validators in ASP model
I changed the architecture of the validation framework over the weekend. I made a class call ValidatorResourcesInitializer that will create a ValidatorResources based on a file name or an InputStream. I'm not sure how different your rules would be for each user. If it is completely different, you could have a file for each user and load it into session scope when they logon. If it is mainly the same with exceptions, you could have an xml file dynamically generated with a JSP page filling in the changes per user. These exceptions to the general validation could be stored in a database or even another XML file. This is a code snippet from ValidatorForm. ValidatorUtil.getValidatorResources() gets the ValidatorResources from application scope, but you could get it from session scope or get an InputStream from a URL. ServletContext application = getServlet().getServletContext(); // Load from a file or even from a dynamic page (jsp) ValidatorResources resources = ValidatorResourcesInitializer.initialize(InputStream of a JSP/XML page or file name); //ValidatorResources resources = // ValidatorUtil.getValidatorResources(application); Locale locale = ValidatorUtil.getLocale(request); ActionErrors errors = new ActionErrors(); Validator validator = new Validator(resources, mapping.getAttribute()); These are ideas off the top of my head. If each user or group is possibly an exception to the general form rules, I can see that dynamically generating the xml might be tedious. If that is what you are doing, let me know. In the meantime I'll think about what would be involved having a user/group attribute for form, field, msg, arg0-arg3, and var. Icould work similiar to retrieving a locale resource. First look for a user value, then a group, and then the default value. fieldproperty=stateProv arg0 key=registrationForm.stateprov.displayname/ /field fieldproperty=stateProv user=Joe arg0 key=registrationForm.stateprov.displayname/ /field Validator validator = new Validator(resources, mapping.getAttribute()); validator.setUser(Joe); Comments? Is anyone else doing anything like this or planning on doing anything like this? David http://home.earthlink.net/~dwinterfeldt --- [EMAIL PROTECTED] wrote: Hi David, Sorry to brother u, I post this message few days ago in struts mailing list, no one reply yet 8(. I would like to have your advice about how I can setup an environment for ASP model which use Struts and Validators. For example, if different subscribers can have different requirement regarding validations, how should I setup the validator.xml. Or do I have to setup the web.xml to access different validator.xml for different subscriber? Thanks in advance 8) Chris Previous Posting I would like to know anyone using Struts and Validators for ASP (application service provider, not active server page 8)) model. What I want to know is If I have the same application for different subscribers/clients, they may have different requirements (e.g. screen flow and validation, etc.). Which implies each subscriber may has its own struts-config.xml / validator.xml. My question is what is the best deployment strategy for that? Any ideas? Thanks in advance! Chris __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Struts installation questions
Here is my cut and pasted answer from last week Looks like your index.jsp? Is trying to use the bean:message key=index.title/ tag and the key does not exist in your message props file or your message prop file can not be found. In your web.xml you should have an entry init-param param-nameapplication/param-name param-valueclass name of your application/param-value /init-param under the servlet entry for the struts ActionServlet. Not you really don't have to have a real class for your application, it just looks up the ResourceBundle with this key. So if you had something like foo.bar.package.MyApplication for the param-value you would need a file \classes\foo\bar\package\MyApplication.properties that has all your message keys in it like index.title = My Title --m - Original Message - From: Ram Palagummi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Ram Palagummi [EMAIL PROTECTED] Sent: Monday, June 25, 2001 4:20 PM Subject: Struts installation questions Hi, I am installing Struts in our company and trying to test it. I followed all the steps mentioned in the installation guide posted at http://jakarta.apache.org/struts/installation.html. I was able to start the server without any exceptions, but I could not open the index.jsp(the first page) after starting the server. The following is the excpetion thrown by the Weblogic App Server(6.0) struts_example)] Root cause of ServletException [nSync:struts_example] javax.servlet.jsp.JspException: Missing message for key index.title [nSync:struts_example] at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242) [nSync:struts_example] at jsp_servlet._index._jspService(_index.java:124) [nSync:struts_example] at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) [nSync:struts_example] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. j ava:213) [nSync:struts_example] at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. j ava:246) [nSync:struts_example] at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl e tContext.java:1265) [nSync:struts_example] at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. j ava:1622) [nSync:struts_example] at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) [nSync:struts_example] at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Can anyone tell me what am I missing here? Please guide me with all the steps involved in installing and running the struts example. I am using ant to build and run the struts example. Awaiting your response!!! Thanks, Best Regards Ram Palagummi Software Engineer H5technologies [EMAIL PROTECTED] Ph: (415)-625-6700 x613
Re: Form Validation
The validate() method is called by the Action when the validate property for the mapping is true. I have more than one mapping to the same Action. The mapping to create a new form has validate=false. The mapping to insert a form has validate=true. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Steve Taylor wrote: When and why is form validation called when the form is instantiated. How are others getting around validation issues when a form should pass validation when there's no data, but not on a save?(i.e. when there's data) Thanks Steve Taylor Systems Consultant Pangaea Systems Inc. (250) 360-0111 http://www.pangaeainc.com
Help creating a portal page.
Hi. I am trying to create a portal page through struts. I am not sure how to go about it. I would like to use templates, but they seem somewhat limiting in that you must insert your templates using taglibs from a JSP page -- unless I am mistaken here. Ideally, the templates should be able to be moved dynamically. Moved up and down in order, enabled and disabled.
RE: Help creating a portal page.
You can do exactly what you want with templates... You can pass in a page name, or put it in the session, or wherever you can get to it, and have a content section of the template to use it dynamically. %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri=/WEB-INF/tlds/struts.tld prefix=struts % % String msg = request.getParameter(page); % template:insert template='/NavTemplate.jsp' template:put name='title' content='Navigation' direct='true'/ template:put name='header' content='/NavBar.jsp' / template:put name='sidebar' content='/sidebar2.jsp' / template:put name='content' content='%= msg %' / template:put name='footer' content='/footer.html' / /table -Original Message- From: Mindaugas Idzelis [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:48 PM To: struts Subject: Help creating a portal page. Hi. I am trying to create a portal page through struts. I am not sure how to go about it. I would like to use templates, but they seem somewhat limiting in that you must insert your templates using taglibs from a JSP page -- unless I am mistaken here. Ideally, the templates should be able to be moved dynamically. Moved up and down in order, enabled and disabled.
Re: Error: No action instance for path
Is it possible to have two separate actions using the same action servlet as long as the ActionServlet is not declared as long? I'm getting the popular No action instance for path [PATH] could be created. I've double checked the bean declaration in the struts xml, as well as double checked the action mapping. My other actions are working fine. -- Derek
RE: Help creating a portal page.
The template examples are not much help and I am confused. Can I insert content from an action and then forward directly to a template? Can I nest templates together? If I do nest templates together, can I pass different parameters to each one? A good solid example will help a lot! I've seen the example below before, but it doesn't show how templates should be used if you have actionservlets and a MVC architecture. Thanks --min -Original Message- From: George, Carl [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 6:10 PM To: '[EMAIL PROTECTED]' Subject: RE: Help creating a portal page. You can do exactly what you want with templates... You can pass in a page name, or put it in the session, or wherever you can get to it, and have a content section of the template to use it dynamically. %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri=/WEB-INF/tlds/struts.tld prefix=struts % % String msg = request.getParameter(page); % template:insert template='/NavTemplate.jsp' template:put name='title' content='Navigation' direct='true'/ template:put name='header' content='/NavBar.jsp' / template:put name='sidebar' content='/sidebar2.jsp' / template:put name='content' content='%= msg %' / template:put name='footer' content='/footer.html' / /table -Original Message- From: Mindaugas Idzelis [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:48 PM To: struts Subject: Help creating a portal page. Hi. I am trying to create a portal page through struts. I am not sure how to go about it. I would like to use templates, but they seem somewhat limiting in that you must insert your templates using taglibs from a JSP page -- unless I am mistaken here. Ideally, the templates should be able to be moved dynamically. Moved up and down in order, enabled and disabled.
Using new instance of PropertyMessageResource
Hi All, I want to use new instance of PropertyMessageResource in the Struts framework. For this I extended PropertyMessageResourceFactory(MYPropertyMessageResourceFactory) class and PropertyMessageResource(MyPropertyMessageResource) class. I configured in ActionServelet in web.xml to use the new instance of MyPropertyMessageResource instead of default PropertyMessageResource. But my problem is with MessageTag now, I want to pass additional information i.e. Company_code along with Locale and Key as a parameter in the getMessage() method of MyPropertMessageResource and for this I don't want to create tag like MyMessageTag for this. I can't put Company_code in the constructor of the MyPropertyMessageResource as this is not allowed in Struts framework without extending classes like MessageResourceFactory, ActionServlet. Can anybody have best solution overcome this situation? Regards, Sandeep
Cannot get request dispatcher for path login.jsp
Hello all, I began to get the above error after adding validation code to my LoginForm bean. Detail below: I have recently begun to setup a simple struts web. I have a login page (login.jsp), an action servlet (LoginAction) and a form (LoginForm). I placed some simple validation in the LoginAction perform() method and everything worked fine (if successful, the user was forwarded to a menu.jsp page, if not they were sent back to login.jsp). However, when I moved some validation into the form itself, so that I could display error messages, I began to get the Cannot get request dispatcher for path login.jsp error. Isn't the user supposed to be sent back to the input page if validate() returns errors? Why can't it find the login.jsp page? Thanks in advance for any help! Aaron