InvokeAction (action chaining)
I am working with the 1/31/02 nightly build. The release notes show that the following was added: Add InvokeAction and CreateActionForm methods to allow direct chaining of Actions. Yet neither method shows in the javadoc or binaries. Does anyone know the status of these methods? Thanks much Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
collecting parameters from a dynamic form
I have a dynamic form that is built from an ArrayList of objects (see below (b) ). Building the form works great. I get multiple rows of widget names and values. However, I can't seem to collect the data in my Action. The HTML that is rendered just repeats the same named input fields (see below (b)). In my action, my widget ArrayList comes in with the right number of objects, but they are blank (no data has been collected from the form). A request.getParameter(name)); request.getParameter(value)); works, but of course only returns one of the sets of data - the first in the form. So I can't seem to retrieve the multiple values from in my Action class in any way. Am I doing something that can't be done? (a) input type=text name=name input type=text name=value input type=text name=name input type=text name=value (b) html:form action=/saveWidgets logic:iterate id=element name=widgetForm property=widgets table tr th Widget Name /th td html:text name=element property=name /td /tr tr th Widget Value /th td html:text name=element property=value /td /tr /logic:iterate /html:form Thanks Jeff http://www.xns.org/=jeffoberlander -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: collecting parameters from a dynamic form
The issue is one of distinct element names when you use an iterator to create your form. I found the solution by way of the indexed=true property of html:text It produces a parameter name of element[0].name - where element is the name given to the iterator object and the bracket represents the index of the iterator. Apparently this is new though because I had to install the nightly build in order to use it. Jeff -Original Message- From: Marcus Brito [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 10:40 AM To: Struts Users Mailing List Subject: Re: collecting parameters from a dynamic form Em Seg, 2002-02-04 às 14:11, Jeff Oberlander escreveu: request.getParameter(name)); request.getParameter(value)); works, but of course only returns one of the sets of data - the first in the form. Take a look at the HttpServletRequest API. If you need to get multiple values for a parameter, you need to use the getParameterValues() method. -- Ja ne, Pazu mailto: [EMAIL PROTECTED] Anime Gaiden: de fãs para fãs, sempre. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamic form action flow
Actually, it doesn't. I've been through that example pretty thouroughly. To add a new subscription, it puts up a form with only the fields for the new subscription (a separate page). It doesn't dynamically new form fields to an existing page. -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:05 AM To: 'Struts Users Mailing List' Subject: RE: dynamic form action flow Hi Jeff, The struts-example.war app does just this, except it uses subscriptions instead of phone numbers. It's part of the struts download, under webapps. Jon. -Original Message- From: Jeff Oberlander [mailto:[EMAIL PROTECTED]] Sent: 01 February 2002 06:08 To: '[EMAIL PROTECTED]' Subject: dynamic form action flow Ok, I've wasted an embarrassing amount of time on this and would appreciate any help. Its night now and no progress has been made. This is another action flow question. Maybe there is a sample somewhere that does this? I apologize that this is long. I have an action form that contains an ArrayList of items (lets say phone numbers). The form allows me to edit existing numbers or add new ones. When I go to the editPhoneNumbers.jsp page, it displays all of my phone numbers based on the ArrayList with a button to add another and a button to save the form. I start with a single phone number - e.g. my home number. If you hit add, the form should be re-displayed with 2 phone number fields - my home one, and a new blank one - both editable. This is the action flow I currently have: editPhoneNumbers.do -- EditPhoneNumberAction.java (input is PhoneNumberForm - containing an ArrayList of numbers) - this loads my current phone numbers from the data store into the form. EditPhoneNumberAction -- editPhoneNumber.jsp - this displays the form. editPhoneNumber.jsp -- SavePhoneNumberAction.java (action = add | save) SavePhoneNumberAction.java - if the action is add, I add an empty PhoneNumber object to the ActionForm ArrayList, then I want to redisplay the form with the original item, and the blank new one. SavePhoneNumberAction.java -- editPhoneNumbers.do Loop is complete. I thought this would be as simple as adding a new item to the ArrayList in the form and forwarding on the original form. It doesn't work. I keep getting back (in the display) only my home phone number (the original form without the new object) I suspect it is related to this log message: Recycling existing ActionForm bean instance of class . Another interesting point is even though I explicitly set the action property of the form in SavePhoneNumberAction, it always comes into EditPhoneNumberAction as null. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamic form action flow
I've tried going straight to the display page and then I get the new, blank element and form, but lose the prior existing form fields (home phone). -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 4:14 AM To: Struts Users Mailing List Subject: Re: dynamic form action flow SavePhoneNumberAction.java -- editPhoneNumbers.do It may be that this is looking up the original phone number again. If so, this is also where the recyling message could be coming into it. Do you want to go back through the edit action, or straight to the display page? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Jeff Oberlander wrote: Ok, I've wasted an embarrassing amount of time on this and would appreciate any help. Its night now and no progress has been made. This is another action flow question. Maybe there is a sample somewhere that does this? I apologize that this is long. I have an action form that contains an ArrayList of items (lets say phone numbers). The form allows me to edit existing numbers or add new ones. When I go to the editPhoneNumbers.jsp page, it displays all of my phone numbers based on the ArrayList with a button to add another and a button to save the form. I start with a single phone number - e.g. my home number. If you hit add, the form should be re-displayed with 2 phone number fields - my home one, and a new blank one - both editable. This is the action flow I currently have: editPhoneNumbers.do -- EditPhoneNumberAction.java (input is PhoneNumberForm - containing an ArrayList of numbers) - this loads my current phone numbers from the data store into the form. EditPhoneNumberAction -- editPhoneNumber.jsp - this displays the form. editPhoneNumber.jsp -- SavePhoneNumberAction.java (action = add | save) SavePhoneNumberAction.java - if the action is add, I add an empty PhoneNumber object to the ActionForm ArrayList, then I want to redisplay the form with the original item, and the blank new one. SavePhoneNumberAction.java -- editPhoneNumbers.do Loop is complete. I thought this would be as simple as adding a new item to the ArrayList in the form and forwarding on the original form. It doesn't work. I keep getting back (in the display) only my home phone number (the original form without the new object) I suspect it is related to this log message: Recycling existing ActionForm bean instance of class . Another interesting point is even though I explicitly set the action property of the form in SavePhoneNumberAction, it always comes into EditPhoneNumberAction as null. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Are Vectors in a FormAction set to null after a user has submitted a form?
Vector has been refactored to implement List (which extends Collection) - so it is part of the Collection classes. The differnece is just synchronization, which may be necessary in certain cases. They both have their place. -Original Message- From: Borislav Iordanov [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 11:35 AM To: Struts Users Mailing List Subject: Re: Are Vectors in a FormAction set to null after a user has submitted a form? Well, for one thing, Vectors are synchronized and ArrayLists aren't. So the latter are faster (I've heard something like 20% faster) and preferable when you don't need synchronization. Same goes for Hashtable vs. HashMap and in general old vs new collection classes. Boris On Fri, 01 Feb 2002, you wrote: Hi Chuck, I use Vector all the time. I'm curious why who feel that List/ArrayList is preferable. Dave D - Original Message - From: Chuck Cavaness [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 01, 2002 2:37 AM Subject: Re: Are Vectors in a FormAction set to null after a user has submitted a form? p.s. Is anyone really using the Vector class anymore? Why aren't you using List/ArrayList? Just curious. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: dynamic form action flow
I figured this out finally, thanks to the Vectors in Form thread today, which turned out to be similar It was 2 things: 1) The scope in my struts-config was request and should have been session. 2) Upon adding a new blank object to the ArrayList for re-display, instead of forwarding to the editPhoneNumbers.do action, directly re-display the jsp. -Original Message- From: Jeff Oberlander Sent: Friday, February 01, 2002 7:39 AM To: 'Struts Users Mailing List' Subject: RE: dynamic form action flow I've tried going straight to the display page and then I get the new, blank element and form, but lose the prior existing form fields (home phone). -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 4:14 AM To: Struts Users Mailing List Subject: Re: dynamic form action flow SavePhoneNumberAction.java -- editPhoneNumbers.do It may be that this is looking up the original phone number again. If so, this is also where the recyling message could be coming into it. Do you want to go back through the edit action, or straight to the display page? -- Ted Husted, Husted dot Com, Fairport NY USA. -- Java Web Development with Struts. -- Tel +1 585 737-3463. -- Web http://www.husted.com/struts/ Jeff Oberlander wrote: Ok, I've wasted an embarrassing amount of time on this and would appreciate any help. Its night now and no progress has been made. This is another action flow question. Maybe there is a sample somewhere that does this? I apologize that this is long. I have an action form that contains an ArrayList of items (lets say phone numbers). The form allows me to edit existing numbers or add new ones. When I go to the editPhoneNumbers.jsp page, it displays all of my phone numbers based on the ArrayList with a button to add another and a button to save the form. I start with a single phone number - e.g. my home number. If you hit add, the form should be re-displayed with 2 phone number fields - my home one, and a new blank one - both editable. This is the action flow I currently have: editPhoneNumbers.do -- EditPhoneNumberAction.java (input is PhoneNumberForm - containing an ArrayList of numbers) - this loads my current phone numbers from the data store into the form. EditPhoneNumberAction -- editPhoneNumber.jsp - this displays the form. editPhoneNumber.jsp -- SavePhoneNumberAction.java (action = add | save) SavePhoneNumberAction.java - if the action is add, I add an empty PhoneNumber object to the ActionForm ArrayList, then I want to redisplay the form with the original item, and the blank new one. SavePhoneNumberAction.java -- editPhoneNumbers.do Loop is complete. I thought this would be as simple as adding a new item to the ArrayList in the form and forwarding on the original form. It doesn't work. I keep getting back (in the display) only my home phone number (the original form without the new object) I suspect it is related to this log message: Recycling existing ActionForm bean instance of class . Another interesting point is even though I explicitly set the action property of the form in SavePhoneNumberAction, it always comes into EditPhoneNumberAction as null. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
dynamic form action flow
Ok, I've wasted an embarrassing amount of time on this and would appreciate any help. Its night now and no progress has been made. This is another action flow question. Maybe there is a sample somewhere that does this? I apologize that this is long. I have an action form that contains an ArrayList of items (lets say phone numbers). The form allows me to edit existing numbers or add new ones. When I go to the editPhoneNumbers.jsp page, it displays all of my phone numbers based on the ArrayList with a button to add another and a button to save the form. I start with a single phone number - e.g. my home number. If you hit add, the form should be re-displayed with 2 phone number fields - my home one, and a new blank one - both editable. This is the action flow I currently have: editPhoneNumbers.do -- EditPhoneNumberAction.java (input is PhoneNumberForm - containing an ArrayList of numbers) - this loads my current phone numbers from the data store into the form. EditPhoneNumberAction -- editPhoneNumber.jsp - this displays the form. editPhoneNumber.jsp -- SavePhoneNumberAction.java (action = add | save) SavePhoneNumberAction.java - if the action is add, I add an empty PhoneNumber object to the ActionForm ArrayList, then I want to redisplay the form with the original item, and the blank new one. SavePhoneNumberAction.java -- editPhoneNumbers.do Loop is complete. I thought this would be as simple as adding a new item to the ArrayList in the form and forwarding on the original form. It doesn't work. I keep getting back (in the display) only my home phone number (the original form without the new object) I suspect it is related to this log message: Recycling existing ActionForm bean instance of class . Another interesting point is even though I explicitly set the action property of the form in SavePhoneNumberAction, it always comes into EditPhoneNumberAction as null. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Navigation: To popup and back
This is an intranet app and the popup won't be an issue. The popup acts as a simple Yes/No dialog box for the app. I'll try the self.close approach. Thanks for the responses. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 5:42 PM To: [EMAIL PROTECTED] Subject: RE: Navigation: To popup and back Oh absolutely -- I would never rely on a popup on a site on the public internet. I was thinking intranet app... -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 8:29 PM To: Struts Users Mailing List Subject: Re: Navigation: To popup and back There are several shareware apps that will prevent popups. They are the most annoying beasts! Mark - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 28, 2002 8:18 PM Subject: RE: Navigation: To popup and back Cant you also do a timeout() method call? Not my forte, but do recall something about this... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 29 January 2002 12:24 To: [EMAIL PROTECTED] Subject: RE: Navigation: To popup and back have the action forward to a page that loads a document containing a javascript handler in the body tag: body onload=self.close() As long as you opened the popup from another page via javascript, you won't get any nasty messages about closing the window. Lee -Original Message- From: Jeff Oberlander [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 8:07 PM To: Struts Users Mailing List (E-mail) Subject: Navigation: To popup and back Hi all. Here's what I want to do: From a current active session: Popup a new browser window that contains an ActionForm, and keeps the current session. Submit the form to the Action servlet. Close the popup window. Return to the main browser and original window. I have a javascript that pops up the window that contains my jsp with the ActionForm, no problem. But thats where I get stuck. How do I close the window upon submitting the form and return to the original browser *after* the Action has completed? Any help is appreciated. Thanks - Jeff http://www.xns.org/=jeffo 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. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Basic (esoteric) Question
Indirectly yes. A declared exception (Checked) forces the caller to implement code to check for that exception. So there is overhead to the client and it can make the API more complex for the client. Generally, throw a checked exception for conditions the caller can expect to recover. Unchecked exceptions (subclasses of RuntimeException) typically mean that the error is not recoverable and programming errors - thus the client will fail, but you've eliminated the client code checking for the exceptions. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 8:46 AM To: Servlets (E-mail); J2ee (E-mail); Struts (E-mail) Subject: Basic (esoteric) Question Does anybody know of any design considerations that would affect the performance of a method that declares a throws in its signature vs. an exception that is either caught or thrown new in the try-catch block? Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Basic (esoteric) Question
Not quite. Placing a throws clause of a *RuntimeException* will not cause a compile error, but it is not necessary - it misleads the caller into thinking they should program for it. Its best to just javadoc the RuntimeExceptions with @throws, and not to declare them in the signature. Bottom line: Best practice is to put a throws clause in the signature when the checked exception is *recoverable* by the client. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 9:26 AM To: 'Struts Users Mailing List' Subject: RE: Basic (esoteric) Question So, if I understand you correctly, placing a throws clause in the signature for a runtime error does not burden the client, whereas the same for a checked exception will burden the client (force the client to traverse the exception tree)? Does this operate similarly within a try-catch block? -Original Message- From: Jeff Oberlander [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 12:20 PM Indirectly yes. A declared exception (Checked) forces the caller to implement code to check for that exception. So there is overhead to the client and it can make the API more complex for the client. Generally, throw a checked exception for conditions the caller can expect to recover. Unchecked exceptions (subclasses of RuntimeException) typically mean that the error is not recoverable and programming errors - thus the client will fail, but you've eliminated the client code checking for the exceptions. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 8:46 AM To: Servlets (E-mail); J2ee (E-mail); Struts (E-mail) Subject: Basic (esoteric) Question Does anybody know of any design considerations that would affect the performance of a method that declares a throws in its signature vs. an exception that is either caught or thrown new in the try-catch block? Mark -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Navigation: To popup and back
Hi all. Here's what I want to do: From a current active session: Popup a new browser window that contains an ActionForm, and keeps the current session. Submit the form to the Action servlet. Close the popup window. Return to the main browser and original window. I have a javascript that pops up the window that contains my jsp with the ActionForm, no problem. But thats where I get stuck. How do I close the window upon submitting the form and return to the original browser *after* the Action has completed? Any help is appreciated. Thanks - Jeff http://www.xns.org/=jeffo 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. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Instantiating a Java Class
You need an import statement for the class in the page tag. %@ page language=java import=tr % if there is no further package structure, it will look for tr.class in web-inf/classes if there is a package structure, then the import needs it: %@ page language=java import=com.acme.something.tr % -Original Message- From: Syed Niaz [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 1:00 PM To: Struts Users Mailing List Subject: Instantiating a Java Class Hi Iam a novice to Struts and need your help . My jsp is this - %@ page language=java % %@ taglib uri=/WEB-INF/app.tldprefix=app % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % % tr xyz = new tr() ; % - When executed , javax.servlet.ServletException: org/apache/jsp/tr Root cause : java.lang.NoClassDefFoundError: org/apache/jsp/tr I have included org/apache/jsp/tr at almost every level of folders . Any idea why this occurs . Where is it actually expecting the tr.class file to be ? Thanks Syed -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to redirect to login page
Set a session variable in first.jsp, then create a custom tag that checks for that session variable and place the custom tag in second.jsp and third.jsp. If the session variable isn't there, forward to first.jsp. The sample app does this exact process with the CheckLogonTag. Go look at how that works. Jeff -Original Message- From: Sivasankaran, Vijay [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 10:18 AM To: '[EMAIL PROTECTED]' Subject: How to redirect to login page Hi, I have three jsp which uses the struts framework first.jsp-second.jsp-third.jsp the second.jsp and third.jsp use the action form data of the first.jsp using html:text tag. All these works fine. But this poses a problem. I want the user to be redirected to first.jsp whenever they access second.jsp and third.jsp directly without going through first.jsp. At present when i access second.jsp or third.jsp directly it errors out. Is there a graceful way in struts to redirect it to first.jsp? Thanks Vijay -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: resources location
It needs to be somewhere in the classpath. Each app server uses their own implementation of the classloader, so it will be dependent on the classpath of your app based on the server. web-inf/classes is in the classpath, but the directory above that typically isn't. -Original Message- From: Witt, Mike (OH35) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 5:00 PM To: Struts Users Mailing List Subject: RE: resources location I'm not sure what you might be doing wrong, but why not put it in your build script (like ant's build.xml) to copy the file from the source location to within the hierachy? Mike -Original Message- From: Bill Page [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 7:57 PM To: [EMAIL PROTECTED] Subject: resources location I've gotten struts installed, integrated, and working in the application we're building for a few days now. However I want to move the resources property file somewhere else. It is currently sitting in com.mycomp.pkg: and the application parameter in web.xml specifies that. I can move it up this hierarchy and put it under classes, take off the structure from the parameter in web.xml and everything is fine. What I need to is to move it out of this hierachy altogether. I want to get it to a place where someone can update it who I don't want to allow access to anything under WEB-INF. I've tried to use / as the root under my application noting that the config parameter uses that. I've tried a relative from path the classes directory. Nothing seems to work except anywhere under WEB-INF/classes. Is this possible? What might I be doing wrong? tia bill page [EMAIL PROTECTED] Digital Garden Software, Inc. 856 US Hwy 206 Bldg B Ste 15 Hillsborough, NJ 08844 908.904.0664 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
iterate tag problems
Been through the archive, and the logic-present.jsp in the sample distributions but nothing has solved this yet. I am simply adding an ArrayList of String to a request in my action. I've added 3 Strings to oMessages: request.setAttribute(messages,oMessages); RELEVANT JSP : %@ taglib uri=/WEB-INF/tlds/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/tlds/struts-logic.tld prefix=logic % logic:present name=messages logic:iterate id=item name=messages liInfo: bean:write name=item //li /logic:iterate /logic:present OUTPUT: Info: Info: Info: So it is iterating through the 3 items, but is writing nothing. What am I missing?? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: action configuration
Are you using the html:base/ tag? -Original Message- From: Henrik Chua [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 3:14 PM To: Struts Users Mailing List (E-mail) Subject: action configuration Hi! I am having a problem with struts. I am running an iPlanet web server 6 sp1. The problem is I am having an error referencing my action class. My URI is just / and when I try to do an action like /logon.do the url changes from http://localhost/logon.jsp into http://logon.do instead of http://localhost/logon.do what should i change?! thanx in advance henrik -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Application resources and logic:notPresent
Thanks Keith. It turns out that the name=org.apache.struts.action.MESSAGE was ok. Turns out I was simply missing the taglib uri=/WEB-INF/tlds/struts-logic.tld. Being new to struts, I would have guessed that would've given me a jsp compile error but it doesn't. -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 3:54 AM To: Struts Users Mailing List Subject: Re: Application resources and logic:notPresent Hi Jeff, is it because name=org.apache.struts.action.MESSAGE is the class name of the messages when you should specify the attribute name that class has been stored under? (It'll be defined as a constant somewhere but I don't know where off-hand). Keith. --- Jeff Oberlander [EMAIL PROTECTED] wrote: I am seeing conflicting behavior with application resources. This is basic stuff, but I haven't found an answer in the archives. First, in my index.jsp I can do the following: bean:message key=test.message/ It successfully displays my test text message from my ApplicationResources file. But, when I also try to execute the logic:notPresent code as given in the example: logic:notPresent name=org.apache.struts.action.MESSAGE scope=application font color=red ERROR: Application resources not loaded -- check servlet container logs for error messages. /font /logic:notPresent It results in displaying the red not loaded message. How can it be that this logic:notPresent thinks the resources aren't there, but the bean:message can retrieve them just fine? Thanks much Jeff http://www.xns.org/=jeffoberlander -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JSPs under WEB-INF/pages/ -- how to include in WAR file using ANT?
You need to move your input directory up a level like: webinf dir=${deploy.home}/WEB-INF/ / If that upper dir has extra things you don't want in the distribution, use includes: webinf dir=${deploy.home}/WEB-INF/ include name=pages/*.jsp/ /webinf -Original Message- From: Barry L. Kline [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 11:19 AM To: [EMAIL PROTECTED] Subject: JSPs under WEB-INF/pages/ -- how to include in WAR file using ANT? I have taken to heart everyone's suggestions and have placed my JSPs under the WEB-INF/pages directory. So far, no problem. When I use ANT's war task I can't seem to get the directory structure to remain intact. e.g.: WEB-INF/pages/mypage.jsp WEB-INF/pages/mypage2.jsp becomes: WEB-INF/mypage.jsp WEB-INF/mypage2.jsp I've tried: webinf dir=${deploy.home}/WEB-INF/pages / and webinf dir=${deploy.home}/WEB-INF/pages/ / both with the same result. The docs indicate that using the webinf element is what I should use. Any suggestions? Thanks Barry -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]