Re: Struts Approach

2005-02-25 Thread Vamsee Kanakala
Tim Christopher wrote: CustomerService.java # Used to gain access to CustomerDAO and CustomerSqlMapDAO. CustomerDispatchAction.java (ex insert method - but will contain CRUD) # Gets instance of CustomerService; copies jsp form details into a DynaActionForm; copy form DynaActionForm to Customer.java

Re: Reset Method in ActionForm

2005-02-25 Thread Jeff Beal
I think that the best sentence to explain when to use the reset method comes from the JavaDoc: "In practice, the only properties that need to be reset are those which represent checkboxes on a session-scoped form." Based on that, I would say that your usage is an inconsistent usage of the reset()

RE: Need Help With Action

2005-02-25 Thread David G. Friedman
Scott, What container are you using? Are you going through something like Apache to Tomcat using mod_jk or mod_jk2? Those can change the context so the /uniquepear/uniquepear webapp path could be something Apache is accidentally mapping into your webapp so your webapp thinks that is the invoking

Re: Struts Approach

2005-02-25 Thread Shey Rab Pawo
Without knowing more details it is hard to respond. I did find the description of the relations between the DAO objects a bit "off" from what I would have expected. I would have expected something like: CustomerDAO customerDAO = FactoryDAO.getCustomerDAO(); This assumes that the CustomerDAO is

Re: Struts Approach

2005-02-25 Thread Erik Weber
I think you're doing fine. What is your cause for concern? Does your application behave as you expect? As long as the business decisions are mostly made by your CustomerService object, you're on the right track. DTO == value object. As far as adding "extra classes", why? The goal is to *reduce*

Re: [OT] Bad programming experiences

2005-02-25 Thread Vic
Of course... that is what the definition of good is! Also this is true: Bad architecture has no or detracts from benefits. I would also say that having an architect is sometimes a bad idea, I prefer a title of "tech lead". This means that I do code hardest things. Things that make you more effect

Struts Approach

2005-02-25 Thread Tim Christopher
Hi, I'm currently designing a web application and as time progresses I keep on less convinced that my approach is correct. Applying what I have to a shop example the classes I have are: -- * Note: I use the iBATIS framework. ---

AW: i18n problem

