Re: dynamic forwards
"lisa ward" <[EMAIL PROTECTED]> > Hi again, > > The values in your hash map have been hardcoded in, which works fine. But > what do I if I do not know what the user's selection will be in advance. > Take for instance, if I have a set of checkboxes on my page, I would like to > be able to initialize the map with the values that the user has selected. > Or am I just missing the point here? Hold on. You have to have all necessary information, when you are generating the link. It does not matter, whether the keys in the map are hardcoded or determined during the runtime. Important is that you are creating the link on the server side, before the user clicks on any checkboxes. If you want to use user's input, you can do it when serving the next page. You can then generate the map in an Action and generate the link for the next displayed page (so you will know all paramaters in advance, since the checkboxes have been submitted already) Or your Action can use the checkboxes to determine what to do or to determine where to forward to. You don't need to use constant strings in findForward. Another possibility would be using JavaScript on the client, but since many browsers have JavaScript disabled, you should not rely on it. -- gR > > Please explain further and thank you very much for your patience. > > Thanks > Lisa > > > >From: "Gregor Rayman" <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: <[EMAIL PROTECTED]> > >CC: "lisa ward" <[EMAIL PROTECTED]> > >Subject: Re: dynamic forwards > >Date: Wed, 26 Sep 2001 20:55:34 +0200 > > > >"lisa ward" <[EMAIL PROTECTED]> wrote: > > > > > Another quick question. How would I be able to initialize the hashMap. > >the > > > problem Im facing is that when I use a forward the submit is not called > >so > > > the values are not initialized in my bean. > > > >Here an quick and dirty example. (Dirty beacuse it uses scriplte. Custom > >tag > >would be somehow more apprpriate.) > > > ><% > > HashMap linkParams = new HashMap(); // create the map > > linkParams.put("areaId", "a"); // set the values > > linkParams.put("aspectId", "b"); > > pageContext.setAttribute("linkParams", linkParams); // make the map an > >attribute of page > >%> > > > > > > > > > > > >The generated URL will be: .../deleteaspect.do?areaId=a&aspectId=b > > > >The map does not have to be the attribute itself. It can be a property of > >an > >attribute. Then the tag would look like this: > > > > >property="propertyName"> > > > >-- > >gR > > > > > > > > > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp >
RE: ActionError() problem
Title: ActionError() problem You have answered your own question :) Use a message properties file, and have the property value as something like error.lineError=error at line {0} then call new ActionError( "error.lineError", lineNo ); the {0} will be replaced with value0 (likewise {1} and {2} if you use the other constructors for ActionError) Cheers, Brett -Original Message-From: Gao, Gang [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 9:33 AMTo: [EMAIL PROTECTED]Subject: ActionError() problem Hi, How can I use ActionError() to construct the error message that is not define in the message property file? Who can give me a example. I want display a dynamic error message such as "ith line got some error !". Who can give me a explanation about second parameter for following ActionError method public ActionError(java.lang.String key, java.lang.Object value0) Construct an action error with the specified replacement values. Parameters: key - Message key for this error message value0 - First replacement value Thanks in advance! Gang
RE: Bad File Argument to include error
Thankyou Brett, I went thru the mailing archives and found a solution. Krishna. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Bad File Argument to include error
Title: RE: Bad File Argument to include error Looks to me like you are specify a file to include that doesn't exist with or <%@include file="" %> BTW, posting a 30 line exception will not help as much as the 1 line (line 10 of index.jsp) where the error occured (and perhaps a few more around it for context). Cheers, Brett -Original Message- From: Bhamidi Krishna [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 September 2001 2:38 PM To: [EMAIL PROTECTED] Subject: Bad File Argument to include error Hi, I get an exception which reads like this : org.apache.jasper.compiler.CompileException: C:\tomcat\webapps\struts_practice\index.jsp(10,0) Bad file argument to include. I am using tomcat on Windows 98. Can someone help me how to solve this problem. The stack trace follows if that is of any help. Krishna. org.apache.jasper.compiler.CompileException: C:\tomcat\webapps\struts_practice\index.jsp(10,0) Bad file argument to include at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:728) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
Bad File Argument to include error
Hi, I get an exception which reads like this : org.apache.jasper.compiler.CompileException: C:\tomcat\webapps\struts_practice\index.jsp(10,0) Bad file argument to include. I am using tomcat on Windows 98. Can someone help me how to solve this problem. The stack trace follows if that is of any help. Krishna. org.apache.jasper.compiler.CompileException: C:\tomcat\webapps\struts_practice\index.jsp(10,0) Bad file argument to include at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:728) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.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$Tag.accept(Parser.java:833) 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.servlet.JspServlet.doLoadJSP(JspServlet.java:612) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: populating a form bean without using a submit button
> "chiji" == chiji nwankwo <[EMAIL PROTECTED]> writes: chiji> Hi, chiji> Is it possible to populate a form bean without using the submit button to post the form. I am using the link tag to forward chiji> the user from one page to another, but at the same time I would like the contents of the form to be sent to the Action form chiji> class. chiji> I do not know if what I am trying to do is actually possible but if it is please let me know how it can be done or at least chiji> where I can start looking for examples that implements this. chiji> Thank you very much in advance. I've gotten something like this to work, but I don't use an Action object. I populate my Form object in the "reset()" method, using a DAO facade over EJB. (Please, anyone feel free to jump in and tell me that's the wrong approach. I'm still trying to figure out what makes sense in a Struts/web application.) I have a link from a page, like this: List Classes My "struts-config.xml" has the following "" and "" elements: ... ... And my destination page can use "logic:iterate" and "bean:write" to list the information: -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
RE: Using
Make sure that "error.company.updatecollision" is defined correctly in your ApplicationResources.properties file ... I had a similar problem. Lou >From: David Winterfeldt <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: RE: Using >Date: Wed, 26 Sep 2001 07:10:45 -0700 (PDT) > >If you don't declare the taglib at the top of the JSP, >you won't get any error message because the JSP >compiler will assume it is just some normal markup it >doensn't have to deal with so it ignores it. If the >'foo' tag isn't defined in the html tag library, then >when you tried to call html:foo you would get an >undefined error message. > >David > >--- [EMAIL PROTECTED] wrote: > > If she hadn't declare the struts-html.tld, she > > should have a struts error > > message > > like "html tag is not defined" > > > > -Message d'origine- > > De: Jonathan M Crater > > [mailto:[EMAIL PROTECTED]] > > Date: mercredi 26 septembre 2001 15:58 > > À: [EMAIL PROTECTED] > > Objet: Re: Using > > > > > > are you declaring the html tag library before you > > try to use the errors tag? > > > > <%@ taglib uri="/WEB-INF/struts-html.tld" > > prefix="html" %> > > > > Anna Englund wrote: > > > > > Hi, > > > > > > I'm new with Struts and have a question on how to > > > display error messages. > > > > > > In my Action I detect an error and take the > > following > > > actions: > > > - Create an ArrayErrors object, errors > > > - Add a new ArrayError to errors > > > - Save errors in request > > > - Retrieves the messages with in my > > jsp > > > > > > ... > > > ActionErrors errors = new ActionErrors(); > > > errors.add(ActionErrors.GLOBAL_ERROR, > > > new > > ActionError("error.company.updatecollision")); > > > saveErrors(request, errors); > > > ... > > > > > > The problem I'm having is that the error message > > is > > > never displayed. I've added a java snippet in my > > jsp > > > that retrieves all attributes from the request and > > > there I can find the bean > > > org.apache.struts.action.ERROR which has a > > property > > > named org.apache.struts.action.GLOBAL_ERROR. > > > > > > I have no idea what I have done wrong. Any help > > would > > > be greatly appreciated. > > > //Anna > > > > > > __ > > > Do You Yahoo!? > > > Get email alerts & NEW webcam video instant > > messaging with Yahoo! > > Messenger. http://im.yahoo.com > > > > > > > > >__ >Do You Yahoo!? >Get email alerts & NEW webcam video instant messaging with Yahoo! >Messenger. http://im.yahoo.com _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Using
> Is there any easy way I can see if I've made some > mistake regarding the message resources file? Yes. Add this to your web.xml: null false This will cause a string based on the message key to be displayed if the matching resource property is not found. The default is that nothing will be displayed when the resource is not found. -- Martin Cooper - Original Message - From: "Anna Englund" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 8:01 AM Subject: Re: Using > Yes, I have. At least I think I've made it properly. > > I've added the property in a file called > StrutsApplicationResources.properties and added the > file as an input parameter to the action servlet > ... > > application > web.resources.StrutsApplicationResources > > ... > Is there any easy way I can see if I've made some > mistake regarding the message resources file? > //Anna > --- 鬼é K <[EMAIL PROTECTED]> wrote: > > Had you added > > error.company.updatecollision=Your Error Message > > in the > > WEB-INF/Classes/ApplicationResources.properties file > > > > - Original Message - > > From: <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, September 26, 2001 9:59 PM > > Subject: RE: Using > > > > > > > Is the "error.company.updatecollision" defined in > > the > > > ApplicationResources.properties > > > files in the Web-inf/classes/ repertory ? > > > > > > -Message d'origine- > > > De: Anna Englund > > [mailto:[EMAIL PROTECTED]] > > > Date: mercredi 26 septembre 2001 15:55 > > > Ã?: [EMAIL PROTECTED] > > > Objet: Using > > > > > > > > > Hi, > > > > > > I'm new with Struts and have a question on how to > > > display error messages. > > > > > > In my Action I detect an error and take the > > following > > > actions: > > > - Create an ArrayErrors object, errors > > > - Add a new ArrayError to errors > > > - Save errors in request > > > - Retrieves the messages with in my > > jsp > > > > > > ... > > > ActionErrors errors = new ActionErrors(); > > > errors.add(ActionErrors.GLOBAL_ERROR, > > > new ActionError("error.company.updatecollision")); > > > saveErrors(request, errors); > > > ... > > > > > > The problem I'm having is that the error message > > is > > > never displayed. I've added a java snippet in my > > jsp > > > that retrieves all attributes from the request and > > > there I can find the bean > > > org.apache.struts.action.ERROR which has a > > property > > > named org.apache.struts.action.GLOBAL_ERROR. > > > > > > I have no idea what I have done wrong. Any help > > would > > > be greatly appreciated. > > > //Anna > > > > > > > > > __ > > > Do You Yahoo!? > > > Get email alerts & NEW webcam video instant > > messaging with Yahoo! > > Messenger. > > > http://im.yahoo.com > > > > > > > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
RE: example struts app
Thanks a lot. That last information may be the key to this problem. Have a nice one Brett! Seetharaman -Original Message-From: Brett Porter [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 26, 2001 5:08 PMTo: '[EMAIL PROTECTED]'Subject: RE: example struts app From the installation guide... Tomcat 3.1 and prior - Not recommended. Use Tomcat 3.2.1 or later. It seems to me it's using an old servlet spec. You shouldn't need struts.jar in the classpath (and its probably best not to), because it is in the examples' WEB-INF/lib directory (where it is supposed to be :) Hope this helps, Brett -Original Message-From: Seetharaman Narayanan [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 10:03 AMTo: '[EMAIL PROTECTED]'Subject: RE: example struts app Hi Brett, Thank you for being a nice help. Here is what I got. I think I have set up all the pre-requisites(otherwise I wouldnt even seen the index.jsp). The war file after its deployed creates a directory and puts in all the files in exact locations. This is what the installation notes was saying. Only concern is do we need to point to struts.jar in the script which starts the Tomcat 3.1 ? Thanks Again Seetharaman Error: 500 Location: /StrutsDemo/registration.jspInternal Servlet Error:javax.servlet.ServletException: cant remove Attributes from request scope at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) at _0002fregistration_0002ejspregistration_jsp_0._jspService(_0002fregistration_0002ejspregistration_jsp_0.java, Compiled Code) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) 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.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) -Original Message-From: Brett Porter [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 26, 2001 4:44 PMTo: '[EMAIL PROTECTED]'Subject: RE: example struts app I believe if you use Tomcat 3.2 there are additional steps required (check in the install docs). Tomcat 4.0 should work as is. The example may be using a PostgeSQL database (I've seen the data source in the setup), but it seemed to work for me without one set up. I deployed it into Resin 2.0 as is without a problem. Perhaps you could post the actual exception (the top 5 - 10 lines). Cheers, Brett -Original Message-From: Seetharaman Narayanan [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 9:40 AMTo: '[EMAIL PROTECTED]'Subject: example struts app Hello All Can anyone tell me what are the prerequisites to run the example application which comes with the struts download? I tries running tha app, but couldnt getpass the index.jsp, because when I click on any of the links in index.jsp, I get a Servlet Exception. Here is what I did. I copied the war file into the C:\Tomcat\Webapps directory. I started Tomcat and pointed my browser to localhost/struts-example and I am taken to index.jsp. From there on the problem beginto arise. I need urgent help as after seeing them work, I have to get on to our project. Thanks Seetharaman Narayanan Software Engineer Keynote Systems Inc.,
RE: example struts app
From the installation guide... Tomcat 3.1 and prior - Not recommended. Use Tomcat 3.2.1 or later. It seems to me it's using an old servlet spec. You shouldn't need struts.jar in the classpath (and its probably best not to), because it is in the examples' WEB-INF/lib directory (where it is supposed to be :) Hope this helps, Brett -Original Message-From: Seetharaman Narayanan [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 10:03 AMTo: '[EMAIL PROTECTED]'Subject: RE: example struts app Hi Brett, Thank you for being a nice help. Here is what I got. I think I have set up all the pre-requisites(otherwise I wouldnt even seen the index.jsp). The war file after its deployed creates a directory and puts in all the files in exact locations. This is what the installation notes was saying. Only concern is do we need to point to struts.jar in the script which starts the Tomcat 3.1 ? Thanks Again Seetharaman Error: 500 Location: /StrutsDemo/registration.jspInternal Servlet Error:javax.servlet.ServletException: cant remove Attributes from request scope at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) at _0002fregistration_0002ejspregistration_jsp_0._jspService(_0002fregistration_0002ejspregistration_jsp_0.java, Compiled Code) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) 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.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) -Original Message-From: Brett Porter [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 26, 2001 4:44 PMTo: '[EMAIL PROTECTED]'Subject: RE: example struts app I believe if you use Tomcat 3.2 there are additional steps required (check in the install docs). Tomcat 4.0 should work as is. The example may be using a PostgeSQL database (I've seen the data source in the setup), but it seemed to work for me without one set up. I deployed it into Resin 2.0 as is without a problem. Perhaps you could post the actual exception (the top 5 - 10 lines). Cheers, Brett -Original Message-From: Seetharaman Narayanan [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 9:40 AMTo: '[EMAIL PROTECTED]'Subject: example struts app Hello All Can anyone tell me what are the prerequisites to run the example application which comes with the struts download? I tries running tha app, but couldnt getpass the index.jsp, because when I click on any of the links in index.jsp, I get a Servlet Exception. Here is what I did. I copied the war file into the C:\Tomcat\Webapps directory. I started Tomcat and pointed my browser to localhost/struts-example and I am taken to index.jsp. From there on the problem beginto arise. I need urgent help as after seeing them work, I have to get on to our project. Thanks Seetharaman Narayanan Software Engineer Keynote Systems Inc.,
RE: example struts app
Hi Brett, Thank you for being a nice help. Here is what I got. I think I have set up all the pre-requisites(otherwise I wouldnt even seen the index.jsp). The war file after its deployed creates a directory and puts in all the files in exact locations. This is what the installation notes was saying. Only concern is do we need to point to struts.jar in the script which starts the Tomcat 3.1 ? Thanks Again Seetharaman Error: 500 Location: /StrutsDemo/registration.jspInternal Servlet Error:javax.servlet.ServletException: cant remove Attributes from request scope at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) at _0002fregistration_0002ejspregistration_jsp_0._jspService(_0002fregistration_0002ejspregistration_jsp_0.java, Compiled Code) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) 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.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) -Original Message-From: Brett Porter [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 26, 2001 4:44 PMTo: '[EMAIL PROTECTED]'Subject: RE: example struts app I believe if you use Tomcat 3.2 there are additional steps required (check in the install docs). Tomcat 4.0 should work as is. The example may be using a PostgeSQL database (I've seen the data source in the setup), but it seemed to work for me without one set up. I deployed it into Resin 2.0 as is without a problem. Perhaps you could post the actual exception (the top 5 - 10 lines). Cheers, Brett -Original Message-From: Seetharaman Narayanan [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 9:40 AMTo: '[EMAIL PROTECTED]'Subject: example struts app Hello All Can anyone tell me what are the prerequisites to run the example application which comes with the struts download? I tries running tha app, but couldnt getpass the index.jsp, because when I click on any of the links in index.jsp, I get a Servlet Exception. Here is what I did. I copied the war file into the C:\Tomcat\Webapps directory. I started Tomcat and pointed my browser to localhost/struts-example and I am taken to index.jsp. From there on the problem beginto arise. I need urgent help as after seeing them work, I have to get on to our project. Thanks Seetharaman Narayanan Software Engineer Keynote Systems Inc.,
RE: example struts app
I believe if you use Tomcat 3.2 there are additional steps required (check in the install docs). Tomcat 4.0 should work as is. The example may be using a PostgeSQL database (I've seen the data source in the setup), but it seemed to work for me without one set up. I deployed it into Resin 2.0 as is without a problem. Perhaps you could post the actual exception (the top 5 - 10 lines). Cheers, Brett -Original Message-From: Seetharaman Narayanan [mailto:[EMAIL PROTECTED]]Sent: Thursday, 27 September 2001 9:40 AMTo: '[EMAIL PROTECTED]'Subject: example struts app Hello All Can anyone tell me what are the prerequisites to run the example application which comes with the struts download? I tries running tha app, but couldnt getpass the index.jsp, because when I click on any of the links in index.jsp, I get a Servlet Exception. Here is what I did. I copied the war file into the C:\Tomcat\Webapps directory. I started Tomcat and pointed my browser to localhost/struts-example and I am taken to index.jsp. From there on the problem beginto arise. I need urgent help as after seeing them work, I have to get on to our project. Thanks Seetharaman Narayanan Software Engineer Keynote Systems Inc.,
prefix matching for an action
I am trying to achieve the following: Essentially, I would like for a URL such as http://www.company.com/app/myAction/filename to trigger my action (assume in this example that the ActionServlet is mapped to "/app/*" in the web.xml file). I would like "filename" to be dynamic, so that a user could essentially download the action's dynamic responses with meaningful filenames. To the best of my knowledge, Struts does not support this. The best workaround I have found is to make this action the default action: But I really don't want to have to do that, especially since I will want to have many such action classes. It looks like I should be able to extend some class (ActionMapping?) in order to enable such a feature. But I am not sure what steps to follow. Has anyone encountered a similar challenge? Thanks JB __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
example struts app
Hello All Can anyone tell me what are the prerequisites to run the example application which comes with the struts download? I tries running tha app, but couldnt getpass the index.jsp, because when I click on any of the links in index.jsp, I get a Servlet Exception. Here is what I did. I copied the war file into the C:\Tomcat\Webapps directory. I started Tomcat and pointed my browser to localhost/struts-example and I am taken to index.jsp. From there on the problem beginto arise. I need urgent help as after seeing them work, I have to get on to our project. Thanks Seetharaman Narayanan Software Engineer Keynote Systems Inc.,
question about setter in actionform
besides submit the form, how can i trigger the setters method in the actionform to set the property values in the formbean? thanks _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
ActionError() problem
Title: ActionError() problem Hi, How can I use ActionError() to construct the error message that is not define in the message property file? Who can give me a example. I want display a dynamic error message such as "ith line got some error !". Who can give me a explanation about second parameter for following ActionError method public ActionError(java.lang.String key, java.lang.Object value0) Construct an action error with the specified replacement values. Parameters: key - Message key for this error message value0 - First replacement value Thanks in advance! Gang
Re: dynamic forwards
Hi again, The values in your hash map have been hardcoded in, which works fine. But what do I if I do not know what the user's selection will be in advance. Take for instance, if I have a set of checkboxes on my page, I would like to be able to initialize the map with the values that the user has selected. Or am I just missing the point here? Please explain further and thank you very much for your patience. Thanks Lisa >From: "Gregor Rayman" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >CC: "lisa ward" <[EMAIL PROTECTED]> >Subject: Re: dynamic forwards >Date: Wed, 26 Sep 2001 20:55:34 +0200 > >"lisa ward" <[EMAIL PROTECTED]> wrote: > > > Another quick question. How would I be able to initialize the hashMap. >the > > problem Im facing is that when I use a forward the submit is not called >so > > the values are not initialized in my bean. > >Here an quick and dirty example. (Dirty beacuse it uses scriplte. Custom >tag >would be somehow more apprpriate.) > ><% > HashMap linkParams = new HashMap(); // create the map > linkParams.put("areaId", "a"); // set the values > linkParams.put("aspectId", "b"); > pageContext.setAttribute("linkParams", linkParams); // make the map an >attribute of page >%> > > > > > >The generated URL will be: .../deleteaspect.do?areaId=a&aspectId=b > >The map does not have to be the attribute itself. It can be a property of >an >attribute. Then the tag would look like this: > >property="propertyName"> > >-- >gR > > > > _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Hiring Struts guru
Hi, My group has an immediate opening for someone with demonstrable technical skills/expertise in Struts framework. Location is San Jose, California, USA. If you are interested and has solid experience, please contact me. cheers, shahid
RE: WML version of Struts?
Title: RE: WML version of Struts? Have a look around the struts website. It's already listed. http://jakarta.apache.org/struts/todo-1.1.html It doesn't have a volunteer yet, so it is a way off. If you are going to do it anyway, maybe you should discuss it with the maintainers and write it for struts. Cheers, Brett -Original Message- From: Matt Parker [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 September 2001 2:09 AM To: [EMAIL PROTECTED] Subject: WML version of Struts? Hi there, Are there any plans to incorporate WML support into Struts? Is it simply a matter of wrapping the WML tags like Struts currently does for HTML? TIA, Matt
Re: Use an image for submit button
Thinh Doan wrote: > Is there a way to do it? In html, it's Actually in HTML it's more like , which you have in Struts in the form of . http://jakarta.apache.org/struts/struts-html.html#image -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] "We're an underground revolution working overtime"
Re: Application Resource reload.
Mark Gordon wrote: > Is it possible to reload the applicationresource.properties file without > restarting the web server/servlet container? > Is it possible to reload the struts-config.xml? The default webapp comes with some mapping to do that (I think they are commented out by default.) Check the URL localhost/myWebApp/admin/reload.do and see if it works, or take a look at the config file to look for those mappings. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] "We're an underground revolution working overtime"
Application Resource reload.
Is it possible to reload the applicationresource.properties file without restarting the web server/servlet container? Is it possible to reload the struts-config.xml? Thanks, Mark
Use an image for submit button
I'd like to replace the following with an image instead of a button: Is there a way to do it? In html, it's Thank you for your response. Thinh
RE: All user's roles
I looked for this in servlet api 2.2 too but couldnt find it either - so had to do "isUserInRole" for each and every role ... would be great if someone has a better suggestion. Thanks Pratima -Original Message- From: Mike Douglass [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 12:58 PM To: [EMAIL PROTECTED] Subject: All user's roles Is there any way to get all roles for a currently authenticated user? We are about to implement a jsp application which allows a user to select one of a number of roles which will determine the functionality available in later pages. Essentially, I want to create a drop down box of all valid roles for the current user without having to build the names of all possible roles into the page source. Mike Douglass [EMAIL PROTECTED] Senior Systems Programmer Communication & Collaboration Technologies 518 276 6780(voice) 2809 (fax) Rensselaer Polytechnic Institute 110 8th Street, Troy, NY 12180
Re: Validation Framework: validating field length
This will work perfectly - thanks! Matt --- David Winterfeldt <[EMAIL PROTECTED]> wrote: > I have plans to add a min and max length for > convenience, but haven't had the time (even though > they aren't a lot of work). Currently you can use > regular expression to limit length. > > 5 letters > ^\w{5}$ > > 5 numbers > ^\d{5}$ > > At least 2, but not more than 5 letters > ^\w{2,5}$ > > > David > > --- Matt Raible <[EMAIL PROTECTED]> wrote: > > Our current UI framework does not allow Javascript > > for UI Validation, so we are > > using the struts validation framework sans > > javascript. > > > > So far, we have found that we are only able to > > validate "required" and "data > > types." We would also like to validate "length" of > > a string and such, to make > > sure the value can fit into the database column. Is > > there anyway/plans to do > > this in the Validation Framework? > > > > Thanks, > > > > Matt > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant > > messaging with Yahoo! Messenger. http://im.yahoo.com > > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
All user's roles
Is there any way to get all roles for a currently authenticated user? We are about to implement a jsp application which allows a user to select one of a number of roles which will determine the functionality available in later pages. Essentially, I want to create a drop down box of all valid roles for the current user without having to build the names of all possible roles into the page source. Mike Douglass [EMAIL PROTECTED] Senior Systems Programmer Communication & Collaboration Technologies 518 276 6780(voice) 2809 (fax) Rensselaer Polytechnic Institute 110 8th Street, Troy, NY 12180
Re: dynamic forwards
"lisa ward" <[EMAIL PROTECTED]> wrote: > Another quick question. How would I be able to initialize the hashMap. the > problem Im facing is that when I use a forward the submit is not called so > the values are not initialized in my bean. Here an quick and dirty example. (Dirty beacuse it uses scriplte. Custom tag would be somehow more apprpriate.) <% HashMap linkParams = new HashMap(); // create the map linkParams.put("areaId", "a"); // set the values linkParams.put("aspectId", "b"); pageContext.setAttribute("linkParams", linkParams); // make the map an attribute of page %> The generated URL will be: .../deleteaspect.do?areaId=a&aspectId=b The map does not have to be the attribute itself. It can be a property of an attribute. Then the tag would look like this: -- gR
Re: Dual-list UI
Whoops. Ignore that. I gave you a solution to a slightly different problem. Sorry. Eric Rizzo wrote: > Has anyone come up with a good way to implement a dual-list interface using > Struts? I mean a UI where there are two lists, a source and a destination, and > buttons to move items between them. Obviously, the lists would be created with > tags, and the source list can be populated with > tags. The big problem I see is how to get the destination list contents into > the form bean when the form is submitted. The Action is not interested in what > is selected in the list, but instead the list's entire contents. > > There are JavaScript solutions that I can think of, but I'm hoping that someone > may have found a way to do it without resorting to that ugliness. > > TIA, > Eric > -- > Eric Rizzo, Software Engineer > OpenNetwork Technologies > http://www.opennetwork.com > - > I embrace my personality flaws, for without them > I might have no personality at all.
Re: Dual-list UI
The only way that I've found to do this is to use javascript to set all the destination elements as "selected" when you submit. Matt --- Eric Rizzo <[EMAIL PROTECTED]> wrote: > Has anyone come up with a good way to implement a dual-list interface using > Struts? I mean a UI where there are two lists, a source and a destination, > and > buttons to move items between them. Obviously, the lists would be created > with > tags, and the source list can be populated with > > tags. The big problem I see is how to get the destination list contents into > > the form bean when the form is submitted. The Action is not interested in > what > is selected in the list, but instead the list's entire contents. > > There are JavaScript solutions that I can think of, but I'm hoping that > someone > may have found a way to do it without resorting to that ugliness. > > TIA, > Eric > -- > Eric Rizzo, Software Engineer > OpenNetwork Technologies > http://www.opennetwork.com > - > I embrace my personality flaws, for without them > I might have no personality at all. > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Dual-list UI
{Off topic} I made something to do this a while back as part of a prototype. It takes a reference to two select boxes: the one that you are trying to move from and to (i.e., origin and destination). It works pretty well with IE and NS4.x. It puts things in a sequential order in the two lists so that if you select an item in the destination list, it will put the origin item you want to move under the destination item. It's ugly but hey, you know, why reinvent the wheel? --Michael function simpleUpdate(originItem, destinationItem) { // do nothing if nothing is selected if (originItem.selectedIndex == -1) { return; } // set some variables oInd=originItem.selectedIndex oText=originItem.options[oInd].text oValue=originItem.options[oInd].value oLength= originItem.options.length dInd=destinationItem.selectedIndex dLength= destinationItem.options.length // build a temporary array itemArray = new Array() indx =0; // the initial index of the new array = the destination index // now add the item to be moved to the array itemArray[indx] = new Option(oText, oValue) indx++ // if there are items from the destination that need to follow the item to be added, if ( destinationItem.options[dInd + 1] != null ) { // pull out all of the options that follow the destination index into temporary holding array for( i=dInd+1; i 1) { originItem.options[0].selected=true } } Marcelo Vanzin wrote: > Eric Rizzo wrote: > > The Action is not interested in what is selected in the list, but > > instead the list's entire contents. > > > > There are JavaScript solutions that I can think of, but I'm hoping > > that someone may have found a way to do it without resorting to > > that ugliness. > > I've built some pages with that (not in Struts, but this is not a > Struts-related problem), and the only way I found to send the contents > of the second list was to use Javascript (to select all the options of > that "select" prior to submitting). > > It's ugly, but...works. > > The problem is that if the item is not selected, it's not sent in the > request. So, you use Javascript or you ask the user to select all the > options on the second list manually (which surely is not a good solution). > > -- > []'s > Marcelo Vanzin > Touch Tecnologia > [EMAIL PROTECTED] > "We're an underground revolution working overtime"
Re: Dual-list UI
Eric Rizzo wrote: > The Action is not interested in what is selected in the list, but > instead the list's entire contents. > > There are JavaScript solutions that I can think of, but I'm hoping > that someone may have found a way to do it without resorting to > that ugliness. I've built some pages with that (not in Struts, but this is not a Struts-related problem), and the only way I found to send the contents of the second list was to use Javascript (to select all the options of that "select" prior to submitting). It's ugly, but...works. The problem is that if the item is not selected, it's not sent in the request. So, you use Javascript or you ask the user to select all the options on the second list manually (which surely is not a good solution). -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] "We're an underground revolution working overtime"
Dual-list UI
Has anyone come up with a good way to implement a dual-list interface using Struts? I mean a UI where there are two lists, a source and a destination, and buttons to move items between them. Obviously, the lists would be created with tags, and the source list can be populated with tags. The big problem I see is how to get the destination list contents into the form bean when the form is submitted. The Action is not interested in what is selected in the list, but instead the list's entire contents. There are JavaScript solutions that I can think of, but I'm hoping that someone may have found a way to do it without resorting to that ugliness. TIA, Eric -- Eric Rizzo, Software Engineer OpenNetwork Technologies http://www.opennetwork.com - I embrace my personality flaws, for without them I might have no personality at all.
RE: dynamic forwards
Another quick question. How would I be able to initialize the hashMap. the problem Im facing is that when I use a forward the submit is not called so the values are not initialized in my bean. >From: "Martin, Margaret" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> >Subject: RE: dynamic forwards >Date: Wed, 26 Sep 2001 13:03:15 -0500 > >Lisa, >I haven't tried it myself, but according to the doc for the html:link tag, >you can specify a bean that returns a map which specifies all of the >parameters... the contents of that bean clearly could change between >invocations, thus giving you dynamic parameters... > >Hope this helps - >Margaret > >-Original Message- >From: lisa ward [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, September 26, 2001 12:52 PM >To: [EMAIL PROTECTED] >Subject: dynamic forwards > > > > >Hi all, > >I am having the exact same problem as Chiji, so I have just copied and >pasted a bulk of his email (Sorry Chiji) . Im literally pulling my hair >out > >over this one. Chiji, if you have solved the problem let me know or point >me in the right direction. > >Thanks > >Chiji's email reads: > >-- start of Chiji's email-- >Hi, > >Im in a bit of dilema, I don't understand is what I should do if the >parameters which are used by the html:link (forward) tag are generated on >the fly. I can't hard code all the forwards in my config file because I >don't know how may parameters there will be in advance. Since I don't know >the amount parameters in advance I can't specify which form bean each of >the > >actions with, appended parameter values, should use. > >This is what my problem looks like: > >in config file: > > > >name="searchForm" >input="/seach.jsp" >scope="request" /> > >in jsp file: > > > > > > > >when I use: > > > >it works fine and think this is because of the mapping in the config file. > >I would want the forward to 'search' (/do/search) as well as the forward to >'search' and it parameters (/do/search?pageNumber=1) to use the same form >bean. > >I hope this makes sense. > >-- end of Chiji's email-- > >Thanks >Lisa > >_ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: dynamic forwards
"Martin, Margaret" <[EMAIL PROTECTED]> wrote: I have tried it. It works. (at least the CVS version) -- gR > Lisa, > I haven't tried it myself, but according to the doc for the html:link tag, > you can specify a bean that returns a map which specifies all of the > parameters... the contents of that bean clearly could change between > invocations, thus giving you dynamic parameters... > > Hope this helps - > Margaret > > -Original Message- > From: lisa ward [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 26, 2001 12:52 PM > To: [EMAIL PROTECTED] > Subject: dynamic forwards > > > > > Hi all, > > I am having the exact same problem as Chiji, so I have just copied and > pasted a bulk of his email (Sorry Chiji) . Im literally pulling my hair out > > over this one. Chiji, if you have solved the problem let me know or point > me in the right direction. > > Thanks > > Chiji's email reads: > > -- start of Chiji's email-- > Hi, > > Im in a bit of dilema, I don't understand is what I should do if the > parameters which are used by the html:link (forward) tag are generated on > the fly. I can't hard code all the forwards in my config file because I > don't know how may parameters there will be in advance. Since I don't know > the amount parameters in advance I can't specify which form bean each of the > > actions with, appended parameter values, should use. > > This is what my problem looks like: > > in config file: > > > > name="searchForm" >input="/seach.jsp" >scope="request" /> > > in jsp file: > > > > > > > > when I use: > > > > it works fine and think this is because of the mapping in the config file. > > I would want the forward to 'search' (/do/search) as well as the forward to > 'search' and it parameters (/do/search?pageNumber=1) to use the same form > bean. > > I hope this makes sense. > > -- end of Chiji's email-- > > Thanks > Lisa > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp >
Re: New struts site!
Just thought you should know but on both Netscape 6 and IE 5 I get a SSL error? Are you using a private certificate? //* Steven Elliott <[EMAIL PROTECTED] Head of Technology VTV Learning Corporation Los Angeles - Boston - Lisbon (http://www.vtvLearning.com/)
RE: dynamic forwards
Lisa, I haven't tried it myself, but according to the doc for the html:link tag, you can specify a bean that returns a map which specifies all of the parameters... the contents of that bean clearly could change between invocations, thus giving you dynamic parameters... Hope this helps - Margaret -Original Message- From: lisa ward [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 12:52 PM To: [EMAIL PROTECTED] Subject: dynamic forwards Hi all, I am having the exact same problem as Chiji, so I have just copied and pasted a bulk of his email (Sorry Chiji) . Im literally pulling my hair out over this one. Chiji, if you have solved the problem let me know or point me in the right direction. Thanks Chiji's email reads: -- start of Chiji's email-- Hi, Im in a bit of dilema, I don't understand is what I should do if the parameters which are used by the html:link (forward) tag are generated on the fly. I can't hard code all the forwards in my config file because I don't know how may parameters there will be in advance. Since I don't know the amount parameters in advance I can't specify which form bean each of the actions with, appended parameter values, should use. This is what my problem looks like: in config file: in jsp file: when I use: it works fine and think this is because of the mapping in the config file. I would want the forward to 'search' (/do/search) as well as the forward to 'search' and it parameters (/do/search?pageNumber=1) to use the same form bean. I hope this makes sense. -- end of Chiji's email-- Thanks Lisa _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
dynamic forwards
Hi all, I am having the exact same problem as Chiji, so I have just copied and pasted a bulk of his email (Sorry Chiji) . Im literally pulling my hair out over this one. Chiji, if you have solved the problem let me know or point me in the right direction. Thanks Chiji's email reads: -- start of Chiji's email-- Hi, Im in a bit of dilema, I don't understand is what I should do if the parameters which are used by the html:link (forward) tag are generated on the fly. I can't hard code all the forwards in my config file because I don't know how may parameters there will be in advance. Since I don't know the amount parameters in advance I can't specify which form bean each of the actions with, appended parameter values, should use. This is what my problem looks like: in config file: in jsp file: when I use: it works fine and think this is because of the mapping in the config file. I would want the forward to 'search' (/do/search) as well as the forward to 'search' and it parameters (/do/search?pageNumber=1) to use the same form bean. I hope this makes sense. -- end of Chiji's email-- Thanks Lisa _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: New Struts User
You need a modified Struts.jar with some minor modifications to the Form tag. http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10964.html (details) http://www.enfused.com/struts.jar (modified jar) Chris Christopher Assenza Phone: 412.201.6026 Fax: 412.201.6060 Email: [EMAIL PROTECTED] ACCESSDATA Moving Your Business from Point A to Point e.SM http://www.accessdc.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 1:32 PM To: [EMAIL PROTECTED] Subject: New Struts User Hi, I am trying to use Struts and have not been able to make it work in my environment. I am running Visual Age for Java 3.5.3 (JSP 1.1 & Servlet 2.2). I followed the instructions for setup and have double checked them. I am getting the following error in my browser when I invoke a jsp. I was hoping someone might have a clue as to where the problem might be OR where I might look to find more info. Error 500 An error has occured while processing request:http://localhost:8080/employeelist/jsp/employeeSearch.jsp Message: Server caught unhandled exception from servlet [jsp]: cant remove Attributes from request scope Target Servlet: jsp 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._employeeSearch_xjsp._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) .(more) I've traced the generated java code for the jsp and the exception happens at the doEndTag() method (as the stack trace shows above) for the tag. The simple jsp I'm invoking is shown below. <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> Name: Find All: http://localhost:8080/employeelist/jsp/employeeEdit.jsp";>Add an Employee The action servlet shouldn't even be invoked yet since I'm calling the jsp and it won't even display. I'm sure it's something simple but I can't find it. Does this mean anything to anyone? I've been struggling with this for a while and am out of ideas. Thanks, Ken --- This message and any included attachments are from Siemens Medical Solutions Health Services Corporation and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] Thank you
New Struts User
Hi, I am trying to use Struts and have not been able to make it work in my environment. I am running Visual Age for Java 3.5.3 (JSP 1.1 & Servlet 2.2). I followed the instructions for setup and have double checked them. I am getting the following error in my browser when I invoke a jsp. I was hoping someone might have a clue as to where the problem might be OR where I might look to find more info. Error 500 An error has occured while processing request:http://localhost:8080/employeelist/jsp/employeeSearch.jsp Message: Server caught unhandled exception from servlet [jsp]: cant remove Attributes from request scope Target Servlet: jsp 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._employeeSearch_xjsp._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) .(more) I've traced the generated java code for the jsp and the exception happens at the doEndTag() method (as the stack trace shows above) for the tag. The simple jsp I'm invoking is shown below. <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> Name: Find All: http://localhost:8080/employeelist/jsp/employeeEdit.jsp";>Add an Employee The action servlet shouldn't even be invoked yet since I'm calling the jsp and it won't even display. I'm sure it's something simple but I can't find it. Does this mean anything to anyone? I've been struggling with this for a while and am out of ideas. Thanks, Ken --- This message and any included attachments are from Siemens Medical Solutions Health Services Corporation and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] Thank you
Re: Struts Integratration module for Forte4J ?
I wrote on of the GUI tools, "Struts Console" at: http://www.ejcenter.com/struts/ and have had many people suggest that I make a NetBeans/Sun Forte module. I am still working out some of the kinks in the software but once that's done I am going to look into this. -james --- [EMAIL PROTECTED] wrote: > > > Are there any plans to provide an integration > module for forte? I have seen > the announcement of the new GUI tools for struts. > Our team is starting to use > FF4J and I am hoping to use Struts in the future as > well. I think a integration > module would be a good fit. I have seen several > products that work as stand > alone and integrate with FF4J and was wondering if > the new struts gui tools > would be canditates for that. The reason I ask is > that (though I have not tried > it) I have seen an Expresso Module available for > Forte. > > Thanks. > Jeff Mychasiw > > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Struts Integratration module for Forte4J ?
Are there any plans to provide an integration module for forte? I have seen the announcement of the new GUI tools for struts. Our team is starting to use FF4J and I am hoping to use Struts in the future as well. I think a integration module would be a good fit. I have seen several products that work as stand alone and integrate with FF4J and was wondering if the new struts gui tools would be canditates for that. The reason I ask is that (though I have not tried it) I have seen an Expresso Module available for Forte. Thanks. Jeff Mychasiw
DataSource problem with NIGHTLY-BUILD version- 20010911 of STRUTS
I have no problem using Datasource in STRUT version 1.0, but when I upgrade STRUTS to nightly version, I have a problem using datasource. Here how it happens I first replace the XML parser and JAXP so that it can support Namespace. Then I follow the instruction in the "Nighlt Release" and I restart the Tomcat server. TOMCAT complain that It cannot locate the GenericDataSource. Something like this: " New org.apache.struts.util.GenericDataSource EM> java.lang.NoClassDefFoundError: org.apache.struts.util.GenericDataSource " I then followed some threads in the user-groups, they said that I need to add jdbc2_0-stdext.jar to the CLASSPATH or to the WEB_INF/lib directory inside of your application. I tried both ways. I still cannot sovled the problem . I did open the the 'struts.jar' in the WEB-INF/lib to make sure the GenericDataSource class is there. Everything seems to be in the right place. but I cannot get rid of the error. Please help me. Thanks Binh __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: multi form pages
I can't find where it is in the specification, but I believe that nested forms are not permitted. - Original Message - From: "Michelle Popovits" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 11:16 AM Subject: Re: multi form pages Has anyone tried embedding a form within a form. In which case when the embedded form is submitted only parms within the form would be submitted, and when the outer form is submitted would it include all parms including those within it's embedded forms. I haven't tried this, but I would be interested in hearing if others have (or if it's even possible). Some of my designs might use this approach (but then again I might redesign them a different way if it's too convoluted). Michelle
WML version of Struts?
Hi there, Are there any plans to incorporate WML support into Struts? Is it simply a matter of wrapping the WML tags like Struts currently does for HTML? TIA, Matt
Re: multi form pages
I don't think you can embed a form in a form in a standard html form. You could use JavaScript to copy values from an inner form to hidden fields in the outer form when it is submitted though. David --- Michelle Popovits <[EMAIL PROTECTED]> wrote: > > Has anyone tried embedding a form within a form. > In which case when the embedded form is submitted > only parms within the form > would be submitted, and when the outer form is > submitted would it include > all parms including those within it's embedded > forms. > I haven't tried this, but I would be interested in > hearing if others have > (or if it's even possible). Some of my designs > might use this approach (but > then again I might redesign them a different way if > it's too convoluted). > > Michelle > > > > >From: [EMAIL PROTECTED] > >Reply-To: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: Re: multi form pages > >Date: 26 Sep 2001 07:44:57 -0700 > > > >What you are asking is really an HTML question. I > don't believe you will > >have any problem with multiple forms on a single > page. However, I do > >believe that only the parameters of the submitted > form will be sent to the > >server. > > > >I've never tried this and am willing to be > corrected by anyone who knows > >for certain! > > > >On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > Transitional//EN"> > > > > > > CONTENT="text/html; charset=iso-8859-1"> > > > > > > > > > name=GENERATOR> > > > > > > face=Arial size=2> > > class=636530314-26092001>There's been quite a > bit of discussion on the > >list > > > about multi-page forms, but nothing on > multi-form > > > pages. > > > > > > size=2> >face=Arial>D > > class=636530314-26092001>oes anyone know if > a single jsp > > class=636530314-26092001> can contain > more than one form > > > section that > reference > >different > > > ActionForm objects? class=636530314-26092001> > > > TIA. > > > class=636530314-26092001> >size=2> > > face=Arial> > > > >class=636530314-26092001>JohnH > > > > > > class=636530314-26092001> > > > > > > class=636530314-26092001> > > > >-- > >Steven Valin > >[EMAIL PROTECTED] > > > _ > Get your FREE download of MSN Explorer at > http://explorer.msn.com/intl.asp > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
RE: multi form pages
forms cannot be nested. -Original Message- From: Michelle Popovits [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:16 AM To: [EMAIL PROTECTED] Subject: Re: multi form pages Has anyone tried embedding a form within a form. In which case when the embedded form is submitted only parms within the form would be submitted, and when the outer form is submitted would it include all parms including those within it's embedded forms. I haven't tried this, but I would be interested in hearing if others have (or if it's even possible). Some of my designs might use this approach (but then again I might redesign them a different way if it's too convoluted). Michelle >From: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: multi form pages >Date: 26 Sep 2001 07:44:57 -0700 > >What you are asking is really an HTML question. I don't believe you will >have any problem with multiple forms on a single page. However, I do >believe that only the parameters of the submitted form will be sent to the >server. > >I've never tried this and am willing to be corrected by anyone who knows >for certain! > >On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > > > > > > > > > > > > > class=636530314-26092001>There's been quite a bit of discussion on the >list > > about multi-page forms, but nothing on multi-form > > pages. > > > > face=Arial>D > class=636530314-26092001>oes anyone know if a single jsp > class=636530314-26092001> can contain more than one form > > section that reference >different > > ActionForm objects? > > TIA. > > size=2> > face=Arial> > > class=636530314-26092001>JohnH > > > class=636530314-26092001> > > > class=636530314-26092001> > >-- >Steven Valin >[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: multi form pages
Michelle, I'm pretty sure that the HTML spec does not allow for that. But I'm not sure what the usefulness of such a feature would be anyway. It would be much simpler just to ignore the values you didn't want if the "inner form" was submitted. Nathan Anderson -Original Message- From: Michelle Popovits [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 8:16 AM To: [EMAIL PROTECTED] Subject: Re: multi form pages Has anyone tried embedding a form within a form. In which case when the embedded form is submitted only parms within the form would be submitted, and when the outer form is submitted would it include all parms including those within it's embedded forms. I haven't tried this, but I would be interested in hearing if others have (or if it's even possible). Some of my designs might use this approach (but then again I might redesign them a different way if it's too convoluted). Michelle >From: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: multi form pages >Date: 26 Sep 2001 07:44:57 -0700 > >What you are asking is really an HTML question. I don't believe you will >have any problem with multiple forms on a single page. However, I do >believe that only the parameters of the submitted form will be sent to the >server. > >I've never tried this and am willing to be corrected by anyone who knows >for certain! > >On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > > > > > > > > > > > > > class=636530314-26092001>There's been quite a bit of discussion on the >list > > about multi-page forms, but nothing on multi-form > > pages. > > > > face=Arial>D > class=636530314-26092001>oes anyone know if a single jsp > class=636530314-26092001> can contain more than one form > > section that reference >different > > ActionForm objects? > > TIA. > > size=2> > face=Arial> > > class=636530314-26092001>JohnH > > > class=636530314-26092001> > > > class=636530314-26092001> > >-- >Steven Valin >[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: multi form pages
Nested forms are not supported by IE and Netscape. I know that you will not be able to post the values of a child form when the parent is submitted. Depending on the browser's implementation of the HTML standards you should get fairly wacky effects... I suggest that you make one form with different values assigned to the various action buttons and then use the action object to read the button's value and then determine how to respond to the request. Hope this helps. --Michael Michelle Popovits wrote: > Has anyone tried embedding a form within a form. > In which case when the embedded form is submitted only parms within the form > would be submitted, and when the outer form is submitted would it include > all parms including those within it's embedded forms. > I haven't tried this, but I would be interested in hearing if others have > (or if it's even possible). Some of my designs might use this approach (but > then again I might redesign them a different way if it's too convoluted). > > Michelle > > >From: [EMAIL PROTECTED] > >Reply-To: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: Re: multi form pages > >Date: 26 Sep 2001 07:44:57 -0700 > > > >What you are asking is really an HTML question. I don't believe you will > >have any problem with multiple forms on a single page. However, I do > >believe that only the parameters of the submitted form will be sent to the > >server. > > > >I've never tried this and am willing to be corrected by anyone who knows > >for certain! > > > >On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > class=636530314-26092001>There's been quite a bit of discussion on the > >list > > > about multi-page forms, but nothing on multi-form > > > pages. > > > > > > >face=Arial>D > > class=636530314-26092001>oes anyone know if a single jsp > > class=636530314-26092001> can contain more than one form > > > section that reference > >different > > > ActionForm objects? > > > TIA. > > > >size=2> > > face=Arial> > > > >class=636530314-26092001>JohnH > > > > > class=636530314-26092001> > > > > > class=636530314-26092001> > > > >-- > >Steven Valin > >[EMAIL PROTECTED] > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: multi form pages
Pretty sure this is not allowed in html, so won't be allowed in Struts. Dave "Michelle Popovits" <[EMAIL PROTECTED]> on 09/26/2001 11:16:04 AM Please respond to [EMAIL PROTECTED]; Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: multi form pages Has anyone tried embedding a form within a form. In which case when the embedded form is submitted only parms within the form would be submitted, and when the outer form is submitted would it include all parms including those within it's embedded forms. I haven't tried this, but I would be interested in hearing if others have (or if it's even possible). Some of my designs might use this approach (but then again I might redesign them a different way if it's too convoluted). Michelle >From: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: multi form pages >Date: 26 Sep 2001 07:44:57 -0700 > >What you are asking is really an HTML question. I don't believe you will >have any problem with multiple forms on a single page. However, I do >believe that only the parameters of the submitted form will be sent to the >server. > >I've never tried this and am willing to be corrected by anyone who knows >for certain! > >On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > > > > > > > > > > > > > class=636530314-26092001>There's been quite a bit of discussion on the >list > > about multi-page forms, but nothing on multi-form > > pages. > > > > face=Arial>D > class=636530314-26092001>oes anyone know if a single jsp > class=636530314-26092001> can contain more than one form > > section that reference >different > > ActionForm objects? > > TIA. > > size=2> > face=Arial> > > class=636530314-26092001>JohnH > > > class=636530314-26092001> > > > class=636530314-26092001> > >-- >Steven Valin >[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Reusable/composable Struts components?
Gary (and all): This is exactly the kind of issue that led us to integrate Struts with Expresso (our OSS app framework) - we had addressed the issue of packaging components and their interaction with Expresso, so I guess we were coming at the problem from the other direction :-) Expresso's OSS community has created a forum component, login/authentication management, polling/voting application, and a bunch of others, and have at least one answer to how to easily be able to plug components together. I'd like to suggest you cross-post your question on the [EMAIL PROTECTED] mailing list - I expect you'd get a lot of input that you might find useful, particularly now that any Expresso component is also effectively a Struts "component" Regards, Mike Jcorporate Ltd. http://www.jcorporate.com -Original Message-From: Gary Johnston [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 26, 2001 10:49 AMTo: [EMAIL PROTECTED]Subject: Re: Reusable/composable Struts components?Gabe, I absolutely agree. I was mentally coming at it from the bottom up: How do I get a good, general reuse mechanism working at all? If/when that is figured out, immediately all the other issues you mention need to be addressed in order to have a real, usable solution. I'd love to find out if/how folks in the Struts community address this. My fear is that what most folks currently do at this level is mostly ad hoc and/or "cut and paste" reuse.- Gary___Gary JohnstonWebSphere Enterprise RAD DevelopmentApplication & Integration Middleware DivisionIBM Software Group, Research Triangle Park, NC919-254-0027, fax 919-254-4914, IBM tieline 444-0027 Gabriel Sidler <[EMAIL PROTECTED]> 09/26/2001 01:35 AM Please respond to struts-user To: [EMAIL PROTECTED] cc: Subject: Re: Reusable/composable Struts components? Gary, Ted,I have a very similar need. I have Struts application components that I'd like to reuse/share with others (e.g. user profile manager,adminisration tools, login, dynamic toolbar, calendar etc.)A reusable component typically consists of:- several Action classes- several ActionForm classes- several JSPs- other classes- other resources, for example, property files- some configuration code in struts-config.xmlGary, in your post you address the issue of control flow. I see some moreissues:How can I package such a reusable component, transport it and make it easy for others to add it to their application?- What is a suitable file structure?- Upon installation: How is the configuration of the reusable component merged with the configuration of the main application?- How do I document such a reusable component.I think it would be a big plus for Struts to support such a concept of reusablecomponents. Being able to easily exchange application components would give the community a boost.Has anything like this been considered, discussed, implemented? Do others agree that it would be useful? Any ideas on a good way to approach this?Gabe SidlerSoftware Consulting, Eivycom GmbH, Zurich, SwitzerlandGary Johnston wrote:> > Thanks for your response, Ted. Yes, I see that inheritance can be used to capture the> common code to validate the user's login status and branch ("goto") accordingly. But> I'm thinking of reuse in terms of components at a higher level than classes and> inheritance.> > I'd like to be able to reuse the whole login *sequence* (which is probably at least 1> JSP, which has the userid/password fields, and a subsequent action, which validates the> userid/password). Other subsequences I might like to define and use might be much more> extensive. I'd like to be able to invoke a subsequence such that when it completes the> application picks up just after where it was when the subsequence was invoked.> Semantically, I'd like to be able to "call" a subsequence, rather than simply doing a> "goto" to its first element (page, action). The problem is that forwards are,> essentially, "goto"s. What I really want is some general mechanism that gives me the> ability to "call" a subsequence such that when it completes ("returns") my application> continues on from right after where I invoked it.> > Using your example code, let's say I've built a subclass that displays the user's bank> account balance. If the user were already logged on then the subclass would,> presumably, retrieve the user's account balance and return a forward to a JSP that would> display it. If the user were *not* logged on, however, then a forward to the logon page> is returned. But because this is just a "goto", my subclass action has no way to> specify that control should return to i
Re: multi form pages
Has anyone tried embedding a form within a form. In which case when the embedded form is submitted only parms within the form would be submitted, and when the outer form is submitted would it include all parms including those within it's embedded forms. I haven't tried this, but I would be interested in hearing if others have (or if it's even possible). Some of my designs might use this approach (but then again I might redesign them a different way if it's too convoluted). Michelle >From: [EMAIL PROTECTED] >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Re: multi form pages >Date: 26 Sep 2001 07:44:57 -0700 > >What you are asking is really an HTML question. I don't believe you will >have any problem with multiple forms on a single page. However, I do >believe that only the parameters of the submitted form will be sent to the >server. > >I've never tried this and am willing to be corrected by anyone who knows >for certain! > >On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > > > > > > > > > > > > > class=636530314-26092001>There's been quite a bit of discussion on the >list > > about multi-page forms, but nothing on multi-form > > pages. > > > > face=Arial>D > class=636530314-26092001>oes anyone know if a single jsp > class=636530314-26092001> can contain more than one form > > section that reference >different > > ActionForm objects? > > TIA. > > size=2> > face=Arial> > > class=636530314-26092001>JohnH > > > class=636530314-26092001> > > > class=636530314-26092001> > >-- >Steven Valin >[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Using
Yes, I have. At least I think I've made it properly. I've added the property in a file called StrutsApplicationResources.properties and added the file as an input parameter to the action servlet ... application web.resources.StrutsApplicationResources ... Is there any easy way I can see if I've made some mistake regarding the message resources file? //Anna --- 鬼頭K <[EMAIL PROTECTED]> wrote: > Had you added > error.company.updatecollision=Your Error Message > in the > WEB-INF/Classes/ApplicationResources.properties file > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, September 26, 2001 9:59 PM > Subject: RE: Using > > > > Is the "error.company.updatecollision" defined in > the > > ApplicationResources.properties > > files in the Web-inf/classes/ repertory ? > > > > -Message d'origine- > > De: Anna Englund > [mailto:[EMAIL PROTECTED]] > > Date: mercredi 26 septembre 2001 15:55 > > À: [EMAIL PROTECTED] > > Objet: Using > > > > > > Hi, > > > > I'm new with Struts and have a question on how to > > display error messages. > > > > In my Action I detect an error and take the > following > > actions: > > - Create an ArrayErrors object, errors > > - Add a new ArrayError to errors > > - Save errors in request > > - Retrieves the messages with in my > jsp > > > > ... > > ActionErrors errors = new ActionErrors(); > > errors.add(ActionErrors.GLOBAL_ERROR, > > new ActionError("error.company.updatecollision")); > > saveErrors(request, errors); > > ... > > > > The problem I'm having is that the error message > is > > never displayed. I've added a java snippet in my > jsp > > that retrieves all attributes from the request and > > there I can find the bean > > org.apache.struts.action.ERROR which has a > property > > named org.apache.struts.action.GLOBAL_ERROR. > > > > I have no idea what I have done wrong. Any help > would > > be greatly appreciated. > > //Anna > > > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant > messaging with Yahoo! > Messenger. > > http://im.yahoo.com > > > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Select Params not getting pre-set.
I have an issue where I am trying to have an HTML page re-running a query over and over again. The first time the page comes up, I want to pre-set all of the select fields. I am having a problem, where the first time, all of them get set except for one. See the following code for example: In this case, the "months property" fills up with the correct data that I pull from the Form. But, the "rptParams.startMonth" does not. NOTE, this only happens the first time, Each subsequent time, both fields fill up correctly. Fyi, this RptParams object gets pre-filled with data in the Form class constructor. Any help would be much appreciated. Here is the Action Class Code: (this code runs every time regardless of first time or subsequent times) Again, every fields seems to pre-set except for RptParams fields. PendingCircuitsForm pcForm = (PendingCircuitsForm) form; // Retreive and Set all Report Paramaters pcForm.setMonths(ReportsUtil.getMonthList()); pcForm.setRptParams(pcForm.getRptParams()); String startDate = pcForm.getRptParams().getStartMonth(); System.out.println("startDate is " + startDate); *** THIS PRINTS OUT FINE PROVING THAT THE DATA EXISTS BEFORE FORWARDING TO JSP request.getSession().setAttribute("pendingCircuitsForm", pcForm); Thanks!!
Re: Using
Yes, I am. I use a lot of the other html tags, such as without problem. //Anna --- Jonathan M Crater <[EMAIL PROTECTED]> wrote: > are you declaring the html tag library before you > try to use the errors tag? > > <%@ taglib uri="/WEB-INF/struts-html.tld" > prefix="html" %> > > Anna Englund wrote: > > > Hi, > > > > I'm new with Struts and have a question on how to > > display error messages. > > > > In my Action I detect an error and take the > following > > actions: > > - Create an ArrayErrors object, errors > > - Add a new ArrayError to errors > > - Save errors in request > > - Retrieves the messages with in my > jsp > > > > ... > > ActionErrors errors = new ActionErrors(); > > errors.add(ActionErrors.GLOBAL_ERROR, > > new > ActionError("error.company.updatecollision")); > > saveErrors(request, errors); > > ... > > > > The problem I'm having is that the error message > is > > never displayed. I've added a java snippet in my > jsp > > that retrieves all attributes from the request and > > there I can find the bean > > org.apache.struts.action.ERROR which has a > property > > named org.apache.struts.action.GLOBAL_ERROR. > > > > I have no idea what I have done wrong. Any help > would > > be greatly appreciated. > > //Anna > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant > messaging with Yahoo! Messenger. http://im.yahoo.com > > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Reusable/composable Struts components?
Gabe, I absolutely agree. I was mentally coming at it from the bottom up: How do I get a good, general reuse mechanism working at all? If/when that is figured out, immediately all the other issues you mention need to be addressed in order to have a real, usable solution. I'd love to find out if/how folks in the Struts community address this. My fear is that what most folks currently do at this level is mostly ad hoc and/or "cut and paste" reuse. - Gary ___ Gary Johnston WebSphere Enterprise RAD Development Application & Integration Middleware Division IBM Software Group, Research Triangle Park, NC 919-254-0027, fax 919-254-4914, IBM tieline 444-0027 Gabriel Sidler <[EMAIL PROTECTED]> 09/26/2001 01:35 AM Please respond to struts-user To: [EMAIL PROTECTED] cc: Subject: Re: Reusable/composable Struts components? Gary, Ted, I have a very similar need. I have Struts application components that I'd like to reuse/share with others (e.g. user profile manager, adminisration tools, login, dynamic toolbar, calendar etc.) A reusable component typically consists of: - several Action classes - several ActionForm classes - several JSPs - other classes - other resources, for example, property files - some configuration code in struts-config.xml Gary, in your post you address the issue of control flow. I see some more issues: How can I package such a reusable component, transport it and make it easy for others to add it to their application? - What is a suitable file structure? - Upon installation: How is the configuration of the reusable component merged with the configuration of the main application? - How do I document such a reusable component. I think it would be a big plus for Struts to support such a concept of reusable components. Being able to easily exchange application components would give the community a boost. Has anything like this been considered, discussed, implemented? Do others agree that it would be useful? Any ideas on a good way to approach this? Gabe Sidler Software Consulting, Eivycom GmbH, Zurich, Switzerland Gary Johnston wrote: > > Thanks for your response, Ted. Yes, I see that inheritance can be used to capture the > common code to validate the user's login status and branch ("goto") accordingly. But > I'm thinking of reuse in terms of components at a higher level than classes and > inheritance. > > I'd like to be able to reuse the whole login *sequence* (which is probably at least 1 > JSP, which has the userid/password fields, and a subsequent action, which validates the > userid/password). Other subsequences I might like to define and use might be much more > extensive. I'd like to be able to invoke a subsequence such that when it completes the > application picks up just after where it was when the subsequence was invoked. > Semantically, I'd like to be able to "call" a subsequence, rather than simply doing a > "goto" to its first element (page, action). The problem is that forwards are, > essentially, "goto"s. What I really want is some general mechanism that gives me the > ability to "call" a subsequence such that when it completes ("returns") my application > continues on from right after where I invoked it. > > Using your example code, let's say I've built a subclass that displays the user's bank > account balance. If the user were already logged on then the subclass would, > presumably, retrieve the user's account balance and return a forward to a JSP that would > display it. If the user were *not* logged on, however, then a forward to the logon page > is returned. But because this is just a "goto", my subclass action has no way to > specify that control should return to it after the logon subsequence completes. Put > another way, when coding the last action of my logon subsequence, there's no way to > specify a "return". I have to return a forward that, again, is essentially a goto. > > This could be solved in an ad hoc manner for any specific situation, of course. For > example, I could code the ancestor "check logon" class such that if the user were not > logged on it would, just before returning a forward to the logon page, put a parameter > in the session that specifies the class (the currently executing subclass of the "check > logon" class) that the logon subsequence should forward to when it completes. Then, the > last action of the logon subsequence would check for this parameter and, if present, > dynamically build and return a forward to it. Then, my subclass would get control back, > it would notice that the user was logged on, and go its merry way. > > The question is, has anyone tried to generalize this kind of approach (or some other > approach that achieves the same goal)? A general solution would have to involve a stack > somewhere. Where should it be kept? What is really pushed? How are subsequences > defined and i
Re: multi form pages
What you are asking is really an HTML question. I don't believe you will have any problem with multiple forms on a single page. However, I do believe that only the parameters of the submitted form will be sent to the server. I've never tried this and am willing to be corrected by anyone who knows for certain! On Wed, 26 September 2001, "Hogan, John" wrote: > > > > > > > > > class=636530314-26092001>There's been quite a bit of discussion on the list > about multi-page forms, but nothing on multi-form > pages. > > D class=636530314-26092001>oes anyone know if a single jsp class=636530314-26092001> can contain more than one form > section that reference different > ActionForm objects? > TIA. > face=Arial> > JohnH > class=636530314-26092001> > class=636530314-26092001> -- Steven Valin [EMAIL PROTECTED]
Re: multi form pages
I don't see why not. Each form is an entity on to itself At 10:10 AM 9/26/01 -0400, you wrote: There's been quite a bit of discussion on the list about multi-page forms, but nothing on multi-form pages. Does anyone know if a single jsp can contain more than one form section that reference different ActionForm objects? TIA. JohnH
RE: Using
You're right. Apologies to Jonathan M Crater -Message d'origine- De: David Winterfeldt [mailto:[EMAIL PROTECTED]] Date: mercredi 26 septembre 2001 16:11 À: [EMAIL PROTECTED] Objet: RE: Using If you don't declare the taglib at the top of the JSP, you won't get any error message because the JSP compiler will assume it is just some normal markup it doensn't have to deal with so it ignores it. If the 'foo' tag isn't defined in the html tag library, then when you tried to call html:foo you would get an undefined error message. David --- [EMAIL PROTECTED] wrote: > If she hadn't declare the struts-html.tld, she > should have a struts error > message > like "html tag is not defined" > > -Message d'origine- > De: Jonathan M Crater > [mailto:[EMAIL PROTECTED]] > Date: mercredi 26 septembre 2001 15:58 > À: [EMAIL PROTECTED] > Objet: Re: Using > > > are you declaring the html tag library before you > try to use the errors tag? > > <%@ taglib uri="/WEB-INF/struts-html.tld" > prefix="html" %> > > Anna Englund wrote: > > > Hi, > > > > I'm new with Struts and have a question on how to > > display error messages. > > > > In my Action I detect an error and take the > following > > actions: > > - Create an ArrayErrors object, errors > > - Add a new ArrayError to errors > > - Save errors in request > > - Retrieves the messages with in my > jsp > > > > ... > > ActionErrors errors = new ActionErrors(); > > errors.add(ActionErrors.GLOBAL_ERROR, > > new > ActionError("error.company.updatecollision")); > > saveErrors(request, errors); > > ... > > > > The problem I'm having is that the error message > is > > never displayed. I've added a java snippet in my > jsp > > that retrieves all attributes from the request and > > there I can find the bean > > org.apache.struts.action.ERROR which has a > property > > named org.apache.struts.action.GLOBAL_ERROR. > > > > I have no idea what I have done wrong. Any help > would > > be greatly appreciated. > > //Anna > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant > messaging with Yahoo! > Messenger. http://im.yahoo.com > > > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Using
not true. i just created a jsp page with without declaring the tag library. the source code of the generated jsp looks like this: [EMAIL PROTECTED] wrote: > If she hadn't declare the struts-html.tld, she should have a struts error > message > like "html tag is not defined" > > -Message d'origine- > De: Jonathan M Crater [mailto:[EMAIL PROTECTED]] > Date: mercredi 26 septembre 2001 15:58 > À: [EMAIL PROTECTED] > Objet: Re: Using > > are you declaring the html tag library before you try to use the errors tag? > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > Anna Englund wrote: > > > Hi, > > > > I'm new with Struts and have a question on how to > > display error messages. > > > > In my Action I detect an error and take the following > > actions: > > - Create an ArrayErrors object, errors > > - Add a new ArrayError to errors > > - Save errors in request > > - Retrieves the messages with in my jsp > > > > ... > > ActionErrors errors = new ActionErrors(); > > errors.add(ActionErrors.GLOBAL_ERROR, > > new ActionError("error.company.updatecollision")); > > saveErrors(request, errors); > > ... > > > > The problem I'm having is that the error message is > > never displayed. I've added a java snippet in my jsp > > that retrieves all attributes from the request and > > there I can find the bean > > org.apache.struts.action.ERROR which has a property > > named org.apache.struts.action.GLOBAL_ERROR. > > > > I have no idea what I have done wrong. Any help would > > be greatly appreciated. > > //Anna > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant messaging with Yahoo! > Messenger. http://im.yahoo.com
multi form pages
There's been quite a bit of discussion on the list about multi-page forms, but nothing on multi-form pages. Does anyone know if a single jsp can contain more than one form section that reference different ActionForm objects? TIA. JohnH
RE: Using
If you don't declare the taglib at the top of the JSP, you won't get any error message because the JSP compiler will assume it is just some normal markup it doensn't have to deal with so it ignores it. If the 'foo' tag isn't defined in the html tag library, then when you tried to call html:foo you would get an undefined error message. David --- [EMAIL PROTECTED] wrote: > If she hadn't declare the struts-html.tld, she > should have a struts error > message > like "html tag is not defined" > > -Message d'origine- > De: Jonathan M Crater > [mailto:[EMAIL PROTECTED]] > Date: mercredi 26 septembre 2001 15:58 > À: [EMAIL PROTECTED] > Objet: Re: Using > > > are you declaring the html tag library before you > try to use the errors tag? > > <%@ taglib uri="/WEB-INF/struts-html.tld" > prefix="html" %> > > Anna Englund wrote: > > > Hi, > > > > I'm new with Struts and have a question on how to > > display error messages. > > > > In my Action I detect an error and take the > following > > actions: > > - Create an ArrayErrors object, errors > > - Add a new ArrayError to errors > > - Save errors in request > > - Retrieves the messages with in my > jsp > > > > ... > > ActionErrors errors = new ActionErrors(); > > errors.add(ActionErrors.GLOBAL_ERROR, > > new > ActionError("error.company.updatecollision")); > > saveErrors(request, errors); > > ... > > > > The problem I'm having is that the error message > is > > never displayed. I've added a java snippet in my > jsp > > that retrieves all attributes from the request and > > there I can find the bean > > org.apache.struts.action.ERROR which has a > property > > named org.apache.struts.action.GLOBAL_ERROR. > > > > I have no idea what I have done wrong. Any help > would > > be greatly appreciated. > > //Anna > > > > __ > > Do You Yahoo!? > > Get email alerts & NEW webcam video instant > messaging with Yahoo! > Messenger. http://im.yahoo.com > > > __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Using
Had you added error.company.updatecollision=Your Error Message in the WEB-INF/Classes/ApplicationResources.properties file - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 9:59 PM Subject: RE: Using > Is the "error.company.updatecollision" defined in the > ApplicationResources.properties > files in the Web-inf/classes/ repertory ? > > -Message d'origine- > De: Anna Englund [mailto:[EMAIL PROTECTED]] > Date: mercredi 26 septembre 2001 15:55 > À: [EMAIL PROTECTED] > Objet: Using > > > Hi, > > I'm new with Struts and have a question on how to > display error messages. > > In my Action I detect an error and take the following > actions: > - Create an ArrayErrors object, errors > - Add a new ArrayError to errors > - Save errors in request > - Retrieves the messages with in my jsp > > ... > ActionErrors errors = new ActionErrors(); > errors.add(ActionErrors.GLOBAL_ERROR, > new ActionError("error.company.updatecollision")); > saveErrors(request, errors); > ... > > The problem I'm having is that the error message is > never displayed. I've added a java snippet in my jsp > that retrieves all attributes from the request and > there I can find the bean > org.apache.struts.action.ERROR which has a property > named org.apache.struts.action.GLOBAL_ERROR. > > I have no idea what I have done wrong. Any help would > be greatly appreciated. > //Anna > > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. > http://im.yahoo.com >
RE: Using
If she hadn't declare the struts-html.tld, she should have a struts error message like "html tag is not defined" -Message d'origine- De: Jonathan M Crater [mailto:[EMAIL PROTECTED]] Date: mercredi 26 septembre 2001 15:58 À: [EMAIL PROTECTED] Objet: Re: Using are you declaring the html tag library before you try to use the errors tag? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Anna Englund wrote: > Hi, > > I'm new with Struts and have a question on how to > display error messages. > > In my Action I detect an error and take the following > actions: > - Create an ArrayErrors object, errors > - Add a new ArrayError to errors > - Save errors in request > - Retrieves the messages with in my jsp > > ... > ActionErrors errors = new ActionErrors(); > errors.add(ActionErrors.GLOBAL_ERROR, > new ActionError("error.company.updatecollision")); > saveErrors(request, errors); > ... > > The problem I'm having is that the error message is > never displayed. I've added a java snippet in my jsp > that retrieves all attributes from the request and > there I can find the bean > org.apache.struts.action.ERROR which has a property > named org.apache.struts.action.GLOBAL_ERROR. > > I have no idea what I have done wrong. Any help would > be greatly appreciated. > //Anna > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
RE: Using
Is the "error.company.updatecollision" defined in the ApplicationResources.properties files in the Web-inf/classes/ repertory ? -Message d'origine- De: Anna Englund [mailto:[EMAIL PROTECTED]] Date: mercredi 26 septembre 2001 15:55 À: [EMAIL PROTECTED] Objet: Using Hi, I'm new with Struts and have a question on how to display error messages. In my Action I detect an error and take the following actions: - Create an ArrayErrors object, errors - Add a new ArrayError to errors - Save errors in request - Retrieves the messages with in my jsp ... ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.company.updatecollision")); saveErrors(request, errors); ... The problem I'm having is that the error message is never displayed. I've added a java snippet in my jsp that retrieves all attributes from the request and there I can find the bean org.apache.struts.action.ERROR which has a property named org.apache.struts.action.GLOBAL_ERROR. I have no idea what I have done wrong. Any help would be greatly appreciated. //Anna __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
Re: Using
are you declaring the html tag library before you try to use the errors tag? <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> Anna Englund wrote: > Hi, > > I'm new with Struts and have a question on how to > display error messages. > > In my Action I detect an error and take the following > actions: > - Create an ArrayErrors object, errors > - Add a new ArrayError to errors > - Save errors in request > - Retrieves the messages with in my jsp > > ... > ActionErrors errors = new ActionErrors(); > errors.add(ActionErrors.GLOBAL_ERROR, > new ActionError("error.company.updatecollision")); > saveErrors(request, errors); > ... > > The problem I'm having is that the error message is > never displayed. I've added a java snippet in my jsp > that retrieves all attributes from the request and > there I can find the bean > org.apache.struts.action.ERROR which has a property > named org.apache.struts.action.GLOBAL_ERROR. > > I have no idea what I have done wrong. Any help would > be greatly appreciated. > //Anna > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. >http://im.yahoo.com
Using
Hi, I'm new with Struts and have a question on how to display error messages. In my Action I detect an error and take the following actions: - Create an ArrayErrors object, errors - Add a new ArrayError to errors - Save errors in request - Retrieves the messages with in my jsp ... ActionErrors errors = new ActionErrors(); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.company.updatecollision")); saveErrors(request, errors); ... The problem I'm having is that the error message is never displayed. I've added a java snippet in my jsp that retrieves all attributes from the request and there I can find the bean org.apache.struts.action.ERROR which has a property named org.apache.struts.action.GLOBAL_ERROR. I have no idea what I have done wrong. Any help would be greatly appreciated. //Anna __ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com
RE: Display JSPs based on language/country/variant
Title: RE: Display JSPs based on language/country/variant You can support this by using tiles. This framework supports a concept called definition that can be localized. It also supports forwarding struts actions to these definitions. Write an action that forwards the request to a definition corresponding to the requested jsp. If there is no definition just forward to the requested jsp. The limitation is that all your jsps should be accessed through this action. So, instead of using xxx.jsp, you would use /jspForward.do?jsp=type.jsp. You need to provide definitions for each jsp in the jspForward action as type="ForwardJspAction"> This is just my understanding and not sure if this is the intended usage, you will get more information at http://www.geocities.com/cedricdumoulin/tiles/. -Padma -Original Message- From: Jolly, Gautam [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 5:03 PM To: '[EMAIL PROTECTED] ' Subject: Display JSPs based on language/country/variant Requirement - suppose the servlet-container is asked to present 'abc.jsp', it should serve the very first jsp that meets the following lookup sequence: abc___.jsp abc__.jsp abc_.jsp abc___.jsp abc__.jsp abc_.jsp abc.jsp Is it possible to do it declaratively in tomcat (or any other container), or is this something that needs to be coded ?? Any help is appreciated. Gautam
Re: link with dynamic page attribute
I'm not sure I understand your recent email. But given your original example (non working): "/> You can do: Will - Original Message - From: "chiji nwankwo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 7:24 AM Subject: Re: link with dynamic page attribute Hi, Im in a bit of dilema, I understand Ted's last statement. But what I don't understand is what I should do if the parameters which are used by the html:link (forward) tag are generated on the fly. I can't hard code all the forwards in my config file because I don't know how may parameters there will be in advance. Since I don't know the amount parameters in advance I can't specify which form bean each of the actions with, appended parameter values, should use. This is what my problem looks like: in config file: in jsp file: when I use: it works fine and think this is because of the mapping in the config file. I would want the forward to 'search' (/do/search) as well as the forward to 'search' and it parameters (/do/search?pageNumber=1) to use the same form bean. I hope this makes sense. I am in dire need of assistance. Thanks Chiji > >Nesting custom tags that way is not allowed by the specification. > >The html:link tag has special properties for assembling hyperlinks from >other beans. It can also accept a map when multiple parameters are >needed. > >http://jakarta.apache.org/struts/struts-html.html#link > >Personally, I avoid using the page= property, and like to use only >forward= instead. That way everything is documented in the configuration >file. > >-- Ted Husted, Husted dot Com, Fairport NY USA. >-- Custom Software ~ Technical Services. >-- Tel +1 716 737-3463 >-- http://www.husted.com/about/struts/ > > > >Antonio Lourinho wrote: > > > > Hi, > > > > i'm new to Struts and i'm already working on a project that takes >advantage > > of it. > > > > The problem is: i'm trying to put a link, and the page attribute depends > > upon the value of a bean defined by an iterate tag. > > > > something like: > > > > > >page="/ServiceReport.do?operation=delete&operationActivityId= > ty name="activity" property="id"/>"/> > > > > the error is: > > > > org.apache.jasper.compiler.ParseException: > > C:\Dev\Projectos\ControloHoras\web_app\ServiceReport.jsp(171,115) >Attribute > > activity has no value > > > > Does anybody have a clue? > > > > Antonio - Portugal _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
can you please remove me from the list !
>From: §õ¦Vºa <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: <[EMAIL PROTECTED]> >Subject: RE: Deployment Problem in iPlanet using Strut Example !! >Date: Wed, 26 Sep 2001 17:41:23 +0800 > >Thank you, trish > >But since me pass the javac problem, I still couldn't get it work. >There are showing some message list below : > >[26/¤E¤ë/2001 17:37:17:7] info: -- >[26/¤E¤ë/2001 17:37:17:7] info: action: init >[26/¤E¤ë/2001 17:37:17:7] info: -- >[26/¤E¤ë/2001 17:37:18:0] info: -- >[26/¤E¤ë/2001 17:37:18:0] info: action: null >[26/¤E¤ë/2001 17:37:18:0] info: -- >[26/¤E¤ë/2001 17:37:19:8] error: Exception: SERVLET-execution_failed: Error >in executing servlet upl >oad: java.lang.IllegalAccessError: try to access class >org.apache.struts.action.AddDataSourceRule fr >om class org.apache.struts.action.ActionServlet >Exception Stack Trace: >java.lang.IllegalAccessError: try to access class >org.apache.struts.action.AddDataSourceRule from cl >ass org.apache.struts.action.ActionServlet > at >org.apache.struts.action.ActionServlet.initDigester(ActionServlet.java:1133) > at >org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1322) > at >org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) > at javax.servlet.GenericServlet.init(GenericServlet.java:258) > at >com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unknown >Source) > at >com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(Unknown >Source >) > at >com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown >Source) > > at >com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Unknown >Source) > at >com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Unknown >Source) > at >com.netscape.server.servlet.servletrunner.AppInfo.(Unknown Source) > at >com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown >Source) > at >com.netscape.server.servlet.servletrunner.ServletRunner.getAppInfo(Unknown >Source) > at >com.netscape.server.servlet.servletrunner.ServletRunner.execute(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) > >[26/¤E¤ë/2001 17:37:20:3] error: APPLOGIC-caught_exception: Caught >Exception: >java.lang.ClassCastException: java.lang.IllegalAccessError > at >com.netscape.server.servlet.servletrunner.ServletRunner.reportError(Unknown >Source) > at >com.netscape.server.servlet.servletrunner.ServletRunner.execute(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) > >What is it suppose means ? Is any access policy over there in Struts ? > >Regards >Frankie Lee >System Services/Project Manager >Mercuries Data Systems Ltd. >3F, 2, 150 Lane, Sec.5, Hsin I Rd., Taipei, Taiwan, R.O.C. >TEL: +886-2-27225333 ext.390 >FAX: +886-2-27222330 >MOBILE:+886-952994950 > >-Original Message- >From: Tricia Ong Cheah Yen [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, September 25, 2001 7:16 PM >To: [EMAIL PROTECTED] >Subject: RE: Deployment Problem in iPlanet using Strut Example !! > > >Frankie, > > you got to specify the the path of ur struts.jar in iPlanet's >java configuration file. So, in your jvm12.config, add in this line > > >jvm.classpath=C:/iPlanet/Servers/docs/YourWebApp/WEB-INF/lib/struts.jar > > however, if u are using iPlanet 6 with Service Pack 1, you do >not have to specify the classpath. > >+trish >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, September 25, 2001 6:41 PM >To: Struts-User >Subject: Deployment Problem in iPlanet using Strut Example !! > > >Hello, all, > >I have searched the mailing archive for this problem, there are someone >post the same issue but no answer. >Hope someome have the solution already that would share for me. >I have got some problems, here is the problems that I occur : > >1. javac couldn't find /WEB-INF/lib/struts.jar, unless I uncompress >struts.jar into /WEB/INF/classes. >2. SERVLET-execution_failed: Error in executing servlet action: >java.lang.IllegalAccessError: > try to access class org.apache.struts.action.AddDataSourceRule >from class org.apache.struts.action.ActionServlet > >Regards >Frankie _ Get your FREE download of MSN Ex
Re: populating a form bean without using a submit button
Hi David/Chiji, I have used this solution to my problem and works fine. Basically, the difference is that instead of calling the jsp page in a success, I´m forwarding the same action (listCalsses.do). Sure, I had also to control the flow (forwards) in my action class. If you need more example, I can send you. Rogerio Zamboim System Analyst - dotIP Project CPqD - Telecom & IT Solutions - Brasil "David M. Karr" wrote: > > "chiji" == chiji nwankwo <[EMAIL PROTECTED]> writes: > > chiji> Hi, > > chiji> Is it possible to populate a form bean without using the submit button to >post the form. I am using the link tag to forward > chiji> the user from one page to another, but at the same time I would like the >contents of the form to be sent to the Action form > chiji> class. > > chiji> I do not know if what I am trying to do is actually possible but if it is >please let me know how it can be done or at least > chiji> where I can start looking for examples that implements this. > > chiji> Thank you very much in advance. > > I believe I have a similar problem, although it's possible I'm suffering from > architectural confusion. I have a link on a main page, like this: > >List Classes > > I have a "" like this: > > type="com.intsoft.sgs.web.forms.ListClassesForm"/> > > And my "" is this: > > type="com.intsoft.sgs.web.actions.ListClassesAction" > name="listClassesForm" scope="request"> > > > > An excerpt from "/class/listClasses.jsp": > > property="allClasses" >id="klass" >type="com.intsoft.sgs.web.dao.ClassDAO"> > abc > > > But when I try to run the app, I get in the browser: > > javax.servlet.ServletException: Cannot find bean listClassesForm in scope null > at >org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) > > I'm sure I have something basically wrong, but I don't see it. You may have a > similar problem. > > -- > === > David M. Karr ; Best Consulting > [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
Re: New struts site!
Looks ok, except for message from the CEO!!! -- Peter Pilgrim | |++44 (0)207-545-9923 \ \ ___ / / ... . - ( * ) --- -- _Cafe_Savannah,_San Antonio,Ibiza__ Message History From: "Jeff Patterson" <[EMAIL PROTECTED]> on 25/09/2001 18:53 EST Please respond to [EMAIL PROTECTED] To: <[EMAIL PROTECTED]> cc: Subject: New struts site! Check out our new site done totally with struts! www.vectren.com -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Re: [Newbie] Display multiple error messages in a list
If it aint broke, why fix it? -- Peter Pilgrim | |++44 (0)207-545-9923 \ \ ___ / / ... . - ( * ) --- -- _Cafe_Savannah,_San Antonio,Ibiza__ -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Re: link with dynamic page attribute
Hi, Im in a bit of dilema, I understand Ted's last statement. But what I don't understand is what I should do if the parameters which are used by the html:link (forward) tag are generated on the fly. I can't hard code all the forwards in my config file because I don't know how may parameters there will be in advance. Since I don't know the amount parameters in advance I can't specify which form bean each of the actions with, appended parameter values, should use. This is what my problem looks like: in config file: in jsp file: when I use: it works fine and think this is because of the mapping in the config file. I would want the forward to 'search' (/do/search) as well as the forward to 'search' and it parameters (/do/search?pageNumber=1) to use the same form bean. I hope this makes sense. I am in dire need of assistance. Thanks Chiji > >Nesting custom tags that way is not allowed by the specification. > >The html:link tag has special properties for assembling hyperlinks from >other beans. It can also accept a map when multiple parameters are >needed. > >http://jakarta.apache.org/struts/struts-html.html#link > >Personally, I avoid using the page= property, and like to use only >forward= instead. That way everything is documented in the configuration >file. > >-- Ted Husted, Husted dot Com, Fairport NY USA. >-- Custom Software ~ Technical Services. >-- Tel +1 716 737-3463 >-- http://www.husted.com/about/struts/ > > > >Antonio Lourinho wrote: > > > > Hi, > > > > i'm new to Struts and i'm already working on a project that takes >advantage > > of it. > > > > The problem is: i'm trying to put a link, and the page attribute depends > > upon the value of a bean defined by an iterate tag. > > > > something like: > > > > > >page="/ServiceReport.do?operation=delete&operationActivityId= > ty name="activity" property="id"/>"/> > > > > the error is: > > > > org.apache.jasper.compiler.ParseException: > > C:\Dev\Projectos\ControloHoras\web_app\ServiceReport.jsp(171,115) >Attribute > > activity has no value > > > > Does anybody have a clue? > > > > Antonio - Portugal _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Difficulty to integrate struts validator
Hi I developed a struts application (jakarta-tomcat-3.2.1, struts 1.0). So far, everything runs well. Then, I integrated the Struts Validator by David Winterfeldt (version 0.5). From now on, I get the following error as soon as I call a page whith field, which should be validated. Is there something wrong whith the validator, did I miss to download some files or is there something important, which I missed when I integrated it to my application? For the struts validator, I am using Struts_Validator-20010308.jar and jakarta-regexp-1.2.jar. FYI: I am able to run the example application "struts-validator-example", but I don't get my own application work together with the struts validator. Any tips how I can solve my problem ? Marcel Included servlet error: 500 Location: /kosa/kosa/jsp/edit.jsp Error Location: /kosa/kosa/jsp/edit1.jspInternal Servlet Error:javax.servlet.ServletException: org/apache/regexp/RESyntaxException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at kosa.jsp._0002fkosa_0002fjsp_0002fedit_0002ejspedit_jsp_0._jspService(_0002fkosa_0002fjsp_0002fedit_0002ejspedit_jsp_0.java:288) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Root cause: javax.servlet.jsp.JspException: org/apache/regexp/RESyntaxException at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:149) at kosa.jsp._0002fkosa_0002fjsp_0002fedit_0002ejspedit_jsp_0._jspService(_0002fkosa_0002fjsp_0002fedit_0002ejspedit_jsp_0.java:266) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484)
RE: Deployment Problem in iPlanet using Strut Example !!
Thank you, trish But since me pass the javac problem, I still couldn't get it work. There are showing some message list below : [26/¤E¤ë/2001 17:37:17:7] info: -- [26/¤E¤ë/2001 17:37:17:7] info: action: init [26/¤E¤ë/2001 17:37:17:7] info: -- [26/¤E¤ë/2001 17:37:18:0] info: -- [26/¤E¤ë/2001 17:37:18:0] info: action: null [26/¤E¤ë/2001 17:37:18:0] info: -- [26/¤E¤ë/2001 17:37:19:8] error: Exception: SERVLET-execution_failed: Error in executing servlet upl oad: java.lang.IllegalAccessError: try to access class org.apache.struts.action.AddDataSourceRule fr om class org.apache.struts.action.ActionServlet Exception Stack Trace: java.lang.IllegalAccessError: try to access class org.apache.struts.action.AddDataSourceRule from cl ass org.apache.struts.action.ActionServlet at org.apache.struts.action.ActionServlet.initDigester(ActionServlet.java:1133) at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1322) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:465) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(Unknown Source ) at com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Unknown Source) at com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Unknown Source) at com.netscape.server.servlet.servletrunner.AppInfo.(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.getAppInfo(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(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) [26/¤E¤ë/2001 17:37:20:3] error: APPLOGIC-caught_exception: Caught Exception: java.lang.ClassCastException: java.lang.IllegalAccessError at com.netscape.server.servlet.servletrunner.ServletRunner.reportError(Unknown Source) at com.netscape.server.servlet.servletrunner.ServletRunner.execute(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) What is it suppose means ? Is any access policy over there in Struts ? Regards Frankie Lee System Services/Project Manager Mercuries Data Systems Ltd. 3F, 2, 150 Lane, Sec.5, Hsin I Rd., Taipei, Taiwan, R.O.C. TEL: +886-2-27225333 ext.390 FAX: +886-2-27222330 MOBILE:+886-952994950 -Original Message- From: Tricia Ong Cheah Yen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 7:16 PM To: [EMAIL PROTECTED] Subject: RE: Deployment Problem in iPlanet using Strut Example !! Frankie, you got to specify the the path of ur struts.jar in iPlanet's java configuration file. So, in your jvm12.config, add in this line jvm.classpath=C:/iPlanet/Servers/docs/YourWebApp/WEB-INF/lib/struts.jar however, if u are using iPlanet 6 with Service Pack 1, you do not have to specify the classpath. +trish -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 6:41 PM To: Struts-User Subject: Deployment Problem in iPlanet using Strut Example !! Hello, all, I have searched the mailing archive for this problem, there are someone post the same issue but no answer. Hope someome have the solution already that would share for me. I have got some problems, here is the problems that I occur : 1. javac couldn't find /WEB-INF/lib/struts.jar, unless I uncompress struts.jar into /WEB/INF/classes. 2. SERVLET-execution_failed: Error in executing servlet action: java.lang.IllegalAccessError: try to access class org.apache.struts.action.AddDataSourceRule from class org.apache.struts.action.ActionServlet Regards Frankie
"rewrite"?
Hi list, Can anyone explain what the following exception in Tomcat means...? "Parse Error at line 138 column 50: Element type "rewrite" must be declared. org.xml.sax.SAXParseException: Element type "rewrite" must be declared." TIA best regards,
Re: JSP is not creating and/or populating an action form? [SOLVED]
Oh! You have been a naught boy! Please take this white chalk write on the "Java" blackboard [ I MUST MAKE SURE THAT MY JAVA BEANS REALLY DO DERIVE FROM THE STRUTS ACTIONFORM CLASS IF THE ACTIONSERVLET IS TO CREATE AND INSTANTIATE THEM! ] x 10 Here is the extract of struts-config.xml ^ ... ... ... My problem occured with the "deptForm". I could not see what the problem was? I have associated, what was supposed to be, the form bean with the action as you can see above. It is quite correct. In my test "delegation.jsp" the actual "Dept" bean is created and used. I put in a default dummy value sin form actual to prove that is loaded. Now when I look at the code this morning I say it did not derive ActionForm! class Dept extends Object { String firstName="foo", lastName="bar"; getFirstName() { ... } ... } I changed the code, recompiled it: class Dept extends org.apache.struts.actions.ActionForm { String firstName="foo", lastName="bar"; getFirstName() { ... } ... } It worked as expected. Damn! -- Peter Pilgrim | |++44 (0)207-545-9923 \ \ ___ / / ... . - ( * ) --- -- _Cafe_Savannah,_San Antonio,Ibiza__ Message History From: [EMAIL PROTECTED] on 25/09/2001 10:38 MST Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: JSP is not creating and/or populating an action form? Have you ensured that your struts-config.xml is written correctly, in particular the tag parameter and the associated tag? On Tue, 25 September 2001, "Peter Pilgrim" wrote: > > JSP is not creating and/or populating an action form? > > I can associate the with the action form. > I can see the bean created by the time the JSP is generated. > However when I the form the action.perform() > method has a "form" parameter that equals null. > I look at the struts-config.xml and it looks correct to me. > How do a find out what the bug is ? Any tips, hints? > > Ta very much > -- > Peter Pilgrim | |++44 (0)207-545-9923 > \ \ ___ / / ... . > - ( * ) --- -- > _Cafe_Savannah,_San Antonio,Ibiza__ -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Grid View
Hi all, Could u guys please help me out here. What we want to do is to be able to display a list of taxpayers along with specific attributes that we can either check or uncheck using checkboxes, then submit the form and update these attributes. Has anyone got nay experience with "Grid" like views in struts? Please HHEELLPP!!! Thanx!! ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **
Antw: RE: multibox always checked
Yes, that's what I figured out at last. One more question: I notice that even objects in session scope cannot be used by different frames. When my frameset is built, the first frame contains a jsp page which is called with a parameter. This page puts the parameter in session scope. The second jsp page uses the same parameter, but it can't fetch it out of the session scope. It looks like this: frameset -- logon.jsp - <% String senderParam = request.getParameter("sender"); pageContext.setAttribute("sender", senderParam, PageContext.SESSION_SCOPE); %> index.jsp -- <% String senderParam = pageContext.getAttribute("sender", PageContext.SESSION_SCOPE); %> Why doesn't this work ? Stranger still: When I call index.jsp?sender=86 and fetch the parameter with request.getAttribute("sender") I still don't get it. This worked earlier, but now everything's messed up. Please help me. Thank you all.