Help about Model design
I know that Struts treats only the View and Controller parts of the MVC2 model . I have a lot of question about the Model design (management of the state of a Web client (shopping cart object ), management of the displayed data(catalog of object) ). I would wish to know if somebody know the address of a forum where the model part is brought for web application. Even if it is very specific to the business it must have basic rules or advertisings. How to manage the modification of the visualized data and the data concerned of the basket customer. If somebody has information on this subject I am very interested. Sandra --- As of February 12, 2003 Thomson unifies its email addresses on a worldwide basis.Please note my new email address: [EMAIL PROTECTED] Thomson is the leader in solutions and technologies for the entertainment and media industries and serves its customers under its four strategic brands: Technicolor, Grass Valley, RCA and THOMSON. More about Thomson: http://www.thomson.net/videochain - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ANNOUNCE] Struts talks at Lone Star Symposium
Neil Erdwien wrote: You mean Feb 21-23 -- next week? Yes, next week. Will these conferences be (freely?) available in mp3 or ogg format, so we can hear it later? This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AssociatedtilesAction failed!
Greetings, I have the following TilesAction configuration: tiles-defs.xml !-- Main page layout used as a root for other pages defintion.-- definition name=.admin.mainLayout path=/web/admin/layouts/adminBase.jsp controllerUrl=/do/AdminAssociatedAction put name=title value =Administracion/ put name=headervalue=/web/admin/header.jsp/ put name=menuvalue=/web/admin/menu.jsp/ put name=message value=/web/admin/message.jsp/ put name=bodyvalue=/web/admin/body.jsp/ put name=footervalue=/web/admin/footer.jsp/ /definition struts-config.xml !-- AdminWelcome -- action path=/AdminWelcome type=org.apache.struts.scaffold.SuccessAction forward name=success path=.admin.index.page / /action !-- AdminAssociatedAction -- action path=/AdminAssociatedAction type=com.mubimedia.project.associatedAction.AdminAssociatedAction /action AdminAssociatedAction.java public ActionForward execute( ComponentContext arg0, ActionMapping arg1, ActionForm arg2, HttpServletRequest arg3, HttpServletResponse arg4) throws Exception { DateFormat df = DateFormat.getDateInstance (DateFormat.SHORT, getLocale(arg3)); arg0.putAttribute(date, df.format(new Date())); //arg3.setAttribute(date, df.format(new Date())); getServlet().log(ferran date: + df.format(new Date())); return null; } My question: If I iterate over all the request attributes, the context attribute exists but it has the key CompContext, whereas I have read in the documentation that it should be under the org.apache.struts.taglib.tiles.CompContext key ... What's going on? When I get the key, CompContext is empty without the attributes I have inserted, like the date String ... Am I missing something? What am I doing wrong?? versions: jdk 1.40_02 struts: 1.1b3 tomcat: 1.4.18 Ferran Parra Departament de Noves Tecnologies MUBIMEDIA S.L. -- [EMAIL PROTECTED] Mallorca, 275, 1r 2a 08008 BARCELONA T. (+34) 93 215 21 91 F. (+34) 93 215 41 21
Jsp code is sent to the client...?
Hi, I'm running a small struts(1.1b3) app in our Tomcat 4.0.6. After a few days the jsp:s stop working. They don't seem to be processed, instead the jsp code gets sent back to the browser. Our bug reporting app (Scarab) is running in the same Tomcat and it works fine. Any ideas? / Jörgen Lundberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jsp code is sent to the client...?
Can you show us the JSP code? This happened to me when I forgot to import the tag libraries. Try deleting the work directory contents and restart the server. Also make sure the extensions etc. are correct. Affan - Original Message - From: Jörgen Lundberg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 17, 2003 2:58 PM Subject: Jsp code is sent to the client...? Hi, I'm running a small struts(1.1b3) app in our Tomcat 4.0.6. After a few days the jsp:s stop working. They don't seem to be processed, instead the jsp code gets sent back to the browser. Our bug reporting app (Scarab) is running in the same Tomcat and it works fine. Any ideas? / Jörgen Lundberg - 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]
Use of DispatchAction class
Hi I am new in the struts and working on a form in which i want to use the hidden fields in my Action class. Please give me any idea regarding how i can implement the functionalty. Thanks Regards Shashi Bhushan
Re: Problem with ActionError in Templates
Hi, I suppose that you use the input attribute of the action. The action forward to the url found in the input value when validation fail. Change the value of the input. Cedric Holger Danske wrote: Hello List. I have the following problem. I using two parts of struts. First at all the Struts Templates to generate the side-make-up and than the Struts-Form for the forms in the pages. I don't use frames, i'm using a table instead. Now I have the following problem. I have a logon.jsp which is part of the table in an index.jsp . In this logon.jsp I have an form. The validate methode return an error if the user or password is null or empty. The problem is, that the response redirect only to the logon.jsp but not to the index.jsp . Does anybody have an idea how to configure that the page to show an error ist the index.jsp where the logon.jsp is part of. THX Holger __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Bis zu 100 MB Speicher bei http://premiummail.yahoo.de - 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]
date format
Hi i need to display the date fields on the jsp in the format dd/MMM/. is there any simple way i can get this like configuration or writing any class etc.. if anybody has any ideas plz help me Thanks usha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: business logic questions
Dan McGowan wrote: Now I would like to isolate the business logic to a bean class and use the scaffold ProcessAction class ala the Artimus app in Struts in Action. Since the bean class has all the business logic how do I communicate errors? Excellent question! The Scaffold solution is to use a ProcessResult object that encapsulates the typical things that the Model might want to send back to the Controller/View. So far, it can transfer data, a numeric code, messages, a dispatch instruction, along with a name and a scope. If the ProcessAction sees that the ProcessResult contains messages, it converts those to ActionMessages. If it sees it contains data, it expose that data under the given name and scope. And so forth. ProcessAction uses a very simple message format. It's just a list where the first entry is the template key and everything else is replacement parameters. Easy to build, but you can only send back one message. Now that we have a Message object in the Commons, I'm migrating a new version of ProcessResult/ProcessAction to use the Commons Messaging. But, the basic design pattern remains the same. HTH, Ted. --- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jsp code is sent to the client...?
I forgot to say that the struts app works fine when I restart Tomcat. index.jsp looks like this: %@ taglib uri=/WEB-INF/taglibs/struts-logic.tld prefix=logic % logic:redirect page=/index.do/ / Jörgen Lundberg -Original Message- From: Affan Qureshi [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Date: Mon, 17 Feb 2003 15:59:42 +0500 Subject: Re: Jsp code is sent to the client...? Can you show us the JSP code? This happened to me when I forgot to import the tag libraries. Try deleting the work directory contents and restart the server. Also make sure the extensions etc. are correct. Affan - Original Message - From: Jörgen Lundberg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 17, 2003 2:58 PM Subject: Jsp code is sent to the client...? Hi, I'm running a small struts(1.1b3) app in our Tomcat 4.0.6. After a few days the jsp:s stop working. They don't seem to be processed, instead the jsp code gets sent back to the browser. Our bug reporting app (Scarab) is running in the same Tomcat and it works fine. Any ideas? / Jörgen Lundberg - 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: Modifying Form Data in Action
Chris wrote: The problem I am noticing is that when the second action is being invoked, the form is being 'repopulated' with the initial form values that the form had when it was passed to the first action. This is an excellent example of what we mean when we talk about Action chaining, or, as I like to call it, the dark side of Struts. There is a very fine design pattern called Chain of Responsibility which Design Patterns[*] define as Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. Struts does *not* implement a CoR at the Action level. The design is that the Action is the request handler and should do whatever is necessary to complete the transaction, use-case, or story underlying the request. Since it does not implement a CoR, it does try to populate the ActionForm with every request. IMHO, the place to implement a Chain of Responsibility is within your Model. If you need anything this complex, you are a candidate for what Patterns of Enterprise Application Architecture [*] calls Domain Objects. You can convert the HTTP request to a business request (of your own devise) and pass it to as many handlers as you see fit. Personally, I believe implementing a CoR using Struts Actions is a step in the wrong direction. IMHO, we are trying to pull ourselves away from the web tier, not dive back into it =:0) There are times when one Action should forward to another, but only to display the final result. Using a second action to complete a business transaction is where we start sliding toward the dark side. But, each to their own. First, avoid trying to set parameters in the request. Better to set properties on the ActionForm (or other object in the request) that you can control. If the properties are not exposed in the request as parameters, then Struts will ignore them like visitors on a Borg ship. If you need to tweak ActionForm properties so that they do no match the parameters, in Struts 1.0.x, you can defeat autopopulate by setting up your own mutable or locked sentry. In each of your setters, put a test like if (mutable) { ... do the setting } So if you setMutable(false), then no one can overwrite your maverick data. (Ahh, the magic of JavaBeans!) If one of your actions needs to do some more tweaking, they an unlock the bean and then lock it again. In Struts 1.1, you could also do clever things with the processPopulate of the RequestHandler. HT., Ted. [*] See the Struts Other Books page http://jakarta.apache.org/struts/resources/related_books.html for links to these and other fine references -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: How to set the active locale ???
Soren Dalby wrote: As default, I18N Struts-applications are managed by the language in the browser. I would like it to be based on a language-code in the users login and thus I need to set the locale/language designation that controls Struts As far as I know, by default, Struts applications are governed by the default locale of the container/JVM hosting the application. (The last thing Struts is going to do is trust what some whacky browser has to say about it! [:0]) The controller creates a default locale object and places it in the session. The other components look for the object under that key to decide what locale to use. To change the locale, change the locale object in the session. It can be convenient to put methods to access the locale object on a base Action or base ActionForm: Action: protected Locale getLocale(HttpServletRequest request) { Locale result = null; HttpSession session = request.getSession(); if (session!=null) { result = (Locale) session.getAttribute(Action.LOCALE_KEY); if (result == null) result = Locale.getDefault(); } else { result = Locale.getDefault(); } return result; } // end getLocale() protected void setLocale( HttpServletRequest request, Locale locale) { HttpSession session = request.getSession(true); session.setAttribute(Action.LOCALE_KEY,locale); } // end setLocale() ActionForm: public static String STRUTS_LOCALE_KEY = Action.LOCALE_KEY; private Locale locale = null; public void setSessionLocale(Locale locale) { this.locale = locale; } public Locale getSessionLocale() { return this.locale; } public String getSessionLocaleName() { return STRUTS_LOCALE_KEY; } protected void resetSessionLocale(HttpServletRequest request) { HttpSession session = request.getSession(); if (session!=null) { setSessionLocale((Locale) session.getAttribute(getSessionLocaleName())); } else { setSessionLocale(Locale.getDefault()); } } // end resetSessionLocale protected void putSessionLocale(HttpServletRequest request) { Locale locale = getSessionLocale(); if (null==locale) locale = Locale.getDefault(); request.getSession(true).setAttribute(Action.LOCALE_KEY,locale); } // end putSessionLocale public String getLocaleDisplay() { Locale locale = getSessionLocale(); if (null==locale) locale = Locale.getDefault(); return locale.getDisplayName(); } // end getLocaleDisplay public void setLocaleDisplay(String language) { setSessionLocale(new Locale(language,EMPTY)); } These and other convenience methods are part of the BaseAction and BaseForm in the Scaffold package of the Struts contrib folder. HTH, Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Is Struts use of BeanUtils and PropertyUtils inconsistent?
Hi Craig- thanks for the reply. You mention that: The conversions on form submit are required because HTTP request parameters are all strings. which I understood perfectly well. I also understand that, in order for that conversion to work for things like date, a common format must used inbound and outbound. Struts does not have any innate knowledge of your model tier's requirements, and in particular does not know what the caller of RequestUtils.lookup() is going to do with the data that is returned. Doing that by itself would break a huge number of apps that depend on RequestUtils.lookup() working the way it does. I agree here too. Struts shouldn't know, and it never will. When a date is inbound, Struts knows just enough to invoke the converter associated with the Class/Type and that's it. And that's how it should be. But, I'd argue that since the caller of RequestUtils.lookup in this case is a view component (a tag), it should be smart enough to know about the formats I want applied to the information it is rendering. I think you're right that we shouldn't tamper with RequestUtils. It sounds like you'd be better off creating a customized version of the bean:write tag that does the conversion for you. That wouldn't be particularly difficult to implement. However, do you think it's worth considering modifying the bean *and* html tags to recognize edit masks/display formats? Most of the Struts work I'm doing now involves re-creating old Oracle Forms applications as JSP/EJB kinds of applications. Edit masks have been a pretty standard view side concept for decades now. Adding masks as attributes of the tags might be a simple way to implement this feature. Also, I realize there are a bunch of other hacks I could employ like breaking dates into three separate input boxes, but I'd rather hack as a last resort. And beyond dates, I can think of many other applications of formats to simplify rendering of data in the JSP. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set the active locale ???
2003. február 17. 13:20 dátummal Ted Husted ezt írtad: Soren Dalby wrote: As default, I18N Struts-applications are managed by the language in the browser. I would like it to be based on a language-code in the users login and thus I need to set the locale/language designation that controls Struts As far as I know, by default, Struts applications are governed by the default locale of the container/JVM hosting the application. (The last thing Struts is going to do is trust what some whacky browser has to say about it! [:0]) Afaik it sets the Locale to request.getLocale() which uses the accept language header of the request. So it does use the locale set up by the browser. If there is no such header it defaults to the container's one. You can change this in your action via http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html#setLocale(javax.servlet.http.HttpServletRequest, java.util.Locale) Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANNOUNCE] Event Foo In US state blah
Is no one going to do a Struts event in the UK? There is supposedly an apache meetup in London organised through http://apache.meetup.com but last one didn't have enough responders to be worthwhile. Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bean:define and nulls
Hi, I want to use a bean:define tag within a logic:iterate tag to set a bean value to null. How can I do this if I can not use the same value for the id attibute. thanks Jordan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use of DispatchAction class
At 10:59 17/02/03, shashi wrote: I am new in the struts and working on a form in which i want to use the hidden fields in my Action class. Please give me any idea regarding how i can implement the functionalty. Hello, You may find Ted Husted's Artimus example useful. It has a form with hidden fields in it. I think it is the article editing form - you need the article id in a field - but it shouldn't be edited by the user - therefore it is put into a hidden field. I can't remember the URL for the WAR file download off the top of my head. Either Ted can remind us, or you can do a google search. Goodluck Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use of DispatchAction class
Thanks Alot If I make a method with the name of hidden field parameter in the Bean Class and give as parameter in the structs_config.xml. Is it helpful for me to find the hidden field value in the class which is extended the Action class. Regards Shashi - Original Message - From: Alex McLintock [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 6:17 PM Subject: Re: Use of DispatchAction class At 10:59 17/02/03, shashi wrote: I am new in the struts and working on a form in which i want to use the hidden fields in my Action class. Please give me any idea regarding how i can implement the functionalty. Hello, You may find Ted Husted's Artimus example useful. It has a form with hidden fields in it. I think it is the article editing form - you need the article id in a field - but it shouldn't be edited by the user - therefore it is put into a hidden field. I can't remember the URL for the WAR file download off the top of my head. Either Ted can remind us, or you can do a google search. Goodluck Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ - 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]
Where to add Access control
Hi Folks, I want to add some access control in order to protected a site form a group of users. My application uses JAAS so I guess I have to write a PriviligedAction. Where do I have to add the invokation of this Action? Where is the best place in RequestProcessor in order to add such support? Thx and Bye Toby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to add Access control
Instead of an action, perhaps a better approach is to have something like: public boolean hasPrivileges(HttpServletRequest request) { ... } which would check if a user or group has a privilege. I put a method like this in my BaseAction, which extends Action and other actions in my framework extend. This way hasPrivileges() is accessible from any action you write, then you can do something like this in your actions: if(!hasPrivileges()) return mapping.findForward(...); ...rest of action code here... and send them onto a page which tells them to buzz off. Nice thing about this is that if you want to change or add behavior, you don't mess with all the actions, just one method. R On Monday, Feb 17, 2003, at 08:37 US/Eastern, Rademacher Tobias wrote: Hi Folks, I want to add some access control in order to protected a site form a group of users. My application uses JAAS so I guess I have to write a PriviligedAction. Where do I have to add the invokation of this Action? Where is the best place in RequestProcessor in order to add such support? Thx and Bye Toby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] R -- Robert S. Sfeir Senior Java Engineer National Institutes of Health Center for Information Technology Department of Enterprise Custom Applications [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Modifying action input at runtime
Hi all, I am looking to use an action to handle the submission of multiple similar forms. Normally I would use separate actions, but in this case the code is identical for the different forms. Everythign seesm to be working fine except for the specification fo the input parameter on the action. Depending on where the request cam eform, I want to have the validate method return to different places. I thought the easiest way to do this would be to use mapping.setInput() to specify at runtime where I want it to return to, but when I try to do this I am getting Servlet Error: Configuration is frozen: java.lang.IllegalStateException: Configuration is frozen You may be wondering how the same Form class could validate a bunch of different html forms effectively. I actually have different Form classes for each of the html forms, but in order to trick the struts-config into allowing me to specify them all for the single action, I specify a common Form base class in struts-config. Now I want to dynamically set the input parameter in the validate() method of the BaseForm subclass - but I can't see an obvious way to do it if the configuration is frozen. Is there any way around this problem? Colin Hawkett Technical Architect Morpheus - eBusiness Solutions Morpheus Limited, Gibbs House, Kennel Ride, Ascot, Berkshire, SL5 7NT Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Tel: 01344 891621; Fax: 01344 891620 Web: http://www.morpheus.co.uk http://www.morpheus.co.uk/ *Winner of the IBM Solution Excellence Award for e-Commerce 2001* *Solution Provider of the Month - Channel 2002 Magazine* *Investor in People* This email and any files transmitted with it contain information that may be confidential or privileged, and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient any disclosure, copying, distribution or use of the information is prohibited. If you have received this email in error, please notify me by return email immediately. Any opinions expressed are those of the author, not of Morpheus Limited. This message has been checked for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre.
RE: Modifying action input at runtime
You will have to parameterize the action of your html:form then have different actions in struts-config for each of those. A failing validation will return to the appropriate input page. -Original Message- From: Colin Hawkett [mailto:[EMAIL PROTECTED]] Sent: 17 February, 2003 16:09 To: 'Struts Users Mailing List' ([EMAIL PROTECTED]) Subject: Modifying action input at runtime Hi all, I am looking to use an action to handle the submission of multiple similar forms. Normally I would use separate actions, but in this case the code is identical for the different forms. Everythign seesm to be working fine except for the specification fo the input parameter on the action. Depending on where the request cam eform, I want to have the validate method return to different places. I thought the easiest way to do this would be to use mapping.setInput() to specify at runtime where I want it to return to, but when I try to do this I am getting Servlet Error: Configuration is frozen: java.lang.IllegalStateException: Configuration is frozen You may be wondering how the same Form class could validate a bunch of different html forms effectively. I actually have different Form classes for each of the html forms, but in order to trick the struts-config into allowing me to specify them all for the single action, I specify a common Form base class in struts-config. Now I want to dynamically set the input parameter in the validate() method of the BaseForm subclass - but I can't see an obvious way to do it if the configuration is frozen. Is there any way around this problem? Colin Hawkett Technical Architect Morpheus - eBusiness Solutions Morpheus Limited, Gibbs House, Kennel Ride, Ascot, Berkshire, SL5 7NT Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Tel: 01344 891621; Fax: 01344 891620 Web: http://www.morpheus.co.uk http://www.morpheus.co.uk/ *Winner of the IBM Solution Excellence Award for e-Commerce 2001* *Solution Provider of the Month - Channel 2002 Magazine* *Investor in People* This email and any files transmitted with it contain information that may be confidential or privileged, and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient any disclosure, copying, distribution or use of the information is prohibited. If you have received this email in error, please notify me by return email immediately. Any opinions expressed are those of the author, not of Morpheus Limited. This message has been checked for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where to add Access control
Look at how Struts support web server roles. http://jakarta.apache.org/struts/userGuide/preface.html#jaas -Original Message- From: Rademacher Tobias [mailto:[EMAIL PROTECTED]] Sent: 17 February, 2003 15:37 To: '[EMAIL PROTECTED]' Subject: Where to add Access control Hi Folks, I want to add some access control in order to protected a site form a group of users. My application uses JAAS so I guess I have to write a PriviligedAction. Where do I have to add the invokation of this Action? Where is the best place in RequestProcessor in order to add such support? Thx and Bye Toby - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts design flaw -- ActionForms are not true domain objects
Dear Struts Users, I have just bought this book : Expert one-one-one J2EE Design and Development by Rod Johnson. http://www.wrox.com/news/852.htm I will greatly appreciate to have your opinion about this so beeing design flaw of Struts described in the above book. Rod Johnson suggested an alternative framework that takes strengths of following frameworks : Struts, Maverick and WebWork, then offer solution to their weaknesses. Codes are available at : http://www.wrox.com/dynamic/books/download.aspx?isbn=1861007841#downloads The Autor wrote the following : Despite of its popularity, I'm not a big fan of Struts.It's good enough, but far from an ideal J2EE web application framework: * The ActionForm approach - central to Struts request processing model - is poor. Bean binding is primitive, meaning that only string properties are really useful. This adds little value over simply querying request parameters.The idea of copying properties from an action form to business command is inelegant and there is o support for type checking. * Struts is too JSP-oriented, although it is possible to use Struts with other templating technologies. * Struts is based almost entirely on concrete classes. This makes it hard to customize Struts's behavior. * Although things have improved significantly with version 1.1, the Struts codebase is poor. Not surprisingly, there have been numerous deprecations in moving to 1.1. * Struts ActionForms have several particularities that we must consider. As all ActionForms must extend the Struts superclass, they all depend on Struts and the Servlet API. This means that they can not be passed to business objects, as business objects shouldn't depend on a particular web application framework or the Servlet API. Secondly, any request parameters that may contain invalid data (such as numeric inputs, for which the user might enter non-numeric data) must be matched by ActionForm properties of type String. The bean manipulation code behind the scenes will attempt to convert string request parameters to the appropriate type, but any exceptions in attempting to set properties will result in the org.apache.struts.util.RequestUtils class failing the request by throwing a ServletException. * Thus a Struts ActionForm is not a true domain object. It's a place to hold user data until it can be validated and transferred into domain objects such commands. The advantage of this approach is that invalid data can be re-displayed easily. The disavantage is that we will need to get this data into true domain object at some point, so Struts has only taken us part of the way towards true data binding. * The need to derive ApplicationForms from a single superclass has always seemed to me a design flaw. Not only does it tie commands to the Struts framework and Servlet API, it incorrectly exposes inherited framework properties to update via data binding from request parameters. For example, adding a servlet parameter with a string value will break just about any page generated by 1.0 application (with a failure to set a property of ActionServlet to a string) . Struts 1.1 introduces a workaround for this particular problem, but the root of the problem is the whole ActionForm concept. * The ActionForm class also defines a validate() method. Subclasses may override this method to valid the state of an action form after population from request parameters. Struts also offers alternative approaches to validation. * Struts 1.1 corrects many (but not all) of shortcomings of Struts 1.0, for example by allowing the use of multiple controller servletin application.(The mechanism for this isn't very elegant, however it's clear that it was an afterthought). Other enhancement in Struts 1.1 include the introduction of the org.apache.struts.actions.DispatchAction superclass, allowing several actions to be performed by the same class. This is very useful in cases where many request types call for simple handling; it avoids the proliferation of many trivial action classes. Struts also introduces declative exception handling. Thanks a lot in advance for your inputs. José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus
[OT] serving images with apache
I am considering what server configuration to use. What is the current best practices as far as using a servlet container fronted by a web server (e.g. tomcat with apache)? On one hand I like the idea of having everything self contained in a war file, and just using the servlet container to serve everything. On the other hand, I have heard it is best to have a web server like apache serve out static content like images. What configuration are you using in a production evnironment? Thanks, Curt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
The author correctly states that ActionForms are not true domain objects. This is intentional. He also correctly points out that Struts uses too many concrete base classes. We will be working to use more interfaces over time. However, Struts is not too JSP oriented. JSP is the most popular Java user interface technology for web applications so it is appropriately supported by Struts taglibs. You can use *any* UI technology you want with Struts. David From: NYIMI Jose (BMB) [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Struts design flaw -- ActionForms are not true domain objects Date: Mon, 17 Feb 2003 15:37:13 +0100 Dear Struts Users, I have just bought this book : Expert one-one-one J2EE Design and Development by Rod Johnson. http://www.wrox.com/news/852.htm I will greatly appreciate to have your opinion about this so beeing design flaw of Struts described in the above book. Rod Johnson suggested an alternative framework that takes strengths of following frameworks : Struts, Maverick and WebWork, then offer solution to their weaknesses. Codes are available at : http://www.wrox.com/dynamic/books/download.aspx?isbn=1861007841#downloads The Autor wrote the following : Despite of its popularity, I'm not a big fan of Struts.It's good enough, but far from an ideal J2EE web application framework: * The ActionForm approach - central to Struts request processing model - is poor. Bean binding is primitive, meaning that only string properties are really useful. This adds little value over simply querying request parameters.The idea of copying properties from an action form to business command is inelegant and there is o support for type checking. * Struts is too JSP-oriented, although it is possible to use Struts with other templating technologies. * Struts is based almost entirely on concrete classes. This makes it hard to customize Struts's behavior. * Although things have improved significantly with version 1.1, the Struts codebase is poor. Not surprisingly, there have been numerous deprecations in moving to 1.1. * Struts ActionForms have several particularities that we must consider. As all ActionForms must extend the Struts superclass, they all depend on Struts and the Servlet API. This means that they can not be passed to business objects, as business objects shouldn't depend on a particular web application framework or the Servlet API. Secondly, any request parameters that may contain invalid data (such as numeric inputs, for which the user might enter non-numeric data) must be matched by ActionForm properties of type String. The bean manipulation code behind the scenes will attempt to convert string request parameters to the appropriate type, but any exceptions in attempting to set properties will result in the org.apache.struts.util.RequestUtils class failing the request by throwing a ServletException. * Thus a Struts ActionForm is not a true domain object. It's a place to hold user data until it can be validated and transferred into domain objects such commands. The advantage of this approach is that invalid data can be re-displayed easily. The disavantage is that we will need to get this data into true domain object at some point, so Struts has only taken us part of the way towards true data binding. * The need to derive ApplicationForms from a single superclass has always seemed to me a design flaw. Not only does it tie commands to the Struts framework and Servlet API, it incorrectly exposes inherited framework properties to update via data binding from request parameters. For example, adding a servlet parameter with a string value will break just about any page generated by 1.0 application (with a failure to set a property of ActionServlet to a string) . Struts 1.1 introduces a workaround for this particular problem, but the root of the problem is the whole ActionForm concept. * The ActionForm class also defines a validate() method. Subclasses may override this method to valid the state of an action form after population from request parameters. Struts also offers alternative approaches to validation. * Struts 1.1 corrects many (but not all) of shortcomings of Struts 1.0, for example by allowing the use of multiple controller servletin application.(The mechanism for this isn't very elegant, however it's clear that it was an afterthought). Other enhancement in Struts 1.1 include the introduction of the org.apache.struts.actions.DispatchAction superclass, allowing several actions to be performed by the same class. This is very useful in cases where many request types call for simple handling; it avoids the proliferation of many trivial action classes. Struts also introduces declative exception handling. Thanks a lot in advance for your inputs. José. DISCLAIMER This e-mail and any attachment thereto may contain information
RE: Struts design flaw -- ActionForms are not true domain objects
-Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 8:55 AM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects However, Struts is not too JSP oriented. JSP is the most popular Java user interface technology for web applications so it is appropriately supported by Struts taglibs. You can use *any* UI technology you want with Struts. David Well, that's not quite true, is it? I mean, look at this signature for Action.execute: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. -= J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
-Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:55 PM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects The author correctly states that ActionForms are not true domain objects. This is intentional. He also correctly points out that Is there any plan to move ActionForms to true domain objects ? Struts uses too many concrete base classes. We will be working to use more interfaces over time. Any idea on when or version ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
James Childers [EMAIL PROTECTED] writes: You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. http://javaboutique.internet.com/tutorials/Swing/ It can be done. cdh -- Chris D. Halverson http://www.halverson.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
i think the argument isn't about it being too servlet-container centric, rather that it is too tightly coupled to JSP as the view technology. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 9:11 AM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 8:55 AM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects However, Struts is not too JSP oriented. JSP is the most popular Java user interface technology for web applications so it is appropriately supported by Struts taglibs. You can use *any* UI technology you want with Struts. David Well, that's not quite true, is it? I mean, look at this signature for Action.execute: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. -= J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
-Original Message- From: Chris Halverson [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 9:16 AM To: Struts Users Mailing List Subject: Re: Struts design flaw -- ActionForms are not true domain objects James Childers [EMAIL PROTECTED] writes: You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. http://javaboutique.internet.com/tutorials/Swing/ It can be done. Quoth the article: So this article is about connecting a Swing client to an existing servlet application. You still need to run Struts within a servlet context, which was my original point. -= J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts to JSTL EL - Taglib 1.0 implementation
Seriously ... it would be nice if JavaBeans recognized something like mapped properties. But that is for the future -- in the mean time, you'll need to stay within the limits of what the JVM recognizes *now* if you want to leverage EL expressions. Craig -- IMHO, if you look at Lisp.. symbol-plist and friends, one could argue that such facilities belong at Object not Beans :) Seriously -- Java is getting better (I hear 1.5 is going to have generics) at learning from Lisp. Hey.. perhaps one of these days we might even get defmacro which will make all this jsp/tag/expression stuff seem well.. just plain passe. :) Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
E-commerce flow with Transaction Tokens?
Hi All, I am building an e-commerce module. The flow of the application is as follows: PaymentForm-- ProcessPayment -- Receipt Success //End -- Receipt Error -- Payment Form The PaymentForm is loaded with a transaction control token to avoid a double click of the submit button. The PaymentForm also implements a JavaScript strategy that involves a submit flag, once submitted all subsequent submit events are ignored and display a Pleas Wait popup window. So should my user have JavaScript enabled my process payment Action should never encounter an invalid token. My problem lies when the client does not have JavaScript enabled and my Action encounters an invalid token. At this point the user must be presented with a receipt either stating success or failure with the financial transaction. I would like to ignore the fact that the double submit happened and just display the proper receipt. Should I forward the user to a transaction already processed page they will loose their proper receipt and never visually receive the receipt as I also send it by e-mail. I can see a couple solutions and would like some input on my ideas or new strategies others have used. 1) Set the form target to be _blank so a new window will appear for every submit. This works fine in that the client will receive an new window for each submit, one stating the proper receipt, one stating the transaction has already been processed. The only thing I dislike with this strategy is that on receipt error the client clicks back to correct the error and we have this rogue window in the background somewhere. 2) Have the process payment Action populate the session with a bean containing the receipt info. If the process payment Action encounters an invalid Token just wait until the previous submit thread populates the session with the receipt bean and then forward to the receipt page. I like this strategy but am not sure if it is proper to have one thread dependant on another thread to populate the session with the bean and if there might be other complications that might arise from this strategy. Many thanks for your time, Greg
RE: Struts design flaw -- ActionForms are not true domain objects
There are always ultra-literal people out there :-). Of course I meant any java web UI technology. David From: James Childers [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Struts design flaw -- ActionForms are not true domain objects Date: Mon, 17 Feb 2003 09:10:48 -0600 -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 8:55 AM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects However, Struts is not too JSP oriented. JSP is the most popular Java user interface technology for web applications so it is appropriately supported by Struts taglibs. You can use *any* UI technology you want with Struts. David Well, that's not quite true, is it? I mean, look at this signature for Action.execute: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. -= J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Looking for DBMessageResources...
You sure that was James Holmes? -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: Dave Cowden [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 2:56 PM To: [EMAIL PROTECTED] Subject: Looking for DBMessageResources... Hello: I'm working on a project in which we're considering using an alternate MessageResource implementation that is backed by a database. Reading through the archives, [EMAIL PROTECTED] advertised that he'd written this ( called DBMessageResources), and posted a news article back in September on the struts website: snip For anyone interested, I have finished implementing DBMessageResources which allows you to keep the key-value pairs (from your ApplicationResources.properties) in a single database table. /snip The mail archives made frequent reference to this code as well. Unfortunately I cannot get my hands on the module. I have searched all the archives, googled, and emailed mr. Holmes with no response. His website , www.open-tools.org that he refers to is not available ( and has not been for about at least a week). The files are also not available on the struts atlanta yahoo files section. Does anybody have or know where I can find this source code? Thanks! Dave __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
Is there any plan to move ActionForms to true domain objects ? No. See past developer and user list discussions on this topic. Struts uses too many concrete base classes. We will be working to use more interfaces over time. Any idea on when or version ? Because introducing interfaces in certain areas would break backwards compatibility, 2.0 would be a good time to do this. David _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
It's not coupled to JSP at all. Struts provides taglibs to use in JSPs but does not dictate that you must use JSP as your view layer. This has been demonstrated by people using Velocity, XML, and Web Services with Struts. David From: John Espey [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Struts design flaw -- ActionForms are not true domain objects Date: Mon, 17 Feb 2003 09:18:08 -0600 i think the argument isn't about it being too servlet-container centric, rather that it is too tightly coupled to JSP as the view technology. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 9:11 AM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 8:55 AM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects However, Struts is not too JSP oriented. JSP is the most popular Java user interface technology for web applications so it is appropriately supported by Struts taglibs. You can use *any* UI technology you want with Struts. David Well, that's not quite true, is it? I mean, look at this signature for Action.execute: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. -= J - 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] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
If you use any flavor of DynaForms, you can pass the user input directly to the business domain as a DynaBean interface which is not directly connected to Struts, but rather to org.apache.commons.beanutils package. You will most likely still have to convert to some sort of DataTransportObject or ValueObject, but the beanutils package also has conversion tools for this. robert -Original Message- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 10:11 AM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:55 PM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects The author correctly states that ActionForms are not true domain objects. This is intentional. He also correctly points out that Is there any plan to move ActionForms to true domain objects ? Struts uses too many concrete base classes. We will be working to use more interfaces over time. Any idea on when or version ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - 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]
Action not executed, only the *.do url is shown and the screen isempty
Hello, I have the problem that an Action is not executed. When I process the Form (by clicking Submit button), the .do url is shown in the addressbar and an empty screen is shown. The start of the Action javafile does some logging (using Log4J), but I see nothing in the MySQL (to where I am logging to). The ActionForm also does some logging to the same Log4J appender (in the first setter) and that one is shown. Below is the struts-config.xml file (only the Action), it's quite standard as you see. !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/index2.jsp / /action Also, the first couple of lines from the Action: package fimp.logon; // imports removed from this extract public class LogonAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Logger log = Logger.getLogger(LogonAction.class); log.debug(Entered the LogonAction class); If anybody can help me, it would be appreciated. Thank you, Bert Catsburg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
-Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 4:35 PM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects If you use any flavor of DynaForms, you can pass the user input directly to the business domain as a DynaBean interface which is not directly connected to Struts, but rather to org.apache.commons.beanutils package. You will most likely still have to convert to some sort of DataTransportObject or ValueObject, but the beanutils package also has conversion tools for this. Inelegant solution :) That one of the reason Rod Johnson said : ... so Struts has only taken us part of the way towards true data binding. José. robert -Original Message- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 10:11 AM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:55 PM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects The author correctly states that ActionForms are not true domain objects. This is intentional. He also correctly points out that Is there any plan to move ActionForms to true domain objects ? Struts uses too many concrete base classes. We will be working to use more interfaces over time. Any idea on when or version ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - 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: Bean:define and nulls
I don't believe bean:define can help you with that. You'll probably have to do this with a scriptlet, a custom tag.or better yet, you should take care of that in your action class. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: Jordan Thomas [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 7:39 AM To: Struts User List Subject: Bean:define and nulls Hi, I want to use a bean:define tag within a logic:iterate tag to set a bean value to null. How can I do this if I can not use the same value for the id attibute. thanks Jordan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
I agree. I wasn't claiming that Struts IS too tightly coupled to JSP, I was pointing out that the argument from the initial post was not that Struts is too servlet centric but that it is too JSP centric, and that the execute() method signature from a subsequent post doesn't really shed any light on that argument. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 9:31 AM To: [EMAIL PROTECTED] Subject: RE: Struts design flaw -- ActionForms are not true domain objects It's not coupled to JSP at all. Struts provides taglibs to use in JSPs but does not dictate that you must use JSP as your view layer. This has been demonstrated by people using Velocity, XML, and Web Services with Struts. David From: John Espey [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Struts design flaw -- ActionForms are not true domain objects Date: Mon, 17 Feb 2003 09:18:08 -0600 i think the argument isn't about it being too servlet-container centric, rather that it is too tightly coupled to JSP as the view technology. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 9:11 AM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 8:55 AM To: [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects However, Struts is not too JSP oriented. JSP is the most popular Java user interface technology for web applications so it is appropriately supported by Struts taglibs. You can use *any* UI technology you want with Struts. David Well, that's not quite true, is it? I mean, look at this signature for Action.execute: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. -= J - 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] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
NYIMI Jose (BMB) wrote: -Original Message- From: Robert Taylor [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 4:35 PM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects If you use any flavor of DynaForms, you can pass the user input directly to the business domain as a DynaBean interface which is not directly connected to Struts, but rather to org.apache.commons.beanutils package. You will most likely still have to convert to some sort of DataTransportObject or ValueObject, but the beanutils package also has conversion tools for this. Inelegant solution :) That one of the reason Rod Johnson said : ... so Struts has only taken us part of the way towards true data binding. José. True data binding is generally inflexible and troublesome. Having come from the VB world many years ago, and its data binding way of doing things, I can say that I can't stand it. Having a middle ground creates more opportunities and power than not having it. I know some who still do data binding in swing apps, and they end up doing lots of hacks to perform things like validation, both simple and complex, and other 'process' type of actions. All of this is easy to do with the way Struts handles things. Taking the data out of a DynaForm once I'm done doing simple validation and maybe some pre-processing, then doing a simple copyProperties call to take the string version of the data and populate a 'real' domain object is to easy for me want to give up. - Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] serving images with apache
I am using apache(http)/tomcat combo with JK Connector. I gave up on using JK2 as the connector because I had to get my app deployed. JK2's conifguration was rather complex and documentation wasn't 1-2-3 (simple) enough for me to get it done quickly. As a side note. There have been significant speed improvements in Tomcat 4.1.x with tag caching. I am not sure that the speed impact is all that big of a deal for serving your pages straight from Tomcat. I know several developers that serve straight Tomcat and are quite satisfied. Usually others serve from apache because it offers support for other scripting languages and reporting tools. So if you are pure java... tomcat would most likely be sufficient. Brandon Goodin Phase Web and Multimedia PO Box 85 Whitefish MT 59937 P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Curtis Brown [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 7:52 AM To: [EMAIL PROTECTED] Subject: [OT] serving images with apache I am considering what server configuration to use. What is the current best practices as far as using a servlet container fronted by a web server (e.g. tomcat with apache)? On one hand I like the idea of having everything self contained in a war file, and just using the servlet container to serve everything. On the other hand, I have heard it is best to have a web server like apache serve out static content like images. What configuration are you using in a production evnironment? Thanks, Curt - 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]
html:select tag and the value attribute
Hello All, I'm having some trouble getting the html:select tag to recognize the value attribute in order to set the appropriate enclosed option to selected. It works fine with a simple string, but doesn't seem to recognize a RT expression. Here's the code sample: html:select property=mapservicename value=${mapserviceDetailForm.mapservice.name} html:optionsCollection label=name property=mapserviceList value=name / /html:select There is a bean mapservice contained in mapserviceDetailForm, and it has a property name that should identify the option to be selected. Can anyone point out what I'm doing wrong? Thanks! -- john - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] serving images with apache
You could have both. Have an images directory within your war build and have it under webapps. Then use the following setup in your httpd.conf to point to the directory where you have images in your webapps directory. DocumentRoot /usr/local/appserver/webapps/application/images -Original Message- From: Curtis Brown [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 9:52 AM To: [EMAIL PROTECTED] Subject: [OT] serving images with apache I am considering what server configuration to use. What is the current best practices as far as using a servlet container fronted by a web server (e.g. tomcat with apache)? On one hand I like the idea of having everything self contained in a war file, and just using the servlet container to serve everything. On the other hand, I have heard it is best to have a web server like apache serve out static content like images. What configuration are you using in a production evnironment? Thanks, Curt - 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:select tag and the value attribute
John == John C Cartwright John writes: John Hello All, John I'm having some trouble getting the html:select tag to recognize the value John attribute in order to set the appropriate enclosed option to selected. It John works fine with a simple string, but doesn't seem to recognize a RT expression. John Here's the code sample: John html:select John property=mapservicename John value=${mapserviceDetailForm.mapservice.name} John html:optionsCollection Johnlabel=name Johnproperty=mapserviceList Johnvalue=name / John /html:select John There is a bean mapservice contained in mapserviceDetailForm, and it has a John property name that should identify the option to be selected. John Can anyone point out what I'm doing wrong? Well, technically you're not using an RT expression, but an EL expression. Those will only work with the Struts-EL library (or the JSTL). You're obviously somewhat familiar with that, or you wouldn't have tried this. Does that tell you what you need to know? -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Struts and Design Patterns
I'm writing a chapter on Struts for a book, Professional JSP 2.0, from Wrox (http://www.wrox.com/books/1861008325.htm). The reason I'm sending this post is to verify my belief of the different design patterns that Struts implements. From the Core J2EE Design Patterns book (by Alur, Crupi, and Malks), there are 6 patterns discussed: Intercepting Filter Front Controller View Helper Composite View Service to Worker Dispatcher View In Struts, I'm assuming the following: Front Controller (ActionServlet) View Helper (ActionForm) Composite View (Tiles) Service to Worker (ActionServlet to your Actions) Dispatcher View (RequestProcessor) Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Use of DispatchAction class
You would retrieve the hidden form property like any other. In other words you have a hidden form element: input type=hidden name=myProperty value=Be cool/ In you action form you have a property with setter/getter: public MyActionForm extends ActionForm { ... protected String myProperty; ... public void setMyProperty(String myProperty) { this.myProperty = myProperty; } public String getMyProperty() { return this.myProperty; } } In your Action class you would access the ActionForm from within your execute or lookupMethod(DispatchAction) and retrieve the property value: public MyAction extends Action { ... public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { MyActionForm myActionForm = (MyActionForm)form; String myProperty = myActionForm.getMyProperty(); // perform logic/model calls return mapping.findForward(success); } ... } Brandon Goodin Phase Web and Multimedia PO Box 85 Whitefish MT 59937 P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: shashi [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 5:47 AM To: Struts Users Mailing List Subject: Re: Use of DispatchAction class Thanks Alot If I make a method with the name of hidden field parameter in the Bean Class and give as parameter in the structs_config.xml. Is it helpful for me to find the hidden field value in the class which is extended the Action class. Regards Shashi - Original Message - From: Alex McLintock [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 6:17 PM Subject: Re: Use of DispatchAction class At 10:59 17/02/03, shashi wrote: I am new in the struts and working on a form in which i want to use the hidden fields in my Action class. Please give me any idea regarding how i can implement the functionalty. Hello, You may find Ted Husted's Artimus example useful. It has a form with hidden fields in it. I think it is the article editing form - you need the article id in a field - but it shouldn't be edited by the user - therefore it is put into a hidden field. I can't remember the URL for the WAR file download off the top of my head. Either Ted can remind us, or you can do a google search. Goodluck Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ - 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: Controller - Model design question?
Yes, I think I'll do that. I could design an underlying service which could ask to the Factory to return bean's instance and it would contain the business methods implementation and error mapping. This way an Action will have to ask only for result(i.e., getCatalogs()), letting the service implementation to take care how. My scaring was actually to bind Struts with EJBs and I knew that an alternative way was 'behind the scenes'. Thank you, Marco -Original Message- From: John Espey [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 16, 2003 8:23 PM To: Struts Users Mailing List Subject: RE: Controller - Model design question? gotcha, now I understand. I generally try to avoid putting the EJB interface in my Action, so I create a Business Delegate (much like what Ted calls a Facade I believe). This business delegate knows about the ejb's interface, and exposes its own interface. It then delegates calls to the underlying service, trapping implementation specific exceptions and wrapping them in more business related exceptions. This way I can later decide to switch from an EJB implementation to some other service (web service, JNI call, CORBA, etc.), without having to modify the Action class, only the delegate class gets modified. -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 16, 2003 2:12 PM To: Struts-user-list Subject: RE: Controller - Model design question? Sorry John, I wasn't talking about the implementation details, as I will let the EJB container to manage the EJBs pool for me; we could discuss about the way to implement an 'EJB's locator service'; I'm using a Factory and you a Singleton. Both work and are independent from the web application. As your Action(part of the Controller) will have to deal with the business components(just to use it!) my question was: Is it correct the Action to know about the EJB's interface? Hope I'll expained myself better than before. Thank you -Original Message- From: John Espey [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 16, 2003 4:19 AM To: Struts Users Mailing List Subject: RE: Controller - Model design question? I'm not sure about your particular requirements, but I personally use a singleton ServiceLocator to do EJB home lookups. Because it is a Singleton, it is easier to find than the way you've shown, and it can be reused outside of the web container. -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 15, 2003 4:38 PM To: Struts-user-list Subject: Controller - Model design question? Hi, to implement the business logic of my application I decided to use EJBs. I'm designing a factory which could return an instance of the EJBs interface and I'm thinking to call that factory(implemented as a PlugIn and there set as a ServletContext attribute) from my Actions. This would lead the Action to know about the EJBs interface name as part of the notation would be like the following: Factory factory = servlet.getServletContext().getAttribute(org.foo.framework.AppCons tants.EJB_ FACTORY_CLASS); EjbInterface bean = factory.getEjbInterface(); The question is: Is it correct the Action to know about the Model interfaces? Regards, Marco - 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: [ANNOUNCE] Event Foo In US state blah
-Original Message- From: Alex McLintock [mailto:[EMAIL PROTECTED]] Is no one going to do a Struts event in the UK? There is supposedly an apache meetup in London organised through http://apache.meetup.com but last one didn't have enough responders to be worthwhile. Alex Sure, pay my airfare and I'll be more than happy to drink Guinness and talk Struts :-) James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
True data binding is generally inflexible and troublesome. Having come from the VB world many years ago, and its data binding way of doing things, I can say that I can't stand it. Having a middle ground creates more opportunities and power than not having it. I know some who still do data binding in swing apps, and they end up doing lots of hacks to perform things like validation, both simple and complex, and other 'process' type of actions. All of this is easy to do with the way Struts handles things. Taking the data out of a DynaForm once I'm done doing simple validation and maybe some pre-processing, then doing a simple Rod Johnson, recommanded the following : Validation code shouldn't be contained in web-tier controllers or any objects unique to the web tier. This allows the reuse of validation objects for other client types. He continued by : Validation in the web tier has the severe disadvantage of tying validation logic(which may be business logic) to the Servlet API and perhaps also to a web application framework. Unfortunately, Struts tends to push validation in the direction of the web tier, as validation must occur on Struts ActionForm objects, which depend on the Servlet API, and hence *cannot* not be passed into an EJB container and should not be passed to any business object. For example, validation is often accomplished by overrinding the org.apache.struts.action.ActionForm validate method. I consider this (and the fact that ActionForm objects must extends a Struts superclass dependent on the Servlet API) to be a major design flaw. copyProperties call to take the string version of the data and populate a 'real' domain object is to easy for me want to give up. With the framework suggested by Rod Johnson there is no need to make this copy. The design deals with domain object. José. - Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: TilesAction and Controller
Question: Just check to make sure that the controllerClass (NOT controllerURL) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, February 16, 2003 3:53 PM Subject: Re: TilesAction and Controller Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Struts and Design Patterns
This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. -Original Message- From: Matt Raible [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 11:57 AM To: [EMAIL PROTECTED] Subject: [OT] Struts and Design Patterns I'm writing a chapter on Struts for a book, Professional JSP 2.0, from Wrox (http://www.wrox.com/books/1861008325.htm). The reason I'm sending this post is to verify my belief of the different design patterns that Struts implements. From the Core J2EE Design Patterns book (by Alur, Crupi, and Malks), there are 6 patterns discussed: Intercepting Filter Front Controller View Helper Composite View Service to Worker Dispatcher View In Struts, I'm assuming the following: Front Controller (ActionServlet) View Helper (ActionForm) Composite View (Tiles) Service to Worker (ActionServlet to your Actions) Dispatcher View (RequestProcessor) Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
NYIMI Jose (BMB) wrote: True data binding is generally inflexible and troublesome. Having come from the VB world many years ago, and its data binding way of doing things, I can say that I can't stand it. Having a middle ground creates more opportunities and power than not having it. I know some who still do data binding in swing apps, and they end up doing lots of hacks to perform things like validation, both simple and complex, and other 'process' type of actions. All of this is easy to do with the way Struts handles things. Taking the data out of a DynaForm once I'm done doing simple validation and maybe some pre-processing, then doing a simple Rod Johnson, recommanded the following : Validation code shouldn't be contained in web-tier controllers or any objects unique to the web tier. This allows the reuse of validation objects for other client types. He continued by : Validation in the web tier has the severe disadvantage of tying validation logic(which may be business logic) to the Servlet API and perhaps also to a web application framework. Unfortunately, Struts tends to push validation in the direction of the web tier, as validation must occur on Struts ActionForm objects, which depend on the Servlet API, and hence *cannot* not be passed into an EJB container and should not be passed to any business object. For example, validation is often accomplished by overrinding the org.apache.struts.action.ActionForm validate method. I consider this (and the fact that ActionForm objects must extends a Struts superclass dependent on the Servlet API) to be a major design flaw. copyProperties call to take the string version of the data and populate a 'real' domain object is to easy for me want to give up. With the framework suggested by Rod Johnson there is no need to make this copy. The design deals with domain object. José. As it has been pointed out a few times on this list, there are different types of validation. The validation in struts is intended for user input validation, not necessarily business logic validation. Input validation being that a number is input instead of a alphanumeric string, or other such 'simple' validation. I agree that business logic validation should happen in the domain objects. Things like cross property validation, cross object validation, verifying a user name/password, etc. etc. The same could be said for db validation. The database is good at validating referential integrity and things like that. Domain objects are good at cross property/object validation and other business rules that aren't necessarily db or input specific. As we tell our clients, validate where it makes sense. Sometimes that means in all three places, sometimes not. - Robert - Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - 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: [Q] Is Struts use of BeanUtils and PropertyUtils inconsistent?
See below. On Mon, 17 Feb 2003, Jim Krygowski wrote: Date: Mon, 17 Feb 2003 07:20:27 -0500 From: Jim Krygowski [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: [Q] Is Struts use of BeanUtils and PropertyUtils inconsistent? Hi Craig- thanks for the reply. You mention that: The conversions on form submit are required because HTTP request parameters are all strings. which I understood perfectly well. I also understand that, in order for that conversion to work for things like date, a common format must used inbound and outbound. Struts does not have any innate knowledge of your model tier's requirements, and in particular does not know what the caller of RequestUtils.lookup() is going to do with the data that is returned. Doing that by itself would break a huge number of apps that depend on RequestUtils.lookup() working the way it does. I agree here too. Struts shouldn't know, and it never will. When a date is inbound, Struts knows just enough to invoke the converter associated with the Class/Type and that's it. And that's how it should be. But, I'd argue that since the caller of RequestUtils.lookup in this case is a view component (a tag), it should be smart enough to know about the formats I want applied to the information it is rendering. I think you're right that we shouldn't tamper with RequestUtils. It sounds like you'd be better off creating a customized version of the bean:write tag that does the conversion for you. That wouldn't be particularly difficult to implement. However, do you think it's worth considering modifying the bean *and* html tags to recognize edit masks/display formats? The bean:write tag already has a format attribute that works like this. I'm not personally interested in adding this kind of thing to the other tags (my long term plan is to use JavaServer Faces components instead), but it's possible that other Struts committers will be interested in this. Most of the Struts work I'm doing now involves re-creating old Oracle Forms applications as JSP/EJB kinds of applications. Edit masks have been a pretty standard view side concept for decades now. Adding masks as attributes of the tags might be a simple way to implement this feature. Also, I realize there are a bunch of other hacks I could employ like breaking dates into three separate input boxes, but I'd rather hack as a last resort. And beyond dates, I can think of many other applications of formats to simplify rendering of data in the JSP. The best way to get something like this included in Struts would be to post enhancement requests to the bug tracking system: http://nagoya.apache.org/bugzilla/ and then attach patches to implement the proposed changes, as outlined starting at: http://jakarta.apache.org/site/getinvolved.html Then, it's just a matter of talking with the developers about incorporating the changes in some appropriate version of Struts (we're trying to lock down 1.1 at the moment, so it won't go there no matter what). Worst case, at least you'll have the tags implemented the way you like so that *you* can use them. Best case, you'll get an @author tag on a bunch of Struts classes :-). thanks. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
On Mon, 17 Feb 2003, Chris Halverson wrote: Date: Mon, 17 Feb 2003 09:16:01 -0600 From: Chris Halverson [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects James Childers [EMAIL PROTECTED] writes: You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. http://javaboutique.internet.com/tutorials/Swing/ It can be done. It can definitely be done -- but having to deal with GUI frameworks (MFC, AWT, Swing, SWT, ...) is so agonizingly painful that it's why I got involved in building applications for the web in the first place :-). Short answer: Struts was never intended to solve any outside of a servlet container problems, so it should hardly be surprising that using it that way is not particularly graceful. cdh Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
Rod Johnson: The idea of copying properties from an action form to business command is inelegant and there is o support for type checking. Was there so far an around solution ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
Rod Johnson: The idea of copying properties from an action form to business command is inelegant and there is no support for type checking. Was there so far an around solution ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action not executed, only the *.do url is shown and the screen is empty
Hi. Check the log files of your container to see the errors. Usualy this occurs because of wrong path of the JSP Check the line forward name=success-login path=/index2.jsp / - Original Message - From: Bert Catsburg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 17, 2003 5:44 PM Subject: Action not executed, only the *.do url is shown and the screen is empty Hello, I have the problem that an Action is not executed. When I process the Form (by clicking Submit button), the .do url is shown in the addressbar and an empty screen is shown. The start of the Action javafile does some logging (using Log4J), but I see nothing in the MySQL (to where I am logging to). The ActionForm also does some logging to the same Log4J appender (in the first setter) and that one is shown. Below is the struts-config.xml file (only the Action), it's quite standard as you see. !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/index2.jsp / /action Also, the first couple of lines from the Action: package fimp.logon; // imports removed from this extract public class LogonAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Logger log = Logger.getLogger(LogonAction.class); log.debug(Entered the LogonAction class); If anybody can help me, it would be appreciated. Thank you, Bert Catsburg - 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]
Announce: Struts talk .. labs live online w/ 4 Authors
Ted James have now both graciously agreed to join the WebEx labs. Try to see them in person! (I just did DC 2 weeks ago). But if you cant . you can see their presentation and hear them live from your home or work, shortly after their live shows. This in addition to doing real labs for multi row master detail processing to DB ,etc, I just added extra sessions. You can find out more and how to sign up at http://www.mail-archive.com/mvc-programmers%40basebeans.net/msg6.html The qualifier is that this is not intro to Struts and that you please do the hands on labs after each of the 5 sessions. Vic - Best Training by readers of JDJ - Project recovery - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action not executed, only the *.do url is shown and the screenis empty
More info: The tomcat logfile shows: 2003-02-17 18:38:36 action: Processing a POST for /logon 2003-02-17 18:38:36 action: Looking for ActionForm bean under attribute 'logonForm' 2003-02-17 18:38:36 action: Creating new ActionForm instance of class 'fimp.logon.LogonForm' 2003-02-17 18:38:36 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-02-17 18:38:36 action: Populating bean properties from this request 2003-02-17 18:38:36 action: Validating input form properties 2003-02-17 18:38:36 action: Looking for Action instance for class fimp.logon.LogonAction 2003-02-17 18:38:36 action: Double checking for Action instance already there 2003-02-17 18:38:36 action: Creating new Action instance So, this means that the Action is created, isn't it? But why am I not seeing the logger messages or results from Action then? I'm am comparing line for line with other examples, like the one from the Wiley book about Struts, but I can see no differences in the parts that should matter. Bert Catsburg Bert Catsburg wrote: Hello, I have the problem that an Action is not executed. When I process the Form (by clicking Submit button), the .do url is shown in the addressbar and an empty screen is shown. The start of the Action javafile does some logging (using Log4J), but I see nothing in the MySQL (to where I am logging to). The ActionForm also does some logging to the same Log4J appender (in the first setter) and that one is shown. Below is the struts-config.xml file (only the Action), it's quite standard as you see. !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/index2.jsp / /action Also, the first couple of lines from the Action: package fimp.logon; // imports removed from this extract public class LogonAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Logger log = Logger.getLogger(LogonAction.class); log.debug(Entered the LogonAction class); If anybody can help me, it would be appreciated. Thank you, Bert Catsburg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
Just monitoring this thread. I wanted to put my 2 cents in. Being a big dummy ;-) I was thinking... Looking at each view technology that exists out there (JSP,XML,XHTML,WAP,Swing,SWT etc...). We face the reality of having a base form in which the data is collected and transported. In a markup environment we usually have a request object that houses all of the form input. The request also passes around objects which some may use in a jsp page. Others may use a straight xml/xslt solution which keeps the request a simple query transport but has to generate objects for creating those pages on the fly. Anyways, The point being struts forms that request into usable objects for the business-tier to take advantage of. What is the other option? Do we create Factory classes in our business logic to accomodate every sort of means of basic data transport out there and data conversion that needs to happen? Or do we provide an intermediary stage (like struts ActionServlet,ActionForm,Action) that prepares that data for the biz logic. Personally, I think Struts handles a type of view quite well(web). I'm not using Swing in conjunction with struts. But, if I so desired my business logic classes are freely available to be used in a swing or swt environment. As far as validation... Struts is NOT trying to accomplish all validaiton. Some validation can be handled on the Struts side to allow for better preparation of data and data conversion to the biz logic. Errors that are passed form the biz logic layer can be captured and displayed to the user if need be. So validation can still be handled in the business logic. I could go on and on... but I will end it with a couple comments: 1) Struts handles various issues in an appropriate and thoughtful manner. I only look forward to struts improving. 2) What technology out there is not breaking someones ideal model? The reason why we discard one technology for another is that the shortcomings of one technology become unbearable in comparison to another. I can bet you that there would be sizeable opponents to Rod Johnson's way of doing things as well as there are opponents to the way struts does things. No matter what technology you use you will be disatisfied with it in some aspect or another. If it's too unbearable for you to use Struts. Then there are various other frameworks that might serve your project better. :-) Let's just work on making what we have better. :-D Brandon Goodin Phase Web and Multimedia PO Box 85 Whitefish MT 59937 P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 10:10 AM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects True data binding is generally inflexible and troublesome. Having come from the VB world many years ago, and its data binding way of doing things, I can say that I can't stand it. Having a middle ground creates more opportunities and power than not having it. I know some who still do data binding in swing apps, and they end up doing lots of hacks to perform things like validation, both simple and complex, and other 'process' type of actions. All of this is easy to do with the way Struts handles things. Taking the data out of a DynaForm once I'm done doing simple validation and maybe some pre-processing, then doing a simple Rod Johnson, recommanded the following : Validation code shouldn't be contained in web-tier controllers or any objects unique to the web tier. This allows the reuse of validation objects for other client types. He continued by : Validation in the web tier has the severe disadvantage of tying validation logic(which may be business logic) to the Servlet API and perhaps also to a web application framework. Unfortunately, Struts tends to push validation in the direction of the web tier, as validation must occur on Struts ActionForm objects, which depend on the Servlet API, and hence *cannot* not be passed into an EJB container and should not be passed to any business object. For example, validation is often accomplished by overrinding the org.apache.struts.action.ActionForm validate method. I consider this (and the fact that ActionForm objects must extends a Struts superclass dependent on the Servlet API) to be a major design flaw. copyProperties call to take the string version of the data and populate a 'real' domain object is to easy for me want to give up. With the framework suggested by Rod Johnson there is no need to make this copy. The design deals with domain object. José. - Robert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual
Struts design flaw -- ActionForms are not true domain objects
I think Rod makes a common mistake in believing Struts is suppose to act as the base of your domain architecture. Struts is a presentation layer controller. Sophisticated applications will also need their own *domain layer* controller. Yes, ActionForms are not domain objects. They are not suppose to domain objects. They are presentation layer objects. They are not intended to be used as domain objects. ActionForm is not an interface *because* we don't want them to be used as domain objects. It's not a design flaw, but a deliberate design decision that's been documented time and again. Sophisticated applications will also use their own set of beans (or the like). Some (and only some) of properties of the domain objects and the ActionForms will overlap, but they are not the same entity. Among other things, ActionForms are Data Transfer Objects. It's important not to confuse a DTO with the DO. This type of decoupling is what MVC is all about. IMHO, what's missing is a decent Domain Layer framework that can hook up with other presentation layer frameworks like Struts or Tapestry or Maverick or WebWorks, or whatever you've brewed in house. But there should not be *one true framework*, but frameworks at each layer that you can mix and match. But I do agree with Rod that the best presentation layer framework has yet to be built. Meanwhile, AFAIK, we haven't even built a decent business layer framework yet. -Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Velocity. Validator and Indexed Properties
Hello, I have been using Vel-tools (struts) as the view technology along with struts for a while now. I am trying to get Indexed properties on a Velocity Template which is used as an input form which then needs to be validated by Struts validator. I am using dyna beans, and the Value Object is read in fine into an array (indexed) if validation doesn't occur, if validation does occur, the values which are displayed back on the screen are all null. Does anybody have any tips for getting the validation portion working along with vel-struts. Would appreciate any input, as am totally lost. tia Sujay __ Post your free ad now! http://personals.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
Validation code shouldn't be contained in web-tier controllers or any objects unique to the web tier. This allows the reuse of validation objects for other client types. You can perform absolutely no validation in the Struts web tier if you choose. Validate wherever you like; Struts provides a hook into basic UI validation if you want to use it. With the framework suggested by Rod Johnson there is no need to make this copy. The design deals with domain object. If you like other frameworks better than Struts, then use them. ActionForm being a base class instead of an interface is not a significant reason to not use Struts. David _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
Touche... Of course I have to shamelessly plug our domain layer framework, eQ!(www.browsersoft.com/eQ) :-) One of the goals is to be UI independant, as well as deployment independant (app server, client-server, standalone), but we also provide adapters for Swing and of course Struts. If we had demand for others, we would build them as well. I also agree that Struts isn't perfect, but it is pretty darn strong and it is the most widely accepted. - Robert Ted Husted wrote: I think Rod makes a common mistake in believing Struts is suppose to act as the base of your domain architecture. Struts is a presentation layer controller. Sophisticated applications will also need their own *domain layer* controller. Yes, ActionForms are not domain objects. They are not suppose to domain objects. They are presentation layer objects. They are not intended to be used as domain objects. ActionForm is not an interface *because* we don't want them to be used as domain objects. It's not a design flaw, but a deliberate design decision that's been documented time and again. Sophisticated applications will also use their own set of beans (or the like). Some (and only some) of properties of the domain objects and the ActionForms will overlap, but they are not the same entity. Among other things, ActionForms are Data Transfer Objects. It's important not to confuse a DTO with the DO. This type of decoupling is what MVC is all about. IMHO, what's missing is a decent Domain Layer framework that can hook up with other presentation layer frameworks like Struts or Tapestry or Maverick or WebWorks, or whatever you've brewed in house. But there should not be *one true framework*, but frameworks at each layer that you can mix and match. But I do agree with Rod that the best presentation layer framework has yet to be built. Meanwhile, AFAIK, we haven't even built a decent business layer framework yet. -Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
* Thus a Struts ActionForm is not a true domain object. Definitely true -- ActionForm is a view tier object, used (by the framework, not the application) to maintain the server-side state of input fields on an HTML form. Trying to treat it as a domain object is a misuse of Struts, and violates the fundamental design principles that the framework is based on. By the way, this is also why ActionForm is a concrete class and not an interface (which it was in the pre-1.0 days). Too many people didn't understand this crucial concept, and were using it incorrectly (by making their real domain objects implement ActionForm). It was changed to a concrete class to push application developers towards doing the right thing. I'm not in favor of switching it back. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TilesAction and Controller
I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag and the value attribute
Thanks for the prompt reply, David. I didn't realize that there was a Struts-EL library, where would I find such a beast? I don't see mention of it in the 1.1b3 distribution nor in the on-line docs. Thanks again! -- john David M. Karr wrote: John == John C Cartwright John writes: John Hello All, John I'm having some trouble getting the html:select tag to recognize the value John attribute in order to set the appropriate enclosed option to selected. It John works fine with a simple string, but doesn't seem to recognize a RT expression. John Here's the code sample: John html:select John property=mapservicename John value=${mapserviceDetailForm.mapservice.name} John html:optionsCollection Johnlabel=name Johnproperty=mapserviceList Johnvalue=name / John /html:select John There is a bean mapservice contained in mapserviceDetailForm, and it has a John property name that should identify the option to be selected. John Can anyone point out what I'm doing wrong? Well, technically you're not using an RT expression, but an EL expression. Those will only work with the Struts-EL library (or the JSTL). You're obviously somewhat familiar with that, or you wouldn't have tried this. Does that tell you what you need to know? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action not executed, only the *.do url is shown and the screenis empty
Jim, Thanks for your answer. To be sure I changed the index2.jsp to main.jsp, maybe it looks too much like the index.jsp. (Yes, you try the less obvious at some point) No luck. To answer your question on the errors int the logfile of the container, I posted the other reply with more info on that. In there it looks like the Action is started. Only it doesn't come back on the screen. When I type in main.jsp on the address bar, I get the index.jsp, just as my code tells me. Code in main.jsp: logic:notPresent name=LOGGED-IN scope=session logic:forward name=index / /logic:notPresent Ok, normally I hate posting large portions of files, but I feel like I should post a larger piece of my config: !-- == Form Bean Definitions == -- form-beans form-bean name=logonForm type=fimp.logon.LogonForm/ /form-beans !-- == Global Forward Definitions = -- global-forwards forward name=index path=/index.jsp / forward name=logon path=/logon.jsp / forward name=failure path=/errorpage.jsp / forward name=home path=/main.jsp / /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/main.jsp / forward name=index path=/index.jsp / /action /action-mappings To rephrase the quesion to a smaller one: HEEEPP !!! :-) Thanks, Bert Catsburg Jim Theodoridis wrote: Hi. Check the log files of your container to see the errors. Usualy this occurs because of wrong path of the JSP Check the line forward name=success-login path=/index2.jsp / - Original Message - From: Bert Catsburg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 17, 2003 5:44 PM Subject: Action not executed, only the *.do url is shown and the screen is empty Hello, I have the problem that an Action is not executed. When I process the Form (by clicking Submit button), the .do url is shown in the addressbar and an empty screen is shown. The start of the Action javafile does some logging (using Log4J), but I see nothing in the MySQL (to where I am logging to). The ActionForm also does some logging to the same Log4J appender (in the first setter) and that one is shown. Below is the struts-config.xml file (only the Action), it's quite standard as you see. !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/index2.jsp / /action Also, the first couple of lines from the Action: package fimp.logon; // imports removed from this extract public class LogonAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Logger log = Logger.getLogger(LogonAction.class); log.debug(Entered the LogonAction class); If anybody can help me, it would be appreciated. Thank you, Bert Catsburg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
I think Rod makes a common mistake in believing Struts is suppose to act as the base of your domain architecture. Struts is a presentation layer controller. Sophisticated applications will also need their own *domain layer* controller. [John Cavacas] I have to disagree with that statement after reading the book and being somewhat familiar with the framework and solutions that Rod presents. I believe that Rod never makes that assumption, on the contrary. IMHO, what's missing is a decent Domain Layer framework that can hook up with other presentation layer frameworks like Struts or Tapestry or Maverick or WebWorks, or whatever you've brewed in house. But there should not be *one true framework*, but frameworks at each layer that you can mix and match. [John Cavacas] I don't want to sound that I am preaching for Rod's methods and framework, but the framework he came up with does seem to solve (to an extent) this and other problems. It's worth a look at especially since it has gone open source and there is the beginning of active development on the project. Struts is great for what it does, and Rods Spring Framework also seems great at what it does. There are also flaws in both Struts and Spring. But that's the beauty and simplicity of all of this. If you don't like something, don't use it. Use something else or do your own thing. John This communication is intended for the use of the individual(s) or entity it was addressed to and may contain confidential and/or privileged information. If the reader of this transmission is not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited. If you receive this communication in error, please notify the sender immediately and delete this communication from your system(s) to which it was sent and/or replicated to. (c) 2002 Sapiens Americas Corp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
It's 19h22 in Belgium : time for me to go home :-) Thanks for your input ... Soon ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts design flaw -- ActionForms are not true domain objects
On Monday, Feb 17, 2003, at 13:04 US/Eastern, John Cavacas wrote: Struts is great for what it does, and Rods Spring Framework also seems great at what it does. There are also flaws in both Struts and Spring. But that's the beauty and simplicity of all of this. If you don't like something, don't use it. Use something else or do your own thing. Yup exactly. Struts is not a do it all framework for everyone. Struts to me is a purely web-based framework which makes very complex web-based application development easier and more maintainable. Plain and simple. It sets a bunch of rules so we don't have to set them ourselves for every project we work on. If you chose Struts to build Swing GUIs you picked the wrong framework, if you want to add Swing GUIs to maintain say application settings for an application that uses Struts, you can still do that, but it's YOUR job to design YOUR side of the framework properly in order to allow your Swing apps to tap into YOUR framework while keeping it oblivious to the Struts side of things (see Business Delegate Pattern). Now does it break this book's opinion of proper design patterns? I'm sure it does, but what GREAT engineers don't break design pattern rules when it benefits the end result of an application or framework? Patters are there to solve issues we have, not to stick us into lala land with shackles and whips telling us that we must do it that way. They're merely there to help us write better OO design, and from where I sit the Struts design is as close to perfect as you can get right now for WEB-based development. just my 2 cents. R -- Robert S. Sfeir Senior Java Engineer National Institutes of Health Center for Information Technology Department of Enterprise Custom Applications [EMAIL PROTECTED]
Re: html:select tag and the value attribute
John == John C Cartwright John writes: John Thanks for the prompt reply, David. I didn't realize that there was a John Struts-EL library, where would I find such a beast? I don't see mention of it John in the 1.1b3 distribution nor in the on-line docs. It's in a directory in the contrib directory, in the main distribution. There is a small section on it in the user guide. You could search the mail archives for more discussion about it. The following link is for the original announcement about it on struts-user: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg43743.html -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] ; SCJP; SCWCD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action not executed, only the *.do url is shown and the screenis empty
Hello, Found the solution. The answer was lying around in my first posting on this subject. Somewhere I read that the method in the Action was called 'execute'. So, I used that. But the ActionServlet start the method 'perform' and I did not have that one. That's why I did not get an error but the logon.do showed up and just did nothing (empty screen) A bit worying that no error is given when there is no 'execute' method in Action. For newbies like me it's very confusing. So, the new header is now: package fimp.logon; // imports removed from this extract public class LogonAction extends Action { public ActionForward perform(ActionMapping mapping, Now I do get the logger info in my JDBC-appender. Problem solved. Bert Catsburg Bert Catsburg wrote: Jim, Thanks for your answer. To be sure I changed the index2.jsp to main.jsp, maybe it looks too much like the index.jsp. (Yes, you try the less obvious at some point) No luck. To answer your question on the errors int the logfile of the container, I posted the other reply with more info on that. In there it looks like the Action is started. Only it doesn't come back on the screen. When I type in main.jsp on the address bar, I get the index.jsp, just as my code tells me. Code in main.jsp: logic:notPresent name=LOGGED-IN scope=session logic:forward name=index / /logic:notPresent Ok, normally I hate posting large portions of files, but I feel like I should post a larger piece of my config: !-- == Form Bean Definitions == -- form-beans form-bean name=logonForm type=fimp.logon.LogonForm/ /form-beans !-- == Global Forward Definitions = -- global-forwards forward name=index path=/index.jsp / forward name=logon path=/logon.jsp / forward name=failure path=/errorpage.jsp / forward name=home path=/main.jsp / /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/main.jsp / forward name=index path=/index.jsp / /action /action-mappings To rephrase the quesion to a smaller one: HEEEPP !!! :-) Thanks, Bert Catsburg Jim Theodoridis wrote: Hi. Check the log files of your container to see the errors. Usualy this occurs because of wrong path of the JSP Check the line forward name=success-login path=/index2.jsp / - Original Message - From: Bert Catsburg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 17, 2003 5:44 PM Subject: Action not executed, only the *.do url is shown and the screen is empty Hello, I have the problem that an Action is not executed. When I process the Form (by clicking Submit button), the .do url is shown in the addressbar and an empty screen is shown. The start of the Action javafile does some logging (using Log4J), but I see nothing in the MySQL (to where I am logging to). The ActionForm also does some logging to the same Log4J appender (in the first setter) and that one is shown. Below is the struts-config.xml file (only the Action), it's quite standard as you see. !-- Process a user logon -- actionpath=/logon type=fimp.logon.LogonAction name=logonForm scope=request validate=false input=/logon.jsp forward name=success-login path=/index2.jsp / /action Also, the first couple of lines from the Action: package fimp.logon; // imports removed from this extract public class LogonAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { Logger log = Logger.getLogger(LogonAction.class); log.debug(Entered the LogonAction class); If anybody can help me, it would be appreciated. Thank you, Bert Catsburg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Struts and Design Patterns
Hi, This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. Wow, that's exactly what I'm searching! Can you tell me where it's possible to download this draft version? Thanks in advance, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Struts and Design Patterns
It appears I was wrong. You can only download the Tiles and Validator chapters (these are the final versions). http://www.manning.com/getpage.html?project=hustedfilename=chapters.html Ted had sent me the draft of the entire book at one point but it looks like you can't download these chapters from anywhere. Sorry, I won't email these out to anyone as I don't have Teds permission to do so. -Original Message- From: Thorsten Schäfer [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:30 PM To: 'Struts Users Mailing List' Subject: RE: [OT] Struts and Design Patterns Hi, This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. Wow, that's exactly what I'm searching! Can you tell me where it's possible to download this draft version? Thanks in advance, Thorsten - 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] Struts and Design Patterns
Well, it isn't like his book isn't available in stores. If you want to read it, you could always buy a copy. It is a really good read. -Original Message- From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:42 PM To: Struts Users Mailing List Subject: RE: [OT] Struts and Design Patterns It appears I was wrong. You can only download the Tiles and Validator chapters (these are the final versions). http://www.manning.com/getpage.html?project=hustedfilename=chapters.html Ted had sent me the draft of the entire book at one point but it looks like you can't download these chapters from anywhere. Sorry, I won't email these out to anyone as I don't have Teds permission to do so. -Original Message- From: Thorsten Schäfer [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:30 PM To: 'Struts Users Mailing List' Subject: RE: [OT] Struts and Design Patterns Hi, This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. Wow, that's exactly what I'm searching! Can you tell me where it's possible to download this draft version? Thanks in advance, Thorsten - 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] Struts and Design Patterns
And for the unpatient ones, you can pay + download it as pdf directly from manning online. -Original Message- From: Pani, Gourav [mailto:[EMAIL PROTECTED]] Sent: Montag, 17. Februar 2003 21:45 To: 'Struts Users Mailing List' Subject: RE: [OT] Struts and Design Patterns Well, it isn't like his book isn't available in stores. If you want to read it, you could always buy a copy. It is a really good read. -Original Message- From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:42 PM To: Struts Users Mailing List Subject: RE: [OT] Struts and Design Patterns It appears I was wrong. You can only download the Tiles and Validator chapters (these are the final versions). http://www.manning.com/getpage.html?project=hustedfilename=chapters.htm l Ted had sent me the draft of the entire book at one point but it looks like you can't download these chapters from anywhere. Sorry, I won't email these out to anyone as I don't have Teds permission to do so. -Original Message- From: Thorsten Schäfer [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:30 PM To: 'Struts Users Mailing List' Subject: RE: [OT] Struts and Design Patterns Hi, This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. Wow, that's exactly what I'm searching! Can you tell me where it's possible to download this draft version? Thanks in advance, Thorsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Struts and Design Patterns
Figures... I own the book and left it at work. Anyone care to save me a trip into the office to verify this? Thanks, Matt --- In [EMAIL PROTECTED], Jerome Jacobsen [EMAIL PROTECTED] wrote: This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. -Original Message- From: Matt Raible [mailto:matt@r...] Sent: Monday, February 17, 2003 11:57 AM To: [EMAIL PROTECTED] Subject: [OT] Struts and Design Patterns I'm writing a chapter on Struts for a book, Professional JSP 2.0, from Wrox (http://www.wrox.com/books/1861008325.htm). The reason I'm sending this post is to verify my belief of the different design patterns that Struts implements. From the Core J2EE Design Patterns book (by Alur, Crupi, and Malks), there are 6 patterns discussed: Intercepting Filter Front Controller View Helper Composite View Service to Worker Dispatcher View In Struts, I'm assuming the following: Front Controller (ActionServlet) View Helper (ActionForm) Composite View (Tiles) Service to Worker (ActionServlet to your Actions) Dispatcher View (RequestProcessor) Thanks, Matt - 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] Struts and Design Patterns
The table of contents is available online. It is listed there as Appendix A. http://www.manning.com/getpage.html?project=hustedfilename=contents.html -Original Message- From: Matt Raible [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:54 PM To: [EMAIL PROTECTED] Subject: Re: [OT] Struts and Design Patterns Figures... I own the book and left it at work. Anyone care to save me a trip into the office to verify this? Thanks, Matt --- In [EMAIL PROTECTED], Jerome Jacobsen [EMAIL PROTECTED] wrote: This has already been done by Ted in his book, I think. At least in the downloadable draft version there is a Patterns chapter. Actually it is Appendix D. -Original Message- From: Matt Raible [mailto:matt@r...] Sent: Monday, February 17, 2003 11:57 AM To: [EMAIL PROTECTED] Subject: [OT] Struts and Design Patterns I'm writing a chapter on Struts for a book, Professional JSP 2.0, from Wrox (http://www.wrox.com/books/1861008325.htm). The reason I'm sending this post is to verify my belief of the different design patterns that Struts implements. From the Core J2EE Design Patterns book (by Alur, Crupi, and Malks), there are 6 patterns discussed: Intercepting Filter Front Controller View Helper Composite View Service to Worker Dispatcher View In Struts, I'm assuming the following: Front Controller (ActionServlet) View Helper (ActionForm) Composite View (Tiles) Service to Worker (ActionServlet to your Actions) Dispatcher View (RequestProcessor) Thanks, Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: Velocity. Validator and Indexed Properties
Does anybody have any tips for getting the validation portion working along with vel-struts. I'm using the Velocity View Tools for Struts with the Validator and conventional beans without a problem. What happens if you just fail validation without using the validator? Or use conventional ActionForms instead? I'm guessing it's a dynabean issue. You might also try slipping a conventional JSP in, just to confirm that everything else is working right. -Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Log detail question
I have low verbosity and debug=0 set in server.xml, but I keep getting all this useless (in production, anyway) detail in my logs: 2003-02-17 17:05:40 default: DefaultServlet.serveResource: Serving resource '/main.css' headers and data 2003-02-17 17:05:46 action: Processing a POST for /logon 2003-02-17 17:05:46 action: Looking for ActionForm bean under attribute 'logonForm' 2003-02-17 17:05:46 action: Creating new ActionForm instance of class ... 2003-02-17 17:05:46 action: Storing instance under attribute 'logonForm' in scope 'request' 2003-02-17 17:05:46 action: Populating bean properties from this request 2003-02-17 17:05:46 action: Validating input form properties 2003-02-17 17:05:46 action: No errors detected, accepting input 2003-02-17 17:05:46 action: Looking for Action instance for class LogonAction 2003-02-17 17:05:46 action: Logon by user Ian Hunter for session A1C65C3930054CA376FF8C1BCC6256C9 The very last line is the only line I intentionally write to the log -- I have copious amounts of logging going on, and I really don't want all the Storing instance... junk. I could have sworn I turned that way up while I was first learning struts but now I can't seem to turn it off. Help? Ian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tag inside the attribute of another tag?
Hello, I am trying to use the jsp:plugin to include an applet in my jsp page. But I want the codebase of my applet and jar file to come from the result of html:rewrite. However, the interpretation stops at the slash right after 'page', saying that attribute has no value. But the slash has to be there for the root of the web application. Can anyone tell me what to do in this situation? Thank you. The following is that part of my jsp: jsp:plugin type=applet code=PhredScorePlotApplet.class archive=bfograph.jar jreversion=1.4.1 width=300 height=200 codebase=html:rewrite page=/chromatogram/graph / jsp:params jsp:param name=phredScoreString value=13 18 27 27 29 29 29 39 39 40 46 46 46 46 48 39 32 32 32 27 24 24 23 25 26 33 39 34 34 34 34 37 40 56 46 51 51 / /jsp:params jsp:fallback Plugin tag OBJECT(IE) or EMBED(Netscape) not supported by browser. /jsp:fallback /jsp:plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tag inside the attribute of another tag?
You can't use tags as input to another tag's attribute. You can use scriptlets or expression language to provide dynamic attribute values. David From: Ginger Cheng [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: tag inside the attribute of another tag? Date: Mon, 17 Feb 2003 17:20:21 -0500 Hello, I am trying to use the jsp:plugin to include an applet in my jsp page. But I want the codebase of my applet and jar file to come from the result of html:rewrite. However, the interpretation stops at the slash right after 'page', saying that attribute has no value. But the slash has to be there for the root of the web application. Can anyone tell me what to do in this situation? Thank you. The following is that part of my jsp: jsp:plugin type=applet code=PhredScorePlotApplet.class archive=bfograph.jar jreversion=1.4.1 width=300 height=200 codebase=html:rewrite page=/chromatogram/graph / jsp:params jsp:param name=phredScoreString value=13 18 27 27 29 29 29 39 39 40 46 46 46 46 48 39 32 32 32 27 24 24 23 25 26 33 39 34 34 34 34 37 40 56 46 51 51 / /jsp:params jsp:fallback Plugin tag OBJECT(IE) or EMBED(Netscape) not supported by browser. /jsp:fallback /jsp:plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tag inside the attribute of another tag?
Hello, May I know how I may have the scriptlet of html:rewrite? Thank you for help. At 03:32 PM 2/17/2003 -0700, you wrote: You can't use tags as input to another tag's attribute. You can use scriptlets or expression language to provide dynamic attribute values. David From: Ginger Cheng [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: tag inside the attribute of another tag? Date: Mon, 17 Feb 2003 17:20:21 -0500 Hello, I am trying to use the jsp:plugin to include an applet in my jsp page. But I want the codebase of my applet and jar file to come from the result of html:rewrite. However, the interpretation stops at the slash right after 'page', saying that attribute has no value. But the slash has to be there for the root of the web application. Can anyone tell me what to do in this situation? Thank you. The following is that part of my jsp: jsp:plugin type=applet code=PhredScorePlotApplet.class archive=bfograph.jar jreversion=1.4.1 width=300 height=200 codebase=html:rewrite page=/chromatogram/graph / jsp:params jsp:param name=phredScoreString value=13 18 27 27 29 29 29 39 39 40 46 46 46 46 48 39 32 32 32 27 24 24 23 25 26 33 39 34 34 34 34 37 40 56 46 51 51 / /jsp:params jsp:fallback Plugin tag OBJECT(IE) or EMBED(Netscape) not supported by browser. /jsp:fallback /jsp:plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
Well said, and that's the reason why I like so much to write and use web applications. Marco -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 5:26 PM To: Struts Users Mailing List Subject: Re: Struts design flaw -- ActionForms are not true domain objects On Mon, 17 Feb 2003, Chris Halverson wrote: Date: Mon, 17 Feb 2003 09:16:01 -0600 From: Chris Halverson [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Struts design flaw -- ActionForms are not true domain objects James Childers [EMAIL PROTECTED] writes: You can't really use that outside of a servlet container. This is not a knock to Struts; it was never designed to be a general purpose MVC model. But noone is going to write a Swing app using Struts, for example. http://javaboutique.internet.com/tutorials/Swing/ It can be done. It can definitely be done -- but having to deal with GUI frameworks (MFC, AWT, Swing, SWT, ...) is so agonizingly painful that it's why I got involved in building applications for the web in the first place :-). Short answer: Struts was never intended to solve any outside of a servlet container problems, so it should hardly be surprising that using it that way is not particularly graceful. cdh Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts design flaw -- ActionForms are not true domain objects
I would say DTO -Original Message- From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 5:35 PM To: Struts Users Mailing List Subject: RE: Struts design flaw -- ActionForms are not true domain objects Rod Johnson: The idea of copying properties from an action form to business command is inelegant and there is o support for type checking. Was there so far an around solution ? José. DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Attribute indexed invalid according to the specified TLD
Hi, I am getting Attribute indexed invalid according to the specified TLD in my JSP. Here is part of my ActionForm: private List parameterList = new ArrayList(); public List getParameterList() { logger.debug(List size is: + this.parameterList.size()); return parameterList; } public void setParameterList(List parameterList) { this.parameterList = parameterList; } public OrderDetailModel getOrderDetail(int index) { return (OrderDetailModel) parameterList.get(index); } Here is the code in my Action where I set the form on the session: updateOrderForm.setParameterList(orderDetailList); //orderDetailList is my ArrayList object session.setAttribute(updateOrderForm, updateOrderForm); Here is my JSP: html:form action=updateOrder.do name=updateOrderForm type=com.academy.ordering.forms.UpdateOrderForm logic:iterate id=parameter name=updateOrderForm property=parameterList tr bgcolor=%= bgColor % tdhtml:text name=parameter property=orderLineNumber indexed=true //td tdhtml:text name=parameter property=itemName indexed=true //td tdhtml:text name=parameter property=quantityOrdered indexed=true //td /tr /logic:iterate input type=submit valueUpdate /html:form I looked at the Struts html:text tag description, http://jakarta.apache.org/struts/struts-html.html#text, and it says that I can use indexed. I am using Struts 1.0.2. I am doing something wrong? Thanks, Marwan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:select tag and the value attribute
Very cool! -- thanks very much for your help and for contributing Struts-EL! -- john David M. Karr wrote: John == John C Cartwright John writes: John Thanks for the prompt reply, David. I didn't realize that there was a John Struts-EL library, where would I find such a beast? I don't see mention of it John in the 1.1b3 distribution nor in the on-line docs. It's in a directory in the contrib directory, in the main distribution. There is a small section on it in the user guide. You could search the mail archives for more discussion about it. The following link is for the original announcement about it on struts-user: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg43743.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Attribute indexed invalid according to the specified TLD
Try: http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#text You're looking at the 1.1 stuff... MarwanSalam wrote: Hi, I am getting Attribute indexed invalid according to the specified TLD in my JSP. Here is part of my ActionForm: private List parameterList = new ArrayList(); public List getParameterList() { logger.debug(List size is: + this.parameterList.size()); return parameterList; } public void setParameterList(List parameterList) { this.parameterList = parameterList; } public OrderDetailModel getOrderDetail(int index) { return (OrderDetailModel) parameterList.get(index); } Here is the code in my Action where I set the form on the session: updateOrderForm.setParameterList(orderDetailList); //orderDetailList is my ArrayList object session.setAttribute(updateOrderForm, updateOrderForm); Here is my JSP: html:form action=updateOrder.do name=updateOrderForm type=com.academy.ordering.forms.UpdateOrderForm logic:iterate id=parameter name=updateOrderForm property=parameterList tr bgcolor=%= bgColor % tdhtml:text name=parameter property=orderLineNumber indexed=true //td tdhtml:text name=parameter property=itemName indexed=true //td tdhtml:text name=parameter property=quantityOrdered indexed=true //td /tr /logic:iterate input type=submit valueUpdate /html:form I looked at the Struts html:text tag description, http://jakarta.apache.org/struts/struts-html.html#text, and it says that I can use indexed. I am using Struts 1.0.2. I am doing something wrong? Thanks, Marwan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: date format
Use the SimpleDateFormat to do it so. Refer this webpage http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html -Original Message- From: usha [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:38 AM To: [EMAIL PROTECTED] Subject: date format Hi i need to display the date fields on the jsp in the format dd/MMM/. is there any simple way i can get this like configuration or writing any class etc.. if anybody has any ideas plz help me Thanks usha - 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: date format
Going for a neat solution, in our project, we tried extending sql.Date and overwriting the toString method to output a date formatted with SimpleDateFormat in dd/MM/ format, We then used this data type as our Date type in our data beans so that when you do a bean:write on it, it will output the date in the correct format Unfortunately, we were using scaffold StorageBaseBean findCollection to get our data and for some reason or another, it was having some casting issues. We had to resort to creating xxxString version of the dates in the data bean that converts the dats into their correct format before returning the string cheers MC Desmond [EMAIL PROTECTED]To: Struts Users Mailing List [EMAIL PROTECTED] t cc: Subject: RE: date format 19/02/2003 04:03 AM Please respond to Struts Users Mailing List Use the SimpleDateFormat to do it so. Refer this webpage http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html -Original Message- From: usha [mailto:[EMAIL PROTECTED]] Sent: Monday, February 17, 2003 3:38 AM To: [EMAIL PROTECTED] Subject: date format Hi i need to display the date fields on the jsp in the format dd/MMM/. is there any simple way i can get this like configuration or writing any class etc.. if anybody has any ideas plz help me Thanks usha - 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: Help about Model design
Heligon Sandra writes: I would wish to know if somebody know the address of a forum where the model part is brought for web application. You can probably find what you are looking for at the ServerSide http://www.theserverside.com/home/index.jsp -T. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:errors/
Hi frenz, Here goes my problem... How can i display action errors at different different places in jsp. For example i have username and password fields in a jsp.If the username is null then i want display the error right behind the username text box...n the same for password.. how can i do this... i appreciate any kind of help... Thanks Varma _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
last item in iterate loop
Hi hi, Quick question, (I hope this is easy), is there any way to easily find out if the current item in a logic:iterate loop is the last item ? -Miriam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:errors/
http://jakarta.apache.org/struts/userGuide/struts-html.html#errors See the property attribute. David From: varma dvk [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: html:errors/ Date: Mon, 17 Feb 2003 18:09:03 +0530 Hi frenz, Here goes my problem... How can i display action errors at different different places in jsp. For example i have username and password fields in a jsp.If the username is null then i want display the error right behind the username text box...n the same for password.. how can i do this... i appreciate any kind of help... Thanks Varma _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:errors/
Does this work for nested:errors/ as well? Or do I have to do something different? Affan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 8:31 AM Subject: Re: html:errors/ http://jakarta.apache.org/struts/userGuide/struts-html.html#errors See the property attribute. David From: varma dvk [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: html:errors/ Date: Mon, 17 Feb 2003 18:09:03 +0530 Hi frenz, Here goes my problem... How can i display action errors at different different places in jsp. For example i have username and password fields in a jsp.If the username is null then i want display the error right behind the username text box...n the same for password.. how can i do this... i appreciate any kind of help... Thanks Varma _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - 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:errors/
I don't use nested but I think it will work the same as html:errors. David From: Affan Qureshi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: html:errors/ Date: Tue, 18 Feb 2003 09:16:00 +0500 Does this work for nested:errors/ as well? Or do I have to do something different? Affan - Original Message - From: David Graham [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 8:31 AM Subject: Re: html:errors/ http://jakarta.apache.org/struts/userGuide/struts-html.html#errors See the property attribute. David From: varma dvk [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: html:errors/ Date: Mon, 17 Feb 2003 18:09:03 +0530 Hi frenz, Here goes my problem... How can i display action errors at different different places in jsp. For example i have username and password fields in a jsp.If the username is null then i want display the error right behind the username text box...n the same for password.. how can i do this... i appreciate any kind of help... Thanks Varma _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - 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] _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]