2005-02-25 Thread Hamster
Thanks! Ok, the filter is used now, as I can see in the debugger. However, the text in the form bean still is wrong. :( I don't know what I'm missing... I know that when using WebSphere you can set client-encoding-override=utf-8, I guess this filter does the same, right? Is there more I have t

Re: i18n problem

2005-02-25 Thread Niall Pemberton
All you need to do is configure the Filter - it "wraps" the response in a UTF8EncodingServletResponse for you. Filters were introduced in the Servlet 2.3 specification and you configure it in your web.xml. First identify the filter, then map the url pattern for the requests you want it to handle.

AW: i18n problem

2005-02-25 Thread Hamster
> Here is a good article which covers i18n. > http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n.html > For a full fledged struts application with i18n/l10n support check out > workeffort.dev.java.net Thanks, Antony, for the links. But I'm a bit confused by the article in the javaworld.

Need Help With Action

2005-02-25 Thread Scott Purcell
Hello, I have been working on a new struts site for a couple of days now, and I have some issues that I was hoping to get some resolve on. In my JSP pages. I am using this tag for an action: When I source the file, I have this: " " Why is it adding multiple webapp URI's to my actions? My s

Re: [OT] Bad programming experiences

2005-02-25 Thread Leon Rosenberg
Maybe I'm a lucky one, since I haven't met any real pointy haired bosses. Maybe I'm just able to speak their language. I still believe that good architecture has business benefits, you just have to speak the same language. If you explain the phb in his language that you gonna give him the opportu

Re: [OT] Bad programming experiences

2005-02-25 Thread Leon Rosenberg
Maybe I'm a lucky one, since I haven't met any real pointy haired bosses. Maybe I'm just able to speak their language. I still believe that good architecture has business benefits, you just have to speak the same language. If you explain the phb in his language that you gonna give him the opportu

Re: [OT] Bad programming experiences

2005-02-25 Thread Frank W. Zammetti
Dakota Jack wrote: > I like the basic premise that usually shortcuts are not efficient. > That is also what I have found. > > Jack > > No argument there, except that my basic premise I believe still applies as well... The business has to understand and agree with that basic premise as well as IT

Re: [OT] Bad programming experiences

2005-02-25 Thread Frank W. Zammetti
I don't disagree with anything you've said Leon, but I think your leaving out one factor: it is not unusual for the business to impose a deadline on you that simply makes it impossible to not work suboptimally. Or they impose a budget that has the same effect, or some combination of the two.

Re: Complex Validation with validwhen and large condition

2005-02-25 Thread Niall Pemberton
The condition you have specified means that addressLine1 is only valid when everything is not null. Thats why you always get the error - you need an OR condition. In order to get appropriate "required" messages for the various fields, how about something along the following lines test

Reset Method in ActionForm

2005-02-25 Thread Evan Cooney
I am using the reset method in my actionForm classes to get collections of beans, and then putting them in the request. The JSPs then pull those beans out to dynamically populate HTML select lists. It works fine, but I'm wondering if this is the appropriate way to do such a thing? Thanks, eva

Reset Method in ActionForm

2005-02-25 Thread Evan Cooney
I am using the reset method in my actionForm classes to get collections of beans, and then putting them in the request. The JSPs then pull those beans out to dynamically populate HTML select lists. It works fine, but I'm wondering if this is the appropriate way to do such a thing? Thanks, eva

Re: [OT] Bad programming experiences

2005-02-25 Thread Leon Rosenberg
> Frank W. Zammetti wrote: > At the end of > the day, my job isn't to design architecturally perfect > solutions, it's to implement solutions that support the > business. I make a huge effort to achieve BOTH those goals, > as we all should, but that's not my primary focus. That's > the rea

Re: [OT] Bad programming experiences

2005-02-25 Thread Dakota Jack
I like the basic premise that usually shortcuts are not efficient. That is also what I have found. Jack -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMA

Re: [OT] Bad programming experiences

2005-02-25 Thread Leon Rosenberg
> Frank W. Zammetti wrote: > At the end of > the day, my job isn't to design architecturally perfect > solutions, it's to implement solutions that support the > business. I make a huge effort to achieve BOTH those goals, > as we all should, but that's not my primary focus. That's > the rea

Uploading: And a Wish List for Struts v1.3 and v2.0 Jericho

2005-02-25 Thread Dakota Jack
This is a topic I continually return to, so I thought I would make a one time statement of my rough thoughts on these matters to both lists and save space in the long run. I deal with applications. An upload application is a good starting point, because what I would like to be able to do with Str

Complex Validation with validwhen and large condition

2005-02-25 Thread Todd Nine
Hi all, I'm having some issues getting validwhen to perform the way I want it to. I would like the following general functionality. 1. The user can input an aseAddress. 2. The address as a whole is nullable, however if they fill in any of the fields, they must filling ALL of the address fie

Re: i18n problem

2005-02-25 Thread Antony Joseph
Here is a good article which covers i18n. http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n.html For a full fledged struts application with i18n/l10n support check out workeffort.dev.java.net - Original Message - From: Hamster <[EMAIL PROTECTED]> To: "Struts Users Mailing List"

i18n problem

2005-02-25 Thread Hamster
Hello! I'm having troubles with i18n in the html form. How do I have to make the configuration for successfully getting the text in the right character encodings out of the form in the action? I found out that there is a good web site http://www.anassina.com/struts/i18n/i18n.html - but unfortuna

Re: Struts and Jasper Reports

2005-02-25 Thread Marco Sindoni
Hi! Usually in my struts applications I use the compiled jasper file (.jasper), without recompiling the .jrxml at each request. I've created a class named JasperReportExporter: package utils.report; import java.sql.Connection; import java.util.HashMap; import net.sf.jasperreports.engine.JREmptyDa

Re: Question on conditionally changing action is html:form

2005-02-25 Thread Tim Christopher
Depending on what the two actions do it may be worth exploring the DispatchAction class. http://struts.apache.org/api/org/apache/struts/actions/DispatchAction.html Tim Christopher - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Struts and Jasper Reports

2005-02-25 Thread Martin Gainty
did you email Support for Jasper Assistant? [EMAIL PROTECTED] Martin - Original Message - From: "Saurabh Bhatla" <[EMAIL PROTECTED]> To: "struts" Sent: Friday, February 25, 2005 12:26 PM Subject: Struts and Jasper Reports hi all I am trying to use jasper reports in struts but when i t

Struts and Jasper Reports

2005-02-25 Thread Saurabh Bhatla
hi all I am trying to use jasper reports in struts but when i try to compile the report, the JasperCompileManager can not find the .jrxml file. any suggestions? -saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: Bean that returns Enumeration or Vector

2005-02-25 Thread Erik Weber
Erik Weber wrote: I assume by "bean" you mean form bean (ActionForm). I sometimes carry non-text attributes in form beans, but that data doesn't represent form inputs (which is really why a form bean exists) but maybe metadata associated with a form or with a form input. Typically those attrib

Re: Bean that returns Enumeration or Vector

2005-02-25 Thread Erik Weber
I assume by "bean" you mean form bean (ActionForm). I sometimes carry non-text attributes in form beans, but that data doesn't represent form inputs (which is really why a form bean exists) but maybe metadata associated with a form or with a form input. Typically those attributes will be collec

Re: Struts Jar File conflict

2005-02-25 Thread Erik Weber
What I was trying to get at is, can you use separate classloaders? If you have an older Servlet app (or some other Java app), and you deploy your Struts classes in a different Servlet app, you can (possibly) use different versions of your dependency libraries in the two apps because the two app

Re: Struts Jar File conflict

2005-02-25 Thread Niall Pemberton
The best solution IMO is to have everything running on the same versions. Is upgrading Commons Logging really a "drastic change"? In fact do you know if upgrading any of them is a drastic change? Maybe you should list the Jakarta dependencies you are talking about along with the versions your lega

RE: html-el oddities

2005-02-25 Thread Trevor Hill
Finally solved my own problem here: My application server (JRun 4) does not appear to be compliant with the Servlet 2.3 spec. It is mostly compliant, but seems to be broken in a few subtle ways, one of which manifests itself in struts-el dying a horrible death if you try to use it on JRun 4.

RE: Struts Jar File conflict

2005-02-25 Thread Samuel Cheung
Erik, The legacy project is the back end of the application, and Struts is the front end of the whole servlet application. But the application itself uses some Jakarta jar (older version than the ones in Struts distribution). Any suggestion is welcome. Thank you. Sam -Original Message

Re: [OT] Bad programming experiences

2005-02-25 Thread Frank W. Zammetti
I don't think anyone would argue with your basic premise Antonio. However, I think Andrew is correct... theory and reality rarely meet in the real world. Where I work, we currently have a lot of high-level architects that are trying to implement enterprise-wide solutions to common problems, try

actions, session and multipart problem

2005-02-25 Thread delbd
Hello We have a system here chich send mails to user asking the to do some actions on the system via some url This is restricted area with container managed login using the auth-basic system. When user click the link, browser strts and a popup ask the user for name password. Problem: login i

Re: problem with form variables

2005-02-25 Thread Andrew Hill
ERROR! - Unable to reply to post The following exception was raised while processing your post: "insufficient information in request to formulate hypothesis" Correct following errors and retry: { 1.) "every thing" is not defined 2.) "getting the values from the form bean" fails to provide context 3

