RE: Installation Getting Started Question
Hey Scott, In practice, the Struts Distribution works like any other Servlet bases Web-App... Download struts and deploy the examples to tomcat (you do not necessarily require Apache, since struts is Servlet based technology)... in other words you really only need a Servlet Container... Good Luck /A -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: November 17, 2004 10:09 AM To: [EMAIL PROTECTED] Subject: Installation Getting Started Question I am wanting to see how Struts may help in my J2EE development. I have purchased the O'Reilly book "Jakarta Struts" and want to get started with some examples. 1) I am currently running Tomcat 4.1.31 as a standalone. Can struts be installed with Tomcat as standalone? I saw somewhere in the install where it says to make sure you have Apache and Tomcat installed? Can someone help clear this up? 2) Is there a hello Struts example somewhere? Just to test the install/setup before I get under way? 3) The book does not start off simple either, so how can one get a handle on this effectively? My background is Servlets/JSP/ Web development. Including taglibs, ant, etc. Thanks, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: free struts boook
http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/index.tss Google is your friend :) /A -Original Message- From: Nishant [mailto:[EMAIL PROTECTED] Sent: November 17, 2004 9:51 AM To: Struts Users Mailing List Subject: free struts boook where do i get struts free book except strutslive Nishant Patil Software Engineer Cybage Software Pvt. Ltd. (A CMM Level 3 Company) West Avenue , Kalyani Nagar, Pune - 411 006 Tel: 91-20-4041700 -355 Email: [EMAIL PROTECTED] Website: www.cybage.com There's a difference between knowing the path, and walking the path - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Hate Myself for Not Getting Drop-Down Menu Right
Try removing the bean:define And setting your line: to: HTH, Amin -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 12:26 PM To: [EMAIL PROTECTED] Subject: Hate Myself for Not Getting Drop-Down Menu Right There is no problem with the database operation. Data are retrieved and can be displayed using the tag. Now, it is the drop-down menu. I have coded some drop-down menu before. This time, I have a collection of JavaBeans instead of a collection of strings. And, I am in trouble again. I passed a collection of JavaBean(s) upon successful completion of an action: Collection pages = service.getPages(); request.setAttribute( "PageBeans", pages ); The individual JavaBean in the Collection is called PageBean. The PageBean has only one property called 'name' (I made it simple for testing purpose) with the get and set methods. In the listpages.jsp, I imported: <%@ page import="org.dhsinfo.content.PageBean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-bean" prefix="bean" %> To form a drop-down menu, I did: I got this error: Http Status 500 root cause javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN and in the Tomcat logs file: 2004-09-20 12:03:38 ApplicationDispatcher[/DHSInfo] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Updating select list...
Hey All, I have a slightly complex problem: I have a dynaform which creates a set of input boxes (address information etc.) to be filled in based upon a number the user specifies at runtime: E.G Choose how many addresses you would like to add? (assume user chooses 3) Three sets of input boxes (indexed) are created listing Name, Address, Phone, etc... Each set of boxes includes a dynamically populated select list. At runtime, the select list may need to be updated with additional entries How can I add extra entries to the select list, and refresh the list, all without losing the information the user may have already entered? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Theoretical debate
I recently downloaded IBATIS in order to use it for some object persistence... interestingly, their JPetStore implementation used a similar idea, although it was all struts based: Essentially, each "method" you want to call is actually mapped within the Action Mapping... so if you wanted to "searchProduct", then your mapping could be: Where the CatalogBean has the required method (searchProducts) It seems pretty neat so far... haven't had much time to play though... /A -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 2:29 PM To: [EMAIL PROTECTED] Subject: Theoretical debate Last night I was Googling for something and I stumbled across the Crysalis framework. I was actualyl intrigued by the underlying premise of it and I wanted to see what others thought about it. In a nutshell and in my own words, Crysalis (http://chrysalis.sourceforge.net/) has the underlying idea that when you develop in most MVC frameworks, Struts chief among them, you are actually doing something unnatural and in a way at odds with basic OOP design. Think about a shopping cart example... If you were going to write that in straight Java, not for the web or anything, how would you model it? Most likely you would have a ShoppingCart class with a number of methods in it, things like addItem(), removeItem(), totalPrice(), etc. In Struts, although you aren't FORCED to, what you GENERALLY do is create three different Action classes like addItemAction, removeItemAction and totalPriceAction, and each is called in response to a form submission. But isn't it kind of odd that your object model isn't following what you probably think in your head is the right way, i.e., one class with multiple related methods? Proper encapsulation and all that jazz, right? Well, Crysalis does just that. It's controller elements are regular Java classes with multiple methods. What you wind up with is something that resembles Remote Procedure Calls instead of numerous servlets as controllers. In other words, you would create the ShoppingCart object just as I described above, with all three methods. Then, when you submit a form, the action is something along the lines of "ShoppingCart.addItem.cmd". ShoppingCart is the class to execute, addItem the method and cmd is a suffix to direct the request, just like extensions in your Struts apps map requests to ActionServlet. The elements of the submitted form are treated as the parameters of the method being called, making it rather elegant. I haven't gotten into any real detail on Crysalis, but I was interested in getting other peoples' thoughts on the underlying principal (which I *THINK* I've stated properly!). It was rather interesting to me because I'd never reall considered looking at it that way, and certainly it's not the way you typically approach a Struts-based application. It was also interesting to me because I've for about four years now been preaching here at work that we should write our applications as a collection of services that are executed to form a coherent larger application, which is very much along the lines of this (so I guess I actually HAVE looked at it this way in a sense, but not exactly). Any thoughts? Frank _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pluggable User Security Framework
Hello All, Just wondering if anybody has come across an Open Source Pluggable User Authentication Frameworks that integrates well with struts... nothing fancy... just user login/password, tombstone information, group levels etc... Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Indexed Properties DynaValidatorForm
I am trying to use a DynaValidatorForm with Indexed Properties... I have setup validation using the Validator Framework... Validation is working, however when it comes time to display failed validation (from ActionErrors), I can not seem to output an individual error message for each indexed property... instead validation errors for a single member of the indexed properties are displayed for all of the members ... Is there any way to display the error solely for the Indexed Property in question? Thanks, Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaAction or Map Backed Form?
I've been able to "hack" it using logic:iterate: : " value=""> Problem is, I lose my counter, and the ability to use validation . there has got to be a better way! Thank, /A -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 5:03 PM To: Struts Users Mailing List Subject: RE: DynaAction or Map Backed Form? Im not sure how to do it with the iterate tag, I use the c:forEach tag in the jstl taglib. It goes something like this: Assume service is a bean with accessors getDocuments ( ) and getId ( ) Assume document is a bean wit accessors getId ( ) and getName ( ) -Original Message- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 1:26 PM To: 'Struts Users Mailing List' Subject: RE: DynaAction or Map Backed Form? Here is the Data structure: I have two tables (Services, Documents) I hit the database and pull two separate Collections. I need to iterate over both collections... here is the relationship: ServiceID ServiceName Documents DocumentID DocumentName So a service object contains a collection of documents I need to be able to output something like: DocumentName --- Contract Deposit Contract Deposit In my action, I created a DynaActionForm. I set a java.util.ArrayList property called requiredDocuments in struts-config.xml In my action I make the database calls, then I iterate the services collection creating a RequiredDocumentsBean (contains serviceID, serviceName, and documents Collection) I populate the first two properties (serviceID, and serviceName) and then iterate the documents collection setting a LabelValueBean Here is the code: <-- snip --> while(sIterator.hasNext()){ // for each service... RequiredDocumentsBean rd = new RequiredDocumentsBean(); ServiceBeanLocal service = (ServiceBeanLocal)sIterator.next(); rd.setServiceId(service.getId()); rd.setServiceName(service.getServiceName()); Iterator dIterator = documents.iterator(); while(dIterator.hasNext()){ // for each available document DocumentBeanValue document = DocumentBeanValue)dIterator.next(); rd.getRequiredDocuments().add(new LabelValueBean(document.getDocumentName(),document.getId())); } requiredDocuments.add(rd); } myForm.set("allRequiredDocuments",requiredDocuments); request.setAttribute("allRequiredDocuments",requiredDocuments); <-- snip --> Thanks -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 3:09 PM To: Struts Users Mailing List Subject: RE: DynaAction or Map Backed Form? It isn't clear what you have to work with. Is services a map of some sort, or is it a collection. Either way you should use the iterate tag in the logic tag set. If you could explain the data structure better, it would be easier to help. -Original Message- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 12:39 PM To: 'Struts Users Mailing List' Subject: RE: DynaAction or Map Backed Form? Sorry... to add... Each Service may have a unknown set of documents... E.g. Services: 001 Catering 002 Party Documents: 001 Contract 002 Deposit Should yield: Contract Deposit Contract Deposit Thanks, /A -Original Message- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 2:28 PM To: 'Struts Users Mailing List' Subject: DynaAction or Map Backed Form? Hello All, I have the following scenario: I need to populate a form using a runtime generated set of form properties... Essentially I have two collections I pull from a database Services (serviceID,serviceName) Documents (documentID,documentName) I want to populate a set of checkboxes for each service such that I achieve: documentName Any ideas? Thanks, Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaAction or Map Backed Form?
Here is the Data structure: I have two tables (Services, Documents) I hit the database and pull two separate Collections. I need to iterate over both collections... here is the relationship: ServiceID ServiceName Documents DocumentID DocumentName So a service object contains a collection of documents I need to be able to output something like: DocumentName --- Contract Deposit Contract Deposit In my action, I created a DynaActionForm. I set a java.util.ArrayList property called requiredDocuments in struts-config.xml In my action I make the database calls, then I iterate the services collection creating a RequiredDocumentsBean (contains serviceID, serviceName, and documents Collection) I populate the first two properties (serviceID, and serviceName) and then iterate the documents collection setting a LabelValueBean Here is the code: <-- snip --> while(sIterator.hasNext()){ // for each service... RequiredDocumentsBean rd = new RequiredDocumentsBean(); ServiceBeanLocal service = (ServiceBeanLocal)sIterator.next(); rd.setServiceId(service.getId()); rd.setServiceName(service.getServiceName()); Iterator dIterator = documents.iterator(); while(dIterator.hasNext()){ // for each available document DocumentBeanValue document = DocumentBeanValue)dIterator.next(); rd.getRequiredDocuments().add(new LabelValueBean(document.getDocumentName(),document.getId())); } requiredDocuments.add(rd); } myForm.set("allRequiredDocuments",requiredDocuments); request.setAttribute("allRequiredDocuments",requiredDocuments); <-- snip --> Thanks -Original Message- From: Ray Madigan [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 3:09 PM To: Struts Users Mailing List Subject: RE: DynaAction or Map Backed Form? It isn't clear what you have to work with. Is services a map of some sort, or is it a collection. Either way you should use the iterate tag in the logic tag set. If you could explain the data structure better, it would be easier to help. -Original Message- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 12:39 PM To: 'Struts Users Mailing List' Subject: RE: DynaAction or Map Backed Form? Sorry... to add... Each Service may have a unknown set of documents... E.g. Services: 001 Catering 002 Party Documents: 001 Contract 002 Deposit Should yield: Contract Deposit Contract Deposit Thanks, /A -Original Message- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 2:28 PM To: 'Struts Users Mailing List' Subject: DynaAction or Map Backed Form? Hello All, I have the following scenario: I need to populate a form using a runtime generated set of form properties... Essentially I have two collections I pull from a database Services (serviceID,serviceName) Documents (documentID,documentName) I want to populate a set of checkboxes for each service such that I achieve: documentName Any ideas? Thanks, Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaAction or Map Backed Form?
Sorry... to add... Each Service may have a unknown set of documents... E.g. Services: 001 Catering 002 Party Documents: 001 Contract 002 Deposit Should yield: Contract Deposit Contract Deposit Thanks, /A -Original Message- From: Amin Lalji [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 2:28 PM To: 'Struts Users Mailing List' Subject: DynaAction or Map Backed Form? Hello All, I have the following scenario: I need to populate a form using a runtime generated set of form properties... Essentially I have two collections I pull from a database Services (serviceID,serviceName) Documents (documentID,documentName) I want to populate a set of checkboxes for each service such that I achieve: documentName Any ideas? Thanks, Amin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaAction or Map Backed Form?
Hello All, I have the following scenario: I need to populate a form using a runtime generated set of form properties... Essentially I have two collections I pull from a database Services (serviceID,serviceName) Documents (documentID,documentName) I want to populate a set of checkboxes for each service such that I achieve: documentName Any ideas? Thanks, Amin