ApplicationException sample

2005-07-19 Thread Rivka Shisman
Hi all, Can someone please attach a sample of an ApplicationException, BaseException SystemException classes? An example of catching them in an Action class will be very helpful too. Thanks a lot Rivka

Re: saving a DynaForm

2005-07-19 Thread Dewitte Rémi
I think i'll take your second option. I could make something work with serializable as said Martin (and confirmed by you), but if we decide a day to change the way to make data persistent, many frameworks exist for POJOs (eg. hibernate). And Benautils provides : BeanUtilsBean.populate(bean,map)

Dynamic from Elements Generation

2005-07-19 Thread Amol Yadwadkar
Hi List, I want to generate Dynamic Form elements in Struts. I had achieved by doing logic:iterate but the issue in that is I am not getting the dynamic values while retrieval or after the submission of the form. Can anyone suggest me the better way of getting the dynamic form elements in Struts.

Re: Which version of Eclipse does current release of Struts support?

2005-07-19 Thread Borislav Sabev
Fei Jiangnan wrote: Hi there, I am newbie to struts, and tried current release of struts with Eclipse 3.1, they seems not working together, coule you please make me some sense from the versions between struts and eclipse? thanks in advance. Fei

Re: Which version of Eclipse does current release of Struts support?

2005-07-19 Thread 于淼
NitroX没用过,我一直觉得MyEclipse这个插件很好。特别是最新推出的4.0版本,通过增加UML双向建模工具、WYSIWYG的JSP/ Strutsdesigner、可视化的Hibernate/ORM工具、Spring和Web services支持,以及新的Oracle数据库开发,MyEclipse 4.0继续为业界提供全面的产品。 有兴趣可以给我单独回复,有破解版下载。

Problem in Struts Tags

2005-07-19 Thread raghavendra
Hi All See the following code In action class I had written like ArrayList shippers = new ArrayList(); shippers.add(new LabelValueBean(UPS, UPS)); shippers.add(new LabelValueBean(Federal Express, FEDX)); shippers.add(new LabelValueBean(AirBorne, AIRB)); request.setAttribute

Problem in Struts Tags

2005-07-19 Thread raghavendra
Hi All See the following code In action class I had written like ArrayList shippers = new ArrayList(); shippers.add(new LabelValueBean(UPS, UPS)); shippers.add(new LabelValueBean(Federal Express, FEDX)); shippers.add(new LabelValueBean(AirBorne, AIRB)); request.setAttribute

RE: Problem in Struts Tags

2005-07-19 Thread Marsh-Bourdon, Christopher
You are adding the HashMap as an item to the ArrayList, not replacing the contents of the ArrayList with the contents of the HashMap. Try this: List shippers = new ArrayList(map); Instead of: shippers.add(map); And get rid of: ArrayList shippers = new ArrayList(); Cheers Christopher

RE: Problem in Struts Tags

2005-07-19 Thread raghavendra
Please first under stand the problem, the problem in jsp page. Why the jsp page does't complile. Try the following code in u r system. logic:iterate id=row name=data type=java.util.HashMap html:radio property=expectedValue value=%=row.get(VALUE)%/ bean:write name=row property=label/

RE: Problem in Struts Tags

2005-07-19 Thread Paul Moody
I would expect you to have a problem with the jsp. You have an ArrayList with each element being a Map. When you iterate over the ArrayList with the logic:iterate tag each element, identified by row, is a Map. This means that the bean:write name=row property=label/ will fail because there is no

re: Problem in Struts Tags

2005-07-19 Thread raghavendra
Hi paulsmoody This just a sample program I know UI labels are not good, Hard coded in Action class. Main problem is value=%=row.get(VALUE)% line not complied in JSP page why? logic:iterate id=row name=data type=java.util.HashMap html:radio property=expectedVia value=%=row.get(VALUE)%/

Re: instantiation of actionforms in session scope

2005-07-19 Thread Martin Morawetz
Thanks a lot for your answer. There could be several poteintal problems. 1) make sure the JSP does not have the session=false page directive set. It doesn't. 2) Make sure you are referencing the form using the same name as you have it defined in the struts config (remember capitalization

re: Problem in Struts Tags

