internationalizing html:option tag, force to lookup resource file
Hi, Sorry if this is a repeat post, but I don't think the original went through. I'm just starting into looking at struts. Is it possible to generate a select/ options list using the html:select and html:option(s) tags, where the labelProperties (i.e. the text displayed on the end users web browser) get looked up from a resource file, instead of been displayed directly. e.g. if we have a collection bean made up of 3 namevalue pairs {(1,one), (2,two), (3,three)} produces one two three This produces a select box with the English values appearing on the web page regardless of the locale that is set. What I want is for the one, two and three to be keys into the applicationResources.properties so that different locales can be setup. If this is not available would it be useful to write a tag to do this? Cheers, Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:select default value problem
Hi, I know this has been talked about before, and I'm pretty sure I understand the concept, but I don't know why this is not working. The default option for an html:select is not being displayed. I have an ActionForm in request scope called "BusinessForm" that is populated. The "status" property has a value of "1" as verified by sticking in a bean:write, but the select list shows the value="0" option as the default item when I load the page. I have twelve other html elements on the page, and they all show the correct defaults, except for this html:select. Am I not seeing something in the code below... thanks...keith --- 0 - INACTIVE 1 - ACTIVE ...
Re: Books
I have always had good luck with the Oreilly series. There book Programming Jakarta Struts book has worked well for me. I doesn't so much cover the new features in 1.1, though. I have only skimmed through Struts in Action, but it looks pretty good too. Those two are the top sellers among Struts books so that would be the first direction that I would look. Hope this helps and my condolences on getting laid off. Keith BTW if you don't know about bookpool.com, you can get technology related books from there really cheap. - Original Message - From: "Brian Richards" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Tuesday, October 07, 2003 10:01 PM Subject: Books > I'm a complete struts newb. I got tomcat 4.1 installed along with struts and > eclipse. I was wondering if you guys could recommend a book for learning > struts. Not necessarily a reference book. But it would be nice to have some > good examples. Getting laid off has me starving to learn something new. So > I'm trying to think of *something* to implement with struts. So yeah, book > recommendations? > > > -Brian Richards > > > - > 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: [Article] SoftwareFashion (includes paragraph about Struts)
This response was uncalled for... at least be more professional when responding to people through the listserv. - Original Message - From: "Adam Levine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 07, 2003 12:04 PM Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts) > Hey, Steve ... >Guess what? You don't understand Struts. (= > > > > > From: Gregory Seidman <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: Struts Users Mailing List <[EMAIL PROTECTED]> > Subject: Re: [Article] SoftwareFashion (includes paragraph about Struts) > Date: Tue, 7 Oct 2003 12:57:18 -0400 > > On Tue, Oct 07, 2003 at 09:32:52AM -0700, Steve Raeburn wrote: > } 'In fact, we'd particularly invite Struts advocates to respond to this > } article by describing the benefits that they feel Struts provides over > } "vanilla" JSP.' > } > } Well if they don't get what Struts provides over "vanilla" JSP, then they > } never will. Discussing what Struts provides compared to other MVC > } frameworks might be useful, but the "vanilla" JSP topic is surely dead > } and buried by now. > > This is a lousy attitude. It's like the stereotype of a woman who says, "If > you don't know what you did, I'm not going to tell you." If you can clearly > and succinctly respond to his challenge, do so. If not, perhaps you don't > understand Struts as well as you think. > > Myself, I'm still evaluating Struts. I have a prototype of my project > written with "vanilla" JSP and a tiny custom taglib, and I'm trying to > decide whether to rewrite it with Struts or simply clean it up and extend > it. I can't, yet, see whether there is a net benefit to using Struts for my > small project. > > [...] > } Steve > --Greg > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > _ > High-speed Internet access as low as $29.95/month (depending on the local > service providers in your area). Click here. https://broadband.msn.com > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Must everything go through an action?...
Thanks so much for your answer. While I do understand everything that you point out, I was wondering if you might have some links to documentation on some of what you have talked about. I almost feel like this is a grave difficency in the struts framework as to not a "standard" way of dealing with the View Helper pattern. You know, it would be wonderful to have an index page with dynamic content coming from a java bean and not have to initialize that java bean by forwarding to an action that does so from a welcome page. In other words, just have every jsp page be linked to a View Helper so the View Helper does its work before displaying the page that is called. From the J2EE pattens book, it seems to suggest that course of action. (Of course, I could just be reading in what I want to). Anyway, thanks again! Keith - Original Message - From: "Ted Husted" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Sunday, October 05, 2003 7:16 AM Subject: Re: Must everything go through an action?... > The current trend is to define two sets of Actions. One set represents > the business actions, the client stories. This Action interacts with the > business layer and, based on what happens, selects the next View. Back > in the Struts 0.5 days, the ActionForward would often points to a server > page, so the Action would, essentially, forward directly to a JSP. > > Most of us now find it convenient to create a second set of "View" > Actions. These Actions work as "page controllers". Instead of forwarding > to the JSP, we forward to these Actions instead. These Actions can then > prepare the request with whatever "chrome" the page may need. > > It's a good practice to define an ActionMapping for every presentation > page in the application, whether it's a server page or HTML, local or > remote, even if it just forwards out to a page. If you need to add an > Action class later, or switch in a server page for a static page, you > can do that without changing anything else. > > In Strut 1.1, I find it useful to separate the business Actions and the > view Actions into separate configuration files, and may give the View > Actions their own virtual path. So there might be a /SelectPermitAction > and a /view/SelectPermitAction. > > There is talk of adding a specific extension point for a "view Action" > as part of the ActionForward construct, but AFAIK, no one's rolled up > their sleeves and given it a try. This would save a trip through the > container, and simplify cases where you want to redirect to another > business Action. > > HTH, Ted. > > Keith Pemberton wrote: > > Experts, > > > > I'm struggling with using the View Helper pattern. In my logical way of > > thinking, when a request to any jsp page is made, then the request goes to > > the ActionServlet. The ActionServlet then looks up the appropriate view > > helper initiallizes it with any parameters that were passed in through the > > request. The ActionServlet then requests that the view helper put the > > required java bean object in the request scope and then the servlet forwards > > to the page that was requested. This doesn't seem to be the case, though, > > with how struts works. Please correct me if I am wrong, but every link in > > my jsp pages where the page that I am requesting has content that comes from > > a java bean (form bean) must be linked to some action component. So, just > > say that I have an index page where I am displaying only five items at a > > time out of database that are ranked based on their index number in the > > database. To get the next five entries from the database I would have to > > use the struts tags and put an html:link element in the page that pointed to > > some action class. I, guess, am just looking for an assurance that I am > > implementing the view helper pattern the correct way according to struts. > > Any help you can provide would be much appreciated! > > > > Keith Pemberton > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > Ted Husted, >Junit in Action - <http://www.manning.com/massol/>, >Struts in Action - <http://husted.com/struts/book.html>, >JSP Site Design - <http://www.amazon.com/exec/obidos/ISBN=1861005512>. > > "Get Ready, We're Moving Out!!" - <http://www.clark04.com> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Must everything go through an action?...
Experts, I'm struggling with using the View Helper pattern. In my logical way of thinking, when a request to any jsp page is made, then the request goes to the ActionServlet. The ActionServlet then looks up the appropriate view helper initiallizes it with any parameters that were passed in through the request. The ActionServlet then requests that the view helper put the required java bean object in the request scope and then the servlet forwards to the page that was requested. This doesn't seem to be the case, though, with how struts works. Please correct me if I am wrong, but every link in my jsp pages where the page that I am requesting has content that comes from a java bean (form bean) must be linked to some action component. So, just say that I have an index page where I am displaying only five items at a time out of database that are ranked based on their index number in the database. To get the next five entries from the database I would have to use the struts tags and put an html:link element in the page that pointed to some action class. I, guess, am just looking for an assurance that I am implementing the view helper pattern the correct way according to struts. Any help you can provide would be much appreciated! Keith Pemberton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Design Question...
Sorry if this is a little off-topic but it has to do with Struts because I am using struts for my web app. I have been reading about the View Helper pattern off the sun website and have two ways of thinking about implementing this pattern. First is the way that I currently have setup: Use an action to call a method on the Delegate. The Delegate create a JavaBean (Value Bean) that has the data that I need for the particular page that I am trying to view. The Action then sets that view in the session scope (tried request scope, but it didn't work) and then forwards to a jsp. The jsp then uses the java bean from the session scope to fill in data for the webpage. Now for the other way that I was thinking of: In the jsp page that I am trying to view, first create a new instance of the JavaBean by calling tag. Then, use the JSTL tags to set parameters that could be passed in from the url. The JavaBean then does the calling of the Delegate to get the information that it requires (potentially in several method calls). In the jsp, using jsp tags I call the getProperty to get the information needed to fill in the data for the website. In other words, the getProperty invoke the JavaBean to call the Delegate to get the information that is needed. The way I see it, there is a trade-off between the two ways of doing this. The first way does not allow (easily) for the adding of request parameters to the url to change the view. The second way, though, could potentially involve many expensive RMI calles to the EJB Container, which is where I am getting the data for the web pages. I would appreciate any of your thoughts as to how best to proceed. Thanks in advance for all your suggestions! Keith Pemberton - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JAAS Login using LoginAction...
I don't think that the things in this article work. For one thing, they are using an auth.conf file and now everything for login module configuration is stored in the login-config.xml file. Anyway, tried the ideas from this website using JBoss 3.2.1 and Struts 1.1? Keith On Mon, 2003-09-22 at 09:05, Parmar, Dipakkumar wrote: > http://www.theserverside.com/resources/article.jsp?l=JAAS > > > -Original Message----- > From: Keith Pemberton [mailto:[EMAIL PROTECTED] > Sent: Sunday, September 21, 2003 11:50 PM > To: [EMAIL PROTECTED] > Subject: JAAS Login using LoginAction... > > > I'm having a bit of trouble trying to login to a Database Realm that I > have setup with JBoss. What I would like to do is to be able to login > to the JAAS SecurityManager using a LoginAction. How is the best way to > go about this. I have tried just doing it by calling the LoginContext > login method after having passed the LoginModule and CallbackHandler. > Do I need to create a specialized ActionServlet to do this? What are > all the important things that I should know on how to authenticate users > by using a Struts Action class? Thanks in advance for your tips! > > Keith Pemberton -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JAAS Login using LoginAction...
I'm having a bit of trouble trying to login to a Database Realm that I have setup with JBoss. What I would like to do is to be able to login to the JAAS SecurityManager using a LoginAction. How is the best way to go about this. I have tried just doing it by calling the LoginContext login method after having passed the LoginModule and CallbackHandler. Do I need to create a specialized ActionServlet to do this? What are all the important things that I should know on how to authenticate users by using a Struts Action class? Thanks in advance for your tips! Keith Pemberton -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple Request...
Hey well what do you know, I've got a sort by received column under evolution. Learn something new everyday. Have no idea why that is not the default under Evolution. Now maybe I can keep the order right of subjects and REs that follow the subjects. This has been an other episode of screwing yourself over 101 again. Hope you enjoyed! -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Small request...
Well, I am using Evolution (you know, under linux) to read email and I sort all the messages by date. Whether that date is sent date or received date I am not entirely positive, but I assume that it is received date. You know, I hate it when ppl freak out over someone just making a request like this. It seems that asking someone to do something these days is just all bad and wrong and ppl get offended. Jeez ppl, chill out! On Mon, 2003-08-25 at 15:50, David Friedman wrote: > Keith, > > What are you doing? Sorting your mailbox > on the 'sent' times so it shows up out of > order because of the different timzones > and countries of members posting to this > list? I'm sorting on the 'received' time > and everything is readable and makes > perfect sense. Well, everything except > this quetion. :) > > Regards, > David > > -Original Message- > From: Keith Pemberton [mailto:[EMAIL PROTECTED] > Sent: Monday, August 25, 2003 3:03 PM > To: [EMAIL PROTECTED] > Subject: Small request... > > > I know that this is way off topic but it would be a bit help for my > inbox. Could the people associated with this list please check the > clock on there computers and set the correct date and time? I really > would appreciate this small request. -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Small request...
One person sent a post to the list with a sent date of Aug 21, 2004. This obviously hasn't happened yet. On Mon, 2003-08-25 at 15:24, Michael Ruppin wrote: > What is it that makes you think our dates & time are > not correct? > > --- Keith Pemberton <[EMAIL PROTECTED]> wrote: > > I know that this is way off topic but it would be a > > bit help for my > > inbox. Could the people associated with this list > > please check the > > clock on there computers and set the correct date > > and time? I really > > would appreciate this small request. > > > > -- > > Keith Pemberton <[EMAIL PROTECTED]> > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > __ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Small request...
I know that this is way off topic but it would be a bit help for my inbox. Could the people associated with this list please check the clock on there computers and set the correct date and time? I really would appreciate this small request. -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Design question...
I have a JSP page that contains entries from a database. I am getting the items using a DTO that is passed from a session EJB. What I would like to be able to do is to specify a parameter in the URL named "offset" that when changed would display the next results from the database. Couple of questions... Would it be considered "presentation" logic to perform the action of getting the DTO from the session bean within the JSP page? I really don't want to do it that way because I'm trying to keep the layers as separate as possible. So, if I don't do it that way, I will have to use Action classes and html:links that can pass the parameter to action class? My real question is what is the best way of dealing with EJBs in the presentation layer? I know that I have to get a DTO of the information that I want, but usually the methods of the DTO take parameters that I can't pass to the DTO in the JSP page. I have read over and over the Oreilly Struts book but it still is confusing me. Thanks for any help! Keith Pemberton -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: adding a parameter to html:link with a map
I'm not sure exactly what you're trying to do, but you can do both of the following: or Hope this helps. - Keith -Original Message- From: Mike Whittaker [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:03 PM To: Struts Users Mailing List Subject: RE: adding a parameter to html:link with a map >I want to be able to add a literal parameter to a link > >but I already successfully use >this adds a Map of parameters, but I'd like to be able to add further >parameters literally (ie not from a bean). > >Is there any way I can achieve this, by struts or jstl or anything!? > Okay I can do this: Printer page seems a bit of a kludge, be nice to just specify an addition rather than put in and take it out of the map. -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts to EJB interface strategies
Buy the Oreilly book on Struts. There are some very good design principles incorporated into this book using especially some of the J2EE design patterns. Keith - Original Message - From: "yan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 19, 2003 7:49 AM Subject: Struts to EJB interface strategies Hi, Firstly, can anyone recommend a good resource that deals with how you integrate a Web Tier implemented using Struts with the EJB Tier. And also a resource that has an excellent example of how the Struts framework interacts with J2EE. I am looking for more than the basic examples you normally find as they do not help given the complexity of the application I am working on. Secondly, what strategies does one use when deciding on how to implement the ActionClass to Session Bean Inteface? I am thinking along these lines: Create a 'Client Helper Interface' that defines all the business methods that your application will require. This Helper class will form the interface between the ActionClasses and the Session Beans. The ActionClass creates a 'Client Helper Interface' object and calls the relevant methods within this interface. The Client Interface then creates a Session Bean that implements the Client Interface. The Session Bean creates the Entity Bean that opens the database connection and returns the relevant data back to the Session Bean. The Session Bean returns the required information back to the Client Helper Interface. The Client Helper Interface returns to the ActionClass Should you have a separate Helper Interface for each Session Bean? many thanks yan KickStartESolutions - Intelligent Web Services [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dealing with images...
I would like to get some input from you guys as to how best to deal with a group of images. I want to put up a photo album of sorts but I am unsure as to how best to access the directory that they are contained in. I could put an initial parameter in the web.xml file that points to the directory, I guess, and just access that parameter. Or I could do a context getRealPath(), or maybe even store each location in a database table along with a description. Anyway, your feedback on how best to handle this is much appreciated! Keith Pemberton --- "Everything's changing when I turn around all out of my control I'm a mobile..." Mobile off the cd Let Go by Avril Lavigne. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Modules explaination...
I was wondering if someone could provide a website that would explain the module feature of v1.1. Thanks! --- "Everything's changing when I turn around all out of my control I'm a mobile..." Mobile off the cd Let Go by Avril Lavigne. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Password encryption on http client...
I would like to create a registration page for my site but I would like to encrypt the passwords on the client side before they are submitted across the line to the server. Is this possible or will I have to just use SSL to get a decent level of security? Your help and suggestions are very much welcome! Keith Pemberton -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MVC2 way to stick a collection in page scope?
I too am working on my own blogging site but I'm using EJBs instead of DAO objects. What I did was to create a plugin that is specified in the struts-config file. The plugin interface is really easy to implement, but you put the object in the ServletContext instead of page context. I can provide you a code sample if you need it. I'm grabbing the last five entries from the database using a Session bean interacting with entity beans. This is not the best way to implement a blogging system I know, but it gives me a good excuse to learn some of the ins and outs of Enterprise JavaBeans. Anyway, let me know if I can help further. Keith On Thu, 2003-08-14 at 09:12, jack beany wrote: > >From: Vic Cekvenich <[EMAIL PROTECTED]> > > > >jack beany wrote: > > > >>yup... so i have my Blog bean which calls the DAO for persistance. What I > >>want to know is how to best structure the searching for a bunch of blog > >>beans/records/objects, and then stick that in page scope for presentation > >>with JSTL? > >> > > > >Conder a Struts book, such as Struts in Acton. > >Struts says this should be done in action. > >The searching/retrieving happens in DAO. > >Struts puts in in scope for you if updetable. Else, put it in request scope > >(do so in Action) for JSTL. > > ok - getting closer... > > to summarise, you're saying I should have an index.do instead of an > index.jsp and declare all bean/bean collections in the action. > > Currently I've not used an action without it being the result of a form > posting... Do I just create an action mapping without a "name" attribute, > and with an "attribute" attribute of something like "indexPage"? i.e.: > > type="project.actions.IndexAction" > attribute="indexPage" > scope="request" >validate="false"> > > > then put a check for the indexPage scope in the jsp and redirect to the > action if it doesnt exist? > > Cheers > J > > _____ > Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: iterate over collection a show the inner collection ashtml:select - how ?
Let's see if I can explain this. I am going to called the collections c1 and c2. Ok, so I have this to iterate through c1. . I think that that is right but I haven't tested it. Basically each object of the first collection becomes a bean that has a property of the name of the inner collection. I hope that this help and works! Other possibilities is to look at the nested tags which has an iterate tag. Keith On Tue, 2003-08-12 at 08:22, Stefan Berger wrote: > Hi, > > I guess this problem is many time solved but i cant find the solution. > > I put into the session a collection. Each members is a class. In this > class i have normal member like > name, street, and this class has another collection ! > > > Now i want to iterate over the main - collection and the second (inner > collection) i want to present > as a html:select: > > The simple String i can write but i cant show the selection, what i do > wrong. > Sorry for my easy question, i don't see the solution. > > Thanks for hints !!! > > Regards Stefan > > > [CODE] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kb > > -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question for you Internationalization supporters
Yeah, if you truly want to support internationalization, then you have to display all of your text with message keys. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 1:50 PM To: [EMAIL PROTECTED] Subject: Question for you Internationalization supporters I don't have a need right now to support Internationalization but if I do need to it seems like I would have to do much more than just the field names but whole page content must be done with message keys. I mean, what is the best way to support not just form field names with different languages using the message keys but whole page content that is say just a long description with no form on it. Every paragraph must be in a message resource. E.g. You must be doing this (not exact but abbreviated to shorten): file1.jsp: as opposed to doing this: file1_en.jsp: Hello! Here is the paragraph that welcomes you in English. footer copyright 1999 where you would have to figure out how to display the correct file1_en.jsp as opposed to file1_fr.jsp. I guess the first way with EVERYTHING in a message resource is the only way to go? Just curious what the best way and any pit falls for supporting internationalization even with all the built in locale stuff already in the framework? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to set a field within a collection while loppingthrough.....
I would like to be able to help but I need some code to look at. Could you please email me some code samples including the jsp page, ActionForm, and class that contains the collection. Thanks! Keith On Wed, 2003-08-13 at 10:48, Monajit Choudhury wrote: > Hi > How can I set the value of a field while looping through a collection. > Ok let me put it this way. > I have a ValueObject vo1 which contains a collection of Vos VO2. > Now in the page I iterate and display the contents of vo2 in a > logic:iterate.Now the fields are shown in text fields so the user can modify > it.I am using a paginator, so my reqirement is when i go to the next page > and come back, whatever values i had entered in the text fields should be > remembered/saved.How can this be achieved? > Hope I could explain the problem well. > Regds > Monojit > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Process Action before displaying index page...
I have an action class that I would like to call before the index page is displayed because elements of the index page are dependant on the action class putting an object in the request scope. I thought that the best way to specify this would be to declare an action in the struts-config.xml file with a path of "/" which would then forward to the index.jsp page. However, apparently the single root context "/" is not recognized as a valid path by the struts-config file. Anyone have any sugguestions for how I can solve this problem? Thanks in advance... Keith -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Process Action before displaying index page...
That worked like a champ. Thanks so much for a straight forward and simple answer! Keith On Tue, 2003-08-12 at 06:47, Vipin Bhatia wrote: > Why not start a struts plugin which will do the needful > - Original Message - > From: "Keith Pemberton" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, August 12, 2003 5:15 PM > Subject: Process Action before displaying index page... > > > > I have an action class that I would like to call before the index page > > is displayed because elements of the index page are dependant on the > > action class putting an object in the request scope. I thought that the > > best way to specify this would be to declare an action in the > > struts-config.xml file with a path of "/" which would then forward to > > the index.jsp page. However, apparently the single root context "/" is > > not recognized as a valid path by the struts-config file. Anyone have > > any sugguestions for how I can solve this problem? Thanks in advance... > > > > Keith > > -- > > Keith Pemberton <[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] -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom Validator
Hey everyone, I've got some nice custom validations working using the validation framework. However, I'm having a hard time with one seemingly imple issue. In the validation method in my custom validation class, how do I get the value of the field I'm validating? I found one example that did this, but it used deprecated methods. Thanks in advance! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: force precompilation of JSPs
Yes. :-) -Original Message- From: Ionel Gardais [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:48 AM To: Struts Users Mailing List Subject: force precompilation of JSPs Hi, I am experiencing a slow down when I access a JSP page for the first time after I deploy e web app. Is there a way to force precompilation of these files as soon as the web app is deployed ? Thanks, ionel - 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: Howto get ActionForward to calling Page?
I personally prefer to use: return mapping.getInputForward(); It's much neater, prettier and intuitive. Shouldn't really matter though. - Keith -Original Message- From: Deepak [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 7:01 AM To: Struts Users Mailing List Subject: Re: Howto get ActionForward to calling Page? Try new ActionForward(mapping.getInput()) deepak - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 05, 2003 4:17 PM Subject: Howto get ActionForward to calling Page? > Hi, > > looking for a way to get an ActionForward to the page calling the > current servlet. > > Example: > Want to realize 5-XX pages where to enter values for a > calculation. The calculation & result page would check if > everything entered was fine (using db queries etc..) > Now in case that one of the input values is incorrect / > missmatching the context, I'd like to redisplay the calling page > to the user, showing the values entered before + an error message. > > How can i realize that without having to define specific forwards > to the 5 pages and then deciding which one was the calling one? > > Tried the ActionMapping.getInputForward(), but it brought back > null values in the ActionForward only. > > Comments and keywords to look for welcome. > > Thanks, Alex > > - > 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: Still struggeling: howto get ActionForward to calling page
This is definitely what I would do. And just to be more clear, I would copy that action mapping into as many new ones as you need. Just change the name and input page, then you should be all set. Also, if you don't specify the input page correctly, you can't return to that page if there are validation errors. I think this is the best solution by far. - Keith -Original Message- From: Rohit Aeron [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:23 AM To: Struts Users Mailing List Subject: RE: Still struggeling: howto get ActionForward to calling page Hi Alex Please try following solution In multiple screen scenario having same display list .Have separate actions for each screen then you can have forwards in case of error in respective Action which will map to original action. Regards Rohit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 5:12 PM To: Struts Users Mailing List Subject: Re: Still struggeling: howto get ActionForward to calling page yeap, that's something in a way i thought of as 'dirty fix' for a framework. As i am looking into struts for 2-3 days only i am surprised to find such an elementary functionallity not implemented? Should be interessting for plenty of people having more than 2-3 pages nested in not linear way? Alex Send reply to: "Struts Users Mailing List" <[EMAIL PROTECTED]> Date sent: Wed, 06 Aug 2003 10:50:00 +0200 From: Adam Hardy <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject:Re: Still struggeling: howto get ActionForward to calling page [ Double-click this line for list subscription options ] The input attribute on the action mapping is what you specify for the return page when validation of the form bean fails, so that is not going to help you. The easiest solution I can think of is to put a hidden field in your selection screens with the screen's URL in it. Alternatively you could try using the HTTP header referer e.g.: Referer: http://www.w3.org/hypertext/DataSources/Overview.html but this is an optional header so not all browsers have to send it. I've never used it so I don't know which browsers do send it. hth Adam [EMAIL PROTECTED] wrote: > Hi, > > i am still looking for a clean way to get an ActionForward to the page that called my > current Action. That means e.g. I am a displayListAction and have been called by a > selection screen. In case i don't find a result for the selection parameters I would like to > bring a specific error to the calling selection screen. That would give users a chance to > change their selection. > > Sounding easy, this gets complicate in case there are several selection screens > bringing up the same list. I don't like to create a specific forward for each selection page > and then somehow determine which one called me (can do that, but there should be a > nice way in such a famous framework?). > > The hint using > ActionMapping.getInputForward() > or new ActionForward(mapping.getInput()) > didn't help me to much, seems to me there is hardcoded value inside, specified in the > input attribute of the specific action. > > How would an expert solve that problem? > > :-) Alex > > > > >>Looking for a way to get an ActionForward to the page calling the >>current page. >> >>The example: >>Want to realize 5-XX pages where to enter values for a >>calculation. The calculation & result page would check if >>everything was fine (using db queries etc..) >>Now in case that one of the input values is incorrect / >>missmatching the context, I'd like to redisplay the calling page >>showing the values entered before + an error message. >> >>How can i realize that without having to define specific forwards >>to the 5 pages and then deciding which one was the calling one? >> >>Tried the ActionMapping.getInputForward(), but it brought back >>null values in the ActionForward only. >> >>Comments and keywords to look for welcome. > > > > - > 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] *-- This message and any attachment(s) is intended only for t
RE: how to use requiredif
It looks like you're just trying to make sue that the password field is filled in right? If so, all you need to use is the 'required' validation. Just replace requiredif with required, and get rid of the var section. This will make sure a password was entered. Is this what you want to do? - Keith -Original Message- From: georgehill [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 11:35 PM To: [EMAIL PROTECTED] Subject: how to use requiredif Hi all, I hava question about the use of required in the validation.xml file.My example is : test ((newPassword != null) Is it right? If it's wrong, please give me a right example. Thanks a lot. :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Friday] TV Commercial 2
Hahahaha, that's a good one. -Original Message- From: Jing Zhou [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 4:06 PM To: Struts Users Mailing List Subject: [Friday] TV Commercial 2 [Four years later, Jim is now the Struts team lead in a corporate IT shop. If you haven't heard of this one, continue. I will try to make it flawless ... although it is still a pre-release.] The dot com bubbles were easy-come-easy-go. There are only two teams left in the IT shop, Jim's Struts team and .NET team. When both teams were scheduling their training in another city for new projects, they were told from the boss of bosses that whoever reduces IT costs more will be the winner. The .NET team booked their airline tickets to the city before they heard of a super discount train ticket that Jim's team was considering. The .NET team canceled their airline tickets and arrived at the train station earlier. When they saw Jim on the train, they started to laugh at the Struts team. Because Jim got only one ticket for his whole team. "The conductor is coming!" One of the Struts team members looked out of the window and said. Jim's team went into one of the rest rooms in the train. The conductor got on the train. When he passed by the rest room, he knocked on the door. "Ticket please?" A ticket was slid out under the door. The .NET team looked very serious after both teams arrived at the city. When they finished the training, the .NET team got only one ticket to back. But they started to laugh at the Struts team again when they saw Jim on the train. Jim's team had no ticket at all. This time, one of the Struts team members looked out of the window and said "The conductor is coming!" Jim's team went into one of the rest rooms in the train. The .NET team went into the other rest room. Before the conductor got on the train, Jim quietly walked out the rest room and knocked on the door of the other rest room. "Ticket please?" * The last screen of the TV Commercial shows "Get bothered by your copy-cat? Find Jim, the Struts team lead." * Jing Netspread Carrier http://www.netspread.com [After Jim came back, he saw the .NET team is releasing its own MVC model and is using a desktop IDE claimed richer in functionality. But he knows they are busily and expertly missing the point again. Because Jim is playing the Internet IDE and considering to empower every employee to build SLWS (Super Large Web Services). If you are in Jim's position, take a look at the 24 tips on Wheels and Struts.] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoSuchMethodException
Changed that and it's working! Thanks for the help. What a load off the shoulders... way too much stress for a Friday, lol. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:50 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException Actually, I just tried it, and found out it's deprecated. It's replaced by org.apache.struts.validator.Resources. Use the same method name, just without the ServletContext parameter. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:48 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException Yes, it would be StrutsValidatorUtil now. It's part of struts util package. org.apache.struts.util? Weird, works fine for me just now. I am using struts-1.1-RC1. -----Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: August 1, 2003 1:35 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException I just looked at the API, and the ValidatorUtil class doesn't have a getActionError method. Do you mean the StrutsValidatorUtil class? I tried that but it didn't like the import. :-( -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:24 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException I can see there are several issues here. First I think you might want to supply the ServletContext as well. Second, you want to add the error to Errors collection by adding: errors.add(field.getKey(), ValidatorUtil.getActionError(servletContext, request, va, field)); before the return statement. Try it. I spent a lot of time before on this too. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: August 1, 2003 10:40 AM To: Struts (E-mail) Subject: NoSuchMethodException Hey everyone, I'm working on a custom validator right now, and all the validation method does is return false. That means it fails that validation, right? Anyway, when I submit the form, I get a NoSuchMethod error. What would cause this? All of my regular validations work, just not this custom one. Here are some code snippets. Thanks in advance for any help! public class CustomValidator implements Serializable { public static boolean validateRange(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { return false; } } validator-rules.xml: And parts of my validation.xml: - 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] - 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: NoSuchMethodException
Actually, I just tried it, and found out it's deprecated. It's replaced by org.apache.struts.validator.Resources. Use the same method name, just without the ServletContext parameter. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:48 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException Yes, it would be StrutsValidatorUtil now. It's part of struts util package. org.apache.struts.util? Weird, works fine for me just now. I am using struts-1.1-RC1. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: August 1, 2003 1:35 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException I just looked at the API, and the ValidatorUtil class doesn't have a getActionError method. Do you mean the StrutsValidatorUtil class? I tried that but it didn't like the import. :-( -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:24 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException I can see there are several issues here. First I think you might want to supply the ServletContext as well. Second, you want to add the error to Errors collection by adding: errors.add(field.getKey(), ValidatorUtil.getActionError(servletContext, request, va, field)); before the return statement. Try it. I spent a lot of time before on this too. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: August 1, 2003 10:40 AM To: Struts (E-mail) Subject: NoSuchMethodException Hey everyone, I'm working on a custom validator right now, and all the validation method does is return false. That means it fails that validation, right? Anyway, when I submit the form, I get a NoSuchMethod error. What would cause this? All of my regular validations work, just not this custom one. Here are some code snippets. Thanks in advance for any help! public class CustomValidator implements Serializable { public static boolean validateRange(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { return false; } } validator-rules.xml: And parts of my validation.xml: - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: NoSuchMethodException
I just looked at the API, and the ValidatorUtil class doesn't have a getActionError method. Do you mean the StrutsValidatorUtil class? I tried that but it didn't like the import. :-( -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:24 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException I can see there are several issues here. First I think you might want to supply the ServletContext as well. Second, you want to add the error to Errors collection by adding: errors.add(field.getKey(), ValidatorUtil.getActionError(servletContext, request, va, field)); before the return statement. Try it. I spent a lot of time before on this too. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: August 1, 2003 10:40 AM To: Struts (E-mail) Subject: NoSuchMethodException Hey everyone, I'm working on a custom validator right now, and all the validation method does is return false. That means it fails that validation, right? Anyway, when I submit the form, I get a NoSuchMethod error. What would cause this? All of my regular validations work, just not this custom one. Here are some code snippets. Thanks in advance for any help! public class CustomValidator implements Serializable { public static boolean validateRange(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { return false; } } validator-rules.xml: And parts of my validation.xml: - 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: NoSuchMethodException
Doh! Thanks to Alex, Richard, and Yansheng, sometimes another set of eyes looking at your code really helps catch the stupid mistakes. I'm sure you can all relate. Hopefully I can get it to work when I fix this! - Keith -Original Message- From: Alex Shneyderman [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:16 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException Just a quick guess your paramaters are probably messed up? This is what you have in your descriptor > java.lang.Object, >org.apache.commons.validator.ValidatorAction, >org.apache.commons.validator.Field, >org.apache.struts.action.ActionErrors, >javax.servlet.http.HttpServletRequest, >javax.servlet.ServletContext and this is what you have in your method > Object bean, ValidatorAction va, > > Field field, ActionErrors errors, > HttpServletRequest request) How do you expect Validator to find the method? Go home take some rest you will think clearer :-) - 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: NoSuchMethodException
Hey, Thanks a bunch for the reply. It's the validateRange method that's not being found, the one responsible for doing the validation. Has anyone else run into anything like this while trying to do custom validation? - Keith -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 3:06 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException How about supplying more information like the name of the method that is not being found? Regards, Richard -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 12:00 PM To: 'Struts Users Mailing List' Subject: RE: NoSuchMethodException Well, so much for the helpfulness of this list. I politely asked a few completely reasonable questions in the past few days, and they were questions that could easily be of interest to others as well. They were also pretty simple issues that I'm sure other people have encountered or would have some sort of input on. Maybe people just ignore my posts or something, but I've been trying all week to get couple simple answers, and I'm not seeing any interest from anyone. Maybe it's just a waste of time posting here. You'll probably say I'm just being in patient, but this list has such a fast turnaround that if a post is not addressed within a few hours, it most likely won't be addressed at all. You'll have to forgive my frustration. Long work days trying to figure things out with no end in sight, and no help from coworkers or the list can drive one mad. - Keith -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 12:40 PM To: Struts (E-mail) Subject: NoSuchMethodException Hey everyone, I'm working on a custom validator right now, and all the validation method does is return false. That means it fails that validation, right? Anyway, when I submit the form, I get a NoSuchMethod error. What would cause this? All of my regular validations work, just not this custom one. Here are some code snippets. Thanks in advance for any help! public class CustomValidator implements Serializable { public static boolean validateRange(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { return false; } } validator-rules.xml: And parts of my validation.xml: - 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: NoSuchMethodException
Well, so much for the helpfulness of this list. I politely asked a few completely reasonable questions in the past few days, and they were questions that could easily be of interest to others as well. They were also pretty simple issues that I'm sure other people have encountered or would have some sort of input on. Maybe people just ignore my posts or something, but I've been trying all week to get couple simple answers, and I'm not seeing any interest from anyone. Maybe it's just a waste of time posting here. You'll probably say I'm just being in patient, but this list has such a fast turnaround that if a post is not addressed within a few hours, it most likely won't be addressed at all. You'll have to forgive my frustration. Long work days trying to figure things out with no end in sight, and no help from coworkers or the list can drive one mad. - Keith -----Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 12:40 PM To: Struts (E-mail) Subject: NoSuchMethodException Hey everyone, I'm working on a custom validator right now, and all the validation method does is return false. That means it fails that validation, right? Anyway, when I submit the form, I get a NoSuchMethod error. What would cause this? All of my regular validations work, just not this custom one. Here are some code snippets. Thanks in advance for any help! public class CustomValidator implements Serializable { public static boolean validateRange(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { return false; } } validator-rules.xml: And parts of my validation.xml: - 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]
NoSuchMethodException
Hey everyone, I'm working on a custom validator right now, and all the validation method does is return false. That means it fails that validation, right? Anyway, when I submit the form, I get a NoSuchMethod error. What would cause this? All of my regular validations work, just not this custom one. Here are some code snippets. Thanks in advance for any help! public class CustomValidator implements Serializable { public static boolean validateRange(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { return false; } } validator-rules.xml: And parts of my validation.xml: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validwhen Alternative
Thanks for the response Imran. I'd rather not do a custom validator if it's not necessary, but if nobody else reponds I might have to bite the bullet and create one... I'm surprised I haven't gotten any other responses, this seems like something that many other people would have run into, or would at least know how to handle... Thanks in advance! - Keith -Original Message- From: Imran Bohoran [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 12:00 AM To: Struts Users Mailing List Subject: RE: validwhen Alternative We had a requirement of this sought as well. Since we needed it fast, we went ahead with the custom validator. And it works fine. so keith, if you want to get crackin on it I guess the custom validator is the way to go. if anyone else has any other ideas i'll be excited to hear them. - I -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 9:02 PM To: Struts (E-mail) Subject: validwhen Alternative Hey everyone, >From what I hear, it seems like the validwhen validation is not supported in the final release of Struts 1.1. Is there an alternative to this? I have a form where 2 of the fields are start range and end range. I want a validation that does the following: 1) If start range is filled in, and end range isn't, validation is successful. 2) If start range is less than or equal to the end range (and end range is greater than or equal to start range), validation is successful. 3) Start range must be filled in. Do I need a custom validator for this, or can I get away with the existing validations? Any help with this would be greatly appreciated, thanks! - Keith - 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]
validwhen Alternative
Hey everyone, >From what I hear, it seems like the validwhen validation is not supported in the final release of Struts 1.1. Is there an alternative to this? I have a form where 2 of the fields are start range and end range. I want a validation that does the following: 1) If start range is filled in, and end range isn't, validation is successful. 2) If start range is less than or equal to the end range (and end range is greater than or equal to start range), validation is successful. 3) Start range must be filled in. Do I need a custom validator for this, or can I get away with the existing validations? Any help with this would be greatly appreciated, thanks! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator: Is validwhen available ?
Hmm. I'm not going to be impatient, but do we have any rough idea how long it will be until the 1.2 release comes out? Just curious. Anyway, thanks for answering my question. - Keith -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:59 AM To: Struts Users Mailing List Subject: RE: Validator: Is validwhen available ? The nightly builds are not working for now because of a problem with the build machine. ValidWhen has been added to the source but, for now, you'll need to check it out from CVS and do your own build. It will be included in the 1.2 release which will come along a lot sooner than the 1.1 release did :-) Steve -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: July 31, 2003 1:49 AM To: [EMAIL PROTECTED] Subject: Re: Validator: Is validwhen available ? hi, 'validwhen' is available in the nightly builds... -- nagi ---Original Message--- From: Struts Users Mailing List Date: Thursday, July 31, 2003 02:08:30 PM To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ? Hi In the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.html) I read under "Designing Complex Validations with validwhen" the following sentence: The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Is the validator with 'validwhen' sowhere available or do we have to wait for the next Struts release? Thanks Koni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . IncrediMail - Email has finally evolved - Click Here - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator: Is validwhen available ?
So it's not available in the initial Struts 1.1 final release? Is there an alternative to validwhen that can do the same job? - Keith -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 4:49 AM To: [EMAIL PROTECTED] Subject: Re: Validator: Is validwhen available ? -- Content-Type: Multipart/Alternative; boundary="Boundary-00=_SHSVLVC0" -- Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi,=0D 'validwhen' is available in the nightly builds...=0D =0D -- nagi=0D =0D ---Original Message---=0D =0D From: Struts Users Mailing List=0D Date: Thursday, July 31, 2003 02:08:30 PM=0D To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ?=0D =0D Hi=0D In the Struts Validator User Guide (http://jakarta.apache org/struts/userGuide/dev_validator.html)=0D I read under "Designing Complex Validations with validwhen" the following= =0D sentence:=0D =0D =2E...=0D The new validwhen validation rule, which will be included into the Struts= =0D release immediately after the 1.1 release, is designed to handle these ca= ses =0D =2E...=0D =0D Is the validator with 'validwhen' sowhere available or do we have to wait= =0D for the next Struts release?=0D Thanks=0D Koni=0D =0D =0D -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] =0D =0D =2E=20 -- Content-Type: Text/HTML; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hi, 'validwhen' is available in the nightly builds... -- nagi ---Original Message---<= /I> From: mailto:[EMAIL PROTECTED]">Struts Users Mailing= =20 List Date: Thursd= ay, July=20 31, 2003 02:08:30 PM To: mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED] apache.org Subject: Val= idator: Is=20 validwhen available ? HiIn the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.ht= ml">http://jakarta.apache.org/struts/userGuide/dev_validator.html)I=20 read under "Designing Complex Validations with validwhen" the=20 followingsentence:The new validwhen validation = rule,=20 which will be included into the Strutsrelease immediately after= the=20 1.1 release, is designed to handle these cases.Is t= he=20 validator with 'validwhen' sowhere available or do we have to wait<= BR>for=20 the next Struts=20 release?ThanksKoni-= -- unsubscribe, e-mail: mailto:[EMAIL PROTECTED]">struts-u= [EMAIL PROTECTED]For=20 additional commands, e-mail: mailto:[EMAIL PROTECTED]">struts-user-hel= [EMAIL PROTECTED]. =09 =09 =09 =09 =09 =09 =09 http://www.incredimail.com/redir.asp?ad_id=3D309&lang=3D9";>cid:5480A88E-200C-4DF6-B083-86DF293AF940";> IncrediMai= l -=20 Email has finally evolved - http://www.incredimail.com/redir.asp?ad_id=3D309&lang=3D9";>Click=20 Here -- -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator Syntax
By the way, that field that I gave as an example should only accept any of those 4 values. I think I need to use == rather than !=, but it doesn't work either way. Any ideas? - Keith -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Monday, July 28, 2003 3:13 PM To: Struts (E-mail) Subject: Validator Syntax Hey everyone, I finally got the validator working! Turned out to be issues with the version of struts I was using or somthing like that. In any case, it's fixed. I'm slightly confused about this one statement in the online documentation. It says that "Only two items may be joined with and or or". Does that mean my example below is using the wrong syntax? I have a field that uses valid when, using the following check: test ((*this* != "B") or (*this* != "I") or (*this* != "N") or (*this* != "T")) However, this field is accepting any value. Do you see any problem with this? Thanks in advance! - Keith - 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]
Validator Syntax
Hey everyone, I finally got the validator working! Turned out to be issues with the version of struts I was using or somthing like that. In any case, it's fixed. I'm slightly confused about this one statement in the online documentation. It says that "Only two items may be joined with and or or". Does that mean my example below is using the wrong syntax? I have a field that uses valid when, using the following check: test ((*this* != "B") or (*this* != "I") or (*this* != "N") or (*this* != "T")) However, this field is accepting any value. Do you see any problem with this? Thanks in advance! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Testing Struts-Config
IBM's Websphere Studio Application Developer, version 5, has a good struts UI. It does quite a bit of validation, a lot of what is being mentioned here. My one complaint though is that I get a warning for every time I use a tiles definition though. It doesn't hurt anything, it's just so ugly... - Keith -Original Message- From: Edgar Dollin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 24, 2003 9:57 PM To: '[EMAIL PROTECTED]' Subject: Testing Struts-Config Does anyone know of a tool that just tests the struts-config for 'class correctness'? The situation I find myself in is I have a large project, which was heavily refactored (unfortunately w/o adequate struts tests), and I need to debug the struts-config. Thanks in advance. Edgar - 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]
Partial form validation...
I have read that when you do a multipage form that you have to do partial form validation. Otherwise, the page just gets thrown back as not being valid. Can someone please give me a sample of how this works in the ActionForm bean? Thanks! Keith -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question...
I was wondering if when a link created by the tag is clicked if a form bean will be created and populated assuming that the link is to an actionmapping? I have a form in which has two buttons that do different actions. I would like to use a DispatchAction class instead of a LookupDispatch action inorder to perform these actions. Some of the actions, though, need info from the ActionForm. Thanks in advance! Keith -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Writing values from javabeans to html tags.
Why not just specify the name attribute in the html:textarea tag with the attribute equal to the name of the bean, in your case requestDTO. That's what I do and it works well for me. On Thu, 2003-07-24 at 20:45, Kelvin wu wrote: > try to use html-el tag > > value="${sessionScope.requestDTO.comments}"/> > > - Original Message - > From: "Matt E" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, July 25, 2003 5:23 AM > Subject: Writing values from javabeans to html tags. > > > > Hello All! > > > > I'm trying to give an inital value to one of the > > fields in a form in an application of mine. > > > > I had tried this: > > > > > value="<%=requestDTO.getComments()%>" > > > > Since I had read that you couldn't use bean:write tag > > in the value attribute of the html tags. However this > > gives me an error in tomcat: > > > > org.apache.jasper.JasperException: Unable to compile > > /int0/opt/tomcat/b331/work/DEFAULT/tir/pla/ReviewRequest_3.java:899: > > Undefined variable or class name: requestDTO > > > > _jspx_th_html_textarea_0.setValue(requestDTO.getComments()); > > > > The bean in question (requestDTO) is session scoped. > > I can use to write out the value, so I > > know it's there. > > > > What do I need to do so that > > <%=requestDTO.getComments()%> works also? > > > > __ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > > > ----- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox checked
I had some issues with the standard method using reset(), so I came up with something else that works very nicely. In the JSP, right after the code for the checkbox, use: This allows the form submission to work correctly, without any messy code. However, I am no expert with this stuff, so if there is any reason not to do this I'd be interested in hearing it. - Keith -Original Message- From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:34 PM To: 'Struts Users Mailing List' Subject: RE: html:checkbox checked In the latest version of struts-html there is no such attribute in the tag called 'checked'. But there is another way if the value of 'value' attribute matches the value of 'property' attribute, it gets checked. I was wondering a simple way of doing it even without checking the equality. Panchasheel -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:14 PM To: 'Struts Users Mailing List' Subject: RE: html:checkbox checked Panchasheel, The attribute you refer to is called 'checked' not 'result'. It is not a bug. -Richard -Original Message- From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 12:55 PM To: 'Struts Users Mailing List' Subject: html:checkbox checked struts-html.tld doesn't have the attribute 'result' which if set to checked, makes the check box checked by default Anybody knows any other way or solution or is it a bug? Thanks Panchasheel - 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]
1 DispathAction, 2 Forms. Possible?
I am trying to combine my actions into one DispatchAction class. I have one JSP page that contains a form with its action statement pointing to the DispatchAction with the appropriate parameters. What I would like to do is to use a different JSP that will perform a different action in the DispatchAction class. In other words, I want to add something to the database through one form and then later be able to retrieve that information and update the entry in the database through another form. As far as I can tell, though, there can only be one "input" specified in the Action mappings for the DispatchAction. Should I just create another mapping for the Action class and specify the other page in the input field for the mapping? Your help is much appreciated! Keith -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reasonable to use EJBs for validation in ActionForm validatemethod?
The validation code of if the custom is already in the database should be in your create method on the entity EJB. Other validation code concerning the webform (such as valid address) should go in the validate method on the ActionForm that you have specified for the webform. Hope this helps. Let me know if you need code samples. Keith On Tue, 2003-06-10 at 08:55, Aaron Robinson wrote: > For validation that can only be done against the database, should this go in > the validate method or in the execute method? > > For example checking that a customer doesn't alerady exist before inserting > it, or checking that a user has entered a valid address before the execute > method is called to try and create it. > > Also, with the validator framework, does this just apply to basic (non model > based) validation? > > _ > Find a cheaper internet access deal - choose one to suit you. > http://www.msn.co.uk/internetaccess > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] auto convert resource property files to different langua ge
I can't believe people actually ask for this kind of thing. Completely ridiculous. It's hard to believe that someone fluent enough in computers to use struts wouldn't have a grasp of the difficulty of language translation. -Original Message- From: Kearney, Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 12:52 PM To: 'Struts Users Mailing List' Subject: RE: [OT] auto convert resource property files to different langua ge You've just asked for the Holy Grail of language translation. I don't think that tool exists yet. There are companies that provide that service. -Michael -Original Message- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 10:21 AM To: [EMAIL PROTECTED] Subject: [OT] auto convert resource property files to different language Hi, I have a properties file which is in english, now i have to create properties files for different langauage like russian, spanish, french etc. now i dont know any of these languages is there any automatic conversion tool which will translate the properties file to different languages. If it is a open source will be nice :-) Ashish __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts, search, and approval...
The new version of IBM's Websphere Studio Application Developer, version 5, has full struts integration. The fact that struts is built right into the program gives it a lot of support. Now if only WSAD would stop complaining about tiles definitions! - Keith -Original Message- From: Greg Reddin [mailto:[EMAIL PROTECTED] Sent: Friday, July 11, 2003 12:30 PM To: Struts Users Mailing List Subject: Re: Struts, search, and approval... Sun's Blueprints book makes mention of Struts when talking about MVC Frameworks. It's about as close to an endorsement as you can get. Greg Gregory F. March wrote: > First a quick note. It seems that searching of the struts list archive > is not working. A search for "forward" in the body is returning zero > results. I think there should be just a few hits for that one. :-) > > Next, I have developed a POC for a product I'm working on. However, > struts is not currently an "approved" tool where I work. I am looking > for statements by big companies / organizations like (especially) Sun, > Weblogic, IBM, etc. that are endorsing this tool. > > I am also looking for a "Top 10" list of reason why we should approve it > as a viable tool irrespective of what other companies think. I think > this was mentioned here a few weeks ago (which is why I mentioned the > issue with searching above), so I'll apologize up front for starting > this thread again. > > Any help would be greatly appreciated. > > Thanks, > > /greg > > -- > Gregory F. March-=-http://www.gfm.net:81/~march-=- > AIM:GfmNet > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > DISCLAIMER: > This email message is for the sole use of the intended recipient(s) and > may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not the > intended recipient, please contact the sender by reply email and destroy > all copies of the original message and attachments. > > DISCLAIMER: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and attachments. - 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: Using JSTL tags instead of Struts tags
There isn't really any business logic with the struts tags either, and there's generally no need for scriptlets. I don't know anything about JSTL, but I'm just not seeing the advantage here. At least not yet. - Keith -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 9:51 AM To: Struts Users Mailing List Subject: RE: Using JSTL tags instead of Struts tags I don't have any documentation but the only Struts taglibs I use are html and tiles. I replaced my usage of the bean tags with the tag and the Struts logic tags are all replaced with a combination of the and tags plus the expression language. The JSPs are remarkably easy to maintain and debug using this strategy because there aren't any scriptlets or complicated business logic in them. David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > I'd be interested in finding out about this too. > > > -Original Message- > From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED] > Sent: Thursday, July 10, 2003 7:30 AM > To: 'Struts Users Mailing List' > Subject: Using JSTL tags instead of Struts tags > > > A previous thread had encouraged me to look into JSTL. It looks like > there > are several tags which I could use instead of Struts tags. Has anyone > come > across any documentation about experiences doing this (benefits, > drawbacks, > caveats)? Anyone care to share their experience? > > Joshua > > > This communication, including attachments, is for the exclusive use of > addressee and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, any use, copying, > disclosure, dissemination or distribution is strictly prohibited. If > you are not the intended recipient, please notify the sender > immediately by return email and delete this communication and destroy > all > copies. > > > - > 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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Using JSTL tags instead of Struts tags
I'd be interested in finding out about this too. -Original Message- From: White, Joshua A (HTSC, CASD) [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 7:30 AM To: 'Struts Users Mailing List' Subject: Using JSTL tags instead of Struts tags A previous thread had encouraged me to look into JSTL. It looks like there are several tags which I could use instead of Struts tags. Has anyone come across any documentation about experiences doing this (benefits, drawbacks, caveats)? Anyone care to share their experience? Joshua This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies. - 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: Logic Iterate in Struts
That's not overly general or anything ** Note the sarcasm ** What do you want to know? -Original Message- From: Yinti, Deepak [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:13 PM To: Struts Users Mailing List Subject: Logic Iterate in Struts Can some body some body tell me about logic iterate tag Thanks Deepak This e-mail may contain confidential or privileged information. If you think you have received this e-mail in error, please advise the sender by reply e-mail and then delete this e-mail immediately. Thank you. Aetna - 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]
[OT] JSTL
I apologize if this is a bit off topic, and if it is a bit of a newbie question. I've never used JSTL before, and I'm not sure exactly what it is. Is it built into standard JSP technology (thus usable without any add-ons), or is it a tag lib that you have to download and put in your project? - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation of user input depending upon the user locale.
I agree. What you wants sounds like it would cause more harm than good. Just my humble opinion though. -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:41 AM To: Struts Users Mailing List Subject: RE: Validation of user input depending upon the user locale. Yep. Your Japanese users are sure gonna love that feature when they try to enter the names of their German clients into the application (or whatever). -Original Message- From: Sagar A. Phanse [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 July 2003 14:32 To: [EMAIL PROTECTED] Subject: Validation of user input depending upon the user locale. Hi! I need some help. I have a textfield in my JSP where user can enter the text. Now I wanted to validate the user entered text into the textfield such that when jsp-form is submitted it will let only those characters to be entered in the textfield which are belonging to the language/locale of the user.. Depending upon the user locale. E.g. If user is in Japanese Locale and if user enters ä or ü (german characters) it should be validated giving an error. Is there any fascility available in struts for this? If there is any other way than struts to achive this, even then do let me know. -Thanks in Advance Sagar *-- This message and any attachment(s) is intended only for the use of the addressee(s) and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended addressee(s), you are hereby notified that any use, distribution, disclosure or copying of this communication is strictly prohibited. If you have received this communication in error, please erase all copies of the message and its attachment(s) and notify the sender or Kanbay postmaster immediately. Any views expressed in this message are those of the individual sender and not of Kanbay. Although we have taken steps to ensure that this e-mail and any attachment(s) are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. - 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]
Multiple Dynamic Parameter Alternatives
Hey everyone, I need to use multiple dynamic parameters for some of my links, and I have this working nicely using a map. Unfortunately, my boss doesn't like scriptlets in the JSP pages, and wants me to find out about any alternatives. It's alright if there aren't, but I have to at least try to find some! So does anybody know of any alternate ways of generating multiple dynamic parameters other than using a scriptlet to fill a map? I belive There are JSTL tags that can fill a map, but we don't even know what JSTL is... I just saw the example in a previous post. Thanks in advance! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: - add parameters
Sorry, ignore my last post. I figured it out. The call to ansm.getNumberType() was just returning an empty string. Sorry to waste space in your inbox. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:04 PM To: 'Struts Users Mailing List' Subject: RE: - add parameters Hey everyone, I'm trying to add 2 dynamic parameters to a link. Someone posted the following solution a while back. I'm using this, slightly modified, within a logic:iterate tag. However, the param names are showing up in the generated link, but the param values aren't. Should I be able to use ansm.getNumberType() within the scriptlet? (ansm refers to the object storing the current element in the collection I'm iterating through.) Any help would be really appreciated. Thanks in advance! - Keith _ Test html:link Tag <% String newValue = "New string value"; pageContext.setAttribute("newValue", newValue); java.util.HashMap newValues = new java.util.HashMap(); newValues.put("floatProperty", new Float(444.0)); newValues.put("intProperty", new Integer(555)); newValues.put("stringArray", new String[] { "Value 1", "Value 2", "Value 3" }); pageContext.setAttribute("newValues", newValues); %> Float, int, and stringArray via name (Map) -- Best regards, Nikolaymailto:[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: - add parameters
Hey everyone, I'm trying to add 2 dynamic parameters to a link. Someone posted the following solution a while back. I'm using this, slightly modified, within a logic:iterate tag. However, the param names are showing up in the generated link, but the param values aren't. Should I be able to use ansm.getNumberType() within the scriptlet? (ansm refers to the object storing the current element in the collection I'm iterating through.) Any help would be really appreciated. Thanks in advance! - Keith _ Test html:link Tag <% String newValue = "New string value"; pageContext.setAttribute("newValue", newValue); java.util.HashMap newValues = new java.util.HashMap(); newValues.put("floatProperty", new Float(444.0)); newValues.put("intProperty", new Integer(555)); newValues.put("stringArray", new String[] { "Value 1", "Value 2", "Value 3" }); pageContext.setAttribute("newValues", newValues); %> Float, int, and stringArray via name (Map) -- Best regards, Nikolaymailto:[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: Cause its a virtual friday
Hahaha. That's awesome. -Original Message- From: Jamie M. Guillemette [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2003 1:42 PM To: Struts Users Mailing List Subject: Cause its a virtual friday -go to http://www.google.com -- type: "weapons of mass destruction" (with the quotes) -- hit the "I'm feeling lucky" button be sure to read the error message closely - 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]
Validating by action
Hey everyone, Quick question. I'm trying to get the validator working with ValidatorActionForm. In the validation.xml, do I have to put the ".do" in the form name, or do I just leave it as ? Thanks! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validation Problems
Websphere 5 has a nice struts-config UI that helps to keep everything organized. I've heard of other UI's out there too. - Keith -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 5:26 PM To: Struts Users Mailing List Subject: Re: Validation Problems --- Adam Hardy <[EMAIL PROTECTED]> wrote: > What is it about action mappings? People seem to think they cost money > or something. Every struts project I've done had hundreds. If you need > two action mappings, don't worry about it. I think somebody worked out > once that tomcat would only start to show performance degradation once > the action mappings total reached 100,000. > > I suppose you have to make sure you keep them grouped together in > struts-config.xml to stop the file getting unmanageable, but that's the > only disadvantage I can think of. You can use multiple struts-config.xml files to cleanly group your definitions. David > As far as I'm concerned, I'd always > rather change some config statement than change code and recompile. > > But your action error is playing up still right? I presume if you take > the html:errors tag out of the jsp, there is no exception? Post the tag > here. Also, check your application resources file for the error > messages, the header and the footer. > > Adam > > Nathan Ewing wrote: > > Upgraded, didn't help. > > > > Nathan > > > > --- Nathan Ewing <[EMAIL PROTECTED]> wrote: > > > >>Actually version 1.1.b3 Maybe I should try the final release. > >> > >> Nathan > >> > >>--- Wendy Smoak <[EMAIL PROTECTED]> wrote: > >> > >>>Nathan wrote: > >>> > >>>>I'm trying to set up struts validation (using the validate() > function in > >>> > >>>the > >>> > >>>>actionForm) and I'm getting a few problems. > >>>>First, as soon as I open the form it shows the validation errors. > >>>>It doesn't wait until I fill out the form. Is there a way to prevent > >> > >>this? > >> > >>>Search the archives, this has come up before. One way is to override > the > >>>'validate' method and only call super.validate() when appropriate. > >>> > >>> > >>>>Second if I fill out the form correctly (and hence there would be no > > >>>>validation errors) I get a null pointer exception on the: > >>>>org.apache.struts.taglib.html.ErrorsTag.doStartTag(ErrorsTag.java:239) > >>>>tag. > >>> > >>>What version of Struts? I am not seeing this behavior at all. > >>> > >>>-- > >>>Wendy Smoak > >>>Applications Systems Analyst, Sr. > >>>Arizona State University, PA, IRM > >>> > >>> > >> > >> > >>- > >>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] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: More Validation Problems
Does the required option of the validator check to see if the field is null or an empty string? Maybe this is why my validations have been passing when they shouldn't, because I initialize all my properties to "". I hope I've finally found my problem! - Keith -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 5:20 PM To: Struts Users Mailing List Subject: Re: More Validation Problems wait til you graduate onto struts validator, you'll have a ball then ;) Nathan Ewing wrote: > Omg I figured it out :) > > In my validation, to see if someone had filled in a required field I was > checking to see if the field was null. Because of this whenever the form > displayed the bean would be created with null fields and errors would display. > Then when I hit submit it would make the blank field "" instead of null so I > wouldn't get an error :) > >Nathan > > > --- Nathan Ewing <[EMAIL PROTECTED]> wrote: > >>Well I figured out why I was getting a validation error. I was returning a >>null error if there were no errors. >> >>Unfortunately now I find my real problem. >> >>My form shows correctly (more or less), but if I hit submit instead of just >>popping back up with validation errors it goes to the Action class behind it. >> >>Shouldn't it by default show my form, then if I enter wrong data just show >>the >>form again with the errors, and then if it passes with no errors it should go >>to the action class for processing? >> >> Nathan >> >> >> >>- >>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: Question reguarding ActionForms
I think you mean for check boxes. A set of radio buttons more often than not needs more than 2 possible values. - Keith -Original Message- From: Sandeep Takhar [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 3:28 PM To: Struts Users Mailing List Subject: Re: Question reguarding ActionForms I think you can get away with booleans for radio buttons. sandeep --- "Jamie M. Guillemette" <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > Ok.. we have been using struts for sometime now and > have recently come a realization that i would love > to get confirmed or corrected. > > ActionForms: > > All variables that are editable should be Strings! > no wrappers or other toString() tricks.. if you want > to use validation and struts they best be Strings! > > That being said.. i dont want my core models to be > that way which means my actions will need to do some > population of the form prior and after the jsp is > displayed. > > Is this inline with what everyone else is doing ? > > Thanks, > J. Guillemette > > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: forward to tiles definition?
Why wouldn't you want to use an ActionForward? It's the "struts way". - Keith -Original Message- From: Chip Paul [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 2:28 PM To: Struts User Subject: forward to tiles definition? Is there a way to make a link (not an action forward) point to a tiles definition, or do I have to create a wrapper jsp that inserts the def, and use that page as the link? Chip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Empty Result Set
Does the ResultSet have to be scrollable for this to work? I'm getting an error that tells me that my result set isn't scrollable. I think it's weird because I can make a call on rs.next() in a while loop using a default resultset without a problem. Confusing... - Keith -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 1:35 PM To: Struts Users Mailing List Subject: Re: [OT] Empty Result Set boolean isEmpty = !rs.next(); David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Hey everyone, > This isn't really a struts question, but it's applicable. I'm just > wondering how to find out if a ResultSet is empty or not after I execute > my > query. I've searched online, but I'm having a hard time finding much of > anything. > Can I just use: > > if (myResultSet.next() ) > { > empty = false; > } > else > { > empty = true; > } > > > Would that work or would that not do what I'm looking for? > Any help would be appreciated, thanks! > > - Keith > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Difference between ValidatorForm and ValidatorActionForm?
So do you have to do anything differently in your validation.xml? Also, where can I find some documentation on this? - Keith -Original Message- From: Butash, Bob [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 12:59 PM To: 'Struts Users Mailing List' Subject: RE: Difference between ValidatorForm and ValidatorActionForm? Yansheng, Since ActionForms are intended to be reused across multiple actions, you might have different validation requirements depending on the context that the ActionForm is being used. One Action might require a certain field but that field may not be required for another Action that is using the same ActionForm. Hope this helps. -Original Message- From: Yansheng Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 11:52 AM To: 'Struts Users Mailing List' Subject: Difference between ValidatorForm and ValidatorActionForm? I kind of understand it. ValidatorForm validates the form and ValidatorActionForm validates the form based on action path. But why would you prefer one over the other? I mean you can achieve almost the same effect with either. Thanks! - 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]
[OT] Scrollable Result Set
Hey, I'm trying to use a PreparedStatement to get a ResultSet. I know how to get a customized ResultSet if you're only using a Statement, but how can I get a scrollable ResultSet with my PreparedStatement? Thanks! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: requiredif question
Here's my struts-config and my validation.xml. I've also attached them, if it's easier to look at that way. I've only shown parts of my struts-config.xml, enough to show one example action that isn't validating right. ___ Struts-Config snippets: ___ Validation.xml: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";> If I should send any other files, let me know. Any input would be great, thanks! - Keith -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 1:32 PM To: [EMAIL PROTECTED] Subject: RE: requiredif question I did not see yours. Can you post your code again? --- Thanks... Mick Knutson --- >From: "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: 'Struts Users Mailing List' <[EMAIL PROTECTED]> >Subject: RE: requiredif question >Date: Wed, 25 Jun 2003 13:26:48 -0400 > >I'm having a similar problem. All I'm trying to do is have a 'required' >condition for 2 fields of my form. Mine submits just fine when I leave it >blank as well. I posted my code here yesterday, but nobody was able to >help >me. If you figure this out, I'd appreciate it if you let me know what the >problem is. I'll do the same! > >- Keith > > >-Original Message- >From: Mick Knutson [mailto:[EMAIL PROTECTED] >Sent: Wednesday, June 25, 2003 1:26 PM >To: [EMAIL PROTECTED] >Subject: Re: requiredif question > > >Yes, no matter what I enter, nothing happends at all. It just accepts >whatever I enter, or leave blank, and submits just fine. > > > >--- >Thanks... >Mick Knutson >--- > > > > > > >From: Kevin Robair <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >To: Struts Users Mailing List <[EMAIL PROTECTED]> > >Subject: Re: requiredif question > >Date: Wed, 25 Jun 2003 10:20:35 -0700 (PDT) > > > >Just a hunch: > > > >For Struts 1.1RC1 , the varnames should be: > > > >field-test[x] > >field-join > >etc... > > > >In 1.1RC2, they are > > > >fieldTest[n] > >fieldJoin > >etc > > > >BTW, I am unsure what you mean by: > > > > "does not seem to operate at all" > > > >Are there any errors or exceptions in the log? If the form validates no > >matter what you enter, and there are no errors in the log, then it is > >possibly a configuration problem. You could try a simpler validation, in > >place of this one just to make sure it is doing something. Then, remove > >the NOTNULL check, and see if the NOTEQUAL alone works. > > > >-Kevin > > > >--- Mick Knutson <[EMAIL PROTECTED]> wrote: > > > I have the following code that does not seem to operate at all. > > > > > > I want phone1type to be a required field _if_ the phone1 attribute is > > > _not_ > > > "" > > > > > > > > depends="requiredif"> > > > > > > > > > field[0] > > > phone1 > > > > > > > > > fieldTest[0] > > > NOTNULL > > > > > > > > > field[1] > > > phone1 > > > > > > > > > fieldTest[1] > > > NOTEQUAL > > > > > > > > > fieldValue[1] > > > > > > > > > > > > fieldJoin > > > OR > > > > > > > > > > > > > > > > > > > > > --- > > > Thanks... > > > Mick Knutson > > > --- > > > > > > _ > > > Tired of spam? Get advanced
[OT] Empty Result Set
Hey everyone, This isn't really a struts question, but it's applicable. I'm just wondering how to find out if a ResultSet is empty or not after I execute my query. I've searched online, but I'm having a hard time finding much of anything. Can I just use: if (myResultSet.next() ) { empty = false; } else { empty = true; } Would that work or would that not do what I'm looking for? Any help would be appreciated, thanks! - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: requiredif question
I'm having a similar problem. All I'm trying to do is have a 'required' condition for 2 fields of my form. Mine submits just fine when I leave it blank as well. I posted my code here yesterday, but nobody was able to help me. If you figure this out, I'd appreciate it if you let me know what the problem is. I'll do the same! - Keith -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 1:26 PM To: [EMAIL PROTECTED] Subject: Re: requiredif question Yes, no matter what I enter, nothing happends at all. It just accepts whatever I enter, or leave blank, and submits just fine. --- Thanks... Mick Knutson --- >From: Kevin Robair <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: Struts Users Mailing List <[EMAIL PROTECTED]> >Subject: Re: requiredif question >Date: Wed, 25 Jun 2003 10:20:35 -0700 (PDT) > >Just a hunch: > >For Struts 1.1RC1 , the varnames should be: > >field-test[x] >field-join >etc... > >In 1.1RC2, they are > >fieldTest[n] >fieldJoin >etc > >BTW, I am unsure what you mean by: > > "does not seem to operate at all" > >Are there any errors or exceptions in the log? If the form validates no >matter what you enter, and there are no errors in the log, then it is >possibly a configuration problem. You could try a simpler validation, in >place of this one just to make sure it is doing something. Then, remove >the NOTNULL check, and see if the NOTEQUAL alone works. > >-Kevin > >--- Mick Knutson <[EMAIL PROTECTED]> wrote: > > I have the following code that does not seem to operate at all. > > > > I want phone1type to be a required field _if_ the phone1 attribute is > > _not_ > > "" > > > > > depends="requiredif"> > > > > > > field[0] > > phone1 > > > > > > fieldTest[0] > > NOTNULL > > > > > > field[1] > > phone1 > > > > > > fieldTest[1] > > NOTEQUAL > > > > > > fieldValue[1] > > > > > > > > fieldJoin > > OR > > > > > > > > > > > > > > --- > > Thanks... > > Mick Knutson > > --- > > > > _ > > Tired of spam? Get advanced junk mail protection with MSN 8. > > http://join.msn.com/?page=features/junkmail > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles question
Can you explain what you want to do in english, rather than pseudocode? -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 10:54 AM To: [EMAIL PROTECTED] Subject: Tiles question I am looking to do something like what is listed below, is it possible or a way to do similar: tiles-defs.xml: This is an error: Blah blah blah If this persists contact blah blah error_page.jsp: ... Basically, I want to have a reusable error page that has a configurable (& HTML formattable) message to the user. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Damn Validator...
Just tried this. The method is getting called, but isn't producing any errors. I believe I'm only using server side validations. - Keith -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 12:10 PM To: Struts Users Mailing List Subject: RE: Damn Validator... That looks ok to me. Override the validate() method in your ActionForm and see if it gets called. Then have it call the super.validate() method to see if the validator returns any errors. Does anything at all happen when you submit the form? Are you using both javascript and server side validations? David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Sure thing, thanks for checking it out. Here's my validation.xml: > > > > >"-//Apache Software Foundation//DTD Commons Validator Rules > Configuration 1.0//EN" > "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";> > > > > > > > > > depends="required"> > > > depends="required"> > > > > > > > > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 11:14 AM > To: Struts Users Mailing List > Subject: Re: Damn Validator... > > > Can you post the relevant form definition in validation.xml? I'm having > a > hard time downloading the attachment. > > David > > > --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > > Hey everyone, > > I posted recently regarding my issues with the Validator plugin. > There > > were > > a few suggestions, but I had already checked everything that was > > mentioned. > > I'm going crazy, I've been trying for a several days to get this thing > > working, but have gotten nowhere. I'm posting some of my code. If > > anyone > > is willing to check it out to see if they notice any mistakes, I'd > > really > > appreciate it. > > > > Here are a few snippets from my struts-config.xml : > > > > > > > > > > > > > > > >> validate="true" > > name="ansm" > > scope="request" > > input="tiles.addFormat"/> > > > > > > > > > > > > > > > value="/WEB-INF/tiles-defs.xml" /> > > > > > value="true" /> > > > > > > > > > property="pathnames" > > > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> > > > > > > > > I have the necessary messages in my ApplicationResources, and my form > > beans > > sublass ValidatorForm. > > > > I've also attached my validation.xml and the JSP that uses the action > > that > > I've shown above. If there are any other files that I should send as > > well, > > let me know. > > > > I'm going nuts here! Any help would be greatly appreciated. Thanks! > > > > > > - Keith > > > > > > > > <> > > > > <> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > __ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Damn Validator...
My boss had me plug the Validator into a sample application for practice. It was all cut and paste though, so there wasn't much real learning. It worked no problem. I just copied the validator-rules.xml, and validation.xml into my app, and changed the validation.xml. I followed all the instructions and everything, but no go. - Keith -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 1:47 PM To: Struts Users Mailing List Subject: RE: Damn Validator... Does the validator example app work? David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Nope, no server errors when I run the app. I'm not getting any errors > period, it just seems like the validator isn't doing anything, or is > passing > when it shouldn't. > > - Keith > > > -Original Message- > From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 11:58 AM > To: 'Struts Users Mailing List' > Subject: RE: Damn Validator... > > > > > Are you sure it isn't an XML parsing problem. Does your server show > errors > when loading? I've seen things happen when the wrong order in your XML > than > the dtd states or something. > > > -Original Message- > From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 11:34 AM > To: 'Struts Users Mailing List' > Subject: RE: Damn Validator... > > Sure thing, thanks for checking it out. Here's my validation.xml: > > > > >"-//Apache Software Foundation//DTD Commons Validator Rules > Configuration 1.0//EN" > "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";> > > > > > > > > > depends="required"> > > > depends="required"> > > > > > > > > > > -Original Message- > From: David Graham [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 11:14 AM > To: Struts Users Mailing List > Subject: Re: Damn Validator... > > > Can you post the relevant form definition in validation.xml? I'm having > a > hard time downloading the attachment. > > David > > > --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > > Hey everyone, > > I posted recently regarding my issues with the Validator plugin. > There > > were > > a few suggestions, but I had already checked everything that was > > mentioned. > > I'm going crazy, I've been trying for a several days to get this thing > > working, but have gotten nowhere. I'm posting some of my code. If > > anyone > > is willing to check it out to see if they notice any mistakes, I'd > > really > > appreciate it. > > > > Here are a few snippets from my struts-config.xml : > > > > > > > > > > > > > > > >> validate="true" > > name="ansm" > > scope="request" > > input="tiles.addFormat"/> > > > > > > > > > > > > > > > value="/WEB-INF/tiles-defs.xml" /> > > > > > value="true" /> > > > > > > > > > property="pathnames" > > > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> > > > > > > > > I have the necessary messages in my ApplicationResources, and my form > > beans > > sublass ValidatorForm. > > > > I've also attached my validation.xml and the JSP that uses the action > > that > > I've shown above. If there are any other files that I should send as > > well, > > let me know. > > > > I'm going nuts here! Any help would be greatly appreciated. Thanks! > > > > > > - Keith > > > > > > > > <> > > > > <> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > >
RE: Damn Validator...
Nope, no server errors when I run the app. I'm not getting any errors period, it just seems like the validator isn't doing anything, or is passing when it shouldn't. - Keith -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:58 AM To: 'Struts Users Mailing List' Subject: RE: Damn Validator... Are you sure it isn't an XML parsing problem. Does your server show errors when loading? I've seen things happen when the wrong order in your XML than the dtd states or something. -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:34 AM To: 'Struts Users Mailing List' Subject: RE: Damn Validator... Sure thing, thanks for checking it out. Here's my validation.xml: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";> -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:14 AM To: Struts Users Mailing List Subject: Re: Damn Validator... Can you post the relevant form definition in validation.xml? I'm having a hard time downloading the attachment. David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Hey everyone, > I posted recently regarding my issues with the Validator plugin. There > were > a few suggestions, but I had already checked everything that was > mentioned. > I'm going crazy, I've been trying for a several days to get this thing > working, but have gotten nowhere. I'm posting some of my code. If > anyone > is willing to check it out to see if they notice any mistakes, I'd > really > appreciate it. > > Here are a few snippets from my struts-config.xml : > > > > > > > > validate="true" > name="ansm" > scope="request" > input="tiles.addFormat"/> > > > > > > > value="/WEB-INF/tiles-defs.xml" /> > >value="true" /> > > > > property="pathnames" > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> > > > > I have the necessary messages in my ApplicationResources, and my form > beans > sublass ValidatorForm. > > I've also attached my validation.xml and the JSP that uses the action > that > I've shown above. If there are any other files that I should send as > well, > let me know. > > I'm going nuts here! Any help would be greatly appreciated. Thanks! > > > - Keith > > > > <> > > <> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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: Damn Validator...
Sure thing, thanks for checking it out. Here's my validation.xml: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd";> -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:14 AM To: Struts Users Mailing List Subject: Re: Damn Validator... Can you post the relevant form definition in validation.xml? I'm having a hard time downloading the attachment. David --- "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: > Hey everyone, > I posted recently regarding my issues with the Validator plugin. There > were > a few suggestions, but I had already checked everything that was > mentioned. > I'm going crazy, I've been trying for a several days to get this thing > working, but have gotten nowhere. I'm posting some of my code. If > anyone > is willing to check it out to see if they notice any mistakes, I'd > really > appreciate it. > > Here are a few snippets from my struts-config.xml : > > > > > > > > validate="true" > name="ansm" > scope="request" > input="tiles.addFormat"/> > > > > > > > value="/WEB-INF/tiles-defs.xml" /> > >value="true" /> > > > > property="pathnames" > > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/> > > > > I have the necessary messages in my ApplicationResources, and my form > beans > sublass ValidatorForm. > > I've also attached my validation.xml and the JSP that uses the action > that > I've shown above. If there are any other files that I should send as > well, > let me know. > > I'm going nuts here! Any help would be greatly appreciated. Thanks! > > > - Keith > > > > <> > > <> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSP's taking too long in websphere
I'm sure there's an option to turn that off somewhere. What version are you running? Websphere tends to be kinda slow. I've had some issues with that, especially in version 4 and version 5 integration edition. - Keith -Original Message- From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 11:18 AM To: 'Struts Users Mailing List' Subject: JSP's taking too long in websphere Hello everyone, I work with strtus framework and use websphere. The problem is that it takes a lot of time to open, load, or save my JSP pages. Could it be because websphere compiles everything (even when I open the page?) if yes, is there any option to turn that off? I appreciate any suggestion Mona * The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. * - 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]
Damn Validator...
Hey everyone, I posted recently regarding my issues with the Validator plugin. There were a few suggestions, but I had already checked everything that was mentioned. I'm going crazy, I've been trying for a several days to get this thing working, but have gotten nowhere. I'm posting some of my code. If anyone is willing to check it out to see if they notice any mistakes, I'd really appreciate it. Here are a few snippets from my struts-config.xml : I have the necessary messages in my ApplicationResources, and my form beans sublass ValidatorForm. I've also attached my validation.xml and the JSP that uses the action that I've shown above. If there are any other files that I should send as well, let me know. I'm going nuts here! Any help would be greatly appreciated. Thanks! - Keith <> <> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator
Also, when using the validator, I have to set validate="true" for each applicable action in my struts config.xml right? - Keith -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2003 10:27 AM To: 'Struts Users Mailing List' Subject: RE: Validator Where can I find the step by step instructions that you are referring to? I've tried a few examples, maybe the one you are referring to would help me out more. Thanx. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Sergey Smirnov [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 3:20 PM To: Struts Users Mailing List Subject: Re: Validator For client-site validation you can omit steps 9, 10, 11, 12 However couple more steps are required: 9a) in page header 10a) for form tag: onsubmit="return validate(this)" So, 10 < 12 :-) Also, I did not say that client-site validation is good and you need to use it instead of server-site one. The Tip says: If you have a problem when you test common validators, make a client-validation first and than, when you fix the problem, return back to server-site validation. Client-site validation lights some problems that server-site hides. For example, if you have a typo in validation.xml file, the page shows javascript text stripped. Regards, Sergey Smirnov - Exadel Struts Studio - IDE for Struts http://www.exadel.com/strutsStudio - - Original Message - From: "Kris Schneider" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, June 20, 2003 11:22 AM Subject: Re: Validator > I would have suggested just the oppostite ;-). How does client-side validation > take fewer steps? My experience has been that the additional tags and JavaScript > wrangling actually add more steps and complexity. Most importantly, client-side > validation is optional while server-side validation should be mandatory. Now > that you've got conflicting suggestions, you can feel justified to start > wherever you like ;-). > > I'm almost in a state of shock over the statement, "I wish my boss would just > let me use the validate method of the ActionForms." Come again? > > Quoting Sergey Smirnov <[EMAIL PROTECTED]>: > > > Cool tip: > > Try to make client-site validation first. > > Client-site validation requires less steps to implement and, ofter, light > > the mispeling errors. If client-site validation works, you need just a > > couple more steps to have a server-site validation working. > > > > > > - Original Message - > > From: "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > > Sent: Friday, June 20, 2003 10:41 AM > > Subject: RE: Validator > > > > > > > Thanks for the input. > > > I'm pretty sure I've got all that though. This validator stuff is > > driving > > > me insane! I wish my boss would just let me use the validate method of > > the > > > ActionForms. > > > > > > - Keith > > > > > > > > > -Original Message- > > > From: Sergey Smirnov [mailto:[EMAIL PROTECTED] > > > Sent: Friday, June 20, 2003 12:52 PM > > > To: Struts Users Mailing List > > > Subject: Re: Validator > > > > > > > > > Common mistake is: You forgot something or misspelt something. Week ago I > > > sent condition set you need to satisfy to make common validator working. > > It > > > is bellow. > > > > > > For example, we have a very simple jsp form and > > > want to use standard server-side validator 'required' for one form field. > > > Actually, it might vary, but to do so you have: > > > > > > 1) Resource (.properties) file with keys/values for standard validators > > (at > > > least - errors.required) > > > 2) struts-config file should contain the reference to this resource file > > for > > > message-resources node > > > 3) struts-config plug-in node should contain > > > className="org.apache.struts.validator.ValidatorPlugIn" > > > 4) this plugin should have set-property with name pathnames that > > corresponds > > > to validator files (such as /WEB-INF/validator-rules.xml and > > > /WEB-INF/validation.xml) > > > 5) validation.xml should contain form with name corresponds to form-bean > > > name > > > 6) the form should have a field with prop
RE: Validator
Where can I find the step by step instructions that you are referring to? I've tried a few examples, maybe the one you are referring to would help me out more. Thanx. ~ Keith http://www.buffalo.edu/~kkamholz -Original Message- From: Sergey Smirnov [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 3:20 PM To: Struts Users Mailing List Subject: Re: Validator For client-site validation you can omit steps 9, 10, 11, 12 However couple more steps are required: 9a) in page header 10a) for form tag: onsubmit="return validate(this)" So, 10 < 12 :-) Also, I did not say that client-site validation is good and you need to use it instead of server-site one. The Tip says: If you have a problem when you test common validators, make a client-validation first and than, when you fix the problem, return back to server-site validation. Client-site validation lights some problems that server-site hides. For example, if you have a typo in validation.xml file, the page shows javascript text stripped. Regards, Sergey Smirnov - Exadel Struts Studio - IDE for Struts http://www.exadel.com/strutsStudio - - Original Message - From: "Kris Schneider" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, June 20, 2003 11:22 AM Subject: Re: Validator > I would have suggested just the oppostite ;-). How does client-side validation > take fewer steps? My experience has been that the additional tags and JavaScript > wrangling actually add more steps and complexity. Most importantly, client-side > validation is optional while server-side validation should be mandatory. Now > that you've got conflicting suggestions, you can feel justified to start > wherever you like ;-). > > I'm almost in a state of shock over the statement, "I wish my boss would just > let me use the validate method of the ActionForms." Come again? > > Quoting Sergey Smirnov <[EMAIL PROTECTED]>: > > > Cool tip: > > Try to make client-site validation first. > > Client-site validation requires less steps to implement and, ofter, light > > the mispeling errors. If client-site validation works, you need just a > > couple more steps to have a server-site validation working. > > > > > > - Original Message - > > From: "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > > Sent: Friday, June 20, 2003 10:41 AM > > Subject: RE: Validator > > > > > > > Thanks for the input. > > > I'm pretty sure I've got all that though. This validator stuff is > > driving > > > me insane! I wish my boss would just let me use the validate method of > > the > > > ActionForms. > > > > > > - Keith > > > > > > > > > -Original Message- > > > From: Sergey Smirnov [mailto:[EMAIL PROTECTED] > > > Sent: Friday, June 20, 2003 12:52 PM > > > To: Struts Users Mailing List > > > Subject: Re: Validator > > > > > > > > > Common mistake is: You forgot something or misspelt something. Week ago I > > > sent condition set you need to satisfy to make common validator working. > > It > > > is bellow. > > > > > > For example, we have a very simple jsp form and > > > want to use standard server-side validator 'required' for one form field. > > > Actually, it might vary, but to do so you have: > > > > > > 1) Resource (.properties) file with keys/values for standard validators > > (at > > > least - errors.required) > > > 2) struts-config file should contain the reference to this resource file > > for > > > message-resources node > > > 3) struts-config plug-in node should contain > > > className="org.apache.struts.validator.ValidatorPlugIn" > > > 4) this plugin should have set-property with name pathnames that > > corresponds > > > to validator files (such as /WEB-INF/validator-rules.xml and > > > /WEB-INF/validation.xml) > > > 5) validation.xml should contain form with name corresponds to form-bean > > > name > > > 6) the form should have a field with property that corresponds to field > > name > > > we want to validate > > > 7) this field should have a 'depends' attribute that corresponds to > > > validator name mentioned in /WEB-INF/validator-rules.xml (in our case - > > with > > > name 'required') > > > 8) thi
RE: Validator
Thanks for the input. I'm pretty sure I've got all that though. This validator stuff is driving me insane! I wish my boss would just let me use the validate method of the ActionForms. - Keith -Original Message- From: Sergey Smirnov [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 12:52 PM To: Struts Users Mailing List Subject: Re: Validator Common mistake is: You forgot something or misspelt something. Week ago I sent condition set you need to satisfy to make common validator working. It is bellow. For example, we have a very simple jsp form and want to use standard server-side validator 'required' for one form field. Actually, it might vary, but to do so you have: 1) Resource (.properties) file with keys/values for standard validators (at least - errors.required) 2) struts-config file should contain the reference to this resource file for message-resources node 3) struts-config plug-in node should contain className="org.apache.struts.validator.ValidatorPlugIn" 4) this plugin should have set-property with name pathnames that corresponds to validator files (such as /WEB-INF/validator-rules.xml and /WEB-INF/validation.xml) 5) validation.xml should contain form with name corresponds to form-bean name 6) the form should have a field with property that corresponds to field name we want to validate 7) this field should have a 'depends' attribute that corresponds to validator name mentioned in /WEB-INF/validator-rules.xml (in our case - with name 'required') 8) this field should have an arg0 node which attribute key corresponds to existing key in resource file 9) form bean should inherit org.apache.struts.validator.ValidatorForm class 10) form bean validate should call validate method of super class 11) 'input' attribute of action should reference to jsp page with validated form 12) jsp page should contains (or its substitute) Regards, Sergey Smirnov - Exadel Struts Studio - IDE for Struts http://www.exadel.com/strutsStudio ----- - Original Message - From: "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> To: "Struts (E-mail)" <[EMAIL PROTECTED]> Sent: Friday, June 20, 2003 9:25 AM Subject: Validator > Hey, > I'm trying to put validation into my application using the validator plugin. > However it doesn't seem like it's doing anything at all. I know it's a very > general question, but what are some things I should look for? Are there any > common mistakes in setting up that I should check for? > > I'm not sure if it's a related issue or not, but I have to specify the name > attribute for each field of my forms. You're not supposed to have to > specify the name right? What do you think I did wrong? > > Thanks in advance. > > > - Keith > > - > 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]
Validator
Hey, I'm trying to put validation into my application using the validator plugin. However it doesn't seem like it's doing anything at all. I know it's a very general question, but what are some things I should look for? Are there any common mistakes in setting up that I should check for? I'm not sure if it's a related issue or not, but I have to specify the name attribute for each field of my forms. You're not supposed to have to specify the name right? What do you think I did wrong? Thanks in advance. - Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: bean:write with in logic:iterate
Use this: This will go through a list of Strings and print out each one. This also works for lists of non-string objects. Let me know if you need help with that modification. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: bhanu sistla [mailto:[EMAIL PROTECTED] Sent: Monday, June 16, 2003 6:08 AM To: [EMAIL PROTECTED] Subject: bean:write with in logic:iterate How to use bean:write with in logic:iterate when we have a collection. I have got a collections where i want to iterate through each element in the collection Regards Bhanu - Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wizard forms
tile.pageTwo is an extension of the main layout tile, with a different body defined. Although there are other ways of doing it, with parameters and logic and whatnot, my suggestion would be to make a separate tiles definition for each page, and forwarding to those tiles defs. Does this make sense to you? Let me know if you're still haveing problems. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Gregory F. March [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 10:26 AM To: Struts Users Mailing List Subject: Re: Wizard forms On Jun 11, 2003, "Kamholz, Keith (corp-staff) USX" <[EMAIL PROTECTED]> wrote: |If all you want to do is forward to another JSP page, make a forward action |in your struts-config like this: | | | |That way, no parameters are necessary. You'll just have to make a whole |bunch of forward actions. The forward you reference, tiles.pageTwo, what is it? A jsp? The reason I ask is that I have one main tile page that has logic: tags to load different body components so that I don't need a separate main tile page for each page of the form. In other words, I have: mainTileFormPage.jsp (loads the formBody.jsp's) formBody1.jsp formBody2.jsp formBody3.jsp formBody4.jsp I'd rather not have a mainTileFormPage.jsp, and I'd rather not embed the body tiles into the main tile form page. Am I thinking about this correctly? I hope I made myself clear there... if not, let me know and I'll try again. Thanks! /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - 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: Wizard forms
If all you want to do is forward to another JSP page, make a forward action in your struts-config like this: That way, no parameters are necessary. You'll just have to make a whole bunch of forward actions. Now if only I could get it to stop giving me warnings for all my tiles names... Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Gregory F. March [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 9:00 AM To: Struts Users Mailing List Subject: Wizard forms How are wizard forms (multipage forms) typically done in the struts framework? I have done the following and I'm running into a few configuration and usability problems that seem to indicate that I did something wrong. I have the following: * Main tile page that contains a header, menu, body and footer. * The body tile contains parts of the form with multiple submit buttons, a "save", "cancel", "reset", "previous" and "next". * When the user hits next or prev, the action redirects to a forward with a ?page=n so that the main tile page can display the correct body. * Based on the "page" parameter, the main tile page will change the body of the page to a different .jsp for each of the pages in the multipart form. * A DynaActionForm that has session scope to maintain the data across pages. Does this sound right? My issues are with that "page" property to manage the content of the body tile - it doesn't seem natural in this framework to do it this way. As usual, any comments are really appreciated... Thanks, /greg -- Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet - 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: Checkbox problem?
I had some issues with the methods, so I came up with something else that works very nicely. In the JSP, right after the code for the checkbox, use: This allows the form submission to work correctly, without any messy code. However, I am no expert with this stuff, so if there is any reason not to do this I'd be interested in hearing it. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Bjorn T Johansen [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:27 AM To: [EMAIL PROTECTED] Subject: Checkbox problem? I use checkboxes to input some variables in a form and as long as I insert new records, i.e. the checkbox variable gets set to false in the form's reset method, it works fine. But when I, say, edit the same record (and propagate the values of the form in the reset method), I never can uncheck the checkbox if it was set to true in the reset method. Are there any solutions/work around for this? Regards, BTJ --- Bjørn T Johansen (BSc,MNIF) Executive Manager [EMAIL PROTECTED] Havleik Consulting Phone : +47 67 54 15 17 Conradisvei 4 Fax : +47 67 54 13 91 N-1338 Sandvika Cellular : +47 926 93 298 http://www.havleik.no --- "The stickers on the side of the box said "Supported Platforms: Windows 98, Windows NT 4.0, Windows 2000 or better", so clearly Linux was a supported platform." --- - 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: Session beans
What package is HttpSession in? Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Josh McCulloch [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 1:31 PM To: Struts Users Mailing List Subject: Re: Session beans Try something like this: HttpSession session = request.getSession(); Enumeration names = session.getAttributeNames(); while(names.hasMoreElements()) { String key = (String)names.nextElement(); session.removeAttribute(key); } [EMAIL PROTECTED] wrote: >Hey everyone, >I'm aware of the issues with using beans in the session context. I'm >wondering if there's any method I can call to remove all the beans from the >session. Does anything like that exist? Are there any adverse effects of >removing something from the session if it isn't in there? Do you know what >I mean? I hope I'm not being confusing. >Thanks in advance. > >Keith Kamholz >Programming and Architecture >Moog Inc. > >Phone: (716) 687-7001 > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help- logic:iterate tag
As far as your question about rebuilding the table, I'm not sure exactly what you're asking. These sorts of things are generally done automatically. I can answer your other question though. The 'type' attribute of the logic:iterate tag specifies the name of the class that is stored in your collection that you are iterating through. For example, if you just have an ArrayList stored in the request with the attribute "someList", and it stores strings that you want to iterate through, you would use: (Do something with 'thisElement') Does that help more? Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 1:26 PM To: [EMAIL PROTECTED] Subject: RE: Help- logic:iterate tag Also could u tell me as what u defined ur action form (eg: ArrayList storing type AnsmItem, and what is type used for type="com.moog.us.app.ans.data.AnsmItem"> >>> [EMAIL PROTECTED] 06/09/03 01:22PM >>> This will definitely help me , but the reason for asking this question .. In my application my requirement is to have multiple HTML elements with the same name. eg: MH MSA NATIONAL But the above table can be 1 row or many rows (dynamic). Once the user submits the page, and say there is some validation error, I want to rebuild the table with the values from the action form. Hope i am clear, if not I will further info. >>> [EMAIL PROTECTED] 06/09/03 12:33PM >>> Well, I'm not sure exactly what you want to know, but here's an example of how I used it in an application I'm currently working on: "groups" is an ArrayList that I put in the request from the preceding action. it stores variables of type AnsmItem. "ansm" is the local bean name that you use within the iterate tag to access the current element of the collection. Let me know if you have any questions about it, or if you want to know anything else. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 11:22 AM To: [EMAIL PROTECTED] Subject: Help- logic:iterate tag Hi I am trying to understand the logic:iterate tag. I have gone thru the docs but could figure out some of the attributes of this tag. My confusion is following attributes 1. property="" so should this have a get and set methods in the ActionForm 2. Collection - when will this be used 3. indexID - when should this be used Can some body throw some insight on these tags or some examples of usage. Thanks - 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]
Session beans
Hey everyone, I'm aware of the issues with using beans in the session context. I'm wondering if there's any method I can call to remove all the beans from the session. Does anything like that exist? Are there any adverse effects of removing something from the session if it isn't in there? Do you know what I mean? I hope I'm not being confusing. Thanks in advance. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help- logic:iterate tag
Well, I'm not sure exactly what you want to know, but here's an example of how I used it in an application I'm currently working on: "groups" is an ArrayList that I put in the request from the preceding action. it stores variables of type AnsmItem. "ansm" is the local bean name that you use within the iterate tag to access the current element of the collection. Let me know if you have any questions about it, or if you want to know anything else. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Sashi Ravipati [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 11:22 AM To: [EMAIL PROTECTED] Subject: Help- logic:iterate tag Hi I am trying to understand the logic:iterate tag. I have gone thru the docs but could figure out some of the attributes of this tag. My confusion is following attributes 1. property="" so should this have a get and set methods in the ActionForm 2. Collection - when will this be used 3. indexID - when should this be used Can some body throw some insight on these tags or some examples of usage. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dispatch Action help...
Hi all, I have a webform that I am trying to create and I have run into a huge problem. So, at the top of the form I have the action specified and underneath I have defined the inputs using the struts taglib. Now, I can submit the form to the Action just fine and all the ActionForm is filled in with all the correct values. I want to be able to include a list of dynamic links with the form information. I have a defined and above that to input fields. Also, I have two buttons (Add and Remove) that I would like to specify the Actions on those two buttons to add an entry to the or remove a selected value in the field. So, here is what I have tried so far. I started using JavaScript to dynamically add the content from the two input fields to the box. When I submitted the form, though, I would only get a String[] from the box that was the values of the entries (not the values and the labels). Now what I am trying to do is to use a DispatchAction class and specify a around each that points to the DispatchAction class with a parameter that says which action to perform. When the program goes to the DispatchAction class, the ActionForm that I specified in the struts-config.xml file is not populated with the fields from the webform. I have tried also to figure out some way to add the parameters onto the request line but the only way that I can do that is using the onclick javascript method and specifing "document.location = "'/admin/EditReference.do?action=addOption&refTitle=' + refTitle.value + '&refLink=' + refLink.value". Now, this works fine for add the stuff to the because I have a bean in the session scope that the refTitle and refLink are being added to. But, when the DispatchAction returns to the webform the other values in the webform do not show anymore. What I figure is happening is that the webform is not getting populated because I haven't actually submitted the form when doing the Add and Remove actions, so therefore that information is not re-put into the webform when the DispatchAction returns to the webform. Anyone know what else I can do? Sorry if this was confusing. I can submit code if it would make things clearer. Any help is very much appreciated! Thanks in advance! Keith -- Keith Pemberton <[EMAIL PROTECTED]> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:hidden value
Hey everyone, I'm having an issue with setting the value for an tag. That form uses a bean called ansa. I want to set the value of the hidden element to the numberType property of a bean called ansm. I tried putting a in the body of the html:hidden tag, but that didn't work. How would I go about doing this without a scriptlet? Thanx in advance. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Excluding values inside a logic:iterate tag or an html:options tag
Yes it is. Use the logic:equal and logic:notEqual tags to do this. Let me know if you need more info. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 www.buffalo.edu/~kkamholz -Original Message- From: Ionel Gardais [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 4:08 AM To: Struts Users Mailing List Subject: Excluding values inside a logic:iterate tag or an html:options tag Hi, Is it possible to tell these tags that when they hit some values, they shouldn't display them ? Thanks, ionel - 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: switch statement
I appreciate everybody's replies, even though some suggestions were really overkill for what I'm trying to do. I think I'll just use the if-else statements, it's not really a big deal. I still wish that switch statements would support Strings, but that's a different topic of discussion. Thanks again everyone. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: DelRio, Omar (CORP, DDEMESIS) [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 12:07 PM To: Struts Users Mailing List Subject: RE: switch statement If your options are well known (if you were going to use a switch they are), create a Map with the strings as the key and the integer as the value, store in application scope; load them from a properties file or some other source; this will give you more flexibility. Would that work? A little bit more coding, but useful in the end. >>-Original Message- >>From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] >>Sent: Thursday, June 05, 2003 11:52 AM >>To: 'Struts Users Mailing List' >>Subject: RE: switch statement >> >>Because having descriptive values for parameters helps make your code more >>understandable, both for yourself and for others. >> >>It's not a big deal, I'll just use the if statements. >> >> >>Keith Kamholz >>Programming and Architecture >>Moog Inc. >> >>Phone: (716) 687-7001 >> >> >> >>-Original Message- >>From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] >>Sent: Thursday, June 05, 2003 11:49 AM >>To: 'Struts Users Mailing List' >>Subject: RE: switch statement >> >> >>Why don't you send a parameter that can be converted into an int then? >> >>-Richard >> >> >>> -Original Message- >>> From: Kamholz, Keith (corp-staff) USX [SMTP:[EMAIL PROTECTED] >>> Sent: Thursday, June 05, 2003 8:42 AM >>> To: 'Struts Users Mailing List' >>> Subject:RE: switch statement >>> >>> The reason I wanted to do this was to make my Action classes cleaner. I >>> send a parameter to the Action to determine which item to pull from a >>> database, then forward to a certain page. >>> >>> I didn't think I could get the switch to work, it was worth a try though. >>> For a situation like mine, what do you all find to be the best way of >>> doing >>> this? I know I can use a series of if statements, it's just not very >>> pretty... >>> >>> >>> Keith Kamholz >>> Programming and Architecture >>> Moog Inc. >>> >>> Phone: (716) 687-7001 >>> >>> >>> >>> -Original Message- >>> From: Erik Price [mailto:[EMAIL PROTECTED] >>> Sent: Thursday, June 05, 2003 11:38 AM >>> To: Struts Users Mailing List >>> Subject: Re: switch statement >>> >>> >>> >>> >>> Kamholz, Keith (corp-staff) USX wrote: >>> > Hey everyone, >>> > This is more of a Java question than a Struts question, I hope you all >>> don't >>> > mind. >>> >>> Not really, but for future reference I have found this resource to be >>> more helpful for such questions: >>> >>> http://forum.java.sun.com/forum.jsp?forum=31 >>> >>> > I'm just wondering if there is any way to use a String for a switch >>> > statement, or if you are restricted to the true primitive types. >>> > I haven't found a way, but it seems like something that lots of people >>> would >>> > want that wouldn't be hard for the Java developers to allow for. >>> > Wouldn't you agree? >>> >>> The reason why it doesn't work is probably specific to the >>> implementation of the language (maybe performance reasons), but a lot of >>> people don't miss it -- nor would they agree, I suspect. The reason is >>> that you can usually add behaviors to objects so that a single >>> polymorphic method call can usually eliminate all of the infrastructural >>> work of writing a switch statement, so doing a switch on an object >>> doens't make much sense in that context. Of course, this is not >>> applicable in all senses, such as your case with String which is final >>> >>> >>> >>> >>> >>> Erik >>> >>> >>>
RE: switch statement
Because having descriptive values for parameters helps make your code more understandable, both for yourself and for others. It's not a big deal, I'll just use the if statements. Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:49 AM To: 'Struts Users Mailing List' Subject: RE: switch statement Why don't you send a parameter that can be converted into an int then? -Richard > -Original Message- > From: Kamholz, Keith (corp-staff) USX [SMTP:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 8:42 AM > To: 'Struts Users Mailing List' > Subject: RE: switch statement > > The reason I wanted to do this was to make my Action classes cleaner. I > send a parameter to the Action to determine which item to pull from a > database, then forward to a certain page. > > I didn't think I could get the switch to work, it was worth a try though. > For a situation like mine, what do you all find to be the best way of > doing > this? I know I can use a series of if statements, it's just not very > pretty... > > > Keith Kamholz > Programming and Architecture > Moog Inc. > > Phone: (716) 687-7001 > > > > -Original Message- > From: Erik Price [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 11:38 AM > To: Struts Users Mailing List > Subject: Re: switch statement > > > > > Kamholz, Keith (corp-staff) USX wrote: > > Hey everyone, > > This is more of a Java question than a Struts question, I hope you all > don't > > mind. > > Not really, but for future reference I have found this resource to be > more helpful for such questions: > > http://forum.java.sun.com/forum.jsp?forum=31 > > > I'm just wondering if there is any way to use a String for a switch > > statement, or if you are restricted to the true primitive types. > > I haven't found a way, but it seems like something that lots of people > would > > want that wouldn't be hard for the Java developers to allow for. > > Wouldn't you agree? > > The reason why it doesn't work is probably specific to the > implementation of the language (maybe performance reasons), but a lot of > people don't miss it -- nor would they agree, I suspect. The reason is > that you can usually add behaviors to objects so that a single > polymorphic method call can usually eliminate all of the infrastructural > work of writing a switch statement, so doing a switch on an object > doens't make much sense in that context. Of course, this is not > applicable in all senses, such as your case with String which is final > > > > > > Erik > > > - > 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: switch statement
The reason I wanted to do this was to make my Action classes cleaner. I send a parameter to the Action to determine which item to pull from a database, then forward to a certain page. I didn't think I could get the switch to work, it was worth a try though. For a situation like mine, what do you all find to be the best way of doing this? I know I can use a series of if statements, it's just not very pretty... Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:38 AM To: Struts Users Mailing List Subject: Re: switch statement Kamholz, Keith (corp-staff) USX wrote: > Hey everyone, > This is more of a Java question than a Struts question, I hope you all don't > mind. Not really, but for future reference I have found this resource to be more helpful for such questions: http://forum.java.sun.com/forum.jsp?forum=31 > I'm just wondering if there is any way to use a String for a switch > statement, or if you are restricted to the true primitive types. > I haven't found a way, but it seems like something that lots of people would > want that wouldn't be hard for the Java developers to allow for. > Wouldn't you agree? The reason why it doesn't work is probably specific to the implementation of the language (maybe performance reasons), but a lot of people don't miss it -- nor would they agree, I suspect. The reason is that you can usually add behaviors to objects so that a single polymorphic method call can usually eliminate all of the infrastructural work of writing a switch statement, so doing a switch on an object doens't make much sense in that context. Of course, this is not applicable in all senses, such as your case with String which is final Erik - 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: calling actions directly
Right, I'm running Websphere and we couldn't get it to work. However, I just upgraded to version 5. Does anyone know if changes in v5 allow the web-inf trick to work? Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:09 AM To: Struts Users Mailing List Subject: RE: calling actions directly Unfortunately, not all web containers will support this. There was apparent disagreement on the interpretation of the specification in this area. In particular, WebLogic does not support this. I believe, however, that in version 8.1 it's possible to do this, although I believe you have to set some non-standard configuration flag. I don't know the details. The alternative is to put all JSP pages into a security constraint on a role that no user is set to. > -Original Message- > From: Nathan Pitts [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 8:02 AM > To: Struts Users Mailing List > Subject: Re: calling actions directly > > Brian, > > If you put all your jsp's inside a the WEB-INF directory, they will not > be accessible directly -- only through an action. I think this is part > of the jsp specification that nothing can be directly served out of > this special directory..Otherwise, a user could pull up configuration > files that reside there -- web.xml for example.For example, I have > a directory structure containing jsp's under WEB-INF/jsp in my current > web applicationHope this helps! > --nathan > > > On Thursday, June 5, 2003, at 09:47 AM, Brian McSweeney wrote: > > > Ah yes, > > > >> Perhaps what you're thinking of is that JSP files should not be called > >> directly or bookmarked. They should be hidden from the user > >> completely, > > and > >> only accessible through an action. > > > > that was it - sorry - stupid of me. > > Could you tell me how to secure the jsps so that they are only a > > result of > > the action? > > cheers, > > Brian > > > > > > - Original Message - > > From: "Kruse, Matt" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Thursday, June 05, 2003 3:12 PM > > Subject: RE: calling actions directly > > > > > >>> I read that one of the things about struts is the actions are > >>> only able to be called from the pages directly. Ie, you > >>> shouldn't be able to bookmark the actions themselves like: > >>> http://myhost/myaction.do > >> > >> Where did you hear this? That's totally not true - any action can be > > called > >> directly as long as it has a mapping. It's just a URL. Otherwise, how > > would > >> you enter the first action? :) > >> > >> Perhaps what you're thinking of is that JSP files should not be called > >> directly or bookmarked. They should be hidden from the user > >> completely, > > and > >> only accessible through an action. > >> > >> Matt Kruse > >> > >> > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > = > Nathan Pitts > Programmer Analyst > Texas Animal Health Commission > = > > > - > 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]
switch statement
Hey everyone, This is more of a Java question than a Struts question, I hope you all don't mind. I'm just wondering if there is any way to use a String for a switch statement, or if you are restricted to the true primitive types. I haven't found a way, but it seems like something that lots of people would want that wouldn't be hard for the Java developers to allow for. Wouldn't you agree? Keith Kamholz Programming and Architecture Moog Inc. Phone: (716) 687-7001 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]