RE: How to handle Dates?

2005-02-25 Thread Brian McGovern
Yes. I was able to get it working as well by doing the same thing. I assumed incorrectly that struts tags had to be string or int data types. Note java.util.Date is accepted as well. Makes things real easy. -B -Original Message- From: Catalin Croitoru [mailto:[EMAIL PROTECTED] Sent:

problem with form variables

2005-02-25 Thread Vijay Kumar
Hai Here iam writing a search form where the result should be copied in to a txt file (like report) but I am not getting the values from the form bean every thing is assining to null Bye vijay

Re: How to handle Dates?

2005-02-25 Thread Catalin Croitoru
I solved this problem with a format key in my application.properties: application.date_format.short=dd.MM. application.date_format.long=dd.MM. hh:mm:ss and in presentation layer I use : bean:write. this tag has: formatKey or format as atributes. in my case I use formatKey. if you would l

RE: How to handle Dates?

2005-02-25 Thread Bob Arnott
Brian McGovern wrote: > Hi looking for input on how to approach dates across all > levels of my struts app. Mainly what approach will allow > me to handle formatting on the presentation layer. > > Is there any tag lib available in struts to handle > formatting of a date type object ? I wrote

Re: [OT] Bad programming experiences

2005-02-25 Thread brenmcguire
> Lets face it, those of us who actually try to do things right will just > get labelled as 'perfectionists' and not 'people who get things done', > and the time we have to spend wading through the code the got-doners > left so we can add feature Y makes us look like a hopeless bottleneck > when co

Re: use fmt instead of bean:write??

2005-02-25 Thread Isteyaque Zahur
Add the following in web.xml javax.servlet.jsp.jstl.fmt.localizationContext application.properties javax.servlet.jsp.jstl.fmt.fallbackLocale en Regards Isteyaque On Thu, 24 Feb 2005 00:03:01 -0600, Jason Long <[EMA

Re: [OT] Bad programming experiences

2005-02-25 Thread Andrew Hill
I dunno mate. The usual technique in the industry would seem to be some variant of the following: Write junk Go home on time (actually get to see family occasionally!) Leave for better job letting someone else cleanup mess Repeat as necessary (Health department warning: If repeated excessively ca

[OT] Bad programming experiences

2005-02-25 Thread brenmcguire
I'd like to share with you a small experience with bad programming practices I had just yesterday. I made a Struts-based application a while ago, when my experience with J2EE application was at its beginning. I wrote a "Business Delegate" (the quotes are intentional) that had an HttpServletRequest

Re: Form bean and variable number of fields

2005-02-25 Thread Tom Ziemer
Hi, I've had the same problem and used a mapped backed form bean, which worked really well. Now I am wondering whether it's possible to use the validator plugin to validate the entries. The only problem is that a) I don't know what kind of properties and b) how many of them are submitted. Any id