2005-07-19 Thread Paul Moody
I did a quick test and it seems that having the html:radio ... value=%=row.get(VALUE)% fails for me too. The output html contains html:radio ... instead of input type=radio Doing the following worked: % String val = (String) row.get(VALUE); % html:radio value=%=val% / Anyway, in

Re: instantiation of actionforms in session scope

2005-07-19 Thread BHansard
In the case you outlined, wizardForm should be placed into the session scope when leaving the Funds action. You are not required to use the struts tags to access the data, but if you are using the struts html tags for input etc, you will need to use the html:form tag. If you are not using the

re: Problem in Struts Tags

2005-07-19 Thread BHansard
the problem is that row is a generic object until you cast it i think. I have used this in then past by using syntax like html:radio ... value=%=(String)((java.util.HashMap)row).get(VALUE)% Looks ugly but it works. Note: I have not used it with a HashMap, but have with custom objects like

Re: saving a DynaForm

2005-07-19 Thread Martin Gainty
Bonjour Remi Am glad that satisfies your requirement.. Bon Chance, Martin- - Original Message - From: Dewitte Rémi [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, July 19, 2005 5:32 AM Subject: Re: saving a DynaForm I think i'll take your second

RE: Problem in Struts Tags

2005-07-19 Thread raghavendra
Hi BHansard U r wrong the following not works, jsp page d't compile html:radio property=expectedVia value=%=(String)((java.util.HashMap)row).get(VALUE)% / -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 19, 2005 6:06 PM To: Struts Users

RE: Problem in Struts Tags

2005-07-19 Thread raghavendra
Hi BHansard it works fine the following way ok tks bye. html:radio property=expectedVia value='%=(String)((java.util.HashMap)row).get(VALUE)%' / Regards Raghavendra.E -- Programmer Analyst StinGray Technologies PVT LTD. ODC, GlobalCase Technologies Inc.

Newbie, How to read values from a select to a ActionForm?

2005-07-19 Thread Thomas Sundberg
Hi! I want to read values from a jsp page that contains something like this: form name=selectForm action=connectRolesToUser.do form:text property=userName/ select name=availableRoles size=14 OPTION VALUE=1role1 OPTION VALUE=2role2 OPTION

Re: Manually Instantiating Action classes

2005-07-19 Thread a k
I am not sure I understand when you say: Don't make them static if they depend on session or request state, as you'll shoot yourself in the foot due to the implicit threading in the app server. Why can't I pass in a request object to a static method? As long as it doesn't depend on other

[ANN] BOF XI Struts JSF London / 7:00PM / Kettners

2005-07-19 Thread Pilgrim, Peter
JUST A REMINDER The Eleventh Struts/JSF London Networking BOF is taking place on Tuesday 19 July 2005 at 19:00 or afterwards at Kettners Restaurant in SOHO, West End, London. 29 Romilly Street, London, W1D 5HP Telephone: 0871 223 8103 Nearest Tube: Leicester Square [3 minutes] (or Picadilly

Validation is called before form is populated from my database

2005-07-19 Thread William Shief
Hello, I'm currently having a problem with the Struts validator. I have a very simple Struts bean EditionPersonneForm (extending ValidatorForm) associated with an action EditerPersonneAction and a JSP form EditerPersonne.jsp [From struts-config.xml] action path=/EditionPersonne

Re: submit form

2005-07-19 Thread Jeff Beal
Mnemonics are onlly non-standard because most people don't use them! Our application uses them all over the place, and our users love us for it. W3C accessibility guidelines strongly recommend heavy usage of mnemonics, also. That said, the standard modifier key for mnemonics is Alt, not Ctrl,

Fwd: Manually Instantiating Action classes

2005-07-19 Thread Ed Griebel
Forgot to CC the list! -- Forwarded message -- From: Ed Griebel [EMAIL PROTECTED] Date: Jul 19, 2005 9:45 AM Subject: Re: Manually Instantiating Action classes To: a k [EMAIL PROTECTED] Well, I re-read my answer and it wasn't very clear at all. You can definitely pass instance

Re: Validation is called before form is populated from my database

2005-07-19 Thread mah bub
Hi, As much I know if you need to load data when the page is load before the validation is called. You may load data when the action is called and there could be another action associated with the Submit button's page which will check the validation. I'm not sure whether it make you clear or

Re: Validation is called before form is populated from my database

2005-07-19 Thread Hubert Rabago
It seems that you're trying to prepopulate a form with values from the DB before showing it to the user. So, you have 1) call /EditionPersonne to prepopulate the form 2) show EditerPersonne.jsp to display the form 3) submit the form to /SomePathLikeSubmitPersonne If so, you don't need to specify

Re: submit form

2005-07-19 Thread Glen Mazza
Thanks for the information! Glen Jeff Beal wrote: Mnemonics are onlly non-standard because most people don't use them! Our application uses them all over the place, and our users love us for it. W3C accessibility guidelines strongly recommend heavy usage of mnemonics, also. That said, the

Re: Validation is called before form is populated from my database

2005-07-19 Thread William Shief
Unfortunately EditerPersonneAction do extend DispatchAction (using parameter do) ! (Otherwise your solution would be good) (I answer you personally because I assume such a message is not useful for the list) Billy --- Hubert Rabago [EMAIL PROTECTED] wrote: It seems that you're trying to

Re: Validation is called before form is populated from my database

2005-07-19 Thread Hubert Rabago
No, always respond to the user list when it's relevant to the question you posted. This way, other people can offer solutions as well, and those having the same problems will get to hear/read what the solution is. Since you're extending DispatchAction, you probably should turn off automatic

Re: Validation is called before form is populated from my database

2005-07-19 Thread Hubert Rabago
Another option is to switch to MappingDispatchAction* so you can set different attributes for the different situations that your Action needs to handle. Hubert *http://struts.apache.org/api/org/apache/struts/actions/MappingDispatchAction.html On 7/19/05, Hubert Rabago [EMAIL PROTECTED] wrote:

Re: I remember now why I said I usually use my VO in my ActionForm

2005-07-19 Thread Stéphane Zuckerman
Hello Laurie, I found myself faced with the same question recently, and couldn't figure out a solution. The 'obvious' solution was to use Map-typed properties in my DynaActionForm declaration, but that didn't work :-( What was the problem ? I have used map-typed properties (which, by the

Re: saving a DynaForm

2005-07-19 Thread Dewitte Rémi
I wrote this method to achieve : it can perfectible i think. public static void copyProperties(Object pojo, DynaBean bean) throws IllegalAccessException, InvocationTargetException, ClassNotFoundException, InstantiationException {

Form Bean being cached

2005-07-19 Thread Johnson, Kaerstin
When I call up some of my jsps, occasionally I get an error, that it cannot find a field in XXXFormBean. However, it is the wrong bean that its looking at? Somehow a different frame bean is being held/cached and my jsp is looking at it, instead of looking at its correct form bean. Any ideas

Re: Form Bean being cached

2005-07-19 Thread Hubert Rabago
Since you don't provide any specific info, all we can provide are non-specific suggestions. Make sure you have you bean scopes correct. Typically, a struts form bean can be placed/accessed from either session scope or request scope. Also, make sure you don't put different classes in

validate nested beans part 2

2005-07-19 Thread Scott Purcell
I dug myself into a corner last night and cannot assemble a viable solution. I created a bean (usercheckout) which holds two nested beans (Shipping), and (Billing). Basically I have the user fill out a shipping form, then they fill out a Billing form. The problem is, when I am trying to

Re: validate nested beans part 2

2005-07-19 Thread Michael Jouravlev
On 7/19/05, Scott Purcell [EMAIL PROTECTED] wrote: I dug myself into a corner last night and cannot assemble a viable solution. I created a bean (usercheckout) which holds two nested beans (Shipping), and (Billing). Basically I have the user fill out a shipping form, then they fill out a

Re: validate nested beans part 2

2005-07-19 Thread Dave Newton
Scott Purcell wrote: I dug myself into a corner last night and cannot assemble a viable solution. I created a bean (usercheckout) which holds two nested beans (Shipping), and (Billing). Basically I have the user fill out a shipping form, then they fill out a Billing form. The problem is,

Re: Validate Followup

2005-07-19 Thread Dave Newton
Scott Purcell wrote: What do you mean by the action mappings as the keys in the validation file? If I have the following in my struts-config.xml action path=/ValidateShippingInfo type=com.mb.purcell.action.checkout.ValidateShippingInfo name=shippingcheckout

Integrating Tiles, Struts and Servlet Filter

2005-07-19 Thread Baranj, Bala
JSP version is 1.1, J2EE 1.4, Eclipse 3.0 with MyEclipse 3.8.3, Weblogic 8.1. I have defined the filter in the web.xml as follows: filter filter-nameBreadcrumbFilter/filter-name filter-classtest.BreadcrumbFilter/filter-class /filter

Re: ApplicationException sample

2005-07-19 Thread Laurie Harper
Rivka Shisman wrote: Can someone please attach a sample of an ApplicationException, BaseException SystemException classes? An example of catching them in an Action class will be very helpful too. Can you explain more what it is you're looking for? If you just want to know how to write and

Re: Integrating Tiles, Struts and Servlet Filter

2005-07-19 Thread a k
%@ taglib uri=mytaglib prefix=p % html % out.print(pbHOME /b); %br p:mytaglib//font br Do you have a tag by name mytaglib within myTag.tld? Becuase that's what p:mytaglib/ means. On 7/19/05, Baranj, Bala [EMAIL PROTECTED] wrote: JSP version is 1.1, J2EE 1.4, Eclipse 3.0 with MyEclipse

Re: ApplicationException sample

2005-07-19 Thread erikweber
public class ApplicationException extends Exception { public ApplicationException(String message) { super(message); } } . . . public class SystemException extends Exception { public SystemException(String message) { super(message); } } . . . (typical manager -- facade,

Re: ApplicationException sample

2005-07-19 Thread Glen Mazza
Search on the Struts User ML (http://marc.theaimsgroup.com/?l=struts-userr=1w=2) for those exceptions; also a google on catch ApplicationException (in quotes), etc. may be of help. Glen Rivka Shisman wrote: Can someone please attach a sample of an ApplicationException, BaseException

RE: Integrating Tiles, Struts and Servlet Filter

2005-07-19 Thread Baranj, Bala
Thank you for the prompt response. The problem was that I replaced the *.do with action which is mapped to the ActionServlet of the Struts that has the url pattern defined *.do. It now invokes the doStartTag. I am able to debug the code now. Cheers, Bala -Original Message- From: a k

Re: [FRIDAY OT ANN] My new project is beta

2005-07-19 Thread erikweber
Vic, I could not get it to run on either my RH 7.2/Mozilla 1.7b/1.4.2 box (where an old version used to run), or my FC3/Netscape 8/1.5 box. On the Fedora box (with 1.5 plugin) the site wouldn't work . . . On the Red Hat box, the site partially worked, the app downloaded and the JVM launched but

Re: Newbie, How to read values from a select to a ActionForm?

2005-07-19 Thread Laurie Harper
1) you have a mix of html:... and regular HTML tags in your example. I assume you're showing a combination of what's in your JSP and what gets generated client-side by JavaScript? That shouldn't be a problem, but note that using html:text/ without an enclosing html:form/ isn't valid. 2) if I

Re: Which version of Eclipse does current release of Struts support?

2005-07-19 Thread Michael Rasmussen
What are you trying to do with Struts and Eclipse? Work on a Struts project in Eclipse? Build Struts in Eclipse? Use a WYSIWYG designer in Eclipse? Please clarify... Michael On 7/18/05, Fei Jiangnan [EMAIL PROTECTED] wrote: Hi there, I am newbie to struts, and tried current release of

how forward to servlets?

2005-07-19 Thread Jane Eisenstein
I am integrating Struts into an application containing servlets. I would like to invoke these from Struts components, but am having a problem getting this configured. My application's web.xml contains: servlet servlet-nameLogonServlet/servlet-name display-nameLogonServlet/display-name

Re: Integrating Tiles, Struts and Servlet Filter

2005-07-19 Thread Laurie Harper
Baranj, Baal wrote: JSP version is 1.1, J2EE 1.4, Eclipse 3.0 with MyEclipse 3.8.3, Weblogic 8.1. I have defined the filter in the web.xml as follows: filter filter-nameBreadcrumbFilter/filter-name filter-classtest.BreadcrumbFilter/filter-class

Re: Dynamic from Elements Generation

2005-07-19 Thread Laurie Harper
Amol Yadwadkar wrote: Hi List, I want to generate Dynamic Form elements in Struts. I had achieved by doing logic:iterate but the issue in that is I am not getting the dynamic values while retrieval or after the submission of the form. Can anyone suggest me the better way of getting the dynamic

Re: [OT] Cross-site scripting filters

2005-07-19 Thread Laurie Harper
Craig McClanahan wrote: I would imagine pretty much any blogging software that allows restricted HTML in comments (or pretty much any Wiki software that accepts some HTML for formatting, for that matter) has dealt with this kind of issue. Might be worth spelunking open source versions of those

Re: how forward to servlets?

2005-07-19 Thread Dave Newton
Jane Eisenstein wrote: servlet servlet-nameLogonServlet/servlet-name display-nameLogonServlet/display-name servlet-classcom.med.servlet.cp.LogonServlet/servlet-class /servlet servlet-mapping servlet-nameLogonServlet/servlet-name

Re: I remember now why I said I usually use my VO in my ActionForm

2005-07-19 Thread Laurie Harper
Stéphane Zuckerman wrote: I found myself faced with the same question recently, and couldn't figure out a solution. The 'obvious' solution was to use Map-typed properties in my DynaActionForm declaration, but that didn't work :-( What was the problem ? I have used map-typed properties (which,

Re: how forward to servlets?

2005-07-19 Thread Aleksandar Matijaca
How about: response.sendRedirect(/yourcontext/YourServlet); inside of your code?? Regards, Alex. On 7/19/05, Dave Newton [EMAIL PROTECTED] wrote: Jane Eisenstein wrote: servlet servlet-nameLogonServlet/servlet-name display-nameLogonServlet/display-name

RE: how forward to servlets?

2005-07-19 Thread Jane Eisenstein
I would like to be able to forward to the existing servlets from Struts code in a manner that will not need to change when a servlet is replaced by an equivalent action. Could I use a ForwardAction action to forward to the servlets? -Original Message- From: Dave Newton [mailto:[EMAIL

Re: [OT] Cross-site scripting filters

2005-07-19 Thread Frank W. Zammetti
If you wind up writing one and would be so inclined, feel free to contribute it to JWP :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com On Tue, July 19, 2005 3:21 pm, Laurie Harper said: Craig McClanahan wrote: I would imagine pretty

Re: how forward to servlets?

2005-07-19 Thread Michael Jouravlev
On 7/19/05, Aleksandar Matijaca [EMAIL PROTECTED] wrote: How about: response.sendRedirect(/yourcontext/YourServlet); He wants to forward, not to redirect. I guess, something like this should work: RequestDispatcher disp = getServletContext().getNamedDispatcher(LogonServlet);

Re: how forward to servlets?

2005-07-19 Thread Michael Jouravlev
On 7/19/05, Jane Eisenstein [EMAIL PROTECTED] wrote: I would like to be able to forward to the existing servlets from Struts code in a manner that will not need to change when a servlet is replaced by an equivalent action. Could I use a ForwardAction action to forward to the servlets? I am

Re: how forward to servlets?

2005-07-19 Thread Craig McClanahan
You can indeed forward to a servlet ... the path that you specify must be a context relative path (starting with a slash) to some URL that you have mapped to your other servlet. The restriction with forwards is that you cannot go outside the current webapp. Craig On 7/19/05, Michael Jouravlev

Re: [OT] Cross-site scripting filters

2005-07-19 Thread Laurie Harper
Frank W. Zammetti wrote: If you wind up writing one and would be so inclined, feel free to contribute it to JWP :) If I end up writing one, I'll definitely contribute it or make it available somewhere! L. -- Laurie, Open Source advocate, Java geek and novice blogger:

Re: how forward to servlets?

2005-07-19 Thread Dave Newton
Jane Eisenstein wrote: I would like to be able to forward to the existing servlets from Struts code in a manner that will not need to change when a servlet is replaced by an equivalent action. Could I use a ForwardAction action to forward to the servlets? Are you sure you mean forward? The

Re: how forward to servlets?

2005-07-19 Thread Aleksandar Matijaca
I don't think so, but there may be somebody more experienced that can tell you better... a.m. On 7/19/05, Jane Eisenstein [EMAIL PROTECTED] wrote: I would like to be able to forward to the existing servlets from Struts code in a manner that will not need to change when a servlet is

Re: how forward to servlets?

2005-07-19 Thread Laurie Harper
To offer a concrete example: action path=/somepath type=org.apache.struts.actions.ForwardAction parameter=/servlet/com.med.servlet.cp.LogonServlet/ You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality to a Struts

Re: how forward to servlets?

2005-07-19 Thread Dave Newton
Laurie Harper wrote: action path=/somepath type=org.apache.struts.actions.ForwardAction parameter=/servlet/com.med.servlet.cp.LogonServlet/ You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality to a Struts action.

RE: Re: how forward to servlets?

2005-07-19 Thread Jane Eisenstein
Thanks. That's exactly what I needed and it works. Jane -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Tuesday, July 19, 2005 4:20 PM To: user@struts.apache.org Subject: Re: how forward to servlets? To offer a concrete example: action

Re: how forward to servlets?

2005-07-19 Thread Laurie Harper
Dave Newton wrote: Laurie Harper wrote: action path=/somepath type=org.apache.struts.actions.ForwardAction parameter=/servlet/com.med.servlet.cp.LogonServlet/ You would simply change the type and/or value attributes as appropriate once you'd migrated your servlet functionality

RE: Re: how forward to servlets?

2005-07-19 Thread Jane Eisenstein
Actually, the src attribute does not begin with a / and the page is loading properly. Here's the final code: struts-config.xml action path=/med.cp.logonServlet type=org.apache.struts.actions.ForwardAction

Creating a valid web.xml version 2.4

2005-07-19 Thread Frasso, Anthony
Hello, and thanks in advance for all of your help. I'm new to struts, and to web development in general, and after tinkering with the struts tag libraries, I've decided to switch to using the JSTL tag library. This requires JSP 2.0 support, which I should have, as I am using Tomcat 5.5. My

Re: Creating a valid web.xml version 2.4

2005-07-19 Thread Dave Newton
Frasso, Anthony wrote: I'm new to struts, and to web development in general, and after tinkering with the struts tag libraries, I've decided to switch to using the JSTL tag library. This requires JSP 2.0 support, which I should have, as I am using Tomcat 5.5. No it doesn't.

More wildcards in action mapping; dialog stuff

2005-07-19 Thread Michael Jouravlev
I was thinking about improving action mapping, using more wildcards. Currently wildcards are unavailable for name attribute of forward element. Also, I was thinking of putting several forward names in one forward element. Little by little I came up with the following list, which better suits

Re: Creating a valid web.xml version 2.4

2005-07-19 Thread Brian Lalor
On Jul 19, 2005, at 4:53 PM, Dave Newton wrote: I'm new to struts, and to web development in general, and after tinkering with the struts tag libraries, I've decided to switch to using the JSTL tag library. This requires JSP 2.0 support, which I should have, as I am using Tomcat 5.5. No

Validation Help

2005-07-19 Thread Paul Goepfert
I have created a web app using struts and velocity. I am going to add vaildation on the struts end of the app. I am still learning struts. The only thing I have been able to do is use struts to move between pages by way of buttons.Now I want to add validation to my web app. I have no

Re: Validation Help

2005-07-19 Thread Laurie Harper
Paul Goepfert wrote: I have created a web app using struts and velocity. I am going to add vaildation on the struts end of the app. I am still learning struts. The only thing I have been able to do is use struts to move between pages by way of buttons.Now I want to add validation to my

Re: Reports

2005-07-19 Thread Shajee
HI, I've hit upon this reporting tool from Eclipse BIRT(Bussiness Intelligence Reporting Tools) It's a very good project and presently has a stable release BIRT 1.0 It supports two output formats - HTML PDF and has support for Charting too. Thought to share this info with you guys who are