RE: java.lang.ClassCastException
Hi, I have a JSP page in which I intend to generate text boxes at run time. I have written a CreateHandler class which actually returns a Collection of Collection of Collection of Form bean objects for the input box. This way I intend to map the text boxes to their corresponding Form beans. However when I try using this page I donot get the text boxes on the page. It goes blank. I found out that a java.lang.ClassCastException occurs from the Tomcat log file. Please suggest what could be the possible cause. The following is the JSP code: <%@ page import="java.util.*"%> <%@ page import="com.untd.sss.struts.*" %> <%jsp:useBean id="ch" class="com.struts.CreateHandler"/> <% Collection v2,v3,v4; Collection v = (Collection)ch.getCollectionbean(); for(Iterator i = v.iterator();i.hasNext();) { v2 =(Collection)i.next(); for(Iterator i2 = v2.iterator();i2.hasNext();) { v3 =(Collection)i2.next(); for(Iterator i3 = v3.iterator();i3.hasNext();) { v4 =(Collection)i3.next(); %> <% } } } %> The exception: java.lang.ClassCastException: com.untd.sss.struts.CreateForm at org.apache.jsp.CreateSched$jsp._jspService(CreateSched$jsp.java:121) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) Thanks, Seshadhri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Writing ActionForm(bean) class when the no of input boxes va ry at runtime
Hi, I would like to add another query. I wish to know how I can assign unique property ids to my text boxes(i.e. ) in the following code. I feel would be needing unique ids so that I can access their values through the Action Form. Please Correct me if my last statement is incorrect. This is a part of my JSP: S2 Thanks Once Again, Seshadhri Srinivasan Original Message- From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 4:22 PM To: 'Struts Users Mailing List' Cc: Balabaskaran, Kanagasabai; Kartikeya Misra Subject: RE: Writing ActionForm(bean) class when the no of input boxes va ry at runtime Hi, I am used to coding ActionForm beans to get data from a JSP page when the no. of input boxes on the page are constant. But now, I have a page wherein I use a Handler class to get the dimensions of a table and then I use the tag to create variable number of input boxes(that constitute the table) on the page. Now, for these input boxes I wish to write an ActionForm bean. The problem is when the number of input boxes can very I am not sure of how to write the get and set methods in the bean. Can some one help me in writing the Form bean for this page. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Writing ActionForm(bean) class when the no of input boxes vary at runtime
Hi, I am used to coding ActionForm beans to get data from a JSP page when the no. of input boxes on the page are constant. But now, I have a page wherein I use a Handler class to get the dimensions of a table and then I use the tag to create variable number of input boxes(that constitute the table) on the page. Now, for these input boxes I wish to write an ActionForm bean. The problem is when the number of input boxes can very I am not sure of how to write the get and set methods in the bean. Can some one help me in writing the Form bean for this page. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Html:select
Hi, Can someone help out with the usage of html:select. The API just gives the syntax ans the parameters that can be used with place. I understand that it can be used with combo boxes. I have to poulate a combo box using this. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts custom tags tutorial
Hi Steve, Let me clarify: I know some of the basic concepts of struts and I have been using things like the Action class, the Form class etc. But the point is, after having finished the work on the backend logic, I have to present my data in the form of tables on the page. Now the table dimensions, the colours used, etc. can vary based on the data generated. So I wanted to use custom Struts tags on the page where the table has to be generated and displayed. Then I want to put my code corresponding to these struts tags else where. This way the logic to display the data will not be there on the JSP page. This is my problem. I have tried to get the right tutorial for this but my search has noy yielded the right results. Can you please help me. Thanks, Seshadhri Srinivasan -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 11:50 AM To: Struts Users Mailing List Subject: RE: Struts custom tags tutorial : urgent!! I do appreciate that when you are completely new to a subject it can be difficult to know where to look. However, you'll get a much more sympathetic response if you demonstrate that you have at least tried to find things out for yourself before asking for help. Start with the Struts web site: - http://jakarta.apache.org/struts/userGuide/index.html - http://jakarta.apache.org/struts/resources/tutorials.html - http://jakarta.apache.org/struts/resources/examples.html And also try Google: - http://www.google.com/search?q=Struts+tutorial - http://www.google.com/search?q=Struts+examples Also, there are at least seven books specifically on Struts and several others that offer some coverage. Flagging your messages as URGENT!! gives the impression that you somehow think your problem is so important that others should stop what they are doing and tend to your needs. In reality, URGENT!! tends to get your message ignored. Please, don't use URGENT!! unless your house is on fire. And even then you'd probably be better off calling the fire service than emailing me :-) Steve http://www.ninsky.com/struts/ > -Original Message- > From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] > Sent: August 25, 2003 10:30 PM > To: 'Struts Users Mailing List' > Subject: RE: Struts custom tags tutorial : urgent!! > > > Hi, > I have a JSP page in which I am supposed to add content > dynamically based on > some logic. I came to know that using custom struts tags in the > jsp page can > aid in making the presentation logic modular. However I have no idea of > custom Struts tags. Can some one suggest a good tutorial to cover up this > portion as quickly as possible? > Thanks in advance > > Seshadhri Srinivasan > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts custom tags tutorial : urgent!!
Hi, I have a JSP page in which I am supposed to add content dynamically based on some logic. I came to know that using custom struts tags in the jsp page can aid in making the presentation logic modular. However I have no idea of custom Struts tags. Can some one suggest a good tutorial to cover up this portion as quickly as possible? Thanks in advance Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to configure a struts application
Hi, The following URL clearly explains how to install struts http://javaboutique.internet.com/tutorials/Struts/directories.html Seshadhri Srinivasan -Original Message- From: Nimmagadda, Ravikumar (CORP, GEITC, Contractor) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:21 AM To: Struts Users Mailing List Subject: How to configure a struts application Hi *, I am new to Struts. can any one let me know how to configure a struts application on either Tomcat4.1 or weblogic.6.x Thanks in advance. Ravi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: New Bie : org.apache.jasper.JasperException: Cannot retrieve mapping for action /login
Hi, This is my first Struts app, I have a login.jsp in which I have declared a form tag with action as login.do and I have two buttons(a login button and a browse button) on the page. I have written a form bean and an action class also. While trying to access login.jsp I get an "Internal Server Error". I have appended the struts-config.xml and the exception that I get. Kindly help me out. The following is an extract from struts-config.xml: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> The Stack trace: org.apache.jasper.JasperException: Cannot retrieve mapping for action /login at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 48) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 ) at java.lang.Thread.run(Thread.java:536) Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to add Java Script to a JSP page with struts tags
Hi Rohit, I tried doing the same but the problem persists. I have the following javascript code wherein I have used 'loginForm' for the form name as I use form tag. In the following code 'userName' is a html:text and 'password' is a html:password entity. function validate() { if(document.loginForm.userName.value=="") { alert("Please enter valid username"); document.loginForm.userName.focus(); return; } if(document.loginForm.password.value=="") { alert("Please enter the password"); document.loginForm.password.focus(); return; } } Please help Thanks, Seshadhri Srinivasan -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:26 AM To: Struts Users Mailing List Subject: RE: How to add Java Script to a JSP page with struts tags Try onclick="javascript:validate();" regards Rohit -Original Message- From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:20 AM To: 'Struts Users Mailing List' Subject: RE: How to add Java Script to a JSP page with struts tags Hi, I have created a login button using the tag. I wish to run a Java Script function validate() when this submit button is clicked. I tried using 'onclick = "validate()" ' within the html:submit tag, but it does not work. Please tell me how I can run Java Script code along with struts tags. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to add Java Script to a JSP page with struts tags
Hi Rohit, I am getting the message: "error on page" followed by a "done" on the left hand corner of the explorer. After this control simply gets forwarded to the page that I have set as "forward"(in struts-config.xml) value on "failure". That is, the java script seems to be ignored by the browser. Thanks, Seshadhri -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:43 PM To: Struts Users Mailing List Subject: RE: How to add Java Script to a JSP page with struts tags Hi Seshadhri Then you must be getting javascript error .just look at the bottom left corner of explorer & see what does it say .. Just mail me that error so that I can will tell you more ... Regards Rohit -Original Message- From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 12:02 PM To: 'Struts Users Mailing List' Subject: RE: How to add Java Script to a JSP page with struts tags Hi Rohit, I tried doing the same but the problem persists. I have the following javascript code wherein I have used 'loginForm' for the form name as I use form tag. In the following code 'userName' is a html:text and 'password' is a html:password entity. function validate() { if(document.loginForm.userName.value=="") { alert("Please enter valid username"); document.loginForm.userName.focus(); return; } if(document.loginForm.password.value=="") { alert("Please enter the password"); document.loginForm.password.focus(); return; } } Please help Thanks, Seshadhri Srinivasan -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:26 AM To: Struts Users Mailing List Subject: RE: How to add Java Script to a JSP page with struts tags Try onclick="javascript:validate();" regards Rohit -Original Message- From: Seshadhri Srinivasan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 11:20 AM To: 'Struts Users Mailing List' Subject: RE: How to add Java Script to a JSP page with struts tags Hi, I have created a login button using the tag. I wish to run a Java Script function validate() when this submit button is clicked. I tried using 'onclick = "validate()" ' within the html:submit tag, but it does not work. Please tell me how I can run Java Script code along with struts tags. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: New Bie: How to apply styles to submit buttons created with struts tags
Hi, I have a few submit buttons to which I wish to apply a style. I tried the following but I could not get the desired blue coloured buttons. LOGIN Please suggest what I should do to get blue coloured buttons. I also have the following *.css file with me. .edit { FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fff1e6 } .edit { FONT-SIZE: 8pt; FONT-FAMILY: VArial } .edita { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fff1e6 } .edit1 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fee2cd } .edit1a { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fee2cd } .edit2 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fed3b4 } .edit2a { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #fed3b4 } .edit3 { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #f6fbff } .edit3a { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #eaf3fb } .edit3b { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #d7e9f7 } .edit4 { FONT-SIZE: 8pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ff } .text { FONT-SIZE: 8pt; COLOR: #00; FONT-FAMILY: Arial } .text1 { FONT-SIZE: 8pt; COLOR: #0788de; FONT-FAMILY: Arial } .text2 { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #00; FONT-FAMILY: Arial } .text3 { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #f16917; FONT-FAMILY: Arial } .text4 { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #127fc9; FONT-FAMILY: Arial } .logintext { FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #3898d8; FONT-FAMILY: Arial } .table { BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 8pt; BORDER-LEFT-COLOR: #ff; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #ff; COLOR: #00; BORDER-TOP-COLOR: #ff; FONT-FAMILY: Arial; TEXT-ALIGN: center; BORDER-RIGHT-WIDTH: 0px; BORDER-RIGHT-COLOR: #ff } .table1 { BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 8pt; BORDER-LEFT-COLOR: #ff; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #ff; COLOR: #00; BORDER-TOP-COLOR: #ff; FONT-FAMILY: Arial; TEXT-ALIGN: center; BORDER-RIGHT-WIDTH: 0px; BORDER-RIGHT-COLOR: #ff } .buttons { FONT-WEIGHT: bold; FONT-SIZE: 9pt; WIDTH: 72px; COLOR: #ff; FONT-FAMILY: Arial; HEIGHT: 17px; BACKGROUND-COLOR: #98c8e8; TEXT-ALIGN: center } buttons2 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; WIDTH: 72px; COLOR: #0384dc; FONT-FAMILY: Arial; HEIGHT: 17px; BACKGROUND-COLOR: #d1cecd; TEXT-ALIGN: center } .buttons1 { FONT-WEIGHT: bold; FONT-SIZE: 8pt; VERTICAL-ALIGN: 15%; WIDTH: 165px; COLOR: #ff; FONT-FAMILY: Arial; HEIGHT: 17px; BACKGROUND-COLOR: #98c8e8; TEXT-ALIGN: center } Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to add Java Script to a JSP page with struts tags
Hi, I have created a login button using the tag. I wish to run a Java Script function validate() when this submit button is clicked. I tried using 'onclick = "validate()" ' within the html:submit tag, but it does not work. Please tell me how I can run Java Script code along with struts tags. Thanks, Seshadhri Srinivasan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]