RE: How to compile the java file with ActionForm / ActionMapping ?
You set the wrong variable in Windows. You need to set CLASSPATH to include the lib directory, various tomcat directories, and %JAVA_HOME%, if I recall correctly. I say "recall" because I've been using Eclipse for sometime but I'm pulling the classpath stuff from memory. Regards, David -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 1:46 AM To: Struts Users Mailing List Subject: RE: How to compile the java file with ActionForm / ActionMapping ? After lots of trial errors i found some very weired workaround. javac -classpath and finally got compiled, but for each file i must do something like above. I do not know how to set -classpath to javac permanently. Also why i need to give the individual jar file names? Why i can not just give directory name - which contains all jar files ? I am sure there will some better way of doing it, regards Manisha Manisha Sathe <[EMAIL PROTECTED]> wrote: Hi David, The situation is something like below. I am using Tomcat 5.0 server. I downloaded struts and extracted into another folder. I do not have admin access so i can not change the path or class path permanenetly as such i.e. going thr Control panel->Environment variables. I am not using any IDE tool. What i did -> Copied all jar files from struts into my /common/lib. I opened Command prompt. Set the path variable to /common/lib like C:>PATH=%PATH%;/common/lib then in the same window i tried to compile javac EmployeeForm.java But still it is same, not understanding ActionForm. Pls guide me. regards Manisha "David G. Friedman" wrote: Manisha, How are you compiling? Are you using Ant? Have you added the "lib" directory to the CLASSPATH? Are you using Eclipse or another IDE? Have you set the IDE to include the jar files when it builds/compiles the application? Regards, David -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 9:38 PM To: [EMAIL PROTECTED] Subject: How to compile the java file with ActionForm / ActionMapping ? Just started using struts: I got following code from Web - but when i tried to compile it i am getting error - import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class EmployeeForm extends ActionForm { private String name; private String age; public void setName(String name) { this.name = name; } public void setAge(String age) { this.age = age; } public String getName() { return name; } public String getAge() { return age; } } -- D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:3: package org.apache.struts.action does not exist import org.apache.struts.action.ActionForm; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:4: package org.apache.struts.action does not exist import org.apache.struts.action.ActionMapping; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:6: cannot resolve symbol symbol : class ActionForm location: class net.reumann.EmployeeForm public class EmployeeForm extends ActionForm { ^ 3 errors Tool completed with exit code 1 - I have copied all jar files inside /lib dir also modified web.xml and struts-config.xml. i tried to set path also. What else is required to compile it ? Thanks and regards Manisha - Do you Yahoo!? The all-new My Yahoo! Get yours free! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Send a seasonal email greeting and help others. Do good. - Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unknown error message
here is the jsp file that gave the error, you will see that i did not use any such tags. the rowSet bean is a requst attribute of type RowSetDynaClass set by an Action class before forwarding to this jsp. this page is supposed to display the table captured in the RowSetDynaClass. Data Base Table - Original Message - From: "Bill Siggelkow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 21, 2004 3:53 PM Subject: Re: unknown error message Well, it looks like you are using a tag (bean:message) that is trying to pull a value from the message resources property file. -Bill Siggelkow Olasoji Ajayi wrote: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE what does this mean, i am just writing a simple program to display the contents of a table in a database using struts (using it ti learn struts), i am not writing any complicates stuff, no resource bundles, internationalizations or things like that, just a form that will display the result and the class tha will fettch the table and give it to the Action that sends it to the form - 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: html:file value
Hi Jack, I finally got it to work. html:file doesn't get filled with a default value (thats a security concern), so I have passed the filename from display.jsp (preview) to my action and in my action class I am checking if the file exists, then I am renaming to another name for Submission and for Edit, I am checking if the file exists then I am deleting that file. And the file is uploaded only once. But there is still a concern with this, What if the user uploads the image and goes to preview page and just closes the browser without submit or edit? There will be an unused image in the server. Can we do anything for this? one idea I have is to call another Action class "onUnLoad" using javascript and delete that file. May be there is a better way than this. Thanks Uma -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 10:52 AM To: uma.k Cc: Struts Users Mailing List Subject: Re: html:file value Hi, Uma, Let's start over. Forget about anything but telling me from a user's point of view what you want to do. You have a user using a browser and wanting to do something with files. If the file is on the server, then we are talking about a download. If the file is on the client (user machine), then we are talking about an upload. Tell me what the user wants to do with the files. From what you have said I might guess right, but I cannot know for sure. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - 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 compile the java file with ActionForm / ActionMapping ?
Thanks, but what's $soft ? I am not too sure about it. I am on WinXP. Where i can i find it ? Pls can u let me know more details ? Thanks and regards manisha Dakota Jack <[EMAIL PROTECTED]> wrote: What I would suggest, if you are using $soft, is that you create a batch file with all the dependencies you need for compiling, then call that batch file prior to compiling, which will give you the appropriate contents/references/etc. in your classpath. You do something similar with sh files if you are not in $soft, etc. Jack On Tue, 21 Dec 2004 22:45:51 -0800 (PST), Manisha Sathe wrote: > After lots of trial errors i found some very weired workaround. > > javac -classpath > > and finally got compiled, but for each file i must do something like above. I > do not know how to set -classpath to javac permanently. Also why i need to > give the individual jar file names? Why i can not just give directory name - > which contains all jar files ? > > I am sure there will some better way of doing it, > > regards > Manisha > > Manisha Sathe wrote: > Hi David, > > The situation is something like below. > > I am using Tomcat 5.0 server. I downloaded struts and extracted into another > folder. I do not have admin access so i can not change the path or class path > permanenetly as such i.e. going thr Control panel->Environment variables. > > I am not using any IDE tool. What i did -> Copied all jar files from struts > into my /common/lib. > I opened Command prompt. Set the path variable to /common/lib like > > C:>PATH=%PATH%;/common/lib > > then in the same window i tried to compile > > javac EmployeeForm.java > > But still it is same, not understanding ActionForm. Pls guide me. > > regards > Manisha > > "David G. Friedman" wrote: > Manisha, > > How are you compiling? Are you using Ant? Have you added the "lib" > directory to the CLASSPATH? Are you using Eclipse or another IDE? Have you > set the IDE to include the jar files when it builds/compiles the > application? > > Regards, > David > > -Original Message- > From: Manisha Sathe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 9:38 PM > To: [EMAIL PROTECTED] > Subject: How to compile the java file with ActionForm / ActionMapping ? > > Just started using struts: I got following code from Web - but when i tried > to compile it i am getting error > > - > import org.apache.struts.action.ActionForm; > import org.apache.struts.action.ActionMapping; > public class EmployeeForm extends ActionForm { > private String name; > private String age; > public void setName(String name) { > this.name = name; > } > public void setAge(String age) { > this.age = age; > } > public String getName() { > return name; > } > public String getAge() { > return age; > } > } > > -- > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:3: package org.apache.struts.action does not exist > import org.apache.struts.action.ActionForm; > ^ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:4: package org.apache.struts.action does not exist > import org.apache.struts.action.ActionMapping; > ^ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:6: cannot resolve symbol > symbol : class ActionForm > location: class net.reumann.EmployeeForm > public class EmployeeForm extends ActionForm { > ^ > 3 errors > Tool completed with exit code 1 > > - > > I have copied all jar files inside /lib dir also modified web.xml and > struts-config.xml. i tried to set path also. > > What else is required to compile it ? > > Thanks and regards > Manisha > > - > Do you Yahoo!? > The all-new My Yahoo! Get yours free! > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > Do you Yahoo!? > Send a seasonal email greeting and help others. Do good. > > - > Do you Yahoo!? > Yahoo! Mail - 250MB free storage. Do more. Manage less. > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Th
Re: How to compile the java file with ActionForm / ActionMapping ?
What I would suggest, if you are using $soft, is that you create a batch file with all the dependencies you need for compiling, then call that batch file prior to compiling, which will give you the appropriate contents/references/etc. in your classpath. You do something similar with sh files if you are not in $soft, etc. Jack On Tue, 21 Dec 2004 22:45:51 -0800 (PST), Manisha Sathe <[EMAIL PROTECTED]> wrote: > After lots of trial errors i found some very weired workaround. > > javac -classpath > > and finally got compiled, but for each file i must do something like above. I > do not know how to set -classpath to javac permanently. Also why i need to > give the individual jar file names? Why i can not just give directory name - > which contains all jar files ? > > I am sure there will some better way of doing it, > > regards > Manisha > > Manisha Sathe <[EMAIL PROTECTED]> wrote: > Hi David, > > The situation is something like below. > > I am using Tomcat 5.0 server. I downloaded struts and extracted into another > folder. I do not have admin access so i can not change the path or class path > permanenetly as such i.e. going thr Control panel->Environment variables. > > I am not using any IDE tool. What i did -> Copied all jar files from struts > into my /common/lib. > I opened Command prompt. Set the path variable to /common/lib like > > C:>PATH=%PATH%;/common/lib > > then in the same window i tried to compile > > javac EmployeeForm.java > > But still it is same, not understanding ActionForm. Pls guide me. > > regards > Manisha > > "David G. Friedman" wrote: > Manisha, > > How are you compiling? Are you using Ant? Have you added the "lib" > directory to the CLASSPATH? Are you using Eclipse or another IDE? Have you > set the IDE to include the jar files when it builds/compiles the > application? > > Regards, > David > > -Original Message- > From: Manisha Sathe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 9:38 PM > To: [EMAIL PROTECTED] > Subject: How to compile the java file with ActionForm / ActionMapping ? > > Just started using struts: I got following code from Web - but when i tried > to compile it i am getting error > > - > import org.apache.struts.action.ActionForm; > import org.apache.struts.action.ActionMapping; > public class EmployeeForm extends ActionForm { > private String name; > private String age; > public void setName(String name) { > this.name = name; > } > public void setAge(String age) { > this.age = age; > } > public String getName() { > return name; > } > public String getAge() { > return age; > } > } > > -- > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:3: package org.apache.struts.action does not exist > import org.apache.struts.action.ActionForm; > ^ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:4: package org.apache.struts.action does not exist > import org.apache.struts.action.ActionMapping; > ^ > D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe > eForm.java:6: cannot resolve symbol > symbol : class ActionForm > location: class net.reumann.EmployeeForm > public class EmployeeForm extends ActionForm { > ^ > 3 errors > Tool completed with exit code 1 > > - > > I have copied all jar files inside /lib dir also modified web.xml and > struts-config.xml. i tried to set path also. > > What else is required to compile it ? > > Thanks and regards > Manisha > > - > Do you Yahoo!? > The all-new My Yahoo! Get yours free! > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > Do you Yahoo!? > Send a seasonal email greeting and help others. Do good. > > - > Do you Yahoo!? > Yahoo! Mail - 250MB free storage. Do more. Manage less. > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED
RE: Passing information to Action class
Yes Jack, You are right. I have ActionForm but do not want to use it. -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 10:56 AM To: Struts Users Mailing List; Shiva Narayana Subject: Re: Passing information to Action class I may be wrong, Shiva, but I think she wants to avoid the use of action forms in this case rather than avoid writing classes. If you use forms in a file upload, then you are trapped into using the Struts file upload implementation. She may, I don't know, want to avoid that. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - 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 compile the java file with ActionForm / ActionMapping ?
After lots of trial errors i found some very weired workaround. javac -classpath and finally got compiled, but for each file i must do something like above. I do not know how to set -classpath to javac permanently. Also why i need to give the individual jar file names? Why i can not just give directory name - which contains all jar files ? I am sure there will some better way of doing it, regards Manisha Manisha Sathe <[EMAIL PROTECTED]> wrote: Hi David, The situation is something like below. I am using Tomcat 5.0 server. I downloaded struts and extracted into another folder. I do not have admin access so i can not change the path or class path permanenetly as such i.e. going thr Control panel->Environment variables. I am not using any IDE tool. What i did -> Copied all jar files from struts into my /common/lib. I opened Command prompt. Set the path variable to /common/lib like C:>PATH=%PATH%;/common/lib then in the same window i tried to compile javac EmployeeForm.java But still it is same, not understanding ActionForm. Pls guide me. regards Manisha "David G. Friedman" wrote: Manisha, How are you compiling? Are you using Ant? Have you added the "lib" directory to the CLASSPATH? Are you using Eclipse or another IDE? Have you set the IDE to include the jar files when it builds/compiles the application? Regards, David -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 9:38 PM To: [EMAIL PROTECTED] Subject: How to compile the java file with ActionForm / ActionMapping ? Just started using struts: I got following code from Web - but when i tried to compile it i am getting error - import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class EmployeeForm extends ActionForm { private String name; private String age; public void setName(String name) { this.name = name; } public void setAge(String age) { this.age = age; } public String getName() { return name; } public String getAge() { return age; } } -- D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:3: package org.apache.struts.action does not exist import org.apache.struts.action.ActionForm; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:4: package org.apache.struts.action does not exist import org.apache.struts.action.ActionMapping; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:6: cannot resolve symbol symbol : class ActionForm location: class net.reumann.EmployeeForm public class EmployeeForm extends ActionForm { ^ 3 errors Tool completed with exit code 1 - I have copied all jar files inside /lib dir also modified web.xml and struts-config.xml. i tried to set path also. What else is required to compile it ? Thanks and regards Manisha - Do you Yahoo!? The all-new My Yahoo! Get yours free! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Send a seasonal email greeting and help others. Do good. - Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less.
Re: html:file value
There actually are a lot of things you can do with this that are not obvious and are consistent with what seems to be impossible. You can actually get around almost all of the restrictions on without breaking security. You just create GUI facades with span styles. This can allow you to actually make a person think they are uploading a file when in fact they are just sending the file name to the server, etc. This is also used to insert images in the place of file upload browser based buttons. Jack On Wed, 22 Dec 2004 00:11:26 -0600, Eddie Bush <[EMAIL PROTECTED]> wrote: > Uma, > > When your user submits the form that they've used to select the file > they want to upload, you'll have to upload it - right then. AFAIK, > there's not a way to, at some later point in time, poke a value into a > html:file input field -- per the HTML spec, I believe. > > You have to upload the file when they choose it. > > I *could* be wrong, but I don't think I am. You could give the user > the ability to "finalize" their selection by showing a confirmation > page prior to actually committing the image (saving it to DB or > whatever you're doing iwth it). > > I could be wrong about this, but I'm fairly sure I'm not. If I am, > someone will no doubt let me know. > > If I recall correctly, this is a kind of security measure. Imagine > someone going to a site, and that site filling in an html:file with > some file that could expose their machine to a hacker attack. The > site grabs the file without the user choosing it because they clicked > a submission button. That's a definite bad thing to do IMHO, and is > likely why it is disallowed. > > On Tue, 21 Dec 2004 21:22:01 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > > Hi, Uma, > > > > Let's start over. Forget about anything but telling me from a user's > > point of view what you want to do. You have a user using a browser > > and wanting to do something with files. If the file is on the server, > > then we are talking about a download. If the file is on the client > > (user machine), then we are talking about an upload. Tell me what the > > user wants to do with the files. From what you have said I might > > guess right, but I cannot know for sure. > > > > Jack > > > > -- > > "You can lead a horse to water but you cannot make it float on its back." > > > > ~Dakota Jack~ > > > > "You can't wake a person who is pretending to be asleep." > > > > ~Native Proverb~ > > > > "Each man is good in His sight. It is not necessary for eagles to be crows." > > > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > > > > --- > > > > "This message may contain confidential and/or privileged information. > > If you are not the addressee or authorized to receive this for the > > addressee, you must not use, copy, disclose, or take any action based > > on this message or any information herein. If you have received this > > message in error, please advise the sender immediately by reply e-mail > > and delete this message. Thank you for your cooperation." > > -- > Eddie Bush > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can we inherit form bean definitions
Thanks my dear. -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 11:43 AM To: Struts Users Mailing List Subject: Re: Can we inherit form bean definitions Nope - can't do that. There is no mechanism to facilitate it ... On Wed, 22 Dec 2004 11:36:47 +0530, Amit Gupta <[EMAIL PROTECTED]> wrote: > Hi, > > I have several pages with forms with 15-20 fields. Out of these 15-20 fields, > 12 fields are common to all pages. I am defining form beans using > DynaActionClass. > > Can I inherit form bean definitions created using DynaActionForm? > > I want that I create one form-bean definition for common fields and use this > form-bean definition in definition of form bean for other forms. > > Amit Gupta -- Eddie Bush - 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 implement torque?
Thanks Eddie I will do that. Have u tried implementing the same? :) Jay Chandran. - Original Message - From: "Eddie Bush" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Jay Chandran" <[EMAIL PROTECTED]> Sent: Wednesday, December 22, 2004 11:32 AM Subject: Re: How to implement torque? > Have you tried surfing the Torque site for docs? They used to have > some decent docs ... been ages since I looked at it though. > > I believe they have a user list there - for Turbine, if not Torque. > That is likely a better spot to ask than here. > > On Wed, 22 Dec 2004 11:32:26 +0530, Jay Chandran > <[EMAIL PROTECTED]> wrote: > > Does any one knows how to implement TORQUE in an existing system implemented > > using struts and postgreSQL. > > > > :( > > > > Jay Chandran > > -- > Eddie Bush > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can we inherit form bean definitions
Nope - can't do that. There is no mechanism to facilitate it ... On Wed, 22 Dec 2004 11:36:47 +0530, Amit Gupta <[EMAIL PROTECTED]> wrote: > Hi, > > I have several pages with forms with 15-20 fields. Out of these 15-20 fields, > 12 fields are common to all pages. I am defining form beans using > DynaActionClass. > > Can I inherit form bean definitions created using DynaActionForm? > > I want that I create one form-bean definition for common fields and use this > form-bean definition in definition of form bean for other forms. > > Amit Gupta -- Eddie Bush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:file value
Uma, When your user submits the form that they've used to select the file they want to upload, you'll have to upload it - right then. AFAIK, there's not a way to, at some later point in time, poke a value into a html:file input field -- per the HTML spec, I believe. You have to upload the file when they choose it. I *could* be wrong, but I don't think I am. You could give the user the ability to "finalize" their selection by showing a confirmation page prior to actually committing the image (saving it to DB or whatever you're doing iwth it). I could be wrong about this, but I'm fairly sure I'm not. If I am, someone will no doubt let me know. If I recall correctly, this is a kind of security measure. Imagine someone going to a site, and that site filling in an html:file with some file that could expose their machine to a hacker attack. The site grabs the file without the user choosing it because they clicked a submission button. That's a definite bad thing to do IMHO, and is likely why it is disallowed. On Tue, 21 Dec 2004 21:22:01 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > Hi, Uma, > > Let's start over. Forget about anything but telling me from a user's > point of view what you want to do. You have a user using a browser > and wanting to do something with files. If the file is on the server, > then we are talking about a download. If the file is on the client > (user machine), then we are talking about an upload. Tell me what the > user wants to do with the files. From what you have said I might > guess right, but I cannot know for sure. > > Jack > > -- > "You can lead a horse to water but you cannot make it float on its back." > > ~Dakota Jack~ > > "You can't wake a person who is pretending to be asleep." > > ~Native Proverb~ > > "Each man is good in His sight. It is not necessary for eagles to be crows." > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > > --- > > "This message may contain confidential and/or privileged information. > If you are not the addressee or authorized to receive this for the > addressee, you must not use, copy, disclose, or take any action based > on this message or any information herein. If you have received this > message in error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation." -- Eddie Bush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing information to Action class
I may be wrong, Shiva, but I think she wants to avoid the use of action forms in this case rather than avoid writing classes. If you use forms in a file upload, then you are trapped into using the Struts file upload implementation. She may, I don't know, want to avoid that. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:file value
Hi, Uma, Let's start over. Forget about anything but telling me from a user's point of view what you want to do. You have a user using a browser and wanting to do something with files. If the file is on the server, then we are talking about a download. If the file is on the client (user machine), then we are talking about an upload. Tell me what the user wants to do with the files. From what you have said I might guess right, but I cannot know for sure. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing information to Action class
try with DynaActionForm it solves ur problem. No noeed to write FormBean On Tue, 21 Dec 2004 19:16:50 +0530, uma.k <[EMAIL PROTECTED]> wrote: > Hi, > How to pass information to Action class directly? i.e. I don't want to write > a ActionForm class. > > > > Edit > > > And my struts-config.xml will look like this > >path="/editUpload" >type="upload.EditUploadAction" >scope="request" >input="/upload/display.jsp"> > > > > in my .java execute method, I am writing > String theFile = request.getParameter("fileAbsPath"); > > Any ideas? > > Uma > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Regards Shiva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing information to Action class
Don't use a form and check the request object for what happens to be in the critter, just as you suggested. What is the problem? Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Tiles : Image instead of text
Yes. The uploading of the image is after the html/response is sent anyway. Jack On Wed, 22 Dec 2004 12:12:21 +0800, PC Leung <[EMAIL PROTECTED]> wrote: > A simple tile layout: > > pages1 pages 2 > -+--- > url1 | > url2 | > url3 | > url4 | > > For the vertical box layout or tab pages, user can click on the labels of > words. > But it is more user friendly to click on images. > Can I replace words with images in Tiles? > > > On Mon, 20 Dec 2004 04:49:49 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > > If you gave the code you were talking about, people who wanted to help > > could do so without looking it up. I just dump the examples and so > > have no idea what you are talking about without reloading. > > > > Jack > > > > > > On Mon, 20 Dec 2004 14:51:40 +0800, PC Leung <[EMAIL PROTECTED]> wrote: > > > The sample of Tiles contains text only. > > > Can I put images instead of texts where points to a URL? > > > So that it is more nice looking to click an image. > > > > > > Please show a way. > > > Thanks > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > "You can lead a horse to water but you cannot make it float on its back." > > > > ~Dakota Jack~ > > > > "You can't wake a person who is pretending to be asleep." > > > > ~Native Proverb~ > > > > "Each man is good in His sight. It is not necessary for eagles to be crows." > > > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing information to Action class
Hi, How to pass information to Action class directly? i.e. I don't want to write a ActionForm class. Edit And my struts-config.xml will look like this in my .java execute method, I am writing String theFile = request.getParameter("fileAbsPath"); Any ideas? Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Tiles : Image instead of text
A simple tile layout: pages1 pages 2 -+--- url1 | url2 | url3 | url4 | For the vertical box layout or tab pages, user can click on the labels of words. But it is more user friendly to click on images. Can I replace words with images in Tiles? On Mon, 20 Dec 2004 04:49:49 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote: > If you gave the code you were talking about, people who wanted to help > could do so without looking it up. I just dump the examples and so > have no idea what you are talking about without reloading. > > Jack > > > On Mon, 20 Dec 2004 14:51:40 +0800, PC Leung <[EMAIL PROTECTED]> wrote: > > The sample of Tiles contains text only. > > Can I put images instead of texts where points to a URL? > > So that it is more nice looking to click an image. > > > > Please show a way. > > Thanks > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > "You can lead a horse to water but you cannot make it float on its back." > > ~Dakota Jack~ > > "You can't wake a person who is pretending to be asleep." > > ~Native Proverb~ > > "Each man is good in His sight. It is not necessary for eagles to be crows." > > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and JDK 1.4.2_06
Ive not seen your code so Ive no idea if this is what you are doing (probably not from the sound of it), but its been my experience that when I dont quite follow the bean specs for my getters and setters it still sometimes works... until I change something else like my JVM version or add some other property or something at which point it falls overs. Last time I had something like that I was trying to have two setters or getters with the same method name but different parameter types. It worked for a while but then after some other change I found it stopped working. Removal (renaming) of one of the overloaded setter methods fixed it. Heres the thread from back in 2002 when I hit this problem: [http://marc.theaimsgroup.com/?l=struts-user&m=102696975022454&w=2] hth Andrew Mike Darretta wrote: Has anyone else experienced any issues with Struts (current release) and JDK 1.4.2_06? I have found my second 'oddity' with JDK release 06. My previous post showed that a form property named "currentView" caused the infamous "no getter method for property ..." error. When I changed the property name and accessor, all was well. Now, I have experienced another issue with a form property. In this case, my form property "cmd" - used to differentiate submit actions - works for one html:submit button, but fails for another. The one that fails generates the ever-frustrating: BeanUtils.populate: javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) ... Fortunately, I was able to get around this issue fairly easily Please, if anyone else finds any strange behavior with release 06, please let us know. Thanks! Mike - 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 compile the java file with ActionForm / ActionMapping ?
Manisha, How are you compiling? Are you using Ant? Have you added the "lib" directory to the CLASSPATH? Are you using Eclipse or another IDE? Have you set the IDE to include the jar files when it builds/compiles the application? Regards, David -Original Message- From: Manisha Sathe [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 9:38 PM To: [EMAIL PROTECTED] Subject: How to compile the java file with ActionForm / ActionMapping ? Just started using struts: I got following code from Web - but when i tried to compile it i am getting error - import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class EmployeeForm extends ActionForm { private String name; private String age; public void setName(String name) { this.name = name; } public void setAge(String age) { this.age = age; } public String getName() { return name; } public String getAge() { return age; } } -- D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:3: package org.apache.struts.action does not exist import org.apache.struts.action.ActionForm; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:4: package org.apache.struts.action does not exist import org.apache.struts.action.ActionMapping; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\Employe eForm.java:6: cannot resolve symbol symbol : class ActionForm location: class net.reumann.EmployeeForm public class EmployeeForm extends ActionForm { ^ 3 errors Tool completed with exit code 1 - I have copied all jar files inside /lib dir also modified web.xml and struts-config.xml. i tried to set path also. What else is required to compile it ? Thanks and regards Manisha - Do you Yahoo!? The all-new My Yahoo! Get yours free! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to compile the java file with ActionForm / ActionMapping ?
Just started using struts: I got following code from Web - but when i tried to compile it i am getting error - import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; public class EmployeeForm extends ActionForm { private String name; private String age; public void setName(String name) { this.name = name; } public void setAge(String age) { this.age = age; } public String getName() { return name; } public String getAge() { return age; } } -- D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\EmployeeForm.java:3: package org.apache.struts.action does not exist import org.apache.struts.action.ActionForm; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\EmployeeForm.java:4: package org.apache.struts.action does not exist import org.apache.struts.action.ActionMapping; ^ D:\jakarta-tomcat-5.0.25\webapps\rr_lesson_1\WEB-INF\src\net\reumann\EmployeeForm.java:6: cannot resolve symbol symbol : class ActionForm location: class net.reumann.EmployeeForm public class EmployeeForm extends ActionForm { ^ 3 errors Tool completed with exit code 1 - I have copied all jar files inside /lib dir also modified web.xml and struts-config.xml. i tried to set path also. What else is required to compile it ? Thanks and regards Manisha - Do you Yahoo!? The all-new My Yahoo! Get yours free!
Struts and JDK 1.4.2_06
Has anyone else experienced any issues with Struts (current release) and JDK 1.4.2_06? I have found my second 'oddity' with JDK release 06. My previous post showed that a form property named "currentView" caused the infamous "no getter method for property ..." error. When I changed the property name and accessor, all was well. Now, I have experienced another issue with a form property. In this case, my form property "cmd" - used to differentiate submit actions - works for one html:submit button, but fails for another. The one that fails generates the ever-frustrating: BeanUtils.populate: javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:497) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:205) ... Fortunately, I was able to get around this issue fairly easily Please, if anyone else finds any strange behavior with release 06, please let us know. Thanks! Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with html:javascript
Hi, I have a a html:javascript on the jsp pages. It is throwing a null exception, and I can't work out why. It was working quite happily a few months ago. But we have just revisited it and it doesn't want to work any more. Its happening on all our pages that have client-side validation. Any ideas will be greatly appreciated. The jsp page contains (when remove this line the page works fine, including server-side validation): the validation-administrationModule.xml contains: min0 max4000 the struts config file contains: type="com.colts.ui.adminSite.workspace.reportModule.reports.EFTSReportProcess" validate="false" name="EFTSReportForm"> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Framework
> -Original Message- > From: Carolina Serrano [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 2:00 PM > To: 'Struts Users Mailing List' > Subject: RE: Validator Framework > > > Yes, you are right, but the thing is that we have to validate > in both sides. > I ´ll try to be more specific. > > We have this situation: > > date: 21/12/2004 > dateGreaterEqualThan: 21/12/1--> this is an error because > it is not a > DATE. Okay so you have 3 validations. 1) date is a date 2) dateGreaterEqualThanis a date 3) dateGreaterEqualThan is >= date. and if I understand you, you have something like this in validation.xml: blah blah And it's this second one that's giving you some trouble. Specifically the error message is not correct. When you have two or more validations specified, the error message should treate them as one failure. So you're message should say something like: "The second date must a valid date and Greater then the first date." I don't think you can specify a different message for each check in the list. > > > I got the following message: the "dateGreaterEqualThan" is minor than > "date" --> this shouldn´t happen because i must get the > message: it is not a > date. This date validation should be done by "date". > > > i attach the validator_rule.xml. > > thanks for your help, > > > VALIDATOR_RULE.XML > > > classname="..validator.ValidatorRules" > > method="dateGreaterEqualThan" > > methodParams="java.lang.Object, > > org.apache.commons.validator.ValidatorAction, > > org.apache.commons.validator.Field, > > org.apache.struts.action.ActionErrors, > > javax.servlet.http.HttpServletRequest" > > msg="errors.dateGreaterEqualThan" > > depends="date" > > jsFunctionName="DateGreaterEqualThanValidations"> > >
RE: Validator Framework
Yes, you are right, but the thing is that we have to validate in both sides. I ´ll try to be more specific. We have this situation: date: 21/12/2004 dateGreaterEqualThan: 21/12/1--> this is an error because it is not a DATE. I got the following message: the "dateGreaterEqualThan" is minor than "date" --> this shouldn´t happen because i must get the message: it is not a date. This date validation should be done by "date". i attach the validator_rule.xml. thanks for your help, VALIDATOR_RULE.XML
RE: Validator Framework
> -Original Message- > From: Carolina Serrano [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 1:35 PM > To: [EMAIL PROTECTED] > Subject: Validator Framework > > > > I'm using the validator framework , doing validations that depends on > others. > > for example: dateafterthat depends on date. > > the dependations in the server run ok, > but it failed when it has to validate in the client both: > 1st date and 2nd > dateafterthan. > > According the documentation: "if 1st(date) fail don't > continue", so that > error shouldn´t happen. > > The first validation does not ocurre in the client side but the 2nd > validation does. There is no error in server side. Both validations must happen on either the server, or the client side. You can't mix where they happen using the validation framework, especially if the first is supposed to fire on the server. > > Thanks > Carito > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator Framework
I'm using the validator framework , doing validations that depends on others. for example: dateafterthat depends on date. the dependations in the server run ok, but it failed when it has to validate in the client both: 1st date and 2nd dateafterthan. According the documentation: "if 1st(date) fail don't continue", so that error shouldn´t happen. The first validation does not ocurre in the client side but the 2nd validation does. There is no error in server side. Thanks Carito
RE: [ot] Excluding BeanUtils from Log4J? How do I do this?
Opps, I am running 2 machines. My WIN has info as root, but Linux has debug, and that is what is having the issue. So root is set to debug. Mick Knutson Wells Fargo Business Direct (415) 222-1020 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 12:16 PM To: Struts Users Mailing List Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? This OT thread could grow a bit more, then, cause it looks like something else is the matter. First of all, your root priority is already set to info, so you shouldn't be getting debug messages. Are you sure the correct config file is being loaded? Hubert On Tue, 21 Dec 2004 14:05:23 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Sorry. I am still getting debug from BeanUtils which is my whole issue. I > want debug from everything BUT BeanUtils. > > > Mick Knutson > Wells Fargo Business Direct > (415) 222-1020 > > "This message may contain confidential and/or privileged information. If you > are not the addressee or authorized to receive this for the addressee, you > must not use, copy, disclose, or take any action based on this message or any > information herein. If you have received this message in error, please advise > the sender immediately by reply e-mail and delete this message. Thank you for > your cooperation." > > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 11:54 AM > To: Struts Users Mailing List > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > How did it not work? Are you seeing info-, warn-, or debug-level logs > from BeanUtils? Or are you seeing error-level logs and you want to > suppress even those? Or are the logs coming from other classes from > the beanutils package, but not necessarily the BeanUtils class itself? > > Hubert > > > On Tue, 21 Dec 2004 13:48:59 -0600, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > It didn't work. What am I doing wrong here: > > > > > > > > > > > > http://jakarta.apache.org/log4j/";> > > > > > > > > > > > > > > > > > > > > > > > > > value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Mick Knutson - 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: bean:message and escaping
Can you just escape it in your .properties file or whereever the message is defined? I think that would be best practice unless you need to only escape it some of the time. - Dan > -Original Message- > From: Edgar Poce [mailto:[EMAIL PROTECTED] > Sent: Saturday, December 18, 2004 2:42 PM > To: [EMAIL PROTECTED] > Subject: bean:message and escaping > > Hi > is there any way to escape html with bean:message?. The only way I > find to achieve this is: > 1 - set a pageContext var with the bean:message value. > 2 - use bean:write, wich escapes html. > > I'd like to do this with a single tag. Something like > > > If it's not possible wich is the best practice? > > Thanks in advance. > Edgar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ot]Excluding BeanUtils from Log4J? How do I do this?
This OT thread could grow a bit more, then, cause it looks like something else is the matter. First of all, your root priority is already set to info, so you shouldn't be getting debug messages. Are you sure the correct config file is being loaded? Hubert On Tue, 21 Dec 2004 14:05:23 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Sorry. I am still getting debug from BeanUtils which is my whole issue. I > want debug from everything BUT BeanUtils. > > > Mick Knutson > Wells Fargo Business Direct > (415) 222-1020 > > "This message may contain confidential and/or privileged information. If you > are not the addressee or authorized to receive this for the addressee, you > must not use, copy, disclose, or take any action based on this message or any > information herein. If you have received this message in error, please advise > the sender immediately by reply e-mail and delete this message. Thank you for > your cooperation." > > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 11:54 AM > To: Struts Users Mailing List > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > How did it not work? Are you seeing info-, warn-, or debug-level logs > from BeanUtils? Or are you seeing error-level logs and you want to > suppress even those? Or are the logs coming from other classes from > the beanutils package, but not necessarily the BeanUtils class itself? > > Hubert > > > On Tue, 21 Dec 2004 13:48:59 -0600, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > It didn't work. What am I doing wrong here: > > > > > > > > > > > > http://jakarta.apache.org/log4j/";> > > > > > > > > > > > > > > > > > > > > > > > > > value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Mick Knutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MVC business separation design
I am using struts with tiles. Now, I have a questioner that is being displayed on a page that calls UrlController. Before it is displayed I need to get the values out of the database. The question is since I cannot use another action with the urlController to populate the actionform bean, should I do the actual data population in the urlController or should I create another class, and just initialize it from the urlController and the class in turn will do all the data retrieval from the database and than urlController will copy the data to the actionform bean? Thank you. Fedor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ot]Excluding BeanUtils from Log4J? How do I do this?
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 1:05 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [ot]Excluding BeanUtils from Log4J? How do I do this? > > > Sorry. I am still getting debug from BeanUtils which is my > whole issue. I want debug from everything BUT BeanUtils. Everything else to error. I know with the properties version you can set the default priority. Sounds like your default priority is debug. I use BeanUtils, and log4j. This is my setup using the properties: log4j.rootLogger=INFO, console log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=%d [%t] %-5p %c.%m%n log4j.logger.com.sssc=DEBUG This last line sets everything in debug mode, while the log4j.rootLogger defaults everything to INFO level. I don't know how to convert this to XML for you though. > > > Mick Knutson > Wells Fargo Business Direct > (415) 222-1020 > > "This message may contain confidential and/or privileged > information. If you are not the addressee or authorized to > receive this for the addressee, you must not use, copy, > disclose, or take any action based on this message or any > information herein. If you have received this message in > error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation." > > > > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 11:54 AM > To: Struts Users Mailing List > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > > How did it not work? Are you seeing info-, warn-, or debug-level logs > from BeanUtils? Or are you seeing error-level logs and you want to > suppress even those? Or are the logs coming from other classes from > the beanutils package, but not necessarily the BeanUtils class itself? > > Hubert > > > On Tue, 21 Dec 2004 13:48:59 -0600, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > It didn't work. What am I doing wrong here: > > > > > > > > > > > > http://jakarta.apache.org/log4j/";> > > > > > > > > > > > > > > > > > > > > class="org.apache.log4j.ConsoleAppender"> > > > > > value="%d %-5p [%t] %C{2} (%F:%L) > - %m%n"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Mick Knutson > > > > -Original Message- > > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 21, 2004 11:16 AM > > To: Struts Users Mailing List > > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > > > For the BeanUtils class itself, try something like: > > > > > > > > > > > > If you want the same priority to apply to all classes under the > > beanutils package, don't include the BeanUtils class name. > > > > Hubert > > > > On Tue, 21 Dec 2004 13:10:48 -0600, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > [ot]Excluding BeanUtils from Log4J? How do I do this? > > > I am using the log4j.xml descriptor and really need to > exclude this class. Can anyone help please? > > > > > > > > > Mick Knutson > > - > 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: [ot]Excluding BeanUtils from Log4J? How do I do this?
Sorry. I am still getting debug from BeanUtils which is my whole issue. I want debug from everything BUT BeanUtils. Mick Knutson Wells Fargo Business Direct (415) 222-1020 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 11:54 AM To: Struts Users Mailing List Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? How did it not work? Are you seeing info-, warn-, or debug-level logs from BeanUtils? Or are you seeing error-level logs and you want to suppress even those? Or are the logs coming from other classes from the beanutils package, but not necessarily the BeanUtils class itself? Hubert On Tue, 21 Dec 2004 13:48:59 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > It didn't work. What am I doing wrong here: > > > > > > http://jakarta.apache.org/log4j/";> > > > > > > > > > > > > value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> > > > > > > > > > > > > > > > > > > > > > > Mick Knutson > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 11:16 AM > To: Struts Users Mailing List > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > For the BeanUtils class itself, try something like: > > > > > > If you want the same priority to apply to all classes under the > beanutils package, don't include the BeanUtils class name. > > Hubert > > On Tue, 21 Dec 2004 13:10:48 -0600, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > [ot]Excluding BeanUtils from Log4J? How do I do this? > > I am using the log4j.xml descriptor and really need to exclude this class. > > Can anyone help please? > > > > > > Mick Knutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ot]Excluding BeanUtils from Log4J? How do I do this?
You can also set "additivity" to false for the class or package, which prevents it from inheriting appenders. You will have to look up the syntax yourself, since I do not use the XML style. - Dan > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 11:16 AM > To: Struts Users Mailing List > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > For the BeanUtils class itself, try something like: > > > > > > If you want the same priority to apply to all classes under the > beanutils package, don't include the BeanUtils class name. > > Hubert > > > On Tue, 21 Dec 2004 13:10:48 -0600, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > [ot]Excluding BeanUtils from Log4J? How do I do this? > > I am using the log4j.xml descriptor and really need to > exclude this class. Can anyone help please? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ot]Excluding BeanUtils from Log4J? How do I do this?
How did it not work? Are you seeing info-, warn-, or debug-level logs from BeanUtils? Or are you seeing error-level logs and you want to suppress even those? Or are the logs coming from other classes from the beanutils package, but not necessarily the BeanUtils class itself? Hubert On Tue, 21 Dec 2004 13:48:59 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > It didn't work. What am I doing wrong here: > > > > > > http://jakarta.apache.org/log4j/";> > > > > > > > > > > > > value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> > > > > > > > > > > > > > > > > > > > > > > Mick Knutson > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 11:16 AM > To: Struts Users Mailing List > Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? > > For the BeanUtils class itself, try something like: > > > > > > If you want the same priority to apply to all classes under the > beanutils package, don't include the BeanUtils class name. > > Hubert > > On Tue, 21 Dec 2004 13:10:48 -0600, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > [ot]Excluding BeanUtils from Log4J? How do I do this? > > I am using the log4j.xml descriptor and really need to exclude this class. > > Can anyone help please? > > > > > > Mick Knutson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ot]Excluding BeanUtils from Log4J? How do I do this?
It didn't work. What am I doing wrong here: http://jakarta.apache.org/log4j/";> Mick Knutson Wells Fargo Business Direct (415) 222-1020 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -Original Message- From: Hubert Rabago [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 21, 2004 11:16 AM To: Struts Users Mailing List Subject: Re: [ot]Excluding BeanUtils from Log4J? How do I do this? For the BeanUtils class itself, try something like: If you want the same priority to apply to all classes under the beanutils package, don't include the BeanUtils class name. Hubert On Tue, 21 Dec 2004 13:10:48 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > [ot]Excluding BeanUtils from Log4J? How do I do this? > I am using the log4j.xml descriptor and really need to exclude this class. > Can anyone help please? > > > Mick Knutson > Wells Fargo Business Direct Information Systems > (415) 222-1020 > > "This message may contain confidential and/or privileged information. If you > are not the addressee or authorized to receive this for the addressee, you > must not use, copy, disclose, or take any action based on this message or any > information herein. If you have received this message in error, please advise > the sender immediately by reply e-mail and delete this message. Thank you for > your cooperation." > > > - > 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: ActionMessage replacement "keys" ?
At 10:55 AM -0800 12/21/04, Woodchuck wrote: that's true. i wouldn't like to have the code assume which bundle either. but now in hindsight, perhaps one bundle per language would be better than having the ability to specify many different bundles (per language). because in the end, all of the message keys would work just as well if they were all in the same bundle provided that care was taken to ensure that each message key was unique. hmm... it really seems the ability to specify which bundle to use is more trouble than it's worth because now everytime we want to display a message we need to worry about the correct bundle. if organizing messages into separate files is really desired, then perhaps some sort of 'include' directive in these property files would be better. having only one bundle would also make it easier to build compound key messages (messages with multiple keys i guess, which is essentially what my original post was about -- however, it came about not from a bundle issue, but an optimization issue) and also to put in logic to display the key literally, instead of throwing an exception when the key is not found. to sum up, we would have: - one bundle per language (get rid of need to specify bundle in all places) - the ability to include other property files from within property files - modify to display all message keys literally if not found in bundle (and assume all parameters are keys) that would be perfect, wouldn't it? Well, no, because what about when you have a number, like: "Your search returned {0,choice,0#no results, 1#one result, 1>{0} results}"? (amazed if I got the choice format syntax right from memory!) The main reason for replacement values is this: to include data like numbers and dates, not to make it easier to get by with less messages. So definitely not a good idea to assume that all parameters are keys. Note that there is no need to specify bundle in all places -- just the support for it if people find more bundles a better way to manage their files. Perhaps it would be nice to have some include syntax, but that would, of course, require action from Sun, since we're using standard properties files here. I suspect folks with large internationalized applications find some comfort in being able to partition their message bundles. You might want to look at commons-resources, which has been factored out of Struts and which will soon be used in place of its predecessor code in Struts 1.3.x It provides enough API flexibility that you might actually be able to specify a message resolution system which did the recursive lookup for you. It also supports alternate message sources like XML and databases -- XML, at least, provides a decent include syntax with entities, although I am still not very clear on the rules for resolving relative paths for entities which represent files... Perhaps instead of trying to find a universal way to make Struts do it, you could come up with a Message Resources implementation which accepted some limitations (less bundles) in exchange for different functionality (recursive lookup of replacement keys). Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts TestCase and Cactus
StrutsMailer wrote: I am looking for documentation and best practices for StrutsTestCase and Cactus and interested in hearing how others are testing their web pages written in Struts. Thanks in advance for your comments and suggestions. Peter Peter, There was a recent article on OnJava that discusses testing Struts with Cactus. It can be found online at http://www.onjava.com/pub/a/onjava/2004/09/22/test-struts.html. Also, the Jakarta Struts Cookbook (http://www.oreilly.com/catalog/jakartastrutsckbk) has an entire chapter on testing Struts. You might also want to check out Struts - The Complete Reference -- it also has a chapter on testing. Let me know if you have some specific questions; I will be glad to help if I can. -Bill Siggelkow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ot]Excluding BeanUtils from Log4J? How do I do this?
For the BeanUtils class itself, try something like: If you want the same priority to apply to all classes under the beanutils package, don't include the BeanUtils class name. Hubert On Tue, 21 Dec 2004 13:10:48 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > [ot]Excluding BeanUtils from Log4J? How do I do this? > I am using the log4j.xml descriptor and really need to exclude this class. > Can anyone help please? > > > Mick Knutson > Wells Fargo Business Direct Information Systems > (415) 222-1020 > > "This message may contain confidential and/or privileged information. If you > are not the addressee or authorized to receive this for the addressee, you > must not use, copy, disclose, or take any action based on this message or any > information herein. If you have received this message in error, please advise > the sender immediately by reply e-mail and delete this message. Thank you for > your cooperation." > > > - > 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: Workaround for IE not sending "value" on input image tag?
I dealt with this with the following strategy: On any page that uses at least one image submit button (even if there are also normal submit buttons on the page), add a hidden form parameter named "submitMethod" (the parameter normally set by the submit button). Change all the submit buttons (not just the image ones) to use a different parameter (it will be ignored). Add a javascript function to set the "submitMethod" parameter. Set the "onclick" event on all the submit buttons to call that function, sending the desired "submitMethod" value. Add comment chastising IE. > -Original Message- > From: Karr, David > Sent: Monday, December 20, 2004 4:18 PM > To: Struts Users Mailing List > Subject: Workaround for IE not sending "value" on input image tag? > > > This isn't strictly a Struts question, but I may have to > manipulate the > Struts tags to get around this problem. > > I have some code that uses "html:image" to form an image > submit button. > I don't care about the click coordinates, I just care about > the request > parameter from the "name" parameter. > > This code works fine when run in FireFox. > > Unfortunately, I find that IE doesn't send a request > parameter named by > the "name" attribute. A quick google for this confirms this somewhat > vaguely. > > For instance, my "input" tag looks like the following. When > I run this > in FireFox, I get a request parameter named "submitMethod", with the > value "abc". In IE, I don't see a "submitMethod" request parameter. > Both browsers produce the ".x" and ".y" parameters, which I don't care > about. > > src="/inputbug/images/delete.gif" value="abc"> > > Is there a standard way of getting around this problem? Is there a > better place to ask questions like this? > > ___ > David M. Karr, Technical Specialist II > TSG Data Delivery and Integration Services > Enterprise Application Integration (EAI) > > Washington Mutual > 1201 Third Avenue, WMT0914, Seattle, WA 98101 > www.wamu.com > > 206.490.7289 direct | 206.909.0664 mobile > 206.490.2262 fax > > - > 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]
[ot]Excluding BeanUtils from Log4J? How do I do this?
[ot]Excluding BeanUtils from Log4J? How do I do this? I am using the log4j.xml descriptor and really need to exclude this class. Can anyone help please? Mick Knutson Wells Fargo Business Direct Information Systems (415) 222-1020 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
that's true. i wouldn't like to have the code assume which bundle either. but now in hindsight, perhaps one bundle per language would be better than having the ability to specify many different bundles (per language). because in the end, all of the message keys would work just as well if they were all in the same bundle provided that care was taken to ensure that each message key was unique. hmm... it really seems the ability to specify which bundle to use is more trouble than it's worth because now everytime we want to display a message we need to worry about the correct bundle. if organizing messages into separate files is really desired, then perhaps some sort of 'include' directive in these property files would be better. having only one bundle would also make it easier to build compound key messages (messages with multiple keys i guess, which is essentially what my original post was about -- however, it came about not from a bundle issue, but an optimization issue) and also to put in logic to display the key literally, instead of throwing an exception when the key is not found. to sum up, we would have: - one bundle per language (get rid of need to specify bundle in all places) - the ability to include other property files from within property files - modify to display all message keys literally if not found in bundle (and assume all parameters are keys) that would be perfect, wouldn't it? woodchuck --- Joe Germuska <[EMAIL PROTECTED]> wrote: > At 9:43 AM -0800 12/21/04, Woodchuck wrote: > >doesn't it seem odd that ActionMessage doesn't already have the > ability > >to use other keys as replacement values... i can't think of any > reason > >for this other than it was simply forgotten > > Well, it's more complicated than that - is it safe to assume that the > > replacement-keys are in the same bundle as the original message? It > may seem obvious, but given the number of Struts users, we tend to be > > reluctant to build assumptions like that into the code. > > Also, in a constructor that takes objects, there's no way to > distinguish whether the object is intended as a literal value or as a > > key to be looked up. You'd have to come up with some alternate > syntax. > > Finally, I don't think it's all that common of a scenario. I've been > > writing Struts apps for three years, and haven't needed anything like > > what you describe. Struts grows and extends when people have > "itches" that need "scratching." > > If you feel like scratching this itch, feel free to post an > enhancement request in bugzilla. Better yet, attach patches to it > that implement a solution! > > Joe > -- > Joe Germuska > [EMAIL PROTECTED] > http://blog.germuska.com > "Narrow minds are weapons made for mass destruction" -The Ex > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
> but i also see your point. just having one unique message for each unique situation is simple and does the job. the only negative thing is that it takes up more memory when the message bundle is cached in application scope since there will be a lot of duplication in the bundle. i was hoping i could clean things up. for example, instead of this: error.invalid.first.name=Invalid first name error.invalid.last.name=Invalid last name error.invalid.middle.name=Invalid middle name error.invalid.address=Invalid address error.invalid.zip.code=Invalid zip code i could get this: error.generic.invalid=Invalid {0} In this particular case, you're probabaly okay. I was thinking you meant something more complicated, such as an entire paragraph of boilerplate etc. Complex error mesaages though Also, for this specific case, it so happens that the commons-validator library DOES ultimately support looking up replacement values by key and using them in messages also looked up by key. So, if the most common use case for this need is in validation error handling, anyone who uses Struts validator libraries is getting the behavior you seek and not feeling its lack in Struts. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT: RE: ActionMessage replacement "keys" ?
that reminds me, you have to check this site out, it is hilarious: http://www.engrish.com have fun! :D woodchuck --- Jim Barrows <[EMAIL PROTECTED]> wrote: > > > > "Somebody set up us the bomb! All your base are belong to us!" > now > > that would be a major translation problem. no argument here. :D > > The problem isn't translating bad English the problem here is > that this is probably a direct translation of the original language. __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Tiles] Action class to retrieve list and send to tile
Hi I'm new to all of this. I'll try to keep it clear. I've playing around with tiles in a struts application that does mostly getters. My tiles-defs.xml looks like: This setup is to reduce the amount of jsp pages, the ones that only define your content and in what definition to load it in. I'm calling on for instance, accOptions.do. This will call on an action DoTiles that has nothing more than a forward mapping in it to the right definition, in this case "account" Here is my struts-config.xml: < Now that works. What I'm trying now is the following: I have one DTO class Customer.java, one Business/Service class CustomerDAO.java and one action class getAccountAction.java The CustomerDAO has a public List getCustomerList method in it I want to call on in the Action like this: public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { List customerList = CustomerDAO.getInstance().getCustomerList(); request.setAttribute("customer", customerList); return (mapping.findForward("success")); } So this forward (as you can see in my struts-config) should call on the accOptions action that loads the "account" definition, so the List will show in the jsp I defined in the tiles-defs for "account". That jsp looks like this: Name: Address: City: Number of Mortgages: Only problem is, it ain't working. Seems like by calling a double action forward it loses it's session or something. So how can I accomplish what I want? Any idea's on this. It might be simple, but it's all new for me, so I have no clue anymore. I hope it isn't too long, but I wanted to give as much needed detail as possible. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
> -Original Message- > From: Woodchuck [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 10:43 AM > To: Struts Users Mailing List > Subject: RE: ActionMessage replacement "keys" ? > > > hi Jim! > > but i think most of the time when there needs to be a replacement > value, that value is in the form of a noun (at least that's how my > messages are). so given a message with replacement placeholders, > wouldn't the only issue be the placement (position) of these > placeholders within the context of the localized message? > > if the replacement values are for other things that are not nouns then > it would be much harder to object-orientify (new word!) messages. > > but i also see your point. just having one unique message for each > unique situation is simple and does the job. the only negative thing > is that it takes up more memory when the message bundle is cached in > application scope since there will be a lot of duplication in the > bundle. > > i was hoping i could clean things up. for example, instead of this: > > error.invalid.first.name=Invalid first name > error.invalid.last.name=Invalid last name > error.invalid.middle.name=Invalid middle name > error.invalid.address=Invalid address > error.invalid.zip.code=Invalid zip code > > i could get this: > > error.generic.invalid=Invalid {0} In this particular case, you're probabaly okay. I was thinking you meant something more complicated, such as an entire paragraph of boilerplate etc. Complex error mesaages though > > first.name=first name > last.name=last name > middle.name=middle name > address=address > zip.code=zip code > > and hoping i could do something like this: > > new ActionMessage("error.generic.invalid", "first.name"); > > doesn't it seem odd that ActionMessage doesn't already have > the ability > to use other keys as replacement values... i can't think of > any reason > for this other than it was simply forgotten Not really. No one else has had this itch strong enough to scratch it. > > > "Somebody set up us the bomb! All your base are belong to us!" now > that would be a major translation problem. no argument here. :D The problem isn't translating bad English the problem here is that this is probably a direct translation of the original language. > > woodchuck > > > > --- Jim Barrows <[EMAIL PROTECTED]> wrote: > > > > > > > > -Original Message- > > > From: Woodchuck [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, December 21, 2004 8:23 AM > > > To: struts > > > Subject: ActionMessage replacement "keys" ? > > > > > > > > > hihi all, > > > > > > is everyone rolling their own helper function to use other > > > message keys > > > as replacement values when creating ActionMessage or ActionError > > > objects? > > > > > > i'm wondering if there's a better way to do this other than > > > getting the > > > MessageResources object and calling the getMessage() function then > > > putting the results into an object array and then passing this to > > the > > > ActionMessage constructor... > > > > > > can/will this functionality be added to the ActionMessage > > > object in the > > > future? > > > > If you're talking about building a message using other keys, no. I > > generally find that I am better off using a seperate key for such > > situations. The problem I run usually into is one of syntax, > > especially with other languages. Breaking things up like that can > > make it harder to structure a well formed sentence. Since one of my > > pet peeves is messages that are not grammatically correct, I avoid > > this at all costs. > > > > Consider an English message translated into say German. IIRC there > > is a joke about a German teacher who ends every class with 5 minutes > > of verbs. Apparently German verb structure is different then > > English, so how would fit that structure into your messages? Or > > Navajo, which is completely different from any other language? > > > > Such flexibitlity in your messages might be nice from a programming > > standpoint, but could be a major pain when translating into foreign > > languages. > > > > So, my answer to your question is that I don't use message resource > > keys as arguments to my messages. In such cases I just use a > > different message key for each possibilty. > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > __ > Do you Yahoo!? > Read only the mail you want - Yahoo! Mail SpamGuard. > http://promotions.yahoo.com/new_mail > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL
RE: ActionMessage replacement "keys" ?
At 9:43 AM -0800 12/21/04, Woodchuck wrote: doesn't it seem odd that ActionMessage doesn't already have the ability to use other keys as replacement values... i can't think of any reason for this other than it was simply forgotten Well, it's more complicated than that - is it safe to assume that the replacement-keys are in the same bundle as the original message? It may seem obvious, but given the number of Struts users, we tend to be reluctant to build assumptions like that into the code. Also, in a constructor that takes objects, there's no way to distinguish whether the object is intended as a literal value or as a key to be looked up. You'd have to come up with some alternate syntax. Finally, I don't think it's all that common of a scenario. I've been writing Struts apps for three years, and haven't needed anything like what you describe. Struts grows and extends when people have "itches" that need "scratching." If you feel like scratching this itch, feel free to post an enhancement request in bugzilla. Better yet, attach patches to it that implement a solution! Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
hi Jim! but i think most of the time when there needs to be a replacement value, that value is in the form of a noun (at least that's how my messages are). so given a message with replacement placeholders, wouldn't the only issue be the placement (position) of these placeholders within the context of the localized message? if the replacement values are for other things that are not nouns then it would be much harder to object-orientify (new word!) messages. but i also see your point. just having one unique message for each unique situation is simple and does the job. the only negative thing is that it takes up more memory when the message bundle is cached in application scope since there will be a lot of duplication in the bundle. i was hoping i could clean things up. for example, instead of this: error.invalid.first.name=Invalid first name error.invalid.last.name=Invalid last name error.invalid.middle.name=Invalid middle name error.invalid.address=Invalid address error.invalid.zip.code=Invalid zip code i could get this: error.generic.invalid=Invalid {0} first.name=first name last.name=last name middle.name=middle name address=address zip.code=zip code and hoping i could do something like this: new ActionMessage("error.generic.invalid", "first.name"); doesn't it seem odd that ActionMessage doesn't already have the ability to use other keys as replacement values... i can't think of any reason for this other than it was simply forgotten "Somebody set up us the bomb! All your base are belong to us!" now that would be a major translation problem. no argument here. :D woodchuck --- Jim Barrows <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > From: Woodchuck [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 21, 2004 8:23 AM > > To: struts > > Subject: ActionMessage replacement "keys" ? > > > > > > hihi all, > > > > is everyone rolling their own helper function to use other > > message keys > > as replacement values when creating ActionMessage or ActionError > > objects? > > > > i'm wondering if there's a better way to do this other than > > getting the > > MessageResources object and calling the getMessage() function then > > putting the results into an object array and then passing this to > the > > ActionMessage constructor... > > > > can/will this functionality be added to the ActionMessage > > object in the > > future? > > If you're talking about building a message using other keys, no. I > generally find that I am better off using a seperate key for such > situations. The problem I run usually into is one of syntax, > especially with other languages. Breaking things up like that can > make it harder to structure a well formed sentence. Since one of my > pet peeves is messages that are not grammatically correct, I avoid > this at all costs. > > Consider an English message translated into say German. IIRC there > is a joke about a German teacher who ends every class with 5 minutes > of verbs. Apparently German verb structure is different then > English, so how would fit that structure into your messages? Or > Navajo, which is completely different from any other language? > > Such flexibitlity in your messages might be nice from a programming > standpoint, but could be a major pain when translating into foreign > languages. > > So, my answer to your question is that I don't use message resource > keys as arguments to my messages. In such cases I just use a > different message key for each possibilty. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI with tiles controller
I appreciate your response. DAO with JDNI retrieving data from a through a tiles controller ended up working and for those who may go down this path setting up a context on Tomcat 5.5.4 is very different so beware. Jim From: Eddie Bush <[EMAIL PROTECTED]> Reply-To: Eddie Bush <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: JNDI with tiles controller Date: Mon, 20 Dec 2004 19:28:04 -0600 Jim, JNDI is the best-practice approach to dealing with acquisition of data-sources. It's not always practical to use (for example, if you don't have control over the server config) but it sure is slick. Not knowing what is in the tile that produces the error, it's difficult to say what your error could be. If you believe this to be a Tomcat configuration issue, you'd likely be better off asking it to the tomcat-user list. Yes, there are people here that use Tomcat, but this is the Struts list and not everyone here uses Tomcat. If you're attempting to do your queries in your JSPs, I'd recommend against it. Let your actions / business objects / DAOs deal with that. Handling your queries in your JSPs is NOT a best practice approach. An approach that tends to work for me is to write a set of DAOs or use an O/R mapper (http://db.apache.org/ojb/ is one). The DAO appoach is really simple, but fairly powerful - it should suffice for most simple to moderately complex systems. There's a ton of best practice stuff in the Struts' site Resources section and User Guides. There are Tomcat-specific configuration guides on the Tomcat site -- JNDI Howtos and, in fact, even DataSource Howtos. It's really best to go to horse and get things from his mouth. Good Luck! Eddie On Mon, 20 Dec 2004 18:54:32 +, Jim Douglas <[EMAIL PROTECTED]> wrote: > My first question is a design one. Is JDNI the best way to access a > database from a Tiles controller? If so, this is the JDNI class problem I > have. > > This is the tomcat/conf/catalina/localhost/myapp.xml file, > > > crossContext="true"> > > /> > > >username >SYSDBA > > >password >password > > >driverClassName >interbase.interclient.Driver > > >url jdbc:interbase://localhost//usr/opt/tomcat/webapps/database/main.gdb > > > > > This is my Myapp/WEB-INF/web.xml entry, > > > DS Connection > jdbc/UserDB > javax.sql.DataSource > Container > > > ...and this is the error, > > ERROR - ServletException in '/layouts/classicLayout.jsp': Cannot create JDBC > driver of class '' for connect URL 'null' > javax.servlet.ServletException: Cannot create JDBC driver of class '' for > connect URL 'null' >at > org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:880) >at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460) > > For whatever reason it doens't seem to be loading the driver class. This is > the line causing the error, > >Connection conn = ds.getConnection(); > > I'm using Tomcat 5.5.4(if JDNI is not the best way to acces a database from > a Tiles Controller, what is, what is?) > > (I can query by other means using the JDBC driver which is located in > ...tomcat/common/lib/, so it's JDNI that giving me the problem.) > > Thanks, > Jim, > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eddie Bush - 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: ActionMessage replacement "keys" ?
In some cases you may be able to use the "choice" formatter. It won't work in every case, but if say you are looking up a day-of-the-week name to use in a sentence, you might be able to pull it off: shipdate.warning=Your thing will ship on {0,choice,1#Sunday|2#Monday|3#Tuesday|4#Wednesday|5#Thursday|6#Friday|7#Saturday} and then you'd pass an Integer (valued 1 through 7) in in the first token replacement position. Joe > >If you're talking about building a message using other keys, no. I >generally find that I am better off using a seperate key for such >situations. The problem I run usually into is one of syntax, especially >with other languages. Breaking things up like that can make it harder to >structure a well formed sentence. Since one of my pet peeves is messages >that are not grammatically correct, I avoid this at all costs. > >Consider an English message translated into say German. IIRC there is a >joke about a German teacher who ends every class with 5 minutes of >verbs. Apparently German verb structure is different then English, so how >would fit that structure into your messages? Or Navajo, which is >completely different from any other language? > >Such flexibitlity in your messages might be nice from a programming >standpoint, but could be a major pain when translating into foreign languages. > >So, my answer to your question is that I don't use message resource keys >as arguments to my messages. In such cases I just use a different message >key for each possibilty. -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
> -Original Message- > From: Radu Badita [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 9:12 AM > To: Struts Users Mailing List > Subject: RE: ActionMessage replacement "keys" ? > > > > For the 99.9% of the situations I agree with you Jim, but > when you do some > kind of generic subsystem to reuse across applications it's > very possible > to need such behavior. Here might be arguable that such > situations can be > avoided, but still... you might end up presenting messages > that are much > too general to the user. Which is where the art of programming comes in :) In such cases, keeping with my theme, you put some logic in to figure out which specific message, and then use it. Optionally I might just dump several messages out, rather then one. Starting with the most generic and working my way down. My focus is on understandability, not necessarily ease of programming. Given the variety of languages, and the way they get structured, it's better to avoid bad sentence construction, even at the risk of losing specificity. The classic example might be "All your base are belong to us." Sure, you can understand it... but do you really want to become the laughing stock of the internet? > > At 17:53 21.12.2004, you wrote: > > > > > -Original Message- > > > From: Woodchuck [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, December 21, 2004 8:23 AM > > > To: struts > > > Subject: ActionMessage replacement "keys" ? > > > > > > > > > hihi all, > > > > > > is everyone rolling their own helper function to use other > > > message keys > > > as replacement values when creating ActionMessage or ActionError > > > objects? > > > > > > i'm wondering if there's a better way to do this other than > > > getting the > > > MessageResources object and calling the getMessage() function then > > > putting the results into an object array and then passing > this to the > > > ActionMessage constructor... > > > > > > can/will this functionality be added to the ActionMessage > > > object in the > > > future? > > > >If you're talking about building a message using other keys, no. I > >generally find that I am better off using a seperate key for such > >situations. The problem I run usually into is one of > syntax, especially > >with other languages. Breaking things up like that can make > it harder to > >structure a well formed sentence. Since one of my pet > peeves is messages > >that are not grammatically correct, I avoid this at all costs. > > > >Consider an English message translated into say German. > IIRC there is a > >joke about a German teacher who ends every class with 5 minutes of > >verbs. Apparently German verb structure is different then > English, so how > >would fit that structure into your messages? Or Navajo, which is > >completely different from any other language? > > > >Such flexibitlity in your messages might be nice from a programming > >standpoint, but could be a major pain when translating into > foreign languages. > > > >So, my answer to your question is that I don't use message > resource keys > >as arguments to my messages. In such cases I just use a > different message > >key for each possibilty. > > > >- > >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: Workaround for IE not sending "value" on input image tag?
Hello, David, You might as well forget about the wonders of firefox and learn to live for the moment with browsers that merely give you coordinates. Struts has many solutions to this problem which are in the code, such as LookupDispatchAction, ImageButtonBean (or something like that) and so on. All these solutions are built around, in the end, determining what the value of the image tag submit button is. They are all dated and not what you need, I think. I use a number of solutions which are take-offs on the varieties shown at www.michaelmcgrady.com/button . If you are interested in these more esoteric answers, I would be happy to send them to you. For the moment, something like the following works well: import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; public class ImageTagUtil { public static String getName(HttpServletRequest request) { String command = null; String buttonValue = null; Enumeration enum = request.getParameterNames(); while(enum.hasMoreElements()) { buttonValue = (String)enum.nextElement(); if(buttonValue.indexOf(".method") != -1) { command = buttonValue.substring(0,buttonValue.indexOf('.')); } } return command; } } All you have to do in this case is change your code to if you want to get "abc" as the value of "command". Usually image buttons are used when you have multiple commands you might want to use, such as "delete", "submit", "store", etc. So, the code would normally be something like: The variable "command" would be "delete" in the former case and "save" in the latter. If you really want the value of "value", which you probably don't, then you can use request.getParameter(command + ".x"). Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts converters
I only briefly skimmed the chapter. I think that struts isn't proposing the use of property editors because no one has identified this as such a serious shortcoming of the current system. Maybe the author speaks for more people than I realize, but personally, I don't find the current model terribly burdensome. I'm not familiar with how Spring uses PropertyEditors -- are you just talking about taking advantage of an interface for converting strings to other types? Or about some more elaborate use? As the article notes, all property conversion is delegated by Struts to commons-beanutils. I'm not sure what original design decisions went into not using PropertyEditors in beanutils, but I do find Converters much simpler to implement than PropertyEditors! It's probably a fair request to ask that BeanUtils honor PropertyEditors where they are defined -- I'm pretty sure it doesn't now -- but even if it "duplicates what Java beans can do", I think the java.beans.* APIs are generally way overblown for most non-tool uses. If you think BeanUtils should honor PropertyEditors, i'd suggest posting a request in Bugzilla: http://issues.apache.org/bugzilla/enter_bug.cgi?product=Commons Joe At 10:15 AM +0530 12/21/04, <[EMAIL PROTECTED]> wrote: Hi, A new chapter from a Struts book has been posted to TSS. It seems that the solution for automatic conversion and formatting is already there in the form of java bean PropertyEditors. Why isn't Struts ( Shale ? ) proposing the use of PropertyEditors ( like Spring )? Is it too much change to the Struts codebase ? Doesn't this solution from the book duplicate what Java beans can do ? Thanks, Mohan This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
For the 99.9% of the situations I agree with you Jim, but when you do some kind of generic subsystem to reuse across applications it's very possible to need such behavior. Here might be arguable that such situations can be avoided, but still... you might end up presenting messages that are much too general to the user. At 17:53 21.12.2004, you wrote: > -Original Message- > From: Woodchuck [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 8:23 AM > To: struts > Subject: ActionMessage replacement "keys" ? > > > hihi all, > > is everyone rolling their own helper function to use other > message keys > as replacement values when creating ActionMessage or ActionError > objects? > > i'm wondering if there's a better way to do this other than > getting the > MessageResources object and calling the getMessage() function then > putting the results into an object array and then passing this to the > ActionMessage constructor... > > can/will this functionality be added to the ActionMessage > object in the > future? If you're talking about building a message using other keys, no. I generally find that I am better off using a seperate key for such situations. The problem I run usually into is one of syntax, especially with other languages. Breaking things up like that can make it harder to structure a well formed sentence. Since one of my pet peeves is messages that are not grammatically correct, I avoid this at all costs. Consider an English message translated into say German. IIRC there is a joke about a German teacher who ends every class with 5 minutes of verbs. Apparently German verb structure is different then English, so how would fit that structure into your messages? Or Navajo, which is completely different from any other language? Such flexibitlity in your messages might be nice from a programming standpoint, but could be a major pain when translating into foreign languages. So, my answer to your question is that I don't use message resource keys as arguments to my messages. In such cases I just use a different message key for each possibilty. - 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]
Strange exception..
Hi In my Action class I put in request scope a List: request.setAttribute("statuses", allStatuses(getAllGroups(),asm)); Then on my jsp page im iteratig over it: ... ... Everething is fine and iterating, but tomcat's console always give an exception: org.apache.jasper.JasperException: Cannot find bean statuses in scope request This is the ONLY place in jsp file where I'm working with this List... Interesting that I'm gettin a data from this collection normally, but still this exception :) Any ideas? P.S. Probably this started to happen after i migrated from struts 1.1 to 1.2... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts TestCase and Cactus
These practices are well documented in Struts Recipes, published by Manning Publications. --- Danilo From: StrutsMailer [mailto:[EMAIL PROTECTED] Sent: Tue 12/21/2004 5:16 AM To: Struts Users Mailing List Subject: Struts TestCase and Cactus I am looking for documentation and best practices for StrutsTestCase and Cactus and interested in hearing how others are testing their web pages written in Struts. Thanks in advance for your comments and suggestions. Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ActionMessage replacement "keys" ?
> -Original Message- > From: Woodchuck [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 21, 2004 8:23 AM > To: struts > Subject: ActionMessage replacement "keys" ? > > > hihi all, > > is everyone rolling their own helper function to use other > message keys > as replacement values when creating ActionMessage or ActionError > objects? > > i'm wondering if there's a better way to do this other than > getting the > MessageResources object and calling the getMessage() function then > putting the results into an object array and then passing this to the > ActionMessage constructor... > > can/will this functionality be added to the ActionMessage > object in the > future? If you're talking about building a message using other keys, no. I generally find that I am better off using a seperate key for such situations. The problem I run usually into is one of syntax, especially with other languages. Breaking things up like that can make it harder to structure a well formed sentence. Since one of my pet peeves is messages that are not grammatically correct, I avoid this at all costs. Consider an English message translated into say German. IIRC there is a joke about a German teacher who ends every class with 5 minutes of verbs. Apparently German verb structure is different then English, so how would fit that structure into your messages? Or Navajo, which is completely different from any other language? Such flexibitlity in your messages might be nice from a programming standpoint, but could be a major pain when translating into foreign languages. So, my answer to your question is that I don't use message resource keys as arguments to my messages. In such cases I just use a different message key for each possibilty. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Urgent Helppp needed
> -Original Message- > From: Meenakshi S [mailto:[EMAIL PROTECTED] > Sent: Monday, December 20, 2004 10:53 PM > To: 'Struts Users Mailing List'; [EMAIL PROTECTED] > Subject: Urgent Helppp needed > > > > Hi all, > > I am newbie in struts. > I need help from u all in designing my application in Struts. > > Plz correct me if I am wrong anywhere. You asked anywhere, so you get a pet peeve. Using u for you and plz for please and all the other "elite speak" nonsense is annoying please stop using it. > > I m planning to use WSAD for development. & would be implementing it > with Tomcat 4.1(as wsad doesn't give an option to configure a higher > version) & JDK1.3. I'm using WSAD now at work. At home I use Eclipse 3.0 and My Eclipse and half a dozen plugins. I find my home environment much more productive then WSAD in most cases. > > My application is a sales tracking system wherein I have various > modules. > Some of my modules & it's activities are as follows: > 1.Security > a. Role > b. Module > c. Form > d. Access Right > e. Change Password > > 2.Setup > a. Organisation > b. Branch > c. Employee > d. Reporting > e. Designation > > 3.Pre-Sales > a. Team > b. Model > c. Color > d. Status > e. Price > f. Finance Source > g. Prospect > h. Target > i. Case Detail > j. Lead Assignment > > 4.Sales > a. Order Booking > b. Customer > c. Dispatch > > 5.Inventory > a. Stock > > 6.Reports > a. Model Wise > b. Team Wise > c. Branch Wise > d. Case History > e. Ageing Report > > 7.Competitor's Activity > > I m thinking about implementing the security part thru JAAS. > Suggest me > if there's a good alternative to it. The better alternative is to use container managed security, implementing JAAS. Tomcat supports this iirc in the 4.x series. > > I also want to know as to where should I store the jsp pages, /WEB-INF/[pages|jsps|your favorite name] > the action > classes, action forms etc. i.e, what kind of hierarchy should I manage > so that making changes/updations is easy. I typically use: com/blah/ui/web com/blah/ui/web/struts/actions com/blah/ui/web/struts/forms com/blah/ui/web/tags com/blah/ui/web/servlets com/blah/ui/web/listeners com/blah/ui/web/filters com/blah/business/ com/blah/business/stdimplementation com/blah/business/[Custom implementations for customers etc.] com/blah/dao com/blah/dao/hibernate com/blah/model Which is mostly from the J2EE blueprints you can find on the sun site. Good generic reference to all things J2EE on the java.sun.com site. > > It's urgent,plz help. > > Regards, > MS. > > > - > 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]
NullPointerException in ActionServlet.java:854
Hi, I am getting a NullPointerException from ActionServlet's getRequestProcessor() method. This happened while my app is up and running. My application served the requests fine for sometime and suddenly this error message is getting poped up for all the subsequent requests. I couldn't able to figure out what happened exactly at the moment my Application started throwing exception. Can anybody help me in this. Regards, Raju. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionMessage replacement "keys" ?
hihi all, is everyone rolling their own helper function to use other message keys as replacement values when creating ActionMessage or ActionError objects? i'm wondering if there's a better way to do this other than getting the MessageResources object and calling the getMessage() function then putting the results into an object array and then passing this to the ActionMessage constructor... can/will this functionality be added to the ActionMessage object in the future? woodchuck __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I'm completely lost, please help... [Thank you/Update]
Thank you for your comments. After another few hours last night I got things working using the following sequence of steps: 1. Deployed a new blank application 2. Editted all the configuration files, with a text editor (NOTE: there appears to be a name mismatch between the Tiles TLD and the taglib entry in the web.xml of the sample struts application) 3. Rebuilt my Tiles framework, again outside of Eclipse 4. Created the src/ structure by hand 5. Coded my custom tag via my preferred text editor 6. Modified build.xml 7. Built from command-line ant 8. Re-started Tomcat from the command-line Ie, doing "everything" by-hand in a "plain" text editor, outside of Eclipse. Now that's how I'm used to doing development, but I liked the promise Eclipse support for testing and CVS as well as the object/method browsing as I'm new to Java and will always be looking up stuff. I'm going to try an Eclipse configuration again later today, using your comments and starting from a regular "Java Project" in Eclipse and not a "Tomcat Project" and see if more manual intervention in the setup allows better results down the road. Thank you. Eric Quoting Bill Siggelkow <[EMAIL PROTECTED]>: > Eric, > > It sounds like you are definitely reaching frustration level. I do not > have experience on Mac OS X but I can tell you my WinXP experience. > First, I don't use the Sysdeo plug-in; I just start and stop tomcat > manually -- I *do* utilize Eclipse's Ant integration to run my builds; > this works fine. As far as development, when developing I add the > jsp-api.jar and servlet-api.jar to my project's build path; I also > reference these jars in my compile path in my Ant script; however, I do > not include these jars in my WEB-INF/classes as they are part of > Tomcat's system classpath. > > As far as my Ant build; I build a War file with the 'dist' target; and > then deploy by extracting the WAR into Tomcat's webapps directory. There > are other techniques; one popular approach is to point your Tomcat to > your application's working development (web) directory; this will let > you develop on-the-fly without needing to restart Tomcat. > > I suggest you get a simple application working the way you want. Then > you can start on your custom tag app. > > -Bill Siggelkow > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: unknown error message
Well, it looks like you are using a tag (bean:message) that is trying to pull a value from the message resources property file. -Bill Siggelkow Olasoji Ajayi wrote: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE what does this mean, i am just writing a simple program to display the contents of a table in a database using struts (using it ti learn struts), i am not writing any complicates stuff, no resource bundles, internationalizations or things like that, just a form that will display the result and the class tha will fettch the table and give it to the Action that sends it to the form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I'm completely lost, please help...
I too only develop on XP, but one point I wanted to mention... I generally just put j2ee.jar in my classpath for build purposes. That gives you the equivalent of servlet-api.jar and jsp-api.jar, plus just about anything else you might need. There could concievably be version mismatch issues, but it has never come up for me. Not a big thing, but could make your life easier. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Tue, December 21, 2004 9:50 am, Bill Siggelkow said: > Eric, > > It sounds like you are definitely reaching frustration level. I do not > have experience on Mac OS X but I can tell you my WinXP experience. > First, I don't use the Sysdeo plug-in; I just start and stop tomcat > manually -- I *do* utilize Eclipse's Ant integration to run my builds; > this works fine. As far as development, when developing I add the > jsp-api.jar and servlet-api.jar to my project's build path; I also > reference these jars in my compile path in my Ant script; however, I do > not include these jars in my WEB-INF/classes as they are part of > Tomcat's system classpath. > > As far as my Ant build; I build a War file with the 'dist' target; and > then deploy by extracting the WAR into Tomcat's webapps directory. There > are other techniques; one popular approach is to point your Tomcat to > your application's working development (web) directory; this will let > you develop on-the-fly without needing to restart Tomcat. > > I suggest you get a simple application working the way you want. Then > you can start on your custom tag app. > > -Bill Siggelkow > > Eric D. Nielsen wrote: >> Long post follows...I don't know if its an Eclipse, Tomcat or >> Struts problem... >> >> I've been trying to get started on Java Web Development using Eclipse, >> Tomcat, and Struts for the past several weeks. Sometime last week I >> got both simple JSP's (no custom logic) and the same JSP's using Tiles >> working. I've been trying to work on my first custom tag. I'm >> developing on a Mac OS X 10.3 platform. >> >> I had to fiddle a lot for the application wide class path and the >> project-specific class path to get the jsp-api.jar reachable. Once I >> got that fixed the base classes were resolve-able and my classes >> compiled. However, the default build from Eclipse, using the Tomcat >> project template from the Sysdeo plugin, did not appear to put class >> files into the correct location for Tomcat to use them (ie not in >> WEB-INF/classes//). >> >> I looked at the Eclipse In Action book published by Manning to for how >> to invoke Ant from inside Eclipse and use the provided build.xml file >> included in the sample Struts application. >> >> I had to add classpaths to the build.xml to locate servlet-api.jar and >> jsp-api.jar. Once that was done Ant could compile the files and the >> directory structure looked correct. I had a typo in the package for my >> tag handler in the .tld. After I fixed that I started getting: >> javax.servlet.ServletExceptions with the root cause as >> java.lang.NoClassDefFoundError: javax/servlet/Servlet >> >> At which point I started working backward, removing custom components >> from my JSP's, until it was only the Tiles and static template content, >> but I got the same errors. I had been restarting Tomcat several times >> throughout this process from the Sysdeo plugin for Eclipse and didn't >> see anything suspicious in the log. >> >> I now tried the root web-application (default Tomcat install) and >> received: >> javax.servlet.ServletException: Error allocating a servlet instance >> org.apache.catalina.values.ErrorReportValue.invoke(ErrorReportValue.java >> : 105) >> >> At this point I tried stopping and restarting Tomcat from the >> command-line instead of from within Eclipse. The root application >> started working. >> >> My development application however now shows 1 of 2 behaviors: >> 1) Blank page, no content in view source: direct request for a simple >> complete jsp (only template text, valid HTML) or for the basic template >> with an Hi as the body. These pages only use the /tags/tiles >> taglib. >> >> 2) >> org.apache.jasper.JasperException: Failed to load or instantiate >> TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei >> >> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand >> ler.java:50) >> >> on any page that includes the /tags/struts-logic taglib. >> >> I'm afraid I've corrupted by install of Tomcat or Struts somehow. I >> haven't done that much actual development, so re-installing everything >> is doable, but the amount of cross application configuration is >> daunting even with the help on-line tutorials and both the Eclipse in >> Action and Struts in Action books. None of the tutorials indicated >> either of the problems with adding the jsp-api.jar to the eclipse >> and/or Ant classpaths nor the configuration required for .classes to >> end up in /WEB-INF/cla
Re: prevent reset of bean after submit
It's possible that you have your bean in request scope. If so, a new bean is being used for each request. Try putting your bean in session scope. Hubert On Tue, 21 Dec 2004 12:49:55 +0530, sachin <[EMAIL PROTECTED]> wrote: > hi all , > > On submit of a form , struts resets the bean before populating the form . > For that perticular action can i stop the resetting of bean ? > > in my application i need to pupulate one bean from two forms . > It has following structure :- > JSP pages - First.jsp , Second.jsp > Actions - FirstAction.java , SecondAction.java > which refer to same CommonBean. > > the commonBean is first populated from First.jsp > then it is forwarded to Second.jsp to populate the remaining fields .. > But here the commonBean gets resetted ... > I tried to override reset action in CommonBean with a blank method .. but it > not doing .. > > any help is appreciated > Thanks in advance > > Regards, > Sachin Hegde > Software Developer > Paradyne Infotech Limited > Mumbai > 022-38546711 > > - > 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: unknown error message
You're probably using a tag to display error messages. You can surround them by a conditional tag that checks for their presence. Check the tag example at the bottom of http://wiki.apache.org/struts/StrutsCatalogErrorTypes Hubert On Tue, 21 Dec 2004 09:17:19 +0100, Olasoji Ajayi <[EMAIL PROTECTED]> wrote: > javax.servlet.ServletException: Cannot find message resources under key > org.apache.struts.action.MESSAGE > > what does this mean, i am just writing a simple program to display the > contents of a table in a database using struts (using it ti learn struts), i > am not writing any complicates stuff, no resource bundles, > internationalizations or things like that, just a form that will display the > result and the class tha will fettch the table and give it to the Action that > sends it to the form > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I'm completely lost, please help...
Eric, It sounds like you are definitely reaching frustration level. I do not have experience on Mac OS X but I can tell you my WinXP experience. First, I don't use the Sysdeo plug-in; I just start and stop tomcat manually -- I *do* utilize Eclipse's Ant integration to run my builds; this works fine. As far as development, when developing I add the jsp-api.jar and servlet-api.jar to my project's build path; I also reference these jars in my compile path in my Ant script; however, I do not include these jars in my WEB-INF/classes as they are part of Tomcat's system classpath. As far as my Ant build; I build a War file with the 'dist' target; and then deploy by extracting the WAR into Tomcat's webapps directory. There are other techniques; one popular approach is to point your Tomcat to your application's working development (web) directory; this will let you develop on-the-fly without needing to restart Tomcat. I suggest you get a simple application working the way you want. Then you can start on your custom tag app. -Bill Siggelkow Eric D. Nielsen wrote: Long post follows...I don't know if its an Eclipse, Tomcat or Struts problem... I've been trying to get started on Java Web Development using Eclipse, Tomcat, and Struts for the past several weeks. Sometime last week I got both simple JSP's (no custom logic) and the same JSP's using Tiles working. I've been trying to work on my first custom tag. I'm developing on a Mac OS X 10.3 platform. I had to fiddle a lot for the application wide class path and the project-specific class path to get the jsp-api.jar reachable. Once I got that fixed the base classes were resolve-able and my classes compiled. However, the default build from Eclipse, using the Tomcat project template from the Sysdeo plugin, did not appear to put class files into the correct location for Tomcat to use them (ie not in WEB-INF/classes//). I looked at the Eclipse In Action book published by Manning to for how to invoke Ant from inside Eclipse and use the provided build.xml file included in the sample Struts application. I had to add classpaths to the build.xml to locate servlet-api.jar and jsp-api.jar. Once that was done Ant could compile the files and the directory structure looked correct. I had a typo in the package for my tag handler in the .tld. After I fixed that I started getting: javax.servlet.ServletExceptions with the root cause as java.lang.NoClassDefFoundError: javax/servlet/Servlet At which point I started working backward, removing custom components from my JSP's, until it was only the Tiles and static template content, but I got the same errors. I had been restarting Tomcat several times throughout this process from the Sysdeo plugin for Eclipse and didn't see anything suspicious in the log. I now tried the root web-application (default Tomcat install) and received: javax.servlet.ServletException: Error allocating a servlet instance org.apache.catalina.values.ErrorReportValue.invoke(ErrorReportValue.java : 105) At this point I tried stopping and restarting Tomcat from the command-line instead of from within Eclipse. The root application started working. My development application however now shows 1 of 2 behaviors: 1) Blank page, no content in view source: direct request for a simple complete jsp (only template text, valid HTML) or for the basic template with an Hi as the body. These pages only use the /tags/tiles taglib. 2) org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand ler.java:50) on any page that includes the /tags/struts-logic taglib. I'm afraid I've corrupted by install of Tomcat or Struts somehow. I haven't done that much actual development, so re-installing everything is doable, but the amount of cross application configuration is daunting even with the help on-line tutorials and both the Eclipse in Action and Struts in Action books. None of the tutorials indicated either of the problems with adding the jsp-api.jar to the eclipse and/or Ant classpaths nor the configuration required for .classes to end up in /WEB-INF/class. Does anyone know if Mac OS X has serious issues with the "normal" configurations that would be causing those problems? Does anyone know what I did that cased the ServletExceptions near the end of my story or why it can't find struts-logic anymore while it can still find tiles? Any other advice? Thank you. Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts documentation
What I always do is explode the documentation war files, so I never have to run a container to read them. For the packages that come with struts (commons), check their own websites at http://jakarta.apache.org/commons/. Hubert On Tue, 21 Dec 2004 10:43:04 +0100, Olasoji Ajayi <[EMAIL PROTECTED]> wrote: > where can i get do download struts doumentation that is as good as or even > better than the one that comes with struts but is in pdf chm or anyformat > that i can read offline and i dont need to startup a servelet container like > i need to do for the documentation that comes with struts, i also need to > know where i can download good documetation on all the classes that comes > with the struts package (e.g. the commons package) > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts TestCase and Cactus
I am looking for documentation and best practices for StrutsTestCase and Cactus and interested in hearing how others are testing their web pages written in Struts. Thanks in advance for your comments and suggestions. Peter
struts documentation
where can i get do download struts doumentation that is as good as or even better than the one that comes with struts but is in pdf chm or anyformat that i can read offline and i dont need to startup a servelet container like i need to do for the documentation that comes with struts, i also need to know where i can download good documetation on all the classes that comes with the struts package (e.g. the commons package)
Re: Urgent Helppp needed
Hi, This looks like the business case for Struts modules. You could check out the doc. related to the support for Struts modules. 1. Support for separate resource files. 2. You could use a single page ( for example a common 'Search' JSP ) across modules if you want. This promotes reusability. 3. Separate struts config. files Initially it was a bit tricky to set up the modules but the advantages are worth it. The archives of the list shoud help too. Also search the recent archives for the Sun blueprints recommendation for directory hierarchy if you are going that way. Mohan "Meenakshi S" <[EMAIL PROTECTED] To: "'Struts Users Mailing List'" om> <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> cc: 12/21/2004 11:22 AM Subject: Urgent Helppp needed Please respond to "Struts Users Mailing List" Hi all, I am newbie in struts. I need help from u all in designing my application in Struts. Plz correct me if I am wrong anywhere. I m planning to use WSAD for development. & would be implementing it with Tomcat 4.1(as wsad doesn't give an option to configure a higher version) & JDK1.3. My application is a sales tracking system wherein I have various modules. Some of my modules & it's activities are as follows: 1. Security a. Role b. Module c. Form d. Access Right e. Change Password 2. Setup a. Organisation b. Branch c. Employee d. Reporting e. Designation 3. Pre-Sales a. Team b. Model c. Color d. Status e. Price f. Finance Source g. Prospect h. Target i. Case Detail j. Lead Assignment 4. Sales a. Order Booking b. Customer c. Dispatch 5. Inventory a. Stock 6. Reports a. Model Wise b. Team Wise c. Branch Wise d. Case History e. Ageing Report 7. Competitor's Activity I m thinking about implementing the security part thru JAAS. Suggest me if there's a good alternative to it. I also want to know as to where should I store the jsp pages, the action classes, action forms etc. i.e, what kind of hierarchy should I manage so that making changes/updations is easy. It's urgent,plz help. Regards, MS. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
error in request.getAttribute
Hi, Why do I get this error org.apache.jasper.compiler.ParseException: /upload/display.jsp(23,70) Attribute image_path has no value when I use " /> but this works fine when I use " /> Any ideas? Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
unknown error message
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE what does this mean, i am just writing a simple program to display the contents of a table in a database using struts (using it ti learn struts), i am not writing any complicates stuff, no resource bundles, internationalizations or things like that, just a form that will display the result and the class tha will fettch the table and give it to the Action that sends it to the form