Re: data-source problem
Look at your servlet engine log (servlet.log if you are using Tomcat with the default setup). Most likely the ActionServlet associated with your web app is not loading because the data source initialization is failing. The mappings aren't there because the initialization failed. The error message will (hopefully) tell you why. Make sure that you have the Oracle JDBC driver jar in your application's WEB-INF/lib. slickdev wrote: I have a problem with the data-source properties in struts-config.xml This is for the sample email portal application. I configured the properties to use my localhost oracle installation, which does work with jdbc from command-line java apps as well as with sql*plus. Here is the suspect layout: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=Oracle Data Source Configuration/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=driverClass value=oracle.jdbc.driver.OracleDriver/ set-property property=url value=jdbc:oracle:thin:@localhost:1521:oracle/ set-property property=user value=system/ set-property property=password value=manager/ /data-source /data-sources PROBLEM When clicking the initial logon link to invoke logon.jsp, an exception occurs: javax.servlet.ServletException: Cannot find ActionMappings orActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:460) at logon_1._jspService(logon_1.java:691) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java) --- --- --- The exception does not occur if the stuff between data-source --- /data-source is commented out. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how to solve a problem of fetchin' HUGE collection into form
A method that I used for a user to find out his or her employee id was by having a 'search for employee id' link on a page next to a text field where the user is to enter his or her employee id since most employees don't know it. This caused a new window to display, allowing the user to enter in his or her name. They enter their name, hit submit, and in the same new window, the results were displayed. When the user selects one of these, the javascript populates the main browser window (the one that launched the search page) and the new window closes itself. Slava_L [EMAIL PROTECTED] writes: that's quite nice way.. but then i will need to truncate search results if they are too big to be send on client, wont i ? In the above app, if the search resulted in only one record, then that record was used to populate the main browser window, otherwise it displayed all the results (which probably wasn't very wise in retrospect). Perhaps if the results are, say, over 25 records, then you could ask them to be more specific or perhaps make pages for them to select from - such as when you use a search engine on the web and receive a great deal of results - 25 each page or whatnot (and perhaps with a text field to re-do their search since at that point they'd realize that their search wasn't specific enough). An extension to the above method is by using javascript to initiate the first query on the pop-up window, too. If there is only one result then javascript populates the calling window (such as when a user is pretty sure that the street name is correct but wants the system to do a quick check; perhaps feedback could be provided in the status bar). hth, Elizabeth - Original Message - From: Dan Cancro [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, June 21, 2002 10:01 AM Subject: RE: how to solve a problem of fetchin' HUGE collection into form It sounds like you need to replace your drop down box with a link to a search screen. On the search screen, the user types in a few letters and the system displays just the streets that start with those letters. Then the user picks one and goes back to the form. -Original Message- From: Slava_L [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 5:49 PM To: Struts Users Mailing List Subject: how to solve a problem of fetchin' HUGE collection into form I have a form with several fields. And one of them is SELECT field - 4xmpl streets names. All streets names are stored in database, amount 100-300 thousands records And the problem is that when this field renders on the page, app is freezing for a long time. how am i suppose to solve kinda problem ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Dynamic Forms
David, This is probably a very newbie question, but how are you gonna define your getters and setters in your form bean? Greetz, Koen -Original Message- From: David Morris [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 7:49 PM To: [EMAIL PROTECTED] Subject: RE: Dynamic Forms Adrian, Would it work to store your property name/values pairs in an arrayList and then use iterate or the nested tags to loop through the values when you display them? The generated text tag would then be something like property=dynValues[0].value value=Some Value. You would build the arrayList of dynProps each one having a value, name pair. nested:root name=yourBeanIfNotOnForm nested:iterate property=dynValues trtdnested:text property=value//td/tr /nested:iterate /nested:root David Morris [EMAIL PROTECTED] 06/20/02 08:14AM Hi, I have checked through almost the entire archive and encountered loads of articles covering dynamic forms, but all use the DynaActionForm, which requres the properties to specified in the struts-config.xml file. In most cases this is fine but for a few JSP's the property names are being dynamically generated at run-time so I can't add them to the struts-config file. Adrian. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:base tag and tiles?
Hello, Maybe we can extend / enhance the base tag to provide such behavior. An idea is to add an optional attribute path. If this attribute is specified, base output the root URL of current web application context, concatenated with the specified path. If path is set to or /, the base output the root URL of current web application. This behavior is interesting when using template, tiles or include. It allows to specify in a layout the base URL to be used by browsers, independently of tiles jsp (or layout) locations. Is there some objections or comments ? Cedric Holman, Cal wrote: Byrne I had a similar issue with the template layout being a sub directory. This is not as elegant as the html:base tag but works. I forward to definitions not .jsp. base href=http://%= request.getServerName()%:%=request.getServerPort()% %=request.getContextPath()%/ Cal -Original Message- From: Byrne, Steven [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 13:44 To: [EMAIL PROTECTED] Subject: html:base tag and tiles? I'm using tiles for my primary page definition, and I've chosen to put my common tiles building blocks into a web space subdirectory called tiles, including my main layout tile. When I try to use the html:base tag to define the default URLs for my web pages, it refers, naturally enough to the tiles subdirectory since that's where the main tile lives. What I'm looking for is a way to get the base element that's emitted to refer to the top of the web space, i.e. http://localhost:8080/app/ and not http://localhost:8080/app/tiles. Of course, I could put the mainLayout.jsp in the top directory, but I had really wanted to factor the basic tiles definitions into their own directory Has anyone run into and solved this problem? Steve -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Architecting an application's workflow with Struts
Hi Brian, Happy to answer questions - I'm actually doing an Architectural Presentation on Struts to the Melbourne WebSphere user group next month, so it gives me a chance to put something on paper in preparation and get some feedback.. In summary, we use a combination of techniques for which Struts is the foundation. To understand how we do forwarding, etc you need to understand a bit about our architecture / presentation paradigm. Our application is JSP / Servlet with no EJB, but architected/layered much the same way you would layer an EJB app. The reason for this is mainly cost/performance - EJB is a very expensive architecture (in terms of $$, processor requirement and cost to develop / manage) and provides little to no real benefit over a servlet architecture (my opinion - I've yet to see something in it that would persuade me to move given our only delivery channel is via a browser). Our page/form design paradigm is to have a form for all tightly related data in our system that is kept in Servlet session memory. Our product is an eRecruitment platform - the main components/areas are things like Resume, JobAd, Applications, Preferences, TimeSheets, etc. For each of these there is generally 1 central page/table, and several 'lists' of related tables (1:M relationships). Each list is managed by a seperate web page / Struts Action, but all related details are managed through a central Business Process. We use the struts form to pass the data down from the presentation layer into the Business Process layer (ie. the EJB valueObject design pattern). Data in the lists is lazy loaded (ie. on first entry to the editing screens) but then kept in servlet session memory. Data is also lazy saved - ie. actions on the same page are all batched (add to list, edit, update, delete) then persisted to the database when you move off the screen. This greatly reduces the load on the database (which is the most expensive part of the technology stack) - as we grow, it's very easy/cheap to add more application servers (either running independantly or load balanced), but a lot more expensive to up-size our database. Data in the lists are model beans (ie. a one-to-one column mapping of tables). We use these model beans on the form and reference them directly from the JSP using struts tag nested references - eg: td First Name: /td td html:text property=person.firstName/ /td This basically does a getPerson().getFirstName() / getPerson().setFirstName() to reference the first name field in the Person model bean attached to our form. This means the code in our Struts actions has to do very little as Struts basically populates the data directly into the objects that are persisted to the database - all we do is grab things from lists and pop them on the form, and vise-versa. The pages of related areas (eg. resume) are linked through a left hand navigation bar - unrelated areas are linked through the top navigation bar. All our links are pushed though a submit action - this allows us to 'remember' data when moving between related actions, and clean up memory when moving between unrelated actions - ie. if you click on the left nav, the current form data is kept so if you link back it is still there. If you click on a top nav, we persist all data to the database and kill the struts Form from memory. This is very important for scalability of our app as we have over 150 tables and you never want to get to a stage where a single user has loaded the session memory with data that is completely unrelated to what they may be doing at the time. Now, back to the original question about handling forward - each page management action looks as follows in struts-config.xml: action path=/JSCVWorkHistoryOrg type=com.hof.web.action.JSCVWorkHistoryOrgAction name=JSCVForm input=/js_cv_orghist.jsp scope=session forward name=success path=/js_cv_orghist.jsp/ forward name=backpath=/JSCVAchievements.do/ forward name=next path=/JSCVWorkHistoryPosition.do/ /action Our Struts Actions in our application do 3 things - manage data on a page, link to related data, and link to unrelated data. Most of the processing is handled through a hidden field on the form called 'action' that we populate with the requested action. On editing data, we always do a forward to the jsp page that is managing the data (ie. you select something from a list, the action gets it, puts it on the form and then forwards to the page by returning mapping.findForward(success). We generally have back/next buttons on these pages - this allows us to configure which pages are required by different customers (eg. some customers may want to capture lots of details, others only a few). To support this, we deploy the same software but just change the back/next mappings in this file to drop out the unwanted pages. Notice that these forward to the manager
javax.servlet.ServletException: Cannot retrieve definition for form beannull
It seems it didn't get to the list last time I sent it... -- Envoyée par Olivier Schmeltzer/QVI/GRAF/FR le 21/06/2002 09:37 --- Olivier Schmeltzer 17/06/2002 17:48 Pour : [EMAIL PROTECTED] cc :(ccc : Olivier Schmeltzer/QVI/GRAF/FR) Objet : javax.servlet.ServletException: Cannot retrieve definition for form bean null Hello, I am getting this exception sometimes, and I don't really understand what it means. What is particulartly strange is the following : I have two servlets, each one dealing with a particular extension (.home and .logon). When I request first an action dealt with the logon servlet, I don't have any problem ; if I happen to load an action serviced by the home servlet, when I try to request the previous action which worked, I have this error. Does anybody have already experienced this ? I am using version 1.0.2 of Struts. Thanks in advance ! Olivier --- Les données et renseignements contenus dans ce message sont personnels, confidentiels et secrets. Ce message est adressé à l'individu ou l'entité dont les coordonnées figurent ci-dessus. Si vous n'êtes pas le bon destinataire, nous vous demandons de ne pas lire, copier, utiliser ou divulguer cette communication. Nous vous prions de notifier cette erreur à l'expéditeur et d'effacer immediatement cette communication de votre système. The information contained in this message is privileged, confidential, and protected from disclosure. This message is intended for the individual or entity adressed herein. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others ;also please notify the sender by replying to this message, and then delete it from your system. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
html:text and ActionForm
Hi, Since the ActionForm resets my input jsp (a form with 2 text fields and a select), I'd like to save the input fields' values in a bean (what I did) and set it as session's attribute. Now suppose one input field is empty, ActionForm creates an ActionErrors, then finForwards back to the initial input jsp. If I use bean:write with ignore=true I see that the value is correctly managed. My problem is : how to get the (text) input field filled with my bean's property ? I cannot nest html:text and bean:write. I just don't want to use scriptlets. Thanks for any help. on my jsp : input id=company name=company size=15 tabindex=1 value= so I used request.getParameterValues(company)[0]; now : html:text name=aif property=st[0] since my bean aif has the following attributes : st[i], i being an integer. How would my ActionForm get the value entered in my input field since it won't use httpServletRequest ? (or do I misunderstand ?). Now I get (struts 1.1) : org.apache.jasper.compiler.ParseException: End of content reached while more parsing required: tag nesting error? My goal is to get my input fields filled with what the user entered, along with the error messages html:errors/ indicating incorrect (empty) fields, after return of ActionForm/Action. Thanks. Barbara -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: html:errors tag funny null strings
You have to add an errrors.header and an errors.footer entry to your properties file, wether you want to print some text before and after your errors or not. You can just leave them blank: errors.header= errors.footer= If the entries are missing, you get a 'null' printed to your page. Hope this helps, Norbert Actualy I'm not missing the entry for the error, since it gets writen to the page, but there are aditional null strings. I have this in properties file: text.login.password.error=Password is required on the jsp page I have html:errors property=password/ but the output on the page is not just: Password is required but : null Password is required null. Does that make sense ? Jf Celestino Pena wrote: In your properties file you are missing entries for errors as in... errors.header=h3font color=redValidation Error/font/h3You must correct the following error(s) before proceeding:ul errors.footer=/ulhr -Original Message- From: Jan Fetyko [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 1:51 PM To: Struts Users Mailing List Subject: html:errors tag funny null strings Hi, I'm using the html:errors property=.../ tag to display errors after the form validation fails. The problem is that when the error is displayed it contains a null string at the begining and at the end on the actual error message. Ex.: null Password is required null. What's going on ? Is this fix-able ? Jf -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Architecting an application's workflow with Struts
Don, Thanks for posting this to the forum. Theres a lot of useful information in there that relates directly to some of the stuff I am / will be doing, so I think Ill be printing this one out and going through it to see what methodologies I can make use of. :-) -Andrew -Original Message- From: Don Elliott [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:56 To: [EMAIL PROTECTED] Cc: Struts-User@Jakarta. Apache. Org Subject: Architecting an application's workflow with Struts Hi Brian, Happy to answer questions - I'm actually doing an Architectural Presentation on Struts to the Melbourne WebSphere user group next month, so it gives me a chance to put something on paper in preparation and get some feedback.. In summary, we use a combination of techniques for which Struts is the foundation. To understand how we do forwarding, etc you need to understand a bit about our architecture / presentation paradigm. Our application is JSP / Servlet with no EJB, but architected/layered much the same way you would layer an EJB app. The reason for this is mainly cost/performance - EJB is a very expensive architecture (in terms of $$, processor requirement and cost to develop / manage) and provides little to no real benefit over a servlet architecture (my opinion - I've yet to see something in it that would persuade me to move given our only delivery channel is via a browser). Our page/form design paradigm is to have a form for all tightly related data in our system that is kept in Servlet session memory. Our product is an eRecruitment platform - the main components/areas are things like Resume, JobAd, Applications, Preferences, TimeSheets, etc. For each of these there is generally 1 central page/table, and several 'lists' of related tables (1:M relationships). Each list is managed by a seperate web page / Struts Action, but all related details are managed through a central Business Process. We use the struts form to pass the data down from the presentation layer into the Business Process layer (ie. the EJB valueObject design pattern). Data in the lists is lazy loaded (ie. on first entry to the editing screens) but then kept in servlet session memory. Data is also lazy saved - ie. actions on the same page are all batched (add to list, edit, update, delete) then persisted to the database when you move off the screen. This greatly reduces the load on the database (which is the most expensive part of the technology stack) - as we grow, it's very easy/cheap to add more application servers (either running independantly or load balanced), but a lot more expensive to up-size our database. Data in the lists are model beans (ie. a one-to-one column mapping of tables). We use these model beans on the form and reference them directly from the JSP using struts tag nested references - eg: td First Name: /td td html:text property=person.firstName/ /td This basically does a getPerson().getFirstName() / getPerson().setFirstName() to reference the first name field in the Person model bean attached to our form. This means the code in our Struts actions has to do very little as Struts basically populates the data directly into the objects that are persisted to the database - all we do is grab things from lists and pop them on the form, and vise-versa. The pages of related areas (eg. resume) are linked through a left hand navigation bar - unrelated areas are linked through the top navigation bar. All our links are pushed though a submit action - this allows us to 'remember' data when moving between related actions, and clean up memory when moving between unrelated actions - ie. if you click on the left nav, the current form data is kept so if you link back it is still there. If you click on a top nav, we persist all data to the database and kill the struts Form from memory. This is very important for scalability of our app as we have over 150 tables and you never want to get to a stage where a single user has loaded the session memory with data that is completely unrelated to what they may be doing at the time. Now, back to the original question about handling forward - each page management action looks as follows in struts-config.xml: action path=/JSCVWorkHistoryOrg type=com.hof.web.action.JSCVWorkHistoryOrgAction name=JSCVForm input=/js_cv_orghist.jsp scope=session forward name=success path=/js_cv_orghist.jsp/ forward name=backpath=/JSCVAchievements.do/ forward name=next path=/JSCVWorkHistoryPosition.do/ /action Our Struts Actions in our application do 3 things - manage data on a page, link to related data, and link to unrelated data. Most of the processing is handled through a hidden field on the form called 'action' that we populate with the requested action. On editing data, we always do a forward to the jsp page that is managing the data (ie. you select something from a
[ANN] Easy Struts 0.3.0 for Eclipse is out
Easy Struts v0.3.0 just released. For the moment this version is only for Eclipse IDE. The aim of this project is to provide a collection of tools integrated with Eclipse 2.0, in order to facilitate the development of a web project based on the MVC2 Jakarta Struts framework. Changes: - v0.3.0 - Add template managing for Jsp generation (a sample is in /tempate directory) - Add managing of application resources in project properties. - Add resources managing wizard. - Add datasource wizard. - Fix Improve struts-config.xml generation (element created did not respect DTD order elements). - Improve action wizard, with forward action, include action... - Add many ToolTipText extracted from struts DTD and Ted Husted catalog) - Add dynamic form creation. - Et n'oubliez pas la fête de la musique :) http://sourceforge.net/projects/easystruts http://easystruts.sourceforge.net/index.html [english] http://easystruts.sourceforge.net/index_fr.html [francais] -Emmanuel - Yahoo! Mail -- Une adresse yahoo.fr gratuite et en français !
RE: If you haven't seen this yet.
I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Use Jakarta's ObjectRelationalBridge (OJB) for your Struts ap p'spersistence layer
There's another tool / persistence layer I've been playing with called DMLDataAccess. It seems to be fashioned somewhat after NeXT/Apple's EOF. There's a GUI modeler tool, as well. I believe the download is compiled for J2SE 1.4, although I think versions to support older JDK's are available. http://www.redshift.com/~lehrian/DMLDataAccess/ Matthew On Thursday, June 20, 2002, at 05:25 PM, Schneider, Eric wrote: Just one more to throw out there. Solid design. Has a good modeling tool to create or reverse engineer a relational database. Plus it generates java source. http://objectstyle.org/cayenne/ I just started using it a week or so ago. Extremely happy so far. Requires the J2SE 1.4 tho...that may be a problem for some. Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 4:31 PM To: Struts Users Mailing List Subject: Re: Use Jakarta's ObjectRelationalBridge (OJB) for your Struts app'spersistence layer Down the road, I think the Stuts DataSources feature may become a way to manage and swap between different datasource connection pools, rather than to just load an internal implementation. This can be a useful feature for a controller. You might want to run unit tests against different pools, side by side, or switch to another pool for troubleshooting, which seem like useful controller features to me. Any thought to using JMX for this type of managment? The functions you've described seem to fit what JMX provides reasonably well. Craig is listed as Author for the whole Modeler pacakge in the Commons area for facilitating JMX implementations: http://jakarta.apache.org/commons/modeler/docs/api/index.html Some other background for anyone not familiar with JMX. The JMX home page http://java.sun.com/products/JavaManagement/ An article by Marc Fluery (leader of the JBoss project) on JMS published on O'Reilly's OnJava site http://www.onjava.com/pub/a/onjava/2001/02/01/jmx.html MX4J - an open source JMX implementation distributed under an Apache-style license http://mx4j.sourceforge.net/ JSR-003 - The JSR covering JMX -currently in Final Release http://jcp.org/aboutJava/communityprocess/final/jsr003/index2.html -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ** -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:struts-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: If you haven't seen this yet.
And I have never seen a Rattlesnake that had a turtle shell! Jim Berg Sr. Software Specialist PSCI 610-270-4158 [EMAIL PROTECTED] Galbreath, Mark [EMAIL PROTECTED] 21-Jun-2002 07:04 Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' cc: Subject:RE: If you haven't seen this yet. I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
They killed Kenny!
http://bofh.ntk.net/Bastard.html Happy Friday (just passing 72 hours for this week now...), Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tiles and skeleton of well-designed pages
Hello, The config file is with the Struts or Tiles distribution, generally in the lib or WEB-INF directory. The Tiles distribution comes with lot of examples. There is also an advanced features guide, from Tiles website only, containing a draft of the definition file syntax (at the end). Hope this help, Cedric Advanced features guide : http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf Heligon Sandra wrote: Hi, Where can I get the file tiles-config.dtd ? the link http://jakarta.apache.org/struts/dtds/tiles-config.dtd; doesn't work. I want to use tiles and I don't know the syntax of the file tiles-def.xml. I am searching to do a skeleton JSP page for my application with commons items like - Login/Logout - Home - Help for the header And a right menu with others commands (the menu must contain sub-menu) Where can I find code/examples for this in order to display pretty/well-designed GUI with bitmaps for instance. It requires to use client-side features, like applets or JavaScript, isn't it? Thanks. Sandra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html:errors tag funny null strings -SOLVED
I'm not using Websphere, but Tomcat, however putting those entries into my properties file HELPED ! THANK YOU. Jf Tim T. Young wrote: Are you using Websphere? If you are, when null String objects get written to a jsp they produce a null. Early versions of Websphere did not do this but we had problems starting with version 3.5.3. I just put a errors.header= and errors.footer= in the properties file and it takes care of it, since I didn't have anything I wanted to display like in the example below. Tim Jan Fetyko janof@phase2o nline.com 06/20/2002 02:48 PM To: Struts Users Mailing List [EMAIL PROTECTED] Please respond cc: to Struts Users Mailing List Subject: Re: html:errors tag funny null strings Caterpillar: Confidential Green Retain Until: 07/20/2002 Retention Category: G90 - Information and Reports Actualy I'm not missing the entry for the error, since it gets writen to the page, but there are aditional null strings. I have this in properties file: text.login.password.error=Password is required on the jsp page I have html:errors property=password/ but the output on the page is not just: Password is required but : null Password is required null. Does that make sense ? Jf Celestino Pena wrote: In your properties file you are missing entries for errors as in... errors.header=h3font color=redValidation Error/font/h3You must correct the following error(s) before proceeding:ul errors.footer=/ulhr -Original Message- From: Jan Fetyko [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 1:51 PM To: Struts Users Mailing List Subject: html:errors tag funny null strings Hi, I'm using the html:errors property=.../ tag to display errors after the form validation fails. The problem is that when the error is displayed it contains a null string at the begining and at the end on the actual error message. Ex.: null Password is required null. What's going on ? Is this fix-able ? Jf -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: blank page
Next time you're not sure if the Action got hit, it's easy to test it by putting a System.out.println in the class. Watch for the message in the server console. It's a good thing to try before posting a question, because you'll be more sure of what's going wrong. ~ Keith -Original Message- From: Billy Ng [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 7:36 PM To: Struts Users Mailing List Subject: blank page I did the action-mapping, but I got a blank page after I hit the submit button. I have a feeling the Action object is not being hit. What did I do worng? Billy Ng -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logic:iterate id?
Ok, you just made me realize my dumb mistake. Thanks for the help! ~ Keith -Original Message- From: Arron Bates [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 8:42 PM To: Struts Users Mailing List Subject: Re: logic:iterate id? Seems that you're trying to write out a property instead of the bean. Try this... logic:iterate id=mc name=entries property=mcEntries type=com.moog,us.eos.beans.MCEntry bean:write name=mc property=oldDept / bean:write name=mc property=oldMatch / bean:write name=mc property=newDept / bean:write name=mc property=newMatch / bean:write name=mc property=pivotDept / bean:write name=mc property=pivotMatch / /logic:iterate ...should get you back on the road. Arron. On Fri, 2002-06-21 at 04:59, Kamholz, Keith (corp-staff) USX wrote: When you use the logic:iterate tag, do you have to define the id that stores the result of the iteration before the tag? My code is: logic:present name=entries property=mcEntries logic:iterate id=mc name=entries property=mcEntries type=com.moog.us.eos.beans.MCentry bean:write name=mc.oldDept/br bean:write name=mc.oldMach/br bean:write name=mc.newDept/br bean:write name=mc.newMach/br bean:write name=mc.pivotDept/br bean:write name=mc.pivotMach/br /logic:iterate /logic:present logic:notPresent name=entries property=mcEntries biNO ENTRIES/i/bbr /logic:notPresent If I don't define the id before the iterate tag, I get a runtime error that says: Cannot find bean mc.oldDept in scope null: However, if I do define the id, then I get a compile time error that complains about a duplicate variable. Maybe the cannot find bean error is referring to the oldDept part rather than the mc, but I dont' know. What's going on? ~ Keith -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSP Pager Tag performance issues
I am currently using JSP Tag's Pager Tag Library v1.1. The tag library is very easy to use. However, I'm suspecting there's a performance issue. I'm returning a Collection of beans. However, it takes a very long time for JSP to generate the page even for small # of results. It also takes very long to go from one page to another, longer than even SQL queries. I check the logs, after the servlet returns to the jsp, it would take a long time for the page to generate. Are there any performance tuning that I can do? Are there another JSP Paging tags? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: blank page
- Original Message - From: Kamholz, Keith (corp-staff) USX [EMAIL PROTECTED] Subject: RE: blank page Next time you're not sure if the Action got hit, it's easy to test it by putting a System.out.println in the class. Watch for the message in the server console. It's a good thing to try before posting a question, because you'll be more sure of what's going wrong. ~ Keith In addition in shows that you have made an effort to resolve your problem yourself, rather than expecting someone else to do your work for you. Dave -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbie: pass ResultSet to JSP?
Subject: Newbie: pass ResultSet to JSP? From: David Chu [EMAIL PROTECTED] === I am trying to get my head around this struts framework for the first time. I am confused about the best/standard way to access data from a JSP. - Let's say I want a page list_items.jsp. - I have access to a bean that has a method that returns the results of a database query as a ResultSet object. - How should I iterate through the rows of the bean? - Complication: my jsp complains that the ResultSet object has been closed (because I closed the query) Is this the prefered encapsulator of data that I should be accessing through my JSP? Hopefully I can use the struts-logic:iterate tag. Thanks for helping out a new struts developer! -david -- David C. Chu America Online Network Tools Intern -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validator problem (or user problem... not sure which yet)
I did a logic:messagesPresent and it showed that there was some messages present. Unfortunately neither html:errors/ or font color=Blue html:messages id=message message=true header=message.bullet bean:write name=message/BR /html:messages /font produces any output... ARRRHHH. This is driving me absolutely insane... If I can get this working before the weekend starts I will be ecstatic -Original Message- From: dwinterfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 5:01 PM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) The change from using multiple set-property elements was made right after beta since it wasn't very clear to call setPathname muliple times. The Validator is run through the ActionForm's validate method and returns a standard ActionErrors object. The additional tags that used to come with the Validator were for features now incorporated into Struts. html:messages - Iterate through messages/errors. logic:messagesPresent - check for the presence of a message/error (can pass in an optional property to check if there is a message/error for an individual field) logic:messagesNotPresent - check for the absence of a message/error David --- [EMAIL PROTECTED] wrote: the problem I was having was caused by the struts-config.xml file defining the plug in like: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml/ /plug-in I took a look at the struts blank war and copied that syntax over which is like this: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathname value=/WEB-INF/validator-rules.xml/ set-property property=pathname value=/WEB-INF/validator.xml/ /plug-in And it started recognizing my rules. Now I cannot get it to show error messages, although it does successfully redirect back until the validation requirements are met. Does validator feed the error messages into the normal html:errors? I noticed it had a validator taglib at one point, but I am not sure where it is now that 1.1b incorporated alot -Original Message- From: Chmura, William B. Sent: Thursday, June 20, 2002 9:46 AM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) Where I have this in my validator.xml file... ?1 This means it should give me an error if it is not filled in? ?2 Should I have to invoke something from the action to check it, or is it just like an actionform? ?3 What else can I try? Its like its all working, just ignoring my validate.xml file or something field property=employeeFirstName depends=required arg0 key=registrationForm.firstname.displayname/ /field -Original Message- From: Chmura, William B. Sent: Wednesday, June 19, 2002 4:54 PM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) Nope... Code runs, but it detects no errors... AAARRGHHH -Original Message- From: Raffy.Lata [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 4:29 PM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) Lot's of stuff in your action class, but I see that you defined a DynaValidatorForm in your form-bean but you are casting it as a DynaActionForm in your action class...if you cast it correctly as a DynaValidatorForm and then invoke the validate() method (like in my previous email), it might correct the problem...try it... [EMAIL PROTECTED] on 06/19/2002 01:24:28 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: Validator problem (or user problem... not sure which yet) Here is everything: Thanks in advance for any solutions! Struts-config.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config data-sourcesdata-source key=MySqlset-property property=autoCommit value=false /set-property property=description value=MySql /set-property property=driverClass value=org.gjt.mm.mysql.Driver /set-property property=maxCount value=4 /set-property property=minCount value=2 /set-property property=password value=vuud /set-property property=user value=vuud /set-property property=url value=jdbc:mysql://localhost/plantsecurity //data-source/data-sources form-beans form-bean name=formNewRequest type=org.apache.struts.validator.DynaValidatorForm dynamic=true form-property name=employeeFirstName type=java.lang.String initial= / form-property name=employeeLastName
html: password and where has my password gone ?
I have : html:password property=userPassword size=10 tabindex=3 redisplay=false/ in a simple html:form... When I press submit I always get the error message that means that my ActionForm got an empty String when getting the password !! getting userPassword variable. So where is my password ? In the reset() method I don't touch it, and in the validate(...) method its value is lost. :-( So I even cannot login ! Thx for any clue. Every other field works well. BP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: pass ResultSet to JSP?
You can definitely use logic:iterate -- you just shouldn't try to iterate the ResultSet. In a strict MVC/Model 2 approach, the ResultSet (model) should be isolated from the JSP (view). In your action, just run through the result set and put the data values into a list of instances of some view-level adapter object. This lets your page work whether the data comes from a database, an XML file, or previously entered user data. If you don't need anything sophisticated, your adapter could simply be a java.util.Map; if you think you're going to use these views of your data more often, you should make a simple bean. Hope that helps. Joe At 6:25 AM -0700 2002/06/21, Struts Newsgroup (@Basebeans.com) wrote: Subject: Newbie: pass ResultSet to JSP? From: David Chu [EMAIL PROTECTED] === I am trying to get my head around this struts framework for the first time. I am confused about the best/standard way to access data from a JSP. - Let's say I want a page list_items.jsp. - I have access to a bean that has a method that returns the results of a database query as a ResultSet object. - How should I iterate through the rows of the bean? - Complication: my jsp complains that the ResultSet object has been closed (because I closed the query) Is this the prefered encapsulator of data that I should be accessing through my JSP? Hopefully I can use the struts-logic:iterate tag. Thanks for helping out a new struts developer! -david -- David C. Chu America Online Network Tools Intern -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 tune in posse radio: http://www.live365.com/stations/289268 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie: pass ResultSet to JSP?
As you found, you cannot pass the ResultSet back to your JSP. This would not be a good thing if you could. That would be coupling your data layer too closely with your view layer. A better solution is to populate a Collection object with the data in your ResultSet, and pass that back to your JSP (through a controller such as an Action object I assume). There has also been some discussion about RowSets, but I haven't had a chance to look into them. Dave - Original Message - Subject: Newbie: pass ResultSet to JSP? From: David Chu [EMAIL PROTECTED] === I am trying to get my head around this struts framework for the first time. I am confused about the best/standard way to access data from a JSP. - Let's say I want a page list_items.jsp. - I have access to a bean that has a method that returns the results of a database query as a ResultSet object. - How should I iterate through the rows of the bean? - Complication: my jsp complains that the ResultSet object has been closed (because I closed the query) Is this the prefered encapsulator of data that I should be accessing through my JSP? Hopefully I can use the struts-logic:iterate tag. Thanks for helping out a new struts developer! -david -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: html: password and where has my password gone ?
You're very right Anand, my setter has a wrong name ! setPassword instead of SetUserPassword :-/ Dumb mistake to avoid ! BP - Original Message - From: Anand Raman [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:39 PM Subject: RE: html: password and where has my password gone ? make sure that the name for the password box has a appropriate getter in the ActionForm. Struts will complain if you trying to display a form on a jsp but the ActionForm doesnt have a getter, but wont crib if a setter for the property is not present in the form. Hope this helps Anand -Original Message- From: Barbara Post [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 7:07 PM To: [EMAIL PROTECTED] Subject: html: password and where has my password gone ? I have : html:password property=userPassword size=10 tabindex=3 redisplay=false/ in a simple html:form... When I press submit I always get the error message that means that my ActionForm got an empty String when getting the password !! getting userPassword variable. So where is my password ? In the reset() method I don't touch it, and in the validate(...) method its value is lost. :-( So I even cannot login ! Thx for any clue. Every other field works well. BP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Variable
why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Variable
I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? From: Barbara Post [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Variable Date: Fri, 21 Jun 2002 16:00:56 +0200 why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Una-se ao maior serviço de email do mundo: o MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Variable
can't you delegate what you want to do to an action and a bean, and logic:equal / or so ? if your idea is using a variable in a jsp, you still may scriptlet-like code... What is your goal ? :-) - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 4:15 PM Subject: Re: Variable I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Weblogic 5.1 + commons.logging
Ok, u need to add the jar files manually to the startweblogic.sh file then - Original Message - From: Chen, Dean (Zhun) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, June 20, 2002 6:13 PM Subject: RE: Weblogic 5.1 + commons.logging I'm using sp8 I believe. But it's on Unix. The jar files are in application/WEB-INF/lib directory. I don't understand where WebLogic looks for Jar files. Does it look in the WEB-INF/lib directory, what about the appclasses directory? Thanks, Dean Chen -Original Message- From: Daniel Jaffa [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 4:48 PM To: Struts Users Mailing List Subject: Re: Weblogic 5.1 + commons.logging What sp are you using and, where in startweblogic.cmd are u putting the jar in the classpath (The weblogic or java) - Original Message - From: Chen, Dean (Zhun) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, June 20, 2002 3:07 PM Subject: Weblogic 5.1 + commons.logging Hi, I'm migrating my Tomcat application to WebLogic 5.1, in doing so I am getting this error: Thu Jun 20 15:05:07 EDT 2002:E WebAppServletContext-setshistory Error instantiating servlet: com.gs.eq.ed.atlas.web.commons.SetsActionServlet org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl at org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497) at org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:331) I placed the commons-logging.jar into the WEB-INF/lib directory, however, it still complains. Has anyone seen these types of error before? Is this a weblogic problem or a commons-logging problem? Thanks, Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JDOM and struts
How can I use jdom along with struts to read Comma Separated Values (csv)? Can jdom read csv by itself? I've been looking for an example, but can not seem to find one anywhere. Thanks, Alok.
UML? File organization?
I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Variable
I don't think you will get the best answer with so few details. Maybe you should reformulate your question... Andre POWROZNIK -Original Message- From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]] Sent: 21 June 2002 16:16 To: [EMAIL PROTECTED] Subject: Re: Variable I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? From: Barbara Post [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Variable Date: Fri, 21 Jun 2002 16:00:56 +0200 why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Una-se ao maior serviço de email do mundo: o MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] DISCLAIMER This e-mail and any attachments 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 persons other 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. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JDOM and struts
JDOM is a library for manipulating XML files and has nothing to do with CSV files. You can read in a CSV file using some simple file i/o and string tokenization. Do a search on google.com on java csv for info on that. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Alok Ghosh [EMAIL PROTECTED] wrote: How can I use jdom along with struts to read Comma Separated Values (csv)? Can jdom read csv by itself? I've been looking for an example, but can not seem to find one anywhere. Thanks, Alok. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: UML? File organization?
Hi, I'm just finishing my first smallish struts app, and the first struts app deployed by the company. I'ld be interested in hearing your ideas about package structure. For now, I just use com.moog.us.beans and com.moog.us.actions for my Bean and Action classes, respectively. It seems to facilitate the MVC separation that we all work toward quite well. I don't have too many classes right now, so its not a big deal yet. For larger applications it could definititely make a difference in headache severity though. Keith Kamholz Moog East Aurora, NY (716) 687-7282 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:34 AM To: [EMAIL PROTECTED] Subject: UML? File organization? I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Variable
Well, you would have to use Java to convert the variable to an int anyway if you used a tag, so just byte the bullet and use the JSP syntax %! int var = 0 %. Mark -Original Message- From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Variable I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? From: Barbara Post [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Variable Date: Fri, 21 Jun 2002 16:00:56 +0200 why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Una-se ao maior serviço de email do mundo: o MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JDOM and struts
True, I know I can use String Tokenizer for parsing. Just curious if JDOM had any built in methods similar to doing: ie.)StringTokenizer st = new StringTokenizer(text, ,); String temp = st.nextToken(); String temp1 = st.nextToken(); ... The input I am trying to read is something like validation=true,mask:^\d+$,minlength:5 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:31 AM To: Struts Users Mailing List Subject: Re: JDOM and struts JDOM is a library for manipulating XML files and has nothing to do with CSV files. You can read in a CSV file using some simple file i/o and string tokenization. Do a search on google.com on java csv for info on that. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Alok Ghosh [EMAIL PROTECTED] wrote: How can I use jdom along with struts to read Comma Separated Values (csv)? Can jdom read csv by itself? I've been looking for an example, but can not seem to find one anywhere. Thanks, Alok. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: UML? File organization?
Looks like we are in the same boat... I've done it two different ways so far and I am not sure which way is better: First application com.ebind.common com.ebind.twizard.dao - objects to connect the action to the database com.ebind.twizard.database - access the database and return recordsets com.ebind.twizard.reports - the code for the specific action, code to support /web-inf/jsp/common/tiles - generic tiles and layouts /web-inf/jsp/twizard/reports - jsps (main body only) for displaying report action related stuff /web-inf/jsp/twizard/tiles - tiles specific to this application In the second application com.ebind.common com.ebind.plantsec.create - create.do related code com.ebind.plantsec.search - search.do related code com.ebind.plantsec.visitors - business objects for visitors (beans, logic, etc) com.ebind.plantsec.database - database access objects /web-inf/jsp/common/tiles - generic tiles and layouts /web-inf/jsp/plantsec/search - jsps (main body only) for displaying search action related stuff /web-inf/jsp/plantsec/create - jsps (main body only) for displaying create action related stuff /web-inf/jsp/plantsec/tiles - tiles specific to this application So far I am not happy with either of them. The only thing I am happy with is the com.ebind.common and /web-inf/jsp/common Since these are all intranet applications, the look and feel is all very similar. With tiles I have a globallayout specified in the common area and I just extend and overwrite for a new application. It takes about 5 minutes to bring up the look and feel for a new application. The com.ebind.common package is for generic code that will get used across all applications possibly. Both these are maintained seperately and pushed down into the applications. -Original Message- From: kkamholz [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:34 AM To: struts-user Subject: RE: UML? File organization? Hi, I'm just finishing my first smallish struts app, and the first struts app deployed by the company. I'ld be interested in hearing your ideas about package structure. For now, I just use com.moog.us.beans and com.moog.us.actions for my Bean and Action classes, respectively. It seems to facilitate the MVC separation that we all work toward quite well. I don't have too many classes right now, so its not a big deal yet. For larger applications it could definititely make a difference in headache severity though. Keith Kamholz Moog East Aurora, NY (716) 687-7282 [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:34 AM To: [EMAIL PROTECTED] Subject: UML? File organization? I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Variable
Maybe you get a better solution to my problem I am using this: logic:iterate id=sequence name=sequenceList type=com.shoptime.apollo.store.Sequence indexId=sequenceIndex logic:iterate id=term name=sequence property=terms type=com.shoptime.apollo.store.Term indexId=termIndex html:text.../ html:button...onclick=aaa( [index] )/ /logic:iterate /logic:iterate the html:text.../ is indexed, and when the button is clicked I need to know what index was clicked because in my action I need the text in that index. Did you understand? I don't get to use the termIndex because it is started with 0 after each other iteration... Thank you. _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JDOM and struts
Not that I am aware of. However, this is a question for the JDOM mailing lists, not Struts. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Alok Ghosh [EMAIL PROTECTED] wrote: True, I know I can use String Tokenizer for parsing. Just curious if JDOM had any built in methods similar to doing: ie.) StringTokenizer st = new StringTokenizer(text, ,); String temp = st.nextToken(); String temp1 = st.nextToken(); ... The input I am trying to read is something like validation=true,mask:^\d+$,minlength:5 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:31 AM To: Struts Users Mailing List Subject: Re: JDOM and struts JDOM is a library for manipulating XML files and has nothing to do with CSV files. You can read in a CSV file using some simple file i/o and string tokenization. Do a search on google.com on java csv for info on that. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Alok Ghosh [EMAIL PROTECTED] wrote: How can I use jdom along with struts to read Comma Separated Values (csv)? Can jdom read csv by itself? I've been looking for an example, but can not seem to find one anywhere. Thanks, Alok. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JDOM and struts
jdom-interest is a good list, too, with a lot of contributions from Jason Hunter (Java Servlet Programming) and Brett McLaughlin (Java XML and Building Enterprise Java Applications), who are the primary architects of JDOM. Mark -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:51 AM To: Struts Users Mailing List Subject: RE: JDOM and struts Not that I am aware of. However, this is a question for the JDOM mailing lists, not Struts. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Alok Ghosh [EMAIL PROTECTED] wrote: True, I know I can use String Tokenizer for parsing. Just curious if JDOM had any built in methods similar to doing: ie.) StringTokenizer st = new StringTokenizer(text, ,); String temp = st.nextToken(); String temp1 = st.nextToken(); ... The input I am trying to read is something like validation=true,mask:^\d+$,minlength:5 -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:31 AM To: Struts Users Mailing List Subject: Re: JDOM and struts JDOM is a library for manipulating XML files and has nothing to do with CSV files. You can read in a CSV file using some simple file i/o and string tokenization. Do a search on google.com on java csv for info on that. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Alok Ghosh [EMAIL PROTECTED] wrote: How can I use jdom along with struts to read Comma Separated Values (csv)? Can jdom read csv by itself? I've been looking for an example, but can not seem to find one anywhere. Thanks, Alok. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Variable
I have'nt followed the discussion keenly though Have u tried this if u wanted the index and are'nt able to get it using the indexed property of Iterate tag % int counter=0; % logic:iterate % counter++;% html:text.../ html:button.. onclick=%=\aaa(\+counter+\)\% / /logic:iterate Regards, satish -Original Message- From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 8:16 PM To: [EMAIL PROTECTED] Subject: Re: Variable Maybe you get a better solution to my problem I am using this: logic:iterate id=sequence name=sequenceList type=com.shoptime.apollo.store.Sequence indexId=sequenceIndex logic:iterate id=term name=sequence property=terms type=com.shoptime.apollo.store.Term indexId=termIndex html:text.../ html:button...onclick=aaa( [index] )/ /logic:iterate /logic:iterate the html:text.../ is indexed, and when the button is clicked I need to know what index was clicked because in my action I need the text in that index. Did you understand? I don't get to use the termIndex because it is started with 0 after each other iteration... Thank you. _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
UML stereotypes for Struts (Re: UML? File organization?)
I think this is a great topic for discussion, but I haven't thought too far about it. I would think the route would be simply to agree on a few stereotypes, and perhaps some standard names for tagged values. Are you familiar with WebUML? http://www.conallen.com/whitepapers/webapps/ModelingWebApplications.htm It might be a useful reference/counterpart to defining UML for struts. One of the future features we have in mind for StrutsBuilder would be import from XMI, which you could export from most UML tools. I don't know XMI syntax at all, but conceptually, it's not much different from importing from a struts-config file. But we wouldn't want to do that until there was a Struts community consensus on UML notation. http://sourceforge.net/projects/rivernorth/ Joe At 10:33 AM -0400 2002/06/21, [EMAIL PROTECTED] wrote: I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 tune in posse radio: http://www.live365.com/stations/289268 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Variable
It's probably better to not do this in a declaration, like this: %! int var = 0; % But instead, use a scriptlet, like this: % int var = 0; % A declaration (as the O'Reilly JSP book describes) ends up being an instance variable in the JSP page implementation class. It us therefore visible to parallel threads (requests) processing the page, and needs to be handled in a thread-safe manner. A thread-safe alternative is to declare variables within a scriplet element instead. It then becomes a local variable of the method in the page implementation class used to process each request, and is not shared by parallel threads. chris -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 9:38 AM To: 'Struts Users Mailing List' Subject: RE: Variable Well, you would have to use Java to convert the variable to an int anyway if you used a tag, so just byte the bullet and use the JSP syntax %! int var = 0 %. Mark -Original Message- From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Variable I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? From: Barbara Post [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Variable Date: Fri, 21 Jun 2002 16:00:56 +0200 why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Una-se ao maior serviço de email do mundo: o MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Variable
very true. -Original Message- From: Bartley, Chris P [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:03 AM To: 'Struts Users Mailing List' Subject: RE: Variable It's probably better to not do this in a declaration, like this: %! int var = 0; % But instead, use a scriptlet, like this: % int var = 0; % A declaration (as the O'Reilly JSP book describes) ends up being an instance variable in the JSP page implementation class. It us therefore visible to parallel threads (requests) processing the page, and needs to be handled in a thread-safe manner. A thread-safe alternative is to declare variables within a scriplet element instead. It then becomes a local variable of the method in the page implementation class used to process each request, and is not shared by parallel threads. chris -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 9:38 AM To: 'Struts Users Mailing List' Subject: RE: Variable Well, you would have to use Java to convert the variable to an int anyway if you used a tag, so just byte the bullet and use the JSP syntax %! int var = 0 %. Mark -Original Message- From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Variable I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? From: Barbara Post [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Variable Date: Fri, 21 Jun 2002 16:00:56 +0200 why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Una-se ao maior serviço de email do mundo: o MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: UML stereotypes for Struts (Re: UML? File organization?)
I think you are right about the sterotypes... Also I think some nice illustrative examples (maybe the struts-sample app) would be helpful to get us all on the same page. I had not seen the webuml page (printing now) but I will give it a read. I thumbed through a book on doing web applications, but it seemed to MS orienteed. -Original Message- From: Joe [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:59 AM To: struts-user Subject: UML stereotypes for Struts (Re: UML? File organization?) I think this is a great topic for discussion, but I haven't thought too far about it. I would think the route would be simply to agree on a few stereotypes, and perhaps some standard names for tagged values. Are you familiar with WebUML? http://www.conallen.com/whitepapers/webapps/ModelingWebApplications.htm It might be a useful reference/counterpart to defining UML for struts. One of the future features we have in mind for StrutsBuilder would be import from XMI, which you could export from most UML tools. I don't know XMI syntax at all, but conceptually, it's not much different from importing from a struts-config file. But we wouldn't want to do that until there was a Struts community consensus on UML notation. http://sourceforge.net/projects/rivernorth/ Joe At 10:33 AM -0400 2002/06/21, [EMAIL PROTECTED] wrote: I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- -- * Joe Germuska{ [EMAIL PROTECTED] } It's pitiful, sometimes, if they've got it bad. Their eyes get glazed, they go white, their hands tremble As I watch them I often feel that a dope peddler is a gentleman compared with the man who sells records. --Sam Goody, 1956 tune in posse radio: http://www.live365.com/stations/289268 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Variable
As bean:define tag sets a context bean + a script variable, I use this: logic:iterate indexId=count bean:define id=counter name=count html:text ... / html:button ... onclick='%= aaa( + counter +) %' / /logic:iterate Nico -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Variable
Ok, this is the alternative that I used. I am thinking that there was a better alternative... Thanks to all... From: Galbreath, Mark [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Variable Date: Fri, 21 Jun 2002 11:04:46 -0400 very true. -Original Message- From: Bartley, Chris P [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:03 AM To: 'Struts Users Mailing List' Subject: RE: Variable It's probably better to not do this in a declaration, like this: %! int var = 0; % But instead, use a scriptlet, like this: % int var = 0; % A declaration (as the O'Reilly JSP book describes) ends up being an instance variable in the JSP page implementation class. It us therefore visible to parallel threads (requests) processing the page, and needs to be handled in a thread-safe manner. A thread-safe alternative is to declare variables within a scriplet element instead. It then becomes a local variable of the method in the page implementation class used to process each request, and is not shared by parallel threads. chris -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 9:38 AM To: 'Struts Users Mailing List' Subject: RE: Variable Well, you would have to use Java to convert the variable to an int anyway if you used a tag, so just byte the bullet and use the JSP syntax %! int var = 0 %. Mark -Original Message- From: Ricardo de Souza Moura [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 10:16 AM To: [EMAIL PROTECTED] Subject: Re: Variable I was wanting to avoid use scriptlet in my jsp page, but I think that I don't have option... Is the common pratice use scriptlet to create variables inside de jsp page ? From: Barbara Post [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Variable Date: Fri, 21 Jun 2002 16:00:56 +0200 why using a taglib ? what is your need ? - Original Message - From: Ricardo de Souza Moura [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 21, 2002 3:53 PM Subject: Variable How can I create a int variable inside the jsp page using taglib ? Thank you _ Chegou o novo MSN Explorer. Instale já. É gratuito: http://explorer.msn.com.br -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Una-se ao maior serviço de email do mundo: o MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Envie e receba emails com o Hotmail no seu dispositivo móvel: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: UML? File organization?
Personaly, I find it most useful to organize everything along conventional functional module or package lines. Things that are used together should be packaged together. At some point, these functional divisions might also made into actual Struts modules and developed independantly. (This prospect should figure highly in any organizational scheme.) Within any application, there are tasks that are used together and tend to form subsystems. Often, these tasks are handled by the same developer(s) within a larger team, and also tie into the applications life-cycle and overall organization. For example, an auction application might have a registeration package, a searching package, a bidding package, and a fulfillment package. For the JSPs, I generally use a /pages folder off the root, and then organize by package beneath that. Something like /pages ./reg ./bid ./find ./buy On the Java source side, there would be corresponding .reg, .bid, .find, and .buy packages Which I think might all fall under your Conventional Theory category. I believe this is also the way the Struts source files are organized. The Action classes are all kept together, since they all work together to form the control layer. Other classes were dispatched to the util package (and then off to the commons). The validator has it own pacakge, as does tiles. We tend to put suffixes like *Action and *Form on classes, but that stems from the *Bean naming approach, rather than the package. Also keep in mind that organizing files for Struts is not any different than organizing them for any Model 2/MVC architecture. BTW, whether putting pages under is WEB-INF is best or not may depend on what container you are using. It is *not* always an option. It also means that you might have to separate your JSPs from other assets that need to be outside of WEB-INF, like HTML files, images, and stylesheets. Like any strategy, this approach has consequences, both good and bad. -- Ted Husted, Husted dot Com, Fairport NY US -- Java Web Development with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services [EMAIL PROTECTED] wrote: I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
extensions.tld to compile Tiles-channel example
Hi, I am trying to compile the tiles example tiles-channel but it doesn't work. The tag library extensions.tld is required but this library is not included in the war file. Can someone send it to me ? Thanks in advance. Sandra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Action Form Dictating Value Objects?
Comrades, Let us take the check the fruit example posted by Larry Maturo. Here the Fruit Object needs to have a boolean value called checked. The ValueObject makes sense when its in a Struts Environment but doesnt it look like we have compromised on the Value Object definition? the checked instance variable should not have been there in the first place as it has nothing to do with a Fruit abstraction. I guess we need something like a ValueObject add on object to plug it in when we use this Object in a Struts environment. later hemant //start logic:iterate id=fruits name=nameOfYourFormBean property=fruits html:checkbox indexed=true name=fruits property=checked/ bean:write name=fruits property=fruitName / /logic:iterate in class Fruit public class Fruit { private String fruitName = ; private boolean checked = false; public Fruit() { super(); } public String getFruitName() { return fruitName; } public void setFruitName(String _fruitName) { fruitName = _fruitName; } public boolean getChecked() { return checked; } public void setChecked(boolean _checked){ checked = _checked; } } In you form bean: private ArrayList frutis = null; public ArrayList getFruits() { return fruits; } public void setFruits(ArrayList _frutis) { fruits = _fruits; } public Fruit getFruits(int index) { return (Fruit) fruits.get(index); } public void setFruits(int index, Fruit fruit) { fruits.set(index,fruit); } public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request){ Fruit f = null; Iterator it = fruits.iterator(); while it.hasNext() { f = (Fruit) it.next(); f.setChecked(false); } } //-end
Bean define problem
Ive run into a problem that is probably very esaily solved, but I cant seem to find the problem. I am trying to grab a value from an attribute in my ActionForm to use as a tag parameter within my JSP. The attribute is an int. I am defining the attribute in the jsp with the following tag: bean:define id=maintenanceType property=maintenanceType name=hardwareForm type=int/ Problem is the JSP errors with the following: Incompatible type for declaration. Can't convert null to int. Within the compile jsp I see this: _jspx_th_bean_define_0.setPageContext(pageContext); _jspx_th_bean_define_0.setParent(null); _jspx_th_bean_define_0.setId(maintenanceType); _jspx_th_bean_define_0.setName(hardwareForm); _jspx_th_bean_define_0.setProperty(maintenanceType); _jspx_th_bean_define_0.setType(int); int maintenanceType = null; - error here Why is the tag trying to force the initial value to null instead of 0? Am I using the tag incorrectly? By the way, I have used this tag on the same page for retrieving a String attribute without any problems. Any help is greatly appreciated. Pete Serafin
Simple Formatted Date..
Greetings: Assuming That I do not want to use another tag lib at this point, how have others performed this type of thing: Simple Problem: I need to have today's date on every page. I would like to the format attribute in the bean:write tag to go from this: % java.util.Date date = new java.util.Date() ;% %= SomeClass.formatDate(date) % to this: bean:write .. format=date.format/ It seems that the bean:define tag can help out here. How can create a new Date() in bean:define Am I out in left field? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Sturts config exception question
HI, i work with struts 1.1 and i have a class with submit is the parameter od the form (DispathAction) public ActionForward *submit*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } and in struts config-xml: exception key=java.lang.SecurityException type=java.lang.SecurityException path=/jsp/security.jsp scope=request/ AND they do not redirect to the /jsp/security.jsp why BUT if i have: public ActionForward *perform*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } They work WHY ?? Can anybody help me to resolve this problem Bye. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Action Form Dictating Value Objects?
Minor correction...It should have been, Let us take the fruit example. pardon my grammar hemant - Original Message - From: hemant To: struts Cc: Sanjay Pamidiparti Sent: Friday, June 21, 2002 11:12 AM Subject: Action Form Dictating Value Objects? Comrades, Let us take the check the fruit example posted by Larry Maturo. Here the Fruit Object needs to have a boolean value called checked. The ValueObject makes sense when its in a Struts Environment but doesnt it look like we have compromised on the Value Object definition? the checked instance variable should not have been there in the first place as it has nothing to do with a Fruit abstraction. I guess we need something like a ValueObject add on object to plug it in when we use this Object in a Struts environment. later hemant //start logic:iterate id=fruits name=nameOfYourFormBean property=fruits html:checkbox indexed=true name=fruits property=checked/ bean:write name=fruits property=fruitName / /logic:iterate in class Fruit public class Fruit { private String fruitName = ; private boolean checked = false; public Fruit() { super(); } public String getFruitName() { return fruitName; } public void setFruitName(String _fruitName) { fruitName = _fruitName; } public boolean getChecked() { return checked; } public void setChecked(boolean _checked){ checked = _checked; } } In you form bean: private ArrayList frutis = null; public ArrayList getFruits() { return fruits; } public void setFruits(ArrayList _frutis) { fruits = _fruits; } public Fruit getFruits(int index) { return (Fruit) fruits.get(index); } public void setFruits(int index, Fruit fruit) { fruits.set(index,fruit); } public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request){ Fruit f = null; Iterator it = fruits.iterator(); while it.hasNext() { f = (Fruit) it.next(); f.setChecked(false); } } //-end
Re: Sturts config exception question
This is because there is a *bug* in the DispatchAction in 1.1b1 and the nightly builds. Currently the DispatchAction does not support the new Exceptions facility in Struts 1.1. There is already a bug in Bugzilla for this and I have submitted a patch. I will be applying the patch to the Struts code soon. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- João_Cerdeira [EMAIL PROTECTED] wrote: HI, i work with struts 1.1 and i have a class with submit is the parameter od the form (DispathAction) public ActionForward *submit*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } and in struts config-xml: exception key=java.lang.SecurityException type=java.lang.SecurityException path=/jsp/security.jsp scope=request/ AND they do not redirect to the /jsp/security.jsp why BUT if i have: public ActionForward *perform*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } They work WHY ?? Can anybody help me to resolve this problem Bye. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Sturts config exception question
Here's the bug report: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8022 -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- James Holmes [EMAIL PROTECTED] wrote: This is because there is a *bug* in the DispatchAction in 1.1b1 and the nightly builds. Currently the DispatchAction does not support the new Exceptions facility in Struts 1.1. There is already a bug in Bugzilla for this and I have submitted a patch. I will be applying the patch to the Struts code soon. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- João_Cerdeira [EMAIL PROTECTED] wrote: HI, i work with struts 1.1 and i have a class with submit is the parameter od the form (DispathAction) public ActionForward *submit*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } and in struts config-xml: exception key=java.lang.SecurityException type=java.lang.SecurityException path=/jsp/security.jsp scope=request/ AND they do not redirect to the /jsp/security.jsp why BUT if i have: public ActionForward *perform*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } They work WHY ?? Can anybody help me to resolve this problem Bye. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Sturts config exception question
Thanks James Advertise the list when this is fixed James Holmes wrote: This is because there is a *bug* in the DispatchAction in 1.1b1 and the nightly builds. Currently the DispatchAction does not support the new Exceptions facility in Struts 1.1. There is already a bug in Bugzilla for this and I have submitted a patch. I will be applying the patch to the Struts code soon. -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ --- Joa~o_Cerdeira [EMAIL PROTECTED] wrote: HI, i work with struts 1.1 and i have a class with submit is the parameter od the form (DispathAction) public ActionForward *submit*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } and in struts config-xml: exception key=java.lang.SecurityException type=java.lang.SecurityException path=/jsp/security.jsp scope=request/ AND they do not redirect to the /jsp/security.jsp why BUT if i have: public ActionForward *perform*( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { throw new SecurityException(ola); } They work WHY ?? Can anybody help me to resolve this problem Bye. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
MockStrutsTestCase
Hello, I have been trying to run the example testcase in StrutsTestCase 1.7.1 (strutstest-1.1_2.3.zip) but I am getting an error Parsing error processing resource path /WEB-INF/struts-config.xml from an underlying MalformedURLException/NullPointerException. I have tried to follow the instructions in the readme file exactly - here is the ant task I wrote based on the readme instructions, which gives me this error. java fork=yes classname=examples.TestLoginAction classpath pathelement location=${xmlParserAPIs} pathelement location=${xercesImpl} pathelement location=${junit.jar}/ pathelement location=${servlet.jar}/ pathelement location=${struts.libs}/struts.jar/ pathelement location=${commons-digester.jar}/ pathelement location=${commons-collections.jar}/ pathelement location=${commons-logging.jar}/ pathelement location=${commons-beanutils.jar}/ pathelement location=${strutstest.jar}/ pathelement path=c:\lib\strutstest/ /classpath /java The only adjustment I made to the instructions in the readme was to add the xerces' xmlParserAPIs/xercesImpl jars to the classpath to get by an original class not found exception. Has anyone had a problem trying to run the TestLoginAction example, or have any suggestions for me to get this running? Thank you. -Brian
RE: If you haven't seen this yet.
Calling the use of Flash script[ing] is like calling the use of gif or jpeg images scripting. Don't confuse the superficialities of the plugin-html with the real product. Using Flash is not really unlike using a pgeg or a gif image, except that it has a lot more to offer. In images, Flash is to a jpeg what object-oriented programming is to procedural programming. A class is a data type that can be used to manipulate data. Flash, similarly, is an image type that can be used to manipulate images. It is what can be inside the Flash that is exciting. The script is unimportant. To think of Flash as scripting is akin to thinking of object-oriented programming as the stuff inside main. By the way, not that it matters, but a somewhat ironic detail of English grammar is that attention-to-detail is not correct. I personally would prefer a coder who knew what Flash was, as opposed to a coder who is intimate with Dalmations. ///;-) At 07:04 AM 6/21/2002 -0400, you wrote: I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: UML? File organization?
I understand what you are saying here. I the example below for the packages where would (1) something that cleary will be used in many packages go (2) something that could be used in another Would it make sense have both the way shown below and another package for business logic Sooo... com.ebind.appname.req - (forms, actions, properties files, etc) com.ebind.appname.bid com.ebind.appname.find com.ebind.appname.buy com.ebind.appname.somecommonfunctions.* com.ebind.commonstuff1 com.ebind.commonstuff2 Does that make sense? Thanks for reminding me about the WEB-INF/JSP issues on other servers. I remeber seeing that now -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:18 AM To: struts-user Subject: Re: UML? File organization? Personaly, I find it most useful to organize everything along conventional functional module or package lines. Things that are used together should be packaged together. At some point, these functional divisions might also made into actual Struts modules and developed independantly. (This prospect should figure highly in any organizational scheme.) Within any application, there are tasks that are used together and tend to form subsystems. Often, these tasks are handled by the same developer(s) within a larger team, and also tie into the applications life-cycle and overall organization. For example, an auction application might have a registeration package, a searching package, a bidding package, and a fulfillment package. For the JSPs, I generally use a /pages folder off the root, and then organize by package beneath that. Something like /pages ./reg ./bid ./find ./buy On the Java source side, there would be corresponding .reg, .bid, .find, and .buy packages Which I think might all fall under your Conventional Theory category. I believe this is also the way the Struts source files are organized. The Action classes are all kept together, since they all work together to form the control layer. Other classes were dispatched to the util package (and then off to the commons). The validator has it own pacakge, as does tiles. We tend to put suffixes like *Action and *Form on classes, but that stems from the *Bean naming approach, rather than the package. Also keep in mind that organizing files for Struts is not any different than organizing them for any Model 2/MVC architecture. BTW, whether putting pages under is WEB-INF is best or not may depend on what container you are using. It is *not* always an option. It also means that you might have to separate your JSPs from other assets that need to be outside of WEB-INF, like HTML files, images, and stylesheets. Like any strategy, this approach has consequences, both good and bad. -- Ted Husted, Husted dot Com, Fairport NY US -- Java Web Development with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services [EMAIL PROTECTED] wrote: I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src directory... Should they be by purpose of the objects like (conventional theory) com.ebind.hrdata.people; com.ebind.hrdata.companies; com.ebind.struts.create; com.ebind.struts.search; or more along the lines of struts: com.ebind.peoplefinder.search; com.ebind.peoplefinder.create; We've got two small projects done wth struts and the next ones will be more complex so I want to get the best practices down (I've printed and read the husted site a few times already) Any thoughts would be great - and I will drop the document out here when its done -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Action management with Tiles-Struts
I am trying to adapt my struts application with Tiles. But I don't understand very well how the action call works with Tiles . In a basic struts application: Essai.jsp: html:form action=/EditEssai.do method=Get . html:submit propery=submit html:form Struts-config.xml: action path=/EditEssai type=... In the JSP file I name the action associated to the JSP page. The other solution consists of add a input entry in the struts-config file like input=/Essai.jsp, isn't it ? Now how can I do the same think with Tiles. Can somebody explain how associate an Action to a link, a menu item and a submit button action with Tiles? Thanks a lot for your help. Sandra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: MockStrutsTestCase
You need to have the directory that contains WEB-INF/struts-config.xml in your class path. Not normally the way Struts runs but the TestCase uses the classpath to find the config file. I struggled with this for awhile as well. -kevin -Original Message- From: Brian Buckley [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 8:26 AM To: [EMAIL PROTECTED] Subject: MockStrutsTestCase Hello, I have been trying to run the example testcase in StrutsTestCase 1.7.1 (strutstest-1.1_2.3.zip) but I am getting an error Parsing error processing resource path /WEB-INF/struts-config.xml from an underlying MalformedURLException/NullPointerException. I have tried to follow the instructions in the readme file exactly - here is the ant task I wrote based on the readme instructions, which gives me this error. java fork=yes classname=examples.TestLoginAction classpath pathelement location=${xmlParserAPIs} pathelement location=${xercesImpl} pathelement location=${junit.jar}/ pathelement location=${servlet.jar}/ pathelement location=${struts.libs}/struts.jar/ pathelement location=${commons-digester.jar}/ pathelement location=${commons-collections.jar}/ pathelement location=${commons-logging.jar}/ pathelement location=${commons-beanutils.jar}/ pathelement location=${strutstest.jar}/ pathelement path=c:\lib\strutstest/ /classpath /java The only adjustment I made to the instructions in the readme was to add the xerces' xmlParserAPIs/xercesImpl jars to the classpath to get by an original class not found exception. Has anyone had a problem trying to run the TestLoginAction example, or have any suggestions for me to get this running? Thank you. -Brian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Validator problem (HELP ME PLS)
In an effort to get this resolved before I go home for the weekend, I have zipped up my application and posted it at the following URL http://www.e-bind.com/plantsec.zip (2.5 mb) I run everything here on Tomcat403. There is a datasource defined in the struts-config, but you probably wont need to get that far to see what the problem is... You should be able to drop this into your web-apps directory The issue is not being able to get the error messages back from DynaFormValidator... (Although something is in there) You have my gratitude -Original Message- From: Chmura, William B. Sent: Friday, June 21, 2002 9:31 AM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) I did a logic:messagesPresent and it showed that there was some messages present. Unfortunately neither html:errors/ or font color=Blue html:messages id=message message=true header=message.bullet bean:write name=message/BR /html:messages /font produces any output... ARRRHHH. This is driving me absolutely insane... If I can get this working before the weekend starts I will be ecstatic -Original Message- From: dwinterfeldt [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 20, 2002 5:01 PM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) The change from using multiple set-property elements was made right after beta since it wasn't very clear to call setPathname muliple times. The Validator is run through the ActionForm's validate method and returns a standard ActionErrors object. The additional tags that used to come with the Validator were for features now incorporated into Struts. html:messages - Iterate through messages/errors. logic:messagesPresent - check for the presence of a message/error (can pass in an optional property to check if there is a message/error for an individual field) logic:messagesNotPresent - check for the absence of a message/error David --- [EMAIL PROTECTED] wrote: the problem I was having was caused by the struts-config.xml file defining the plug in like: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/WEB-INF/validator-rules.xml,/WEB-INF/validator.xml/ /plug-in I took a look at the struts blank war and copied that syntax over which is like this: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathname value=/WEB-INF/validator-rules.xml/ set-property property=pathname value=/WEB-INF/validator.xml/ /plug-in And it started recognizing my rules. Now I cannot get it to show error messages, although it does successfully redirect back until the validation requirements are met. Does validator feed the error messages into the normal html:errors? I noticed it had a validator taglib at one point, but I am not sure where it is now that 1.1b incorporated alot -Original Message- From: Chmura, William B. Sent: Thursday, June 20, 2002 9:46 AM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) Where I have this in my validator.xml file... ?1 This means it should give me an error if it is not filled in? ?2 Should I have to invoke something from the action to check it, or is it just like an actionform? ?3 What else can I try? Its like its all working, just ignoring my validate.xml file or something field property=employeeFirstName depends=required arg0 key=registrationForm.firstname.displayname/ /field -Original Message- From: Chmura, William B. Sent: Wednesday, June 19, 2002 4:54 PM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) Nope... Code runs, but it detects no errors... AAARRGHHH -Original Message- From: Raffy.Lata [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 19, 2002 4:29 PM To: struts-user Subject: RE: Validator problem (or user problem... not sure which yet) Lot's of stuff in your action class, but I see that you defined a DynaValidatorForm in your form-bean but you are casting it as a DynaActionForm in your action class...if you cast it correctly as a DynaValidatorForm and then invoke the validate() method (like in my previous email), it might correct the problem...try it... [EMAIL PROTECTED] on 06/19/2002 01:24:28 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: Validator problem (or user problem... not sure which yet) Here is everything: Thanks in advance for any solutions! Struts-config.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN
Re: UML? File organization?
In general, I'd recommend strongly separating the Struts classes from the rest of the application. So, I'd put anything that imports from Struts into a Struts package. Conceptually, the heirarchy should descibe your application first, and then show how Struts is used to expose your application to the web tier. So, I tend to have things like: [module1 stuff] appname.module1.dao appname.module1.struts appname.module1.util [module2 stuff] appname.module2.dao appname.module2.struts appname.module2.lucene [common stuff] appname.lang appname.lucene appnane.struts appname.sql appnane.util If you are writing up practices, I'd start with the recommendation to first follow the Java package patterns, and treat your application as an extension of those. So if you are writing collection classes that extend util classes, they can go into your own util package. Things that extend Struts can go into a Struts package. Things that extend Lucene can go into a Lucene package, and so forth. This follows the general OOP principle that methods that use each other a lot should be in the same class. Likewise, classes that use each other a lot should be in the same package. Generally, I wouldn't do something like have a package for Actions and another for ActionForms. I'd instead look at which Actions are using which ActionForms and try to group the packages along those lines. -T. [EMAIL PROTECTED] wrote: I understand what you are saying here. I the example below for the packages where would (1) something that cleary will be used in many packages go (2) something that could be used in another Would it make sense have both the way shown below and another package for business logic Sooo... com.ebind.appname.req - (forms, actions, properties files, etc) com.ebind.appname.bid com.ebind.appname.find com.ebind.appname.buy com.ebind.appname.somecommonfunctions.* com.ebind.commonstuff1 com.ebind.commonstuff2 Does that make sense? Thanks for reminding me about the WEB-INF/JSP issues on other servers. I remeber seeing that now -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:18 AM To: struts-user Subject: Re: UML? File organization? Personaly, I find it most useful to organize everything along conventional functional module or package lines. Things that are used together should be packaged together. At some point, these functional divisions might also made into actual Struts modules and developed independantly. (This prospect should figure highly in any organizational scheme.) Within any application, there are tasks that are used together and tend to form subsystems. Often, these tasks are handled by the same developer(s) within a larger team, and also tie into the applications life-cycle and overall organization. For example, an auction application might have a registeration package, a searching package, a bidding package, and a fulfillment package. For the JSPs, I generally use a /pages folder off the root, and then organize by package beneath that. Something like /pages ./reg ./bid ./find ./buy On the Java source side, there would be corresponding .reg, .bid, .find, and .buy packages Which I think might all fall under your Conventional Theory category. I believe this is also the way the Struts source files are organized. The Action classes are all kept together, since they all work together to form the control layer. Other classes were dispatched to the util package (and then off to the commons). The validator has it own pacakge, as does tiles. We tend to put suffixes like *Action and *Form on classes, but that stems from the *Bean naming approach, rather than the package. Also keep in mind that organizing files for Struts is not any different than organizing them for any Model 2/MVC architecture. BTW, whether putting pages under is WEB-INF is best or not may depend on what container you are using. It is *not* always an option. It also means that you might have to separate your JSPs from other assets that need to be outside of WEB-INF, like HTML files, images, and stylesheets. Like any strategy, this approach has consequences, both good and bad. -- Ted Husted, Husted dot Com, Fairport NY US -- Java Web Development with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services [EMAIL PROTECTED] wrote: I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am also putting together a document on the best way to go about struturing your directories under struts... If anyone has any suggestions I would love to hear it... I already have stuff like JSPs under the WEB-INF and stuff. I am trying to work out the best way to organize all the packages in the src
RE: Newbie: pass ResultSet to JSP?
We've had good success in using a CachedRowSet instead of a ResultSet. -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 6:25 AM To: [EMAIL PROTECTED] Subject: Newbie: pass ResultSet to JSP? Subject: Newbie: pass ResultSet to JSP? From: David Chu [EMAIL PROTECTED] === I am trying to get my head around this struts framework for the first time. I am confused about the best/standard way to access data from a JSP. - Let's say I want a page list_items.jsp. - I have access to a bean that has a method that returns the results of a database query as a ResultSet object. - How should I iterate through the rows of the bean? - Complication: my jsp complains that the ResultSet object has been closed (because I closed the query) Is this the prefered encapsulator of data that I should be accessing through my JSP? Hopefully I can use the struts-logic:iterate tag. Thanks for helping out a new struts developer! -david -- David C. Chu America Online Network Tools Intern -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: UML? File organization?
When you say module1 and module2 below are you inferring something like billing and reporting (discrete chunks of the application?) I like this -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:50 PM To: struts-user Subject: Re: UML? File organization? In general, I'd recommend strongly separating the Struts classes from the rest of the application. So, I'd put anything that imports from Struts into a Struts package. Conceptually, the heirarchy should descibe your application first, and then show how Struts is used to expose your application to the web tier. So, I tend to have things like: [module1 stuff] appname.module1.dao appname.module1.struts appname.module1.util [module2 stuff] appname.module2.dao appname.module2.struts appname.module2.lucene [common stuff] appname.lang appname.lucene appnane.struts appname.sql appnane.util If you are writing up practices, I'd start with the recommendation to first follow the Java package patterns, and treat your application as an extension of those. So if you are writing collection classes that extend util classes, they can go into your own util package. Things that extend Struts can go into a Struts package. Things that extend Lucene can go into a Lucene package, and so forth. This follows the general OOP principle that methods that use each other a lot should be in the same class. Likewise, classes that use each other a lot should be in the same package. Generally, I wouldn't do something like have a package for Actions and another for ActionForms. I'd instead look at which Actions are using which ActionForms and try to group the packages along those lines. -T. [EMAIL PROTECTED] wrote: I understand what you are saying here. I the example below for the packages where would (1) something that cleary will be used in many packages go (2) something that could be used in another Would it make sense have both the way shown below and another package for business logic Sooo... com.ebind.appname.req - (forms, actions, properties files, etc) com.ebind.appname.bid com.ebind.appname.find com.ebind.appname.buy com.ebind.appname.somecommonfunctions.* com.ebind.commonstuff1 com.ebind.commonstuff2 Does that make sense? Thanks for reminding me about the WEB-INF/JSP issues on other servers. I remeber seeing that now -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:18 AM To: struts-user Subject: Re: UML? File organization? Personaly, I find it most useful to organize everything along conventional functional module or package lines. Things that are used together should be packaged together. At some point, these functional divisions might also made into actual Struts modules and developed independantly. (This prospect should figure highly in any organizational scheme.) Within any application, there are tasks that are used together and tend to form subsystems. Often, these tasks are handled by the same developer(s) within a larger team, and also tie into the applications life-cycle and overall organization. For example, an auction application might have a registeration package, a searching package, a bidding package, and a fulfillment package. For the JSPs, I generally use a /pages folder off the root, and then organize by package beneath that. Something like /pages ./reg ./bid ./find ./buy On the Java source side, there would be corresponding .reg, .bid, .find, and .buy packages Which I think might all fall under your Conventional Theory category. I believe this is also the way the Struts source files are organized. The Action classes are all kept together, since they all work together to form the control layer. Other classes were dispatched to the util package (and then off to the commons). The validator has it own pacakge, as does tiles. We tend to put suffixes like *Action and *Form on classes, but that stems from the *Bean naming approach, rather than the package. Also keep in mind that organizing files for Struts is not any different than organizing them for any Model 2/MVC architecture. BTW, whether putting pages under is WEB-INF is best or not may depend on what container you are using. It is *not* always an option. It also means that you might have to separate your JSPs from other assets that need to be outside of WEB-INF, like HTML files, images, and stylesheets. Like any strategy, this approach has consequences, both good and bad. -- Ted Husted, Husted dot Com, Fairport NY US -- Java Web Development with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services [EMAIL PROTECTED] wrote: I have been playing with UML and trying to find a good way to do the upfront design of a struts based application. Has anyone done this already and have any suggestions? I know the use-cases can pretty much stay the same... I am
RE: UML? File organization?
I don't think I would say it was my idea... I think it was either in my UML user guide book or java patterns... This is all well and good, and I could walk away nodding my head saying yeah that sounds good... but now in practice with struts, etc... The app I am planning now is a web app that will track: * Projects - (add a project, alter status, close projects, add notes) * Billing - Enter in a billable time entry, generate reports, etc * Ticket Tracking - typical functionality for a ticket system (add, edit, assign, close, notify problem reports) ... Lets stop there for now... So the functionality of the system is pretty clearly broken out into the above groups. We can package them like so into com.ebind.myapp.projects com.ebind.myapp.billing com.ebind.myapp.tickets So now we can break them up inside each one into: com.ebind.myapp.projects.dao com.ebind.myapp.projects.logic com.ebind.myapp.projects.struts.createnew com.ebind.myapp.projects.struts.edit com.ebind.myapp.projects.struts.report com.ebind.myapp.billing.dao com.ebind.myapp.billing.logic com.ebind.myapp.billing.struts.addEntry com.ebind.myapp.billing.struts.report com.ebind.myapp.tickets.dao com.ebind.myapp.tickets.logic com.ebind.myapp.tickets.struts.createnew com.ebind.myapp.tickets.struts.edit com.ebind.myapp.tickets.struts.archive Alternatively, we could break out the logic so that it was more re-useable... com.ebind.projects.dao com.ebind.projects.logic com.ebind.myapp.tickets.struts.createnew com.ebind.myapp.tickets.struts.edit com.ebind.myapp.tickets.struts.archive ??and potentially add factory objects to the project?? com.ebind.myapp.tickets.logic (objects in here) I used the term logic here to represent the business logic that controls all behind the scenes So this seems to satisfy: (1) Keeping the struts together, keeping the logic togther (2) Packaging by functionality (3) cross package dependencies can be done (or implement a facade) (4) logic would have the beans for a given app (not form beans) On the JSP side: /jsp/projects /jsp/billing /jsp/tickets /images Depending on the complexity, the different areas could be broken up further (ie: /projects/create, /projects/reports, etc) -Original Message- From: Kevin.Bedell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 1:07 PM To: struts-user Subject: RE: UML? File organization? From reviewing my UML Distilled and UML Reference manual books, here are some thoughts - - According to the UML reference manual, pakage design should reflect the high-level architecture of a system - it's decomposition into subsystems and their dependencies. Dependency among packages summarizes the dependencies among the package contents. - In UML Distilled, Martin Fowler recommends designing packages to minimize package dependencies. He goes as far as recommending the designer create facade classes within packages that expose only those properties/methods that other packages need to know about. (I'm not sure if I buy into taking it this far.) In other words, the idea that Things that are used together should be packaged together could be thought of as another way of saying minimize inter-package dependencies which is what the UML recommends anyway. And it also follows the idea you have below of trying to minimize package dependencies so that you could break pieces of the application off (or reuse them) later. This seems to me to be sound object-oriented design - it encapsulates functionality into packages and minimizes dependancies (and hopefully maintenance effort later!). This approach is similar to approaches I've use successuflly in the past. Kevin [EMAIL PROTECTED] on 06/21/2002 12:37:15 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc:(bcc: Kevin Bedell/Systems/USHO/SunLife) Subject: RE: UML? File organization? I understand what you are saying here. I the example below for the packages where would (1) something that cleary will be used in many packages go (2) something that could be used in another Would it make sense have both the way shown below and another package for business logic Sooo... com.ebind.appname.req - (forms, actions, properties files, etc) com.ebind.appname.bid com.ebind.appname.find com.ebind.appname.buy com.ebind.appname.somecommonfunctions.* com.ebind.commonstuff1 com.ebind.commonstuff2 Does that make sense? Thanks for reminding me about the WEB-INF/JSP issues on other servers. I remeber seeing that now -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:18 AM To: struts-user Subject: Re: UML? File organization? Personaly, I find it most useful to organize everything along conventional functional module or package lines. Things that are used together should be packaged together. At some point, these functional divisions might also made into actual Struts modules and
Re: Newbie: pass ResultSet to JSP?
The cached Row set works extremely well for small volumes but when volumes are large, its can cause a resource problem as these objects hog the memory especially when there are a large number of users. just a thought. later hemant - Original Message - From: Shekhar Jain [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, June 21, 2002 1:06 PM Subject: RE: Newbie: pass ResultSet to JSP? We've had good success in using a CachedRowSet instead of a ResultSet. -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 6:25 AM To: [EMAIL PROTECTED] Subject: Newbie: pass ResultSet to JSP? Subject: Newbie: pass ResultSet to JSP? From: David Chu [EMAIL PROTECTED] === I am trying to get my head around this struts framework for the first time. I am confused about the best/standard way to access data from a JSP. - Let's say I want a page list_items.jsp. - I have access to a bean that has a method that returns the results of a database query as a ResultSet object. - How should I iterate through the rows of the bean? - Complication: my jsp complains that the ResultSet object has been closed (because I closed the query) Is this the prefered encapsulator of data that I should be accessing through my JSP? Hopefully I can use the struts-logic:iterate tag. Thanks for helping out a new struts developer! -david -- David C. Chu America Online Network Tools Intern -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: UML? File organization?
Not trying to put words in Ted's mouth - I'm sure he'll respond as well. I think from a pure OO design perspective, the breaking at the level of billing and reporting are good chuncks. That is, they are likely high enough that dependencies between them would be minimal. Then breaking sub-packages down lower in a consistent way as Ted lays out - appname.module1.dao appname.module1.struts appname.module1.util The idea here being similar functionality with inter-dependencies being less important. While minimizing inter-package dependencies at the lower level may be harder, it wouldn't be needed as much. Maintanance on appname.module1.* would probably require maintenance on classes in multiple of the sub-packages - but there would be fewer classes per package and the classes would be similar in type. Kevin [EMAIL PROTECTED] on 06/21/2002 01:13:00 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc:(bcc: Kevin Bedell/Systems/USHO/SunLife) Subject: RE: UML? File organization? When you say module1 and module2 below are you inferring something like billing and reporting (discrete chunks of the application?) I like this -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:50 PM To: struts-user Subject: Re: UML? File organization? In general, I'd recommend strongly separating the Struts classes from the rest of the application. So, I'd put anything that imports from Struts into a Struts package. Conceptually, the heirarchy should descibe your application first, and then show how Struts is used to expose your application to the web tier. So, I tend to have things like: [module1 stuff] appname.module1.dao appname.module1.struts appname.module1.util [module2 stuff] appname.module2.dao appname.module2.struts appname.module2.lucene [common stuff] appname.lang appname.lucene appnane.struts appname.sql appnane.util If you are writing up practices, I'd start with the recommendation to first follow the Java package patterns, and treat your application as an extension of those. So if you are writing collection classes that extend util classes, they can go into your own util package. Things that extend Struts can go into a Struts package. Things that extend Lucene can go into a Lucene package, and so forth. This follows the general OOP principle that methods that use each other a lot should be in the same class. Likewise, classes that use each other a lot should be in the same package. Generally, I wouldn't do something like have a package for Actions and another for ActionForms. I'd instead look at which Actions are using which ActionForms and try to group the packages along those lines. -T. [EMAIL PROTECTED] wrote: I understand what you are saying here. I the example below for the packages where would (1) something that cleary will be used in many packages go (2) something that could be used in another Would it make sense have both the way shown below and another package for business logic Sooo... com.ebind.appname.req - (forms, actions, properties files, etc) com.ebind.appname.bid com.ebind.appname.find com.ebind.appname.buy com.ebind.appname.somecommonfunctions.* com.ebind.commonstuff1 com.ebind.commonstuff2 Does that make sense? Thanks for reminding me about the WEB-INF/JSP issues on other servers. I remeber seeing that now -Original Message- From: husted [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 11:18 AM To: struts-user Subject: Re: UML? File organization? Personaly, I find it most useful to organize everything along conventional functional module or package lines. Things that are used together should be packaged together. At some point, these functional divisions might also made into actual Struts modules and developed independantly. (This prospect should figure highly in any organizational scheme.) Within any application, there are tasks that are used together and tend to form subsystems. Often, these tasks are handled by the same developer(s) within a larger team, and also tie into the applications life-cycle and overall organization. For example, an auction application might have a registeration package, a searching package, a bidding package, and a fulfillment package. For the JSPs, I generally use a /pages folder off the root, and then organize by package beneath that. Something like /pages ./reg ./bid ./find ./buy On the Java source side, there would be corresponding .reg, .bid, .find, and .buy packages Which I think might all fall under your Conventional Theory category. I believe this is also the way the Struts source files are organized. The Action classes are all kept together, since they all work together to form the control layer. Other classes were dispatched to the util package (and then off to the commons). The validator has it own pacakge, as does tiles. We tend to
HELP Tiles Action Component Servlet not being called
I am trying to test out tiles. I change my web.xml file to use the tiles ActionComponent servlet and restarted tomcat but the exception printed below appears to still be using the struts ActionServlet. I've restarted tomcat multiple times and tried changing the names of the servlet-class more than a few to make sure it was getting reloaded. This one has got me stumped. Any Suggestions? TIA: Dennis java.lang.IllegalArgumentException: Path indexPage does not start with a / character at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:570) at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:174) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:965) at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:548) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:250) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452) My Action: action path=/index forward=indexPage/ My important part of web.xml servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameinstances-config/param-name param-value/WEB-INF/component-definitions.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HELP Tiles Action Component Servlet not being called
No wait... I know this one... I had the same problem... here is my web.xml... I have some differences from yours. Try setting it up like this. I had some issues with some old documentation on the site. (another hint: on the tiles home page there is a link to a document called advanced tiles - which is geared better i think) servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-namedefinitions-config/param-name param-value/WEB-INF/jsp/plantsec/tilesDefinitions.xml,/WEB-INF/jsp/com mon/tiles/tilesGlobal.xml /param-value /init-param init-param param-namedefinitions-debug/param-name param-value2/param-value /init-param init-param param-namedefinitions-parser-details/param-name param-value0/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 4:19 PM To: struts-user Subject: HELP Tiles Action Component Servlet not being called I am trying to test out tiles. I change my web.xml file to use the tiles ActionComponent servlet and restarted tomcat but the exception printed below appears to still be using the struts ActionServlet. I've restarted tomcat multiple times and tried changing the names of the servlet-class more than a few to make sure it was getting reloaded. This one has got me stumped. Any Suggestions? TIA: Dennis java.lang.IllegalArgumentException: Path indexPage does not start with a / character at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Applica tionContext.java:570) at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(A pplicationContextFacade.java:174) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:965) at org.apache.struts.action.RequestProcessor.processForward(RequestProcesso r.java:548) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 250) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452) My Action: action path=/index forward=indexPage/ My important part of web.xml servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameinstances-config/param-name param-value/WEB-INF/component-definitions.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Making Action object as singleton
Hello I have an Action object which is common for all JSP pages. It doesn't have any object level variable in it. What are all the advantages/disadvantages of making Action object as a singleton? Thanks in advance !! - Nilesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HELP Tiles Action Component Servlet not being called
Same here 4.0.3 tomcat my defs file: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; !-- Main Layout Definition description -- tiles-definitions definition name=indexPage path=/globals/BlackBaseLayout.jsp put name=title value=DateMate.com / put name=header value=Test / put name=body value=Test / /definition /tiles-definitions This is being loaded ok. This is a very strange error. Thanks for you help -Dennis On Fri, 2002-06-21 at 15:09, [EMAIL PROTECTED] wrote: I am on Tomcat 403 and it works. I would not think it was a tomcat bug because it is not really being handled by that... What does your tiles definition file look like? I had some issues in there also. I wish I could remember what I did to fix it... -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 4:48 PM To: struts-user Subject: RE: HELP Tiles Action Component Servlet not being called Still a no-go. Fixing the servlet parameters to be tiles specific helped load the servlet. I turned the debug level up and verified the my servlet was being loaded. The following from my catalina.out Component Definitions debug level = 2 factory loaded : {indexPage={name=indexPage, path=/globals/BlackBaseLayout.jsp, role=null, controller=null, controllerType=null, controllerInstance=null, attributes={header=, title=DateMate.com, body=}} } Factory initialized from file '/WEB-INF/component-definitions.xml'. The problem still exists though. When I access a page the exception printed suggests that the parent class is being used (See exception) Is this a tomcat bug? Thanks Dennis On Fri, 2002-06-21 at 14:37, [EMAIL PROTECTED] wrote: No wait... I know this one... I had the same problem... here is my web.xml... I have some differences from yours. Try setting it up like this. I had some issues with some old documentation on the site. (another hint: on the tiles home page there is a link to a document called advanced tiles - which is geared better i think) servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-namedefinitions-config/param-name param-value/WEB-INF/jsp/plantsec/tilesDefinitions.xml,/WEB-INF/jsp/com mon/tiles/tilesGlobal.xml /param-value /init-param init-param param-namedefinitions-debug/param-name param-value2/param-value /init-param init-param param-namedefinitions-parser-details/param-name param-value0/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 4:19 PM To: struts-user Subject: HELP Tiles Action Component Servlet not being called I am trying to test out tiles. I change my web.xml file to use the tiles ActionComponent servlet and restarted tomcat but the exception printed below appears to still be using the struts ActionServlet. I've restarted tomcat multiple times and tried changing the names of the servlet-class more than a few to make sure it was getting reloaded. This one has got me stumped. Any Suggestions? TIA: Dennis java.lang.IllegalArgumentException: Path indexPage does not start with a / character at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Applica tionContext.java:570) at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(A pplicationContextFacade.java:174) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:965) at org.apache.struts.action.RequestProcessor.processForward(RequestProcesso r.java:548) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 250) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452) My Action: action path=/index forward=indexPage/ My important part of web.xml servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameinstances-config/param-name param-value/WEB-INF/component-definitions.xml/param-value /init-param init-param
RE: Making Action object as singleton
?? -- Action objects are always singletons in the Struts framework, it only creates a single instance of each Action class for delegationdo you mean, What the the advantages/disadvantages to having only a single Action class in my framework? peace, Joe -Original Message- From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 1:56 PM To: Struts mailing list ([EMAIL PROTECTED]) Subject: Making Action object as singleton Hello I have an Action object which is common for all JSP pages. It doesn't have any object level variable in it. What are all the advantages/disadvantages of making Action object as a singleton? Thanks in advance !! - Nilesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Making Action object as singleton
Thanks for your clarification. I'm not yet much familiar with Struts framework. And I didn't know that Struts take care of making Action object as a Singleton. May be I should go back and study Struts in detail before implementing it! Thanks again. - Nilesh -Original Message- From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 22, 2002 5:16 PM To: Struts Users Mailing List Subject: RE: Making Action object as singleton ?? -- Action objects are always singletons in the Struts framework, it only creates a single instance of each Action class for delegationdo you mean, What the the advantages/disadvantages to having only a single Action class in my framework? peace, Joe -Original Message- From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 1:56 PM To: Struts mailing list ([EMAIL PROTECTED]) Subject: Making Action object as singleton Hello I have an Action object which is common for all JSP pages. It doesn't have any object level variable in it. What are all the advantages/disadvantages of making Action object as a singleton? Thanks in advance !! - Nilesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HELP Tiles Action Component Servlet not being called
I am outta here for the weekend... But here is one last thing to try: try changing definition name=indexPage path=/globals/BlackBaseLayout.jsp to this... definition name=indexPage template=/globals/BlackBaseLayout.jsp otherwise you can hope that some decade old bong resin breaks loose in my brain and lets me remember how I fixed it for myself :) -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 5:04 PM To: struts-user Subject: RE: HELP Tiles Action Component Servlet not being called Same here 4.0.3 tomcat my defs file: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; !-- Main Layout Definition description -- tiles-definitions definition name=indexPage path=/globals/BlackBaseLayout.jsp put name=title value=DateMate.com / put name=header value=Test / put name=body value=Test / /definition /tiles-definitions This is being loaded ok. This is a very strange error. Thanks for you help -Dennis On Fri, 2002-06-21 at 15:09, [EMAIL PROTECTED] wrote: I am on Tomcat 403 and it works. I would not think it was a tomcat bug because it is not really being handled by that... What does your tiles definition file look like? I had some issues in there also. I wish I could remember what I did to fix it... -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 4:48 PM To: struts-user Subject: RE: HELP Tiles Action Component Servlet not being called Still a no-go. Fixing the servlet parameters to be tiles specific helped load the servlet. I turned the debug level up and verified the my servlet was being loaded. The following from my catalina.out Component Definitions debug level = 2 factory loaded : {indexPage={name=indexPage, path=/globals/BlackBaseLayout.jsp, role=null, controller=null, controllerType=null, controllerInstance=null, attributes={header=, title=DateMate.com, body=}} } Factory initialized from file '/WEB-INF/component-definitions.xml'. The problem still exists though. When I access a page the exception printed suggests that the parent class is being used (See exception) Is this a tomcat bug? Thanks Dennis On Fri, 2002-06-21 at 14:37, [EMAIL PROTECTED] wrote: No wait... I know this one... I had the same problem... here is my web.xml... I have some differences from yours. Try setting it up like this. I had some issues with some old documentation on the site. (another hint: on the tiles home page there is a link to a document called advanced tiles - which is geared better i think) servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-namedefinitions-config/param-name param-value/WEB-INF/jsp/plantsec/tilesDefinitions.xml,/WEB-INF/jsp/com mon/tiles/tilesGlobal.xml /param-value /init-param init-param param-namedefinitions-debug/param-name param-value2/param-value /init-param init-param param-namedefinitions-parser-details/param-name param-value0/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 4:19 PM To: struts-user Subject: HELP Tiles Action Component Servlet not being called I am trying to test out tiles. I change my web.xml file to use the tiles ActionComponent servlet and restarted tomcat but the exception printed below appears to still be using the struts ActionServlet. I've restarted tomcat multiple times and tried changing the names of the servlet-class more than a few to make sure it was getting reloaded. This one has got me stumped. Any Suggestions? TIA: Dennis java.lang.IllegalArgumentException: Path indexPage does not start with a / character at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Applica tionContext.java:570) at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(A pplicationContextFacade.java:174) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:965) at org.apache.struts.action.RequestProcessor.processForward(RequestProcesso r.java:548) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 250) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452) My Action: action path=/index
RE: Making Action object as singleton
That's okay, everyone's learning around here, myself included. :) It's good that you were planning your Action as a Singleton, though, because that's exactly how Struts treats all Action classes. Therefore, as you mentioned, you cannot have class-level member variables (unless they are static or intended to be shared across sessions) and must pass values through method calls instead. Any state variables should go into the ActionForm associated with the Action instead, or into the HttpSession if this is not feasible for some reason. peace, Joe -Original Message- From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 2:23 PM To: 'Struts Users Mailing List' Subject: RE: Making Action object as singleton Thanks for your clarification. I'm not yet much familiar with Struts framework. And I didn't know that Struts take care of making Action object as a Singleton. May be I should go back and study Struts in detail before implementing it! Thanks again. - Nilesh -Original Message- From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 22, 2002 5:16 PM To: Struts Users Mailing List Subject: RE: Making Action object as singleton ?? -- Action objects are always singletons in the Struts framework, it only creates a single instance of each Action class for delegationdo you mean, What the the advantages/disadvantages to having only a single Action class in my framework? peace, Joe -Original Message- From: Bhattad, Nilesh [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 1:56 PM To: Struts mailing list ([EMAIL PROTECTED]) Subject: Making Action object as singleton Hello I have an Action object which is common for all JSP pages. It doesn't have any object level variable in it. What are all the advantages/disadvantages of making Action object as a singleton? Thanks in advance !! - Nilesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: HELP Tiles Action Component Servlet not being called
Well, After extensivly searching the mail archive, I found that I needed to include a controller in my struts-config. controller processorClass=org.apache.struts.tiles.TilesRequestProcessor nocache=true/ Even if you user ActionComponentServlet, it still does the basic ActionServlet processing unless you change the controller too. On Fri, 2002-06-21 at 14:47, Dennis Muhlestein wrote: Still a no-go. Fixing the servlet parameters to be tiles specific helped load the servlet. I turned the debug level up and verified the my servlet was being loaded. The following from my catalina.out Component Definitions debug level = 2 factory loaded : {indexPage={name=indexPage, path=/globals/BlackBaseLayout.jsp, role=null, controller=null, controllerType=null, controllerInstance=null, attributes={header=, title=DateMate.com, body=}} } Factory initialized from file '/WEB-INF/component-definitions.xml'. The problem still exists though. When I access a page the exception printed suggests that the parent class is being used (See exception) Is this a tomcat bug? Thanks Dennis On Fri, 2002-06-21 at 14:37, [EMAIL PROTECTED] wrote: No wait... I know this one... I had the same problem... here is my web.xml... I have some differences from yours. Try setting it up like this. I had some issues with some old documentation on the site. (another hint: on the tiles home page there is a link to a document called advanced tiles - which is geared better i think) servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-namedefinitions-config/param-name param-value/WEB-INF/jsp/plantsec/tilesDefinitions.xml,/WEB-INF/jsp/com mon/tiles/tilesGlobal.xml /param-value /init-param init-param param-namedefinitions-debug/param-name param-value2/param-value /init-param init-param param-namedefinitions-parser-details/param-name param-value0/param-value /init-param init-param param-namedefinitions-parser-validate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -Original Message- From: dennis [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 4:19 PM To: struts-user Subject: HELP Tiles Action Component Servlet not being called I am trying to test out tiles. I change my web.xml file to use the tiles ActionComponent servlet and restarted tomcat but the exception printed below appears to still be using the struts ActionServlet. I've restarted tomcat multiple times and tried changing the names of the servlet-class more than a few to make sure it was getting reloaded. This one has got me stumped. Any Suggestions? TIA: Dennis java.lang.IllegalArgumentException: Path indexPage does not start with a / character at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Applica tionContext.java:570) at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(A pplicationContextFacade.java:174) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:965) at org.apache.struts.action.RequestProcessor.processForward(RequestProcesso r.java:548) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 250) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452) My Action: action path=/index forward=indexPage/ My important part of web.xml servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-c lass init-param param-nameapplication/param-name param-valueApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameinstances-config/param-name param-value/WEB-INF/component-definitions.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail:
html:img ... problem!
Subject: html:img ... problem! From: Jack Gao [EMAIL PROTECTED] === Hi, There I have a question about html:img tag. I use html:img page=/images/mainlogo.gif align=left border=0/ to show the logo in my page. But the problem is: sometimes, when I first time to open the page, the logo doesn't show, because it's append something like: ;jsessionid=DC41A.. follow the image file name in the url. Anybody have idea how this happen? and how to resolve it? Thanks Jack -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
debug
Would anybody share with me how you debug the program? I am using simply emacs. Is the getServlet.log() my only choice if I just want to do something equivalent to System.out.print()? Thanks! Billy Ng
please reply with data-sourc section (m)
Can someone upload a struts-config.xml which has a known good data-sources section? I can't figure out how to properly set the data-sources section of the struts-config.xml. It keeps causing an inability to parse the config file, resulting in this exception: javax.servlet.ServletException: Cannot find ActionMappings orActionFormBeans collection Without the data-sources section, the config and my app works fine. Here is my broken version: data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=Oracle Data Source Configuration/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=driverClass value=oracle.jdbc.driver.OracleDriver/ set-property property=url value=jdbc:oracle:thin:@localhost:1521:oracle/ set-property property=user value=system/ set-property property=password value=manager/ /data-source /data-sources -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: debug
How come I do not see the System.out result print to the xterm? How do you do it? Billy Ng - Original Message - From: Andrew Hill [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, June 21, 2002 9:57 PM Subject: RE: debug Hehe, Im still just using System.out and watching the Tomcat window! -Original Message- From: Billy Ng [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 22, 2002 10:17 To: Struts Users Mailing List Subject: debug Would anybody share with me how you debug the program? I am using simply emacs. Is the getServlet.log() my only choice if I just want to do something equivalent to System.out.print()? Thanks! Billy Ng -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: If you haven't seen this yet.
Haven't done anything serious in Flash?... the scripting inside it is quite excellent (now. Not thier first ireatation with v4). Mark was probably (hopefully?) talking about this scripting ability. Used not unlike another image format?... wow. You need to take a more serious look, mandinga. On Sat, 2002-06-22 at 02:30, micael wrote: Calling the use of Flash script[ing] is like calling the use of gif or jpeg images scripting. Don't confuse the superficialities of the plugin-html with the real product. Using Flash is not really unlike using a pgeg or a gif image, except that it has a lot more to offer. In images, Flash is to a jpeg what object-oriented programming is to procedural programming. A class is a data type that can be used to manipulate data. Flash, similarly, is an image type that can be used to manipulate images. It is what can be inside the Flash that is exciting. The script is unimportant. To think of Flash as scripting is akin to thinking of object-oriented programming as the stuff inside main. By the way, not that it matters, but a somewhat ironic detail of English grammar is that attention-to-detail is not correct. I personally would prefer a coder who knew what Flash was, as opposed to a coder who is intimate with Dalmations. ///;-) At 07:04 AM 6/21/2002 -0400, you wrote: I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JDOM and struts
Hi Alok, How can I use jdom along with struts to read Comma Separated Values (csv)? Parsing CSV files is not what JDOM does, I would recommend using java.util.StreamTokenizer to read in the CSV file and generate an XML file using JDOM. Duke Can jdom read csv by itself? I've been looking for an example, but can not seem to find one anywhere. Thanks, Alok. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: If you haven't seen this yet.
Not quite sure what you are saying here, Aaron? If we are not talking about Flash, then guess you are right. If we are, then that is a different matter. My apologies if the topic was not Flash. I took it that was Mark's topic, since he said Flash scripters. Maybe I am being too literal. If so, I guess I should not be so detail-oriented, and there you go? Mandinga, like the art of self-defense? Or is that also an aussie word of some different meaning? At 02:58 PM 6/22/2002 +1000, you wrote: Haven't done anything serious in Flash?... the scripting inside it is quite excellent (now. Not thier first ireatation with v4). Mark was probably (hopefully?) talking about this scripting ability. Used not unlike another image format?... wow. You need to take a more serious look, mandinga. On Sat, 2002-06-22 at 02:30, micael wrote: Calling the use of Flash script[ing] is like calling the use of gif or jpeg images scripting. Don't confuse the superficialities of the plugin-html with the real product. Using Flash is not really unlike using a pgeg or a gif image, except that it has a lot more to offer. In images, Flash is to a jpeg what object-oriented programming is to procedural programming. A class is a data type that can be used to manipulate data. Flash, similarly, is an image type that can be used to manipulate images. It is what can be inside the Flash that is exciting. The script is unimportant. To think of Flash as scripting is akin to thinking of object-oriented programming as the stuff inside main. By the way, not that it matters, but a somewhat ironic detail of English grammar is that attention-to-detail is not correct. I personally would prefer a coder who knew what Flash was, as opposed to a coder who is intimate with Dalmations. ///;-) At 07:04 AM 6/21/2002 -0400, you wrote: I guess Flash scripters don't know the difference between a Dalmation and a Black Lab, huh? That's the kind of attention-to-detail I'd be looking for! ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 12:38 AM To: Struts Users Mailing List Subject: If you haven't seen this yet. Mark, I thought you'd like this one :-) http://www.theserverside.com/home/thread.jsp?thread_id=14080 James Mitchell Software Engineer\Struts Evangelist Struts-Atlanta, the Open Minded Developer Network http://struts-atlanta.open-tools.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]