LookUpDispatchAction :does not contain handler parameter named ...
Hi! I am getting an exception which reads like this : *:does not contain handler parameter named empfieldsaction * I have the following jsp. html:form action=StartCustomFieldCreation.do input type = hidden name=module value=Leads Leads Custom Fields nbsp; html:submit property=empfieldsaction /html:submit /html:form br My struts-config-temp.xml entry is : action path=/StartCustomFieldCreation type=com.adventnet.hrms.action.DataTypePopulateAction name=fieldDetailsForm scope=request parameter=empfieldsaction forward name=addnewfield path=hrms.field_datatype/ /action I use partitioned struts-config.xml file . In the particular case, I have used struts-config-temp.xml file StartCustomFieldCreation.do invokes a LookupDispatchAction. PLease help. *Richie*
Re: struts.meetup.com (Re: [OT] Struts users in [my city, my country])
On 2004-05-24 at 16:18:18 -0500, Joe Germuska wrote: At 2:04 PM -0700 5/24/04, Wiebe de Jong wrote: Ok. I've signed up as the first user in Vancouver. Now I just have to wait for somebody else to signup... yes, at only 45 members, it's not really on-fire yet! Especially now its 64 (one of them in Austria) that means 19 new members in 36 hours, hope the other thousands will also join :) .. cheers, Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
display master child records using jps,logic:iterate
Hi all, if we have a master/child relationship to show after execution of action/execute, how shld we create the beans to display this using jsp and logic:iterate ?? i tried creating 2 beans (one each for master and child) but it is difficult to match master record with child . The output needs to be like - 1Master rec first Child rec 1 child rec 2 child rec 3 2)master rec second child rec 1 child rec 2 child rec 3 and so on .. how this can be achieved using beans ? I am relatively new to struts ...so please help me thanks in advance Rgds Rahul Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
scope and presenting realtime data
Hi, We are developing a web based interface (struts + jsp etc) for realtime monitoring of server cpu usage. We have written a bean that will contact the server and get the current cpu usage and return that value. I want to plot a line graph (using jfreechart) with the cpu usage in Y-axis and time in X-axis. The Graph need to plot the last 'N' values + the current value during each refresh. The issue is how to remember these last N values. I do not want to assign session scope for this object as the end-user might monitor for more than one servers and several users might be using the system at same time. How this situation is typically handled in the Struts+jsp environment. thanks regards -Ramudu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple validation.xml
Is it possible to use multiple validation.xml files concurrently ? We're about to launch a fairly large projetct and I see issues where one developer has validation.xml checked out when another one needs to edit it as a possible problem. //Linus Nikander - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple validation.xml
In a sense everyone does just this when they declare their plugin as such: plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml property=pathnames/ It's just you put all the project specific stuff into one. Can't imagine why adding more files to it wouldn't work (although could introduce it's own set of confuscation) -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Linus Nikander Sent: Wednesday, May 26, 2004 5:46 AM To: [EMAIL PROTECTED] Subject: Multiple validation.xml Is it possible to use multiple validation.xml files concurrently ? We're about to launch a fairly large projetct and I see issues where one developer has validation.xml checked out when another one needs to edit it as a possible problem. //Linus Nikander - - 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: Multiple validation.xml
Linus Nikander wrote: Is it possible to use multiple validation.xml files concurrently ? We're about to launch a fairly large projetct and I see issues where one developer has validation.xml checked out when another one needs to edit it as a possible problem. //Linus Nikander - If you use CVS it should be no problem to have file which is edited by two persons at one time. As XML files are text-only files CVS can do merges. We are using this for our projects too and don't have any difficulties. I don't think it's a good alternative that you will create several XML files. Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error in using bean:size tag
Hi , I have used bean:size tag and getting JspException as shown below bean:size id=nattachments name=dataInputForm property=attachments / Pls can anybody guess the problem. Thanks. Thanks, HAri. ** javax.servlet.jsp.JspException at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:875) at org.apache.struts.taglib.bean.SizeTag.doStartTag(SizeTag.java:192) at jsp_servlet._privatejsp.__ew_data_input._jspService(__ew_data_input.java:190 7) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle tStubImpl.java:1053) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :387) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :305) at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDis patcherImpl.java:382) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec t.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp l.java:286) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 33) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces sor.java:436) at org.apache.struts.action.RequestProcessor.processActionForward(RequestProces sor.java:401) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1426) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:527) at com.gefa.esg.scc.servlet.SCCActionServlet.doPost(SCCActionServlet.java:277) at com.gefa.esg.scc.servlet.SCCActionServlet.doGet(SCCActionServlet.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle tStubImpl.java:1053) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :387) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W ebAppServletContext.java:6310) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec t.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:3622) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :2569) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: Virus Alert
- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Links relative to jsp not action in Opera
When our webpages are viewed with opera all our links are relative to the jsp used (within tiles) not the actual url/action given. Is there some way of changing the response so that the url is correct and relative links don't reference the jsp? Mick. -- -- BR/ It is not enough to have a good mind; the main thing is to use it well. Descartes BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Links relative to jsp not action in Opera
Opera should know nothing about your jsp, unless you are doing something else wrong. Are you using redirects or forwards? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Mick Wever [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 7:02 AM Subject: Links relative to jsp not action in Opera When our webpages are viewed with opera all our links are relative to the jsp used (within tiles) not the actual url/action given. Is there some way of changing the response so that the url is correct and relative links don't reference the jsp? Mick. -- -- BR/ It is not enough to have a good mind; the main thing is to use it well. Descartes BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - 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: Links relative to jsp not action in Opera
On Wed, 26 May 2004 07:14:52 -0400, James Mitchell wrote: Opera should know nothing about your jsp, unless you are doing something else wrong. Are you using redirects or forwards? Indeed I would think so too. There are naturally no differents in the html source between the different browsers, and the links are definitely relative, but Opera bases the links relative to the last requested jsp not the request url, hence this last-requested-jsp information must be stored somewhere in the response... So, how to I change it back to the original request url before the response is sent? Mick ps there are forwards and tiles involved. -- -- BR/ To be young, really young, takes a very long time. Picasso BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Struts Users in London / meet+greet / pub / networking / BO F? / pre J1
UK Struts Users We have three people (including myself) who are meeting for informal drinks on Wednesday 9th June 2004 19:15 GMT @ Waxy O'Connor (Irish Pub) in central London, the West End. Peter Pilgrim Tim Penhey Niall Pemberton If there's anyone else interested please contact me off-list. -- Peter Pilgrim Operations/IT - Credit Suisse First Boston, 10 South Colonnade, London E14 4QJ, United Kingdom Tel: +44 (0)207 883 4447 -Original Message- From: Niall Pemberton [mailto:[EMAIL PROTECTED] Sent: 26 May 2004 00:59 To: Tim Penhey; Pilgrim, Peter; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [OT] Struts Users in London / meet+greet / pub / networking / BO F? / pre J1 Me too. - Original Message - From: Tim Penhey [EMAIL PROTECTED] To: Pilgrim, Peter [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:51 PM Subject: RE: [OT] Struts Users in London / meet+greet / pub / networking / BO F? / pre J1 I'll pencil that in. -Original Message- From: Pilgrim, Peter [mailto:[EMAIL PROTECTED] Sent: 25 May 2004 16:29 To: Pilgrim, Peter; 'Tim Penhey'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject: RE: [OT] Struts Users in London / meet+greet / pub / networking / BO F? / pre J1 All How about Waxy O'conners situated between Picadilly Circus and Leicester Square on Wednesday 9th June 2004 starting say 7:00 - 7:15 pm Waxy O'Connors 14 - 16 Rupert Street, W1D 6DF http://www.londontown.com/LondonInformation/Bars_and_Clubs/Wax y_OConnors/771d/ == This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Links relative to jsp not action in Opera
Do you have a base tag inside your htmlhead ? -Oorspronkelijk bericht- Van: Mick Wever [mailto:[EMAIL PROTECTED] Verzonden: woensdag 26 mei 2004 13:17 Aan: [EMAIL PROTECTED] Onderwerp: Re: Links relative to jsp not action in Opera On Wed, 26 May 2004 07:14:52 -0400, James Mitchell wrote: Opera should know nothing about your jsp, unless you are doing something else wrong. Are you using redirects or forwards? Indeed I would think so too. There are naturally no differents in the html source between the different browsers, and the links are definitely relative, but Opera bases the links relative to the last requested jsp not the request url, hence this last-requested-jsp information must be stored somewhere in the response... So, how to I change it back to the original request url before the response is sent? Mick ps there are forwards and tiles involved. -- -- BR/ To be young, really young, takes a very long time. Picasso BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a -- - - 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]
scope and presenting realtime data (fwd)
Hi, Can anyone suggest some approach for this issue. thanks regards -Ramudu -- Forwarded message -- Date: Wed, 26 May 2004 14:52:23 +0530 (IST) From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: scope and presenting realtime data Hi, We are developing a web based interface (struts + jsp etc) for realtime monitoring of server cpu usage. We have written a bean that will contact the server and get the current cpu usage and return that value. I want to plot a line graph (using jfreechart) with the cpu usage in Y-axis and time in X-axis. The Graph need to plot the last 'N' values + the current value during each refresh. The issue is how to remember these last N values. I do not want to assign session scope for this object as the end-user might monitor for more than one servers and several users might be using the system at same time. How this situation is typically handled in the Struts+jsp environment. thanks regards -Ramudu - 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: Links relative to jsp not action in Opera
On Wed, 26 May 2004 13:28:23 +0200, Kransen, J. wrote: Do you have a base tag inside your htmlhead ? No, but I'm playing around with that now... One problem that arises from using the base tag is browser differences: IE: server name and port required in base href Firefox: base tag doesn't work at all Opera: works great. Mick. -- -- BR/ When prosperity comes, do not use all of it. Confucius BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Links relative to jsp not action in Opera
On Wed, 26 May 2004 13:49:34 +0200, Kransen, J. wrote: You probably already know, but you can use Struts html:base/ tag to dynamically create the base tag. This works great as you don't have to edit the tag if you move the page or change the server for example. It also creates the full http://host/webapp/page.jsp; I'm not sure on how to use the htmml:base tag in the opposite manner, ie the href to be that of the struts action's path not the jsp's path? Mick [The other problem here is in a clustor the server must be the virtual host fronting the clustor not the localhost, although this can be solved it's just an extra pain.] -- -- BR/ Only those who risk going too far can possibly know how far they can really go. T.S. Eliot BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: scope and presenting realtime data (fwd)
Why not store the info in the servlet context, using different keys for each server? That way if several users are all monitoring the same server they will be looking at the same set of data. Since the data is being multithreaded you will need to make sure you synchronize in the appropriate places for which purpose you would probably implement some kind of bean to store this data in an internal collection. You would probably want to merge the functionality of your polling bean with this storeage one, so you would be using one bean instance per server, with all users sharing these beans simultaneously. Id suggest that when the bean is asked to pull data for a particular server it checks to see that a certain period of time has gone by since the last poll. If not you wouldnt bother pulling another value to add to the set.(Id suggest at least a second, and more if you have lots of users). If two users ask for the information within a few milliseconds if each other there is little point doing an extra poll. By the time the graph is redrawn and hits the browser even the most current value will be many milliseconds out of date anyhow and it doesnt make much difference to a human! In terms of 'realtime' presentation you probably dont really want to have the browsers polling the server too much (though it would be easy to do with a javascript timer that refreshes the page), as all the requests will add considerably to your server load (especially since the charts need redrawing). If your setting a minimum polling period as suggested above you would probably also want to try and somehow cache the resulting chart images until such time as new data is available, such that several requests coming in rapidly (probably from different users) could all be serviced with the same image and cut the need to spend server time re-rendering the chart. Thats just my 2 cents worth though so theres probably many better ways of doing it. hth Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 19:42 To: [EMAIL PROTECTED] Subject: scope and presenting realtime data (fwd) Hi, Can anyone suggest some approach for this issue. thanks regards -Ramudu -- Forwarded message -- Date: Wed, 26 May 2004 14:52:23 +0530 (IST) From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: scope and presenting realtime data Hi, We are developing a web based interface (struts + jsp etc) for realtime monitoring of server cpu usage. We have written a bean that will contact the server and get the current cpu usage and return that value. I want to plot a line graph (using jfreechart) with the cpu usage in Y-axis and time in X-axis. The Graph need to plot the last 'N' values + the current value during each refresh. The issue is how to remember these last N values. I do not want to assign session scope for this object as the end-user might monitor for more than one servers and several users might be using the system at same time. How this situation is typically handled in the Struts+jsp environment. thanks regards -Ramudu - 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]
New Struts tutorial in Struts Wiki
Hi all, After a year of using Struts I want to contribute something to the community. So I decided to write a short tutorial on Struts validator framework in Struts wiki http://wiki.apache.org/struts/StrutsBeginnerValidatorFramework I will really appreciate it, if you guys can stop by for a minute to review the tutorial for any errata, especially those Struts Guru in the mailing list :D Regards, Irfandhy Franciscus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: scope and presenting realtime data (fwd)
Hi, Thanks for your response... as you rightly pointed out the data is 'near realtime' not exactly REAL-TIME. Yes.. we need to store in the servlet context.. but what needs to be the scope.. if scope is request, than we can show only the current value. if the scope is session, than this bean (storing + polling bean) will be maintained even when there is no user is currently watching the data. Is there anyway to *invalidate* this storage bean if nobody has accessed it in some past N minutes? I am new to struts so this question might be be too simple.. thanks regards -Ramudu On Wed, 26 May 2004, Andrew Hill wrote: Why not store the info in the servlet context, using different keys for each server? That way if several users are all monitoring the same server they will be looking at the same set of data. Since the data is being multithreaded you will need to make sure you synchronize in the appropriate places for which purpose you would probably implement some kind of bean to store this data in an internal collection. You would probably want to merge the functionality of your polling bean with this storeage one, so you would be using one bean instance per server, with all users sharing these beans simultaneously. Id suggest that when the bean is asked to pull data for a particular server it checks to see that a certain period of time has gone by since the last poll. If not you wouldnt bother pulling another value to add to the set.(Id suggest at least a second, and more if you have lots of users). If two users ask for the information within a few milliseconds if each other there is little point doing an extra poll. By the time the graph is redrawn and hits the browser even the most current value will be many milliseconds out of date anyhow and it doesnt make much difference to a human! In terms of 'realtime' presentation you probably dont really want to have the browsers polling the server too much (though it would be easy to do with a javascript timer that refreshes the page), as all the requests will add considerably to your server load (especially since the charts need redrawing). If your setting a minimum polling period as suggested above you would probably also want to try and somehow cache the resulting chart images until such time as new data is available, such that several requests coming in rapidly (probably from different users) could all be serviced with the same image and cut the need to spend server time re-rendering the chart. Thats just my 2 cents worth though so theres probably many better ways of doing it. hth Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 19:42 To: [EMAIL PROTECTED] Subject: scope and presenting realtime data (fwd) Hi, Can anyone suggest some approach for this issue. thanks regards -Ramudu -- Forwarded message -- Date: Wed, 26 May 2004 14:52:23 +0530 (IST) From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: scope and presenting realtime data Hi, We are developing a web based interface (struts + jsp etc) for realtime monitoring of server cpu usage. We have written a bean that will contact the server and get the current cpu usage and return that value. I want to plot a line graph (using jfreechart) with the cpu usage in Y-axis and time in X-axis. The Graph need to plot the last 'N' values + the current value during each refresh. The issue is how to remember these last N values. I do not want to assign session scope for this object as the end-user might monitor for more than one servers and several users might be using the system at same time. How this situation is typically handled in the Struts+jsp environment. thanks regards -Ramudu - 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: New Struts tutorial in Struts Wiki
There are currently four flavours of Validator ActionForms, so IMO it would be good to say something about this. Your example shows using the ValidatorForm - the alternative is if someone wants to use Dyna forms and the equivalent is DynaValidatorForm, it would be good to show an example of this. Both ValidatorForm and DynaValidatorForm use the form name attribute from the struts-config.xml action mapping to find the validation rules from the validation.xml - there is an alternative to this, which is to use the action's path attribute from the struts-config.xml action mapping - ValidatorActionForm and DynaValidatorActionForm use this mechanism. Niall - Original Message - From: Irfandhy Franciscus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 21, 2004 5:54 PM Subject: New Struts tutorial in Struts Wiki Hi all, After a year of using Struts I want to contribute something to the community. So I decided to write a short tutorial on Struts validator framework in Struts wiki http://wiki.apache.org/struts/StrutsBeginnerValidatorFramework I will really appreciate it, if you guys can stop by for a minute to review the tutorial for any errata, especially those Struts Guru in the mailing list :D Regards, Irfandhy Franciscus - 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: Links relative to jsp not action in Opera
[The other problem here is in a cluster the server must be the virtual host fronting the cluster not the localhost, although this can be solved it's just an extra pain.] According to http://jakarta.apache.org/struts/userGuide/struts-html.html#base you can use two attributes from which one is server. I never tried this one, but it looks like you can enter your virtual host there, possibly after reading it from config file or so Default is request.getServerName(), not localhost. I'm not sure on how to use the html:base tag in the opposite manner, ie the href to be that of the struts action's path not the jsp's path? Indeed it seems impossible to create a base tag containing an action path instead of a jsp path, or at least it didn't work for me. I assume your jsps are not in the root? I once had difficulties with the base tag with jsps not in the webapp root. I ended up placing the jsps in the webapp root. Not sure if this is an option for your project, but maybe you can do the same? I have to warn you that I don't know about tiles, nor can I tell you if that makes the situation different. Just trying to give you hints :-) Jeroen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to renderize a image?
Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo
RE: scope and presenting realtime data (fwd)
neither request nor session. the recommendation was to use the application context (also known as servlet context) This is one context object FOR ALL servlets und users within the same web-application. It would be shard between ALL users of the web-application, so the overhead of keeping it alive even when no user is accessing it, is not exagerated. Else you will have to program (or search for) a caching mechanism with active object invalidation. As this needs to be perfectly synchronized (attention: not over-synchronized), is is not an easy task. hth Alexander -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 26. Mai 2004 14:35 To: Struts Users Mailing List Subject: RE: scope and presenting realtime data (fwd) Hi, Thanks for your response... as you rightly pointed out the data is 'near realtime' not exactly REAL-TIME. Yes.. we need to store in the servlet context.. but what needs to be the scope.. if scope is request, than we can show only the current value. if the scope is session, than this bean (storing + polling bean) will be maintained even when there is no user is currently watching the data. Is there anyway to *invalidate* this storage bean if nobody has accessed it in some past N minutes? I am new to struts so this question might be be too simple.. thanks regards -Ramudu On Wed, 26 May 2004, Andrew Hill wrote: Why not store the info in the servlet context, using different keys for each server? That way if several users are all monitoring the same server they will be looking at the same set of data. Since the data is being multithreaded you will need to make sure you synchronize in the appropriate places for which purpose you would probably implement some kind of bean to store this data in an internal collection. You would probably want to merge the functionality of your polling bean with this storeage one, so you would be using one bean instance per server, with all users sharing these beans simultaneously. Id suggest that when the bean is asked to pull data for a particular server it checks to see that a certain period of time has gone by since the last poll. If not you wouldnt bother pulling another value to add to the set.(Id suggest at least a second, and more if you have lots of users). If two users ask for the information within a few milliseconds if each other there is little point doing an extra poll. By the time the graph is redrawn and hits the browser even the most current value will be many milliseconds out of date anyhow and it doesnt make much difference to a human! In terms of 'realtime' presentation you probably dont really want to have the browsers polling the server too much (though it would be easy to do with a javascript timer that refreshes the page), as all the requests will add considerably to your server load (especially since the charts need redrawing). If your setting a minimum polling period as suggested above you would probably also want to try and somehow cache the resulting chart images until such time as new data is available, such that several requests coming in rapidly (probably from different users) could all be serviced with the same image and cut the need to spend server time re-rendering the chart. Thats just my 2 cents worth though so theres probably many better ways of doing it. hth Andrew -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 26 May 2004 19:42 To: [EMAIL PROTECTED] Subject: scope and presenting realtime data (fwd) Hi, Can anyone suggest some approach for this issue. thanks regards -Ramudu -- Forwarded message -- Date: Wed, 26 May 2004 14:52:23 +0530 (IST) From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: scope and presenting realtime data Hi, We are developing a web based interface (struts + jsp etc) for realtime monitoring of server cpu usage. We have written a bean that will contact the server and get the current cpu usage and return that value. I want to plot a line graph (using jfreechart) with the cpu usage in Y-axis and time in X-axis. The Graph need to plot the last 'N' values + the current value during each refresh. The issue is how to remember these last N values. I do not want to assign session scope for this object as the end-user might monitor for more than one servers and several users might be using the system at same time. How this situation is typically handled in the Struts+jsp environment. thanks regards -Ramudu - 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: How to renderize a image?
Dear Paulo, first of all, you need to make a jsp page (like photo.jsp) which will be like this in your display page html:img src=photo.jsp?ID=3 the photo.jsp will need to make the contentType to img/jpeg or any typem extract the BLOB field from database and flush the content. Regards, zaid - Original Message - From: Paulo Rezende [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:57 PM Subject: How to renderize a image? Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Links relative to jsp not action in Opera
I'm not sure on how to use the htmml:base tag in the opposite manner, ie the href to be that of the struts action's path not the jsp's path? Are you sure you want to have the action path in the base href instead of the jsp path? I would think that as you write the relative links inside the jsp, you also want to make the relative paths relative to the jsp? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to renderize a image?
you can use whatever image tag you want. The real catch is that you will need and action that pulls the info from the db and writes it to the OutputStream in the response. The have the execute method return null. You might end up with a tag that looks like... img src=c:url value=/CreateChart.do/ This is if you use jstl otherwise html:img action=/CreateChart.do / might work but I am not sure. nathan On May 26, 2004, at 6:57 AM, Paulo Rezende wrote: Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: why and how to configure tomcat with apache web server urgent
Is this a Struts question? -Original Message- From: ganesh g [mailto:[EMAIL PROTECTED] Sent: 26 May 2004 14:15 To: user Subject: why and how to configure tomcat with apache web server urgent Hi list Will u please tell me for my thearitical question what is the need of to configure Tomcat with Apache web server. And how to do it. waiting for ur reply urgent Thanks Ganesh - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger For more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
why and how to configure tomcat with apache web server urgent pls..
Hi list Will u please tell me for my thearitical question what is the need of to configure Tomcat with Apache web server. And how to do it. waiting for ur reply urgent Thanks Ganesh - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger
what is the need of to configure Tomcat with Apache web server.
Hi list Will u please tell me for my thearitical question what is the need of to configure Tomcat with Apache web server. And how to do it. waiting for ur reply urgent Thanks Ganesh - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger
Re: How to renderize a image?
Zaid, It's a way but I really dont like it. If I copy all the fields of a table to properties of the form, why i dont can copy also the image to a Blob in the form and use it? Do I need to create another connection with db and run another sql only to get the image? tks, Paulo - Original Message - From: Zaid [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, May 07, 2004 10:14 AM Subject: Re: How to renderize a image? Dear Paulo, first of all, you need to make a jsp page (like photo.jsp) which will be like this in your display page html:img src=photo.jsp?ID=3 the photo.jsp will need to make the contentType to img/jpeg or any typem extract the BLOB field from database and flush the content. Regards, zaid - Original Message - From: Paulo Rezende [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:57 PM Subject: How to renderize a image? Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo - 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: How to renderize a image?
Yes, nathan. A action is so bettet than a servlet or a jsp. But are this the only way? tks, Paulo - Original Message - From: Nathan Maves [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 10:16 AM Subject: Re: How to renderize a image? you can use whatever image tag you want. The real catch is that you will need and action that pulls the info from the db and writes it to the OutputStream in the response. The have the execute method return null. You might end up with a tag that looks like... img src=c:url value=/CreateChart.do/ This is if you use jstl otherwise html:img action=/CreateChart.do / might work but I am not sure. nathan On May 26, 2004, at 6:57 AM, Paulo Rezende wrote: Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo - 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: LookUpDispatchAction :does not contain handler parameter name d ...
Can you send the code for the DataTypePopulateAction class? I'm having a similar problem, except I'm using a form with multiple submit buttons and if I press the 'Enter' key rather than clicking on the button, then I get the same error. At least I think it's the same error... I'll check. I guess when I press 'Enter' it doesn't know which submit to use, which could be related to your issue. Just for the hell of it, I guess you could try clicking the button instead of pressing 'Enter' assuming that you're not already doing that. Keith Kamholz IT - Programming and Architecture Moog Inc. -Original Message- From: shankarr [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 3:10 AM To: Struts Users Mailing List Subject: LookUpDispatchAction :does not contain handler parameter named ... Hi! I am getting an exception which reads like this : *:does not contain handler parameter named empfieldsaction * I have the following jsp. html:form action=StartCustomFieldCreation.do input type = hidden name=module value=Leads Leads Custom Fields nbsp; html:submit property=empfieldsaction /html:submit /html:form br My struts-config-temp.xml entry is : action path=/StartCustomFieldCreation type=com.adventnet.hrms.action.DataTypePopulateAction name=fieldDetailsForm scope=request parameter=empfieldsaction forward name=addnewfield path=hrms.field_datatype/ /action I use partitioned struts-config.xml file . In the particular case, I have used struts-config-temp.xml file StartCustomFieldCreation.do invokes a LookupDispatchAction. PLease help. *Richie* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: why and how to configure tomcat with apache web server urgent
a) doesn't seem so b) something a googling with How to configure tomcat with apache could resolve c) seeing his duplicate entries: SPAM well, ... happens -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 26. Mai 2004 15:20 To: [EMAIL PROTECTED] Subject: RE: why and how to configure tomcat with apache web server urgent Is this a Struts question? -Original Message- From: ganesh g [mailto:[EMAIL PROTECTED] Sent: 26 May 2004 14:15 To: user Subject: why and how to configure tomcat with apache web server urgent Hi list Will u please tell me for my thearitical question what is the need of to configure Tomcat with Apache web server. And how to do it. waiting for ur reply urgent Thanks Ganesh - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger For more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. - 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: How to renderize a image?
Because that's not the way HTML works. A cursory look at the img tag would have shown you that it accepts a url to an image, not a byte array. You can not do (with Struts or custom tags) something that is not in the end supported by html. -Original Message- From: Paulo Rezende [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 8:27 AM To: Struts Users Mailing List Subject: Re: How to renderize a image? Zaid, It's a way but I really dont like it. If I copy all the fields of a table to properties of the form, why i dont can copy also the image to a Blob in the form and use it? Do I need to create another connection with db and run another sql only to get the image? tks, Paulo - Original Message - From: Zaid [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, May 07, 2004 10:14 AM Subject: Re: How to renderize a image? Dear Paulo, first of all, you need to make a jsp page (like photo.jsp) which will be like this in your display page html:img src=photo.jsp?ID=3 the photo.jsp will need to make the contentType to img/jpeg or any typem extract the BLOB field from database and flush the content. Regards, zaid - Original Message - From: Paulo Rezende [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:57 PM Subject: How to renderize a image? Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo - 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: How to renderize a image?
You must request it separatly because the browser DOES it like that. He needs an object with a different mime-type. Certain questions cannot be answered in a different way... Zaid's answer points to the right direction. hth Alexander -Original Message- From: Paulo Rezende [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 26. Mai 2004 15:27 To: Struts Users Mailing List Subject: Re: How to renderize a image? Zaid, It's a way but I really dont like it. If I copy all the fields of a table to properties of the form, why i dont can copy also the image to a Blob in the form and use it? Do I need to create another connection with db and run another sql only to get the image? tks, Paulo - Original Message - From: Zaid [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, May 07, 2004 10:14 AM Subject: Re: How to renderize a image? Dear Paulo, first of all, you need to make a jsp page (like photo.jsp) which will be like this in your display page html:img src=photo.jsp?ID=3 the photo.jsp will need to make the contentType to img/jpeg or any typem extract the BLOB field from database and flush the content. Regards, zaid - Original Message - From: Paulo Rezende [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 4:57 PM Subject: How to renderize a image? Friends, I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this class, seemingly they support only a Map. Really I'm helping a friend, and I thank so any help... Anybody could show me the way? tks, Paulo - 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: How to renderize a image?
I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this Hi, First remember how images work in HTML. the img src=... attribute is treated as an href, so there are actually two separate HTTP requests: one to render the JSP and one to fetch and display the image. The only thing that changes if your image is stored in an Oracle BLOB is, instead of html:image pointing to a file resource, it has to point to a servlet that you write yourself. The servlet fetches the BLOB from your table, sets the Content-Type properly (image/gif, image/jpeg) and writes the bytes to response.getOutputStream. One thing to remember is, you _can't_ retrieve images from within an Action because you are only allowed to call response.getOutputStream once during the request and Struts' ActionServlet already appears to do that. So you have to write an actual servlet. Hope this helps, Bill -- Bill Schneider Chief Architect Vecna Technologies 5004 Lehigh Rd., Suite B College Park, MD 20740 [EMAIL PROTECTED] t: 301-864-7594 f: 301-699-3180 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to renderize a image?
It's an error to call getWriter after getOutputStream (or vice versa), but I don't think it's an issue to call getOutputStream multiple times. Although, even if it were, I really don't think Struts ever calls getOutputStream. At least not in 1.1. Quoting Bill Schneider [EMAIL PROTECTED]: I have a image in Oracle Blob field and i want to renderize it my jsp. Do I need to use hmtl:image or html:img or this is not the way? My form property is a Blob, but i guess that this tags dont support this Hi, First remember how images work in HTML. the img src=... attribute is treated as an href, so there are actually two separate HTTP requests: one to render the JSP and one to fetch and display the image. The only thing that changes if your image is stored in an Oracle BLOB is, instead of html:image pointing to a file resource, it has to point to a servlet that you write yourself. The servlet fetches the BLOB from your table, sets the Content-Type properly (image/gif, image/jpeg) and writes the bytes to response.getOutputStream. One thing to remember is, you _can't_ retrieve images from within an Action because you are only allowed to call response.getOutputStream once during the request and Struts' ActionServlet already appears to do that. So you have to write an actual servlet. Hope this helps, Bill -- Bill Schneider Chief Architect Vecna Technologies 5004 Lehigh Rd., Suite B College Park, MD 20740 [EMAIL PROTECTED] t: 301-864-7594 f: 301-699-3180 -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Links relative to jsp not action in Opera
On Wed, 26 May 2004 14:52:08 +0200, Kransen, J. wrote: I'm not sure on how to use the html:base tag in the opposite manner, ie the href to be that of the struts action's path not the jsp's path? Indeed it seems impossible to create a base tag containing an action path instead of a jsp path, or at least it didn't work for me. I assume your jsps are not in the root? I once had difficulties with the base tag with jsps not in the webapp root. I ended up placing the jsps in the webapp root. Not sure if this is an option for your project, but maybe you can do the same? Ended up just using base (base/) tag directly, with a coded correct base url (virtual hostname, port, web context, and action path). A bit messy just to satisfy one browser, but i guess #*% happens. It would have been nice to exclude the action path from the base url making all relative links relative to the base of the webcontext but... firefox doesn't honour the base tag! Thanks for the help Jeroen. Mick. -- -- BR/ Living on Earth is expensive, but it does include a free trip around the sun every year. Unknown BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to renderize a image?
On Wed, 26 May 2004 10:26:34 -0300, Paulo Rezende wrote: It's a way but I really dont like it. If I copy all the fields of a table to properties of the form, why i dont can copy also the image to a Blob in the form and use it? Do I need to create another connection with db and run another sql only to get the image? Yes you'll need separate db calls. Images are always separate urls and are not 'embedded' into the html. Your picture servlet will look something like below so it's not like there is really a lot of extra work involved. String format = ...; byte[] data = ...; try{ response.reset(); response.setContentType(format); ServletOutputStream ss = response.getOutputStream(); ss.write(data); ss.close(); }catch(IOException io){ LOG.error(PictureServlet.doGet +io); } Mick. -- -- BR/ As you go the way of life, you will see a great chasm. Jump. It is not as wide as you think. Native American Initiation Rite BR/ --- a href=http://www.harryspractice.com.auHarry's Practice/a --- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Passing ActionForm along on the request
Is it possible to call an Action which pre-populates a form, forwards on to a JSP page which displays the form values for the user to change, and then submit back to an Action that will contain the form value? We're running into a scenario where we prepopulate the Form in 1 action and set it onto the Request. The jsp displays some of the values so that they may be modified, and then submits back to a second action where the Form is to be populated. When the form is submitted to the 2nd Action, the ActionForm is reinitialized, and ends up throwing an exception in the BeanUtils.populate method because an object on the form is null. We've found that the scenario works fine when using Sessions, but runs into issues when using the request. Here's a sample struts config: action path=/actions/MyAction type=actions.MyAction name=myActionForm scope=request validate=false forward name=continue path=/actions/MyAction.jsp/ /action action path=/actions/MyActionSubmit type=actions.MyActionSubmit name=myActionForm scope=request input=/actions/MyAction.jsp validate=true forward name=continue path=/actions/MyNextAction/ /action We already have 1 solution (using sessions), but given the fact that we're going to be working in a load-balanced environment with multiple Tomcat instances, we are trying to use the session sparingly. Another solution that I just thought of would be to replicate all the values of the Form as hidden values on the JSP page so that they would be repopulated on the submit. This would be slightly annoying, but is a viable solution. My question is, is there another solution that works as clean as sessions but uses the request? _ Jeremy Nix Senior Application Developer Southwest Financial Services, LTD. (513) 621-6699 x1158 www.sfsltd.com
[OT] London(UK) Users - Monday 7th June
Peter Pilgrim has arranged a meet up for informal drinks on Monday 7th June 2004 19:15 GMT @ Waxy O'Connor (Irish Pub) in central London, the West End. Anyone else interested is welcome. Theres a Map on Waxy's Web Site showing the location: http://www.waxyoconnors. co.uk/london/index.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Passing ActionForm along on the request
I presume the element that's throwing the NPE is one of the elements that the user cannot change. I presume this because let's say for the sake of argument that all the fields of the ActionForm were on the screen, then what you describe should never happen. Your dealing with the classic stateless nature problem of the web in general... you can either put it in session (or some other persistent storage on the server) or you can pass the information to the view, which wil pass it with the next request (i.e., hidden form fields, as you alluded to). Putting any object in request definitively means that it should NOT persist between requests, that's the whole point, so if you have something you need to persist, as you do here, those are your choices basically, either session or data passing between JSPs. If security is an issue you can get into applets or (God forbid!) ActiveX controls, then do all your data passing through them (and this might not even work with applets since they will probably be loading with each page load, so there's no persistence there either, so ActiveX becomes the option, but then your talking IE only, without buggy plug-ins anyway, so really neither is much of an option anyway). From: Jeremy Nix [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Passing ActionForm along on the request Date: Wed, 26 May 2004 10:35:41 -0400 Is it possible to call an Action which pre-populates a form, forwards on to a JSP page which displays the form values for the user to change, and then submit back to an Action that will contain the form value? We're running into a scenario where we prepopulate the Form in 1 action and set it onto the Request. The jsp displays some of the values so that they may be modified, and then submits back to a second action where the Form is to be populated. When the form is submitted to the 2nd Action, the ActionForm is reinitialized, and ends up throwing an exception in the BeanUtils.populate method because an object on the form is null. We've found that the scenario works fine when using Sessions, but runs into issues when using the request. Here's a sample struts config: action path=/actions/MyAction type=actions.MyAction name=myActionForm scope=request validate=false forward name=continue path=/actions/MyAction.jsp/ /action action path=/actions/MyActionSubmit type=actions.MyActionSubmit name=myActionForm scope=request input=/actions/MyAction.jsp validate=true forward name=continue path=/actions/MyNextAction/ /action We already have 1 solution (using sessions), but given the fact that we're going to be working in a load-balanced environment with multiple Tomcat instances, we are trying to use the session sparingly. Another solution that I just thought of would be to replicate all the values of the Form as hidden values on the JSP page so that they would be repopulated on the submit. This would be slightly annoying, but is a viable solution. My question is, is there another solution that works as clean as sessions but uses the request? _ Jeremy Nix Senior Application Developer Southwest Financial Services, LTD. (513) 621-6699 x1158 www.sfsltd.com _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
exception argument
I don't know English very well, I'm sorry... How can I include an argument in an exception tag? For example, this is a piece of my struts_config.xml: ... action path=/CompaniesDelete type=companies.actions.CompaniesDeleteAction name=CompaniesForm input=/jsp/CompaniesMain.jsp validate=false exception type=java.lang.Exception key = errors.deleted path=/CompaniesMain2.do/ forward name=success path=/CompaniesMain.do/ /action ... I would like to include an argument in my errors.deleted wich I can throw from servlet companies.actions.CompaniesDeleteAction when an Exception ocurrs. Thanks in advance... Alvaro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: scope and presenting realtime data (fwd)
Dear All, Thanks for all your feedback. Based on the discussion i derive following conclusions. please comment on their accuracy. 1. A Data Storage object (Say a HaspMap with the server name as a key and the N value data object as value are stored along with the last updated time) -- we are not going for database to save time on I/O and do not want to deal with stale data in database. -- 2. A cleaner thread will wake-up periodically, and remove the server entry which is not being used for the last 'X' minutes -- This we need to do as we are having large number of servers to be monitored -- 3. For each request the bean class need to a. poll and get the current value b. get the stored data object for the server c. if the object exists, add the value and drop the oldest sample if size becomes N+1 d. if object does not exist, create with the current value e. update the value in data storage object thanks regards -Ramudu On Wed, 26 May 2004, Irfandhy Franciscus wrote: My advice may sound out of the context, but how bout actually storing each last N value to a database. this way you can even have an archive of the Last N value. Or if you dont want to setup a database, just write the last N value to a property file or text file. Regards, Irfandhy Franciscus [EMAIL PROTECTED] wrote: Hi, Can anyone suggest some approach for this issue. thanks regards -Ramudu -- Forwarded message -- Date: Wed, 26 May 2004 14:52:23 +0530 (IST) From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: scope and presenting realtime data Hi, We are developing a web based interface (struts + jsp etc) for realtime monitoring of server cpu usage. We have written a bean that will contact the server and get the current cpu usage and return that value. I want to plot a line graph (using jfreechart) with the cpu usage in Y-axis and time in X-axis. The Graph need to plot the last 'N' values + the current value during each refresh. The issue is how to remember these last N values. I do not want to assign session scope for this object as the end-user might monitor for more than one servers and several users might be using the system at same time. How this situation is typically handled in the Struts+jsp environment. thanks regards -Ramudu - 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]
how to reset only some fields from the form.
Whats the best way to do so? Redefine the reset() method in each ActionForm and call it from the action? Or hold the values and do: form = new ActionForm(); in the action call? Thanks, Julio Cesar De Salvo - Project Leader iTechnology S.R.L. - Ciudad de la Paz 2846 - piso 1 Tel 54 11 4782.6901 / Fax 54 11 4782.6901 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] AVISO DE CONFIDENCIALIDAD. La información incluida en este e-mail está dirigida únicamente al destinatario. Puede contener información privilegiada, confidencial y que no debe ser revelada. Si ha recibido este e-mail por error, por favor no disemine, utilice, publique, distribuya, revele o copie esta comunicación de ningún modo. En cambio, por favor notifíquenos inmediatamente remitiéndonos este e-mail (incluso el mensaje original en su contestación), por fax (54-11-4782-6901) o teléfono (54-11-4782-6901) y entonces elimine y deseche todas las copias de este e-mail. Gracias. CONFIDENTIALITY NOTICE. The information in this e-mail is intended for the designated recipient only. It may contain information that is privileged, confidential and exempt from disclosure. If you have received this e-mail in error, please do not disseminate, use, publish, distribute, disclose or copy this communication in any way. Instead, please notify us immediately by return e-mail (including the original message in your reply), by fax (54-11-4782-6901) or by telephone (54-11-4782-6901) and then delete and discard all copies of this e-mail. Thank you.
Q: Can I have multiple ApplicationResources from the same locale?
This may be a RTFM situation, but I didn't want to take a break and try it and then after a hour find out it didn't work so I was hoping (while I was coding) someone could let me know if the following is legal: Situation: I have an ApplicationResources_en.properties file that represents the English locale of my app. This file is getting huge (to say the least) as I've internationalized pretty much all the text in my entire app. I was hoping to break out this file into logical units that collective represented the English locale, for example: ApplicationResources-User_en.properties ApplicationResources-Product_en.properties ApplicationResources-Module_en.properties ApplicationResources-Administrator_en.properties. and move the corresponding key/value strings into the appropriate .properties files. But then I had a question about how my message-resources tag in my struts-config file should change... it currently looks like this: message-resources parameter=a.b.c.d.ApplicationResources / Thanks for any help you can provide. Best, Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to reset only some fields from the form.
Do the reset method, it will avoid the new object creation. On Wednesday 26 May 2004 11:42 am, Julio Cesar De Salvo wrote: Whats the best way to do so? Redefine the reset() method in each ActionForm and call it from the action? Or hold the values and do: form = new ActionForm(); in the action call? Thanks, Julio Cesar De Salvo - Project Leader iTechnology S.R.L. - Ciudad de la Paz 2846 - piso 1 Tel 54 11 4782.6901 / Fax 54 11 4782.6901 mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] AVISO DE CONFIDENCIALIDAD. La información incluida en este e-mail está dirigida únicamente al destinatario. Puede contener información privilegiada, confidencial y que no debe ser revelada. Si ha recibido este e-mail por error, por favor no disemine, utilice, publique, distribuya, revele o copie esta comunicación de ningún modo. En cambio, por favor notifíquenos inmediatamente remitiéndonos este e-mail (incluso el mensaje original en su contestación), por fax (54-11-4782-6901) o teléfono (54-11-4782-6901) y entonces elimine y deseche todas las copias de este e-mail. Gracias. CONFIDENTIALITY NOTICE. The information in this e-mail is intended for the designated recipient only. It may contain information that is privileged, confidential and exempt from disclosure. If you have received this e-mail in error, please do not disseminate, use, publish, distribute, disclose or copy this communication in any way. Instead, please notify us immediately by return e-mail (including the original message in your reply), by fax (54-11-4782-6901) or by telephone (54-11-4782-6901) and then delete and discard all copies of this e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can I have multiple ApplicationResources from the same locale ?
message-resources parameter=ApplicationResources null=false / message-resources parameter=LookupMethodMessageResources key=BUTTONS_KEY null=false / And then in the use the 'bundle=' attribute on the bean:write tag to specify the additional bundle to use, if different than the default. -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 11:38 AM To: Struts Users Mailing List Subject: Q: Can I have multiple ApplicationResources from the same locale? This may be a RTFM situation, but I didn't want to take a break and try it and then after a hour find out it didn't work so I was hoping (while I was coding) someone could let me know if the following is legal: Situation: I have an ApplicationResources_en.properties file that represents the English locale of my app. This file is getting huge (to say the least) as I've internationalized pretty much all the text in my entire app. I was hoping to break out this file into logical units that collective represented the English locale, for example: ApplicationResources-User_en.properties ApplicationResources-Product_en.properties ApplicationResources-Module_en.properties ApplicationResources-Administrator_en.properties. and move the corresponding key/value strings into the appropriate .properties files. But then I had a question about how my message-resources tag in my struts-config file should change... it currently looks like this: message-resources parameter=a.b.c.d.ApplicationResources / Thanks for any help you can provide. Best, Riyad - 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: Can I have multiple ApplicationResources from the same locale ?
Ahhh ok, thanks for the info. What is null=false for? On Wednesday 26 May 2004 11:43 am, [EMAIL PROTECTED] wrote: message-resources parameter=ApplicationResources null=false / message-resources parameter=LookupMethodMessageResources key=BUTTONS_KEY null=false / And then in the use the 'bundle=' attribute on the bean:write tag to specify the additional bundle to use, if different than the default. -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 11:38 AM To: Struts Users Mailing List Subject: Q: Can I have multiple ApplicationResources from the same locale? This may be a RTFM situation, but I didn't want to take a break and try it and then after a hour find out it didn't work so I was hoping (while I was coding) someone could let me know if the following is legal: Situation: I have an ApplicationResources_en.properties file that represents the English locale of my app. This file is getting huge (to say the least) as I've internationalized pretty much all the text in my entire app. I was hoping to break out this file into logical units that collective represented the English locale, for example: ApplicationResources-User_en.properties ApplicationResources-Product_en.properties ApplicationResources-Module_en.properties ApplicationResources-Administrator_en.properties. and move the corresponding key/value strings into the appropriate .properties files. But then I had a question about how my message-resources tag in my struts-config file should change... it currently looks like this: message-resources parameter=a.b.c.d.ApplicationResources / Thanks for any help you can provide. Best, Riyad - 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: Can I have multiple ApplicationResources from the same locale ?
That is so if the key does not exist, you will get ???bundle.key.attr??? instead of a null string. -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 11:44 AM To: Struts Users Mailing List Subject: Re: Can I have multiple ApplicationResources from the same locale ? Ahhh ok, thanks for the info. What is null=false for? On Wednesday 26 May 2004 11:43 am, [EMAIL PROTECTED] wrote: message-resources parameter=ApplicationResources null=false / message-resources parameter=LookupMethodMessageResources key=BUTTONS_KEY null=false / And then in the use the 'bundle=' attribute on the bean:write tag to specify the additional bundle to use, if different than the default. -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 11:38 AM To: Struts Users Mailing List Subject: Q: Can I have multiple ApplicationResources from the same locale? This may be a RTFM situation, but I didn't want to take a break and try it and then after a hour find out it didn't work so I was hoping (while I was coding) someone could let me know if the following is legal: Situation: I have an ApplicationResources_en.properties file that represents the English locale of my app. This file is getting huge (to say the least) as I've internationalized pretty much all the text in my entire app. I was hoping to break out this file into logical units that collective represented the English locale, for example: ApplicationResources-User_en.properties ApplicationResources-Product_en.properties ApplicationResources-Module_en.properties ApplicationResources-Administrator_en.properties. and move the corresponding key/value strings into the appropriate .properties files. But then I had a question about how my message-resources tag in my struts-config file should change... it currently looks like this: message-resources parameter=a.b.c.d.ApplicationResources / Thanks for any help you can provide. Best, Riyad - 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: Can I have multiple ApplicationResources from the same locale ?
Hey that's perfect, thanks Mick! On Wednesday 26 May 2004 11:49 am, [EMAIL PROTECTED] wrote: That is so if the key does not exist, you will get ???bundle.key.attr??? instead of a null string. -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 11:44 AM To: Struts Users Mailing List Subject: Re: Can I have multiple ApplicationResources from the same locale ? Ahhh ok, thanks for the info. What is null=false for? On Wednesday 26 May 2004 11:43 am, [EMAIL PROTECTED] wrote: message-resources parameter=ApplicationResources null=false / message-resources parameter=LookupMethodMessageResources key=BUTTONS_KEY null=false / And then in the use the 'bundle=' attribute on the bean:write tag to specify the additional bundle to use, if different than the default. -Original Message- From: Riyad Kalla [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 11:38 AM To: Struts Users Mailing List Subject: Q: Can I have multiple ApplicationResources from the same locale? This may be a RTFM situation, but I didn't want to take a break and try it and then after a hour find out it didn't work so I was hoping (while I was coding) someone could let me know if the following is legal: Situation: I have an ApplicationResources_en.properties file that represents the English locale of my app. This file is getting huge (to say the least) as I've internationalized pretty much all the text in my entire app. I was hoping to break out this file into logical units that collective represented the English locale, for example: ApplicationResources-User_en.properties ApplicationResources-Product_en.properties ApplicationResources-Module_en.properties ApplicationResources-Administrator_en.properties. and move the corresponding key/value strings into the appropriate .properties files. But then I had a question about how my message-resources tag in my struts-config file should change... it currently looks like this: message-resources parameter=a.b.c.d.ApplicationResources / Thanks for any help you can provide. Best, Riyad - 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]
[JSTL] accessing rows by index
Hi all, in my Struts application I can access result collection from sql:query with the forEach loop. When I try access one single row by index, it fails. Right now I solved this with defining a forEach loop where begin and end are the index I want to access. This looks like this: c:forEach begin=1 end=1 items=${xyz.rows} var=yxz ... /c:forEach In my opinion there should be an easier way. Can anyone give me a hint or a piece of code how I have to access my rows by index? Thanks, Axel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [JSTL] accessing rows by index
So you've tried ${xyz.rows[1]} ? -Original Message- From: Axel Seinsche [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 1:59 PM To: Struts Users Mailing List Subject: [JSTL] accessing rows by index Hi all, in my Struts application I can access result collection from sql:query with the forEach loop. When I try access one single row by index, it fails. Right now I solved this with defining a forEach loop where begin and end are the index I want to access. This looks like this: c:forEach begin=1 end=1 items=${xyz.rows} var=yxz ... /c:forEach In my opinion there should be an easier way. Can anyone give me a hint or a piece of code how I have to access my rows by index? Thanks, Axel - 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]
message resource problems
I introduced the resource bundle errors_en_US.properties into my struts-config.xml file. Now, all the other declared resource files are ignored, WHY !! I ended up moving all declared messages into the errors_en_US.properties, and things work again. Anyone have any idea why. Thanks in advance. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LookUpDispatchAction :does not contain handler parameter named ...
shankarr wrote: Hi! I am getting an exception which reads like this : *:does not contain handler parameter named empfieldsaction * I have the following jsp. html:form action=StartCustomFieldCreation.do input type = hidden name=module value=Leads Leads Custom Fields nbsp; html:submit property=empfieldsaction /html:submit /html:form br I hate the LookupDispatchAction compared to the regular DispatchAction. I started out using it thinking it would be nice, but down the line it ends up being a pain, more so from the standpoint of being unituitive. For example later on you might want to pass in a parameter through javascript or a url to the same LookupDispatchAction... well now you have to make a button name for it in your resources file just so you can get the lookupDispatchAction can work correctly. It gets annoying in my opinion. I understand the concept of the LookupDispatchAction and for simple cases it's fine. Ayway, I digress... What are you passing in for the value of empfieldsaction? You have to make sure that both that value is found as the key in your map in your LookupDispatchAction and also there is key/value for it in your resources file. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How long are your struts-config files? Should I worry about performance?
Ok this was what I was wondering about (runtime). I didn't know if the hashtable with all the actions in it was going to be too big or something to that effect. Thanks for the feedback! On Wednesday 26 May 2004 12:51 pm, Hubert Rabago wrote: If your concern is with the physical size of your file, you can break down your struts-config into multiple files with your entries spread among them. What I do is have a main struts-config.xml containing my global values and all plug-ins, then have several struts-config-nnn.xml files for nnn-related forms and action mappings. Can't say I've tried profiling the effect of having a large number of mappings as a result of a large config file. I'd imagine there'd be some difference at the startup of the app while Struts parses your config. Overall, though, I wouldn't really worry about it. In most cases, I'd say the effect at runtime, if any, would be negligible in terms of speed. --- Riyad Kalla [EMAIL PROTECTED] wrote: I'm curious what the size of some of the verteran programmer's struts-config.xml files are. Mine is approaching 2k lines right now, and I'm about 1/2 done with the project I'm working on. I don't know if I should really start worrying about performance/other issues, or if this is normal and I should smile and keep working. Thanks! Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.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: LookUpDispatchAction :does not contain handler parameter named ...
I agree, it drove me nuts so I switched to using MappingDispatchAction and it turned out to be exactly what I wanted. Same idea behind the DispatchActions, but you specify the method name in the parameter field... can't get more straight forward than that ;) On Wednesday 26 May 2004 01:04 pm, Rick Reumann wrote: shankarr wrote: Hi! I am getting an exception which reads like this : *:does not contain handler parameter named empfieldsaction * I have the following jsp. html:form action=StartCustomFieldCreation.do input type = hidden name=module value=Leads Leads Custom Fields nbsp; html:submit property=empfieldsaction /html:submit /html:form br I hate the LookupDispatchAction compared to the regular DispatchAction. I started out using it thinking it would be nice, but down the line it ends up being a pain, more so from the standpoint of being unituitive. For example later on you might want to pass in a parameter through javascript or a url to the same LookupDispatchAction... well now you have to make a button name for it in your resources file just so you can get the lookupDispatchAction can work correctly. It gets annoying in my opinion. I understand the concept of the LookupDispatchAction and for simple cases it's fine. Ayway, I digress... What are you passing in for the value of empfieldsaction? You have to make sure that both that value is found as the key in your map in your LookupDispatchAction and also there is key/value for it in your resources file. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resource problems
how do you declared this resource in your struts-config.xml ?? (place the code) Henrique Viecili PS.: Maybe your question is answered in the message titled 'Can I have multiple ApplicationResources from the same locale?' - Original Message - From: ksitron To: Struts Users Mailing List Sent: Wednesday, May 26, 2004 5:58 PM Subject: message resource problems I introduced the resource bundle errors_en_US.properties into my struts-config.xml file. Now, all the other declared resource files are ignored, WHY !! I ended up moving all declared messages into the errors_en_US.properties, and things work again. Anyone have any idea why. Thanks in advance. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: message resource problems
try something like this: message-resources parameter=net.wessendorf.ApplicationResources null=false/ in WEB-INF/classes/net/wessendorf/ there must be a file called -ApplicationResources.properties (default_file) you can add files with names like thiS: -ApplicationResources_en_US.properties ... Cheers, -Original Message- From: ksitron [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 10:58 PM To: Struts Users Mailing List Subject: message resource problems I introduced the resource bundle errors_en_US.properties into my struts-config.xml file. Now, all the other declared resource files are ignored, WHY !! I ended up moving all declared messages into the errors_en_US.properties, and things work again. Anyone have any idea why. Thanks in advance. -- - 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]
version confusion
I'm a recent convert to java (from micro$oft... sh) and i'm still trying to understand which versions of which products work together. I just got Tomcat 5.x, which implements Servlet 2.4 and JSP 2.0. Does it matter if I use Struts 1.0, 1.1 or 1.2 with this? Why? How does the version of the JRE affect things? How do I know which version of the JSTL I need? Is there some good reading on these topics somewhere? (A document that can explain how all these products work together and how the version of one affects the version of another?) Thanks, Brian Barnett
Re: message resource problems
Thanks Riyad, I think you hit right on the head. Riyad Kalla wrote: I believe if you have more than one resource file, you need to give them keys. The resource file with no key becomes the default, and then the others need to be referenced explicity using the bundleKey (I think that's the name...) attribute of the struts taglibs. On Wednesday 26 May 2004 01:58 pm, ksitron wrote: I introduced the resource bundle errors_en_US.properties into my struts-config.xml file. Now, all the other declared resource files are ignored, WHY !! I ended up moving all declared messages into the errors_en_US.properties, and things work again. Anyone have any idea why. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kevin J Citron Sr. Object Imagineer Optimized Objects, Inc. EL Paso, Texas 79930 (915) 565-7785/566-2403
Re: version confusion
Brian, This can definately get confusing if you are just thrown into the mix. Tomcat 5 is definately the right way to go, its faster, more stable and supports newer specs. Struts, IIRC, is designed to only need the Servlet 2.2 and JSP 1.0 or 1.1 spec, it was meant to be super-compatible, soyou should be safe. There is information on the Struts page (under future direction) where it explains that the next Struts 2.0 release might change to require Servlet 2.3/JSP 1.2 I believe it was. As far as JSTL, just get the newest version possible. JSTL it a set of taglibs, and JSP has supported taglibs for a while. But if you want to get fancy with the Expression Language support in JSTL, then you will need a container that supports Servlet 2.4 spec (which Tomcat 5 does just fine). I believe I've left out gaping holes of information, and may even be wrong, but AFAIK this is the gist of the version information you need. Generally going with the newest stuff you can find is pretty safe, especially with Jakarta projects (stuff comming out of apache group). They have one of the strictest (I love it) release cycles I've ever seen when it comes to shipping stable stuff. I hope that helped atleast a little, Riyad On Wednesday 26 May 2004 01:31 pm, Barnett, Brian W. wrote: I'm a recent convert to java (from micro$oft... sh) and i'm still trying to understand which versions of which products work together. I just got Tomcat 5.x, which implements Servlet 2.4 and JSP 2.0. Does it matter if I use Struts 1.0, 1.1 or 1.2 with this? Why? How does the version of the JRE affect things? How do I know which version of the JSTL I need? Is there some good reading on these topics somewhere? (A document that can explain how all these products work together and how the version of one affects the version of another?) Thanks, Brian Barnett - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How long are your struts-config files? Should I worry about performance?
My config file for a project I'm currently working on is 7k, and that's NOT counting comments (something like 16k counting them - I'm a comment freak). Since it's only parsed once at startup, I wouldn't be too overly concerned about performance. Yes, your talking about a lookup for each request, and I'm not familiar with how it's stored internally (just a HashMap maybe?), but I wouldn't suspect it's a huge concern. I can't speak to how typical that size is of course, but it's one example. I should also point out that the app I'm referring to was originally built on a homegrown framework (I didn't write it, so don't laugh at ME when I tell you this)... it used a very convoluted mapping XML file structure, much more complex than struts-config, and the that version of the file was 43k! Again, NOT counting comments! And to make matter worse, this file was actually parsed WITH EACH REQUEST!! But, and here's where I get to a point (aside from the fact that those that wrote that framework didn't know their a** from their elbows)... performance even under those conditions with a halfway decent load (50 concurrent users at any given time on average) was perfectly acceptable. And it wasn't a monstrous server either (Dual P2-550's with 1G RAM and a SCSI array internally). So, I wouldn't be too concerned with the size of your struts-config, unless someone else has reason to disagree. A couple of K wouldn't concern me. From: Riyad Kalla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: How long are your struts-config files? Should I worry about performance? Date: Wed, 26 May 2004 12:36:58 -0700 I'm curious what the size of some of the verteran programmer's struts-config.xml files are. Mine is approaching 2k lines right now, and I'm about 1/2 done with the project I'm working on. I don't know if I should really start worrying about performance/other issues, or if this is normal and I should smile and keep working. Thanks! Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself with the new version of MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How long are your struts-config files? Should I worry about performance?
None, That was EXACTLY the kind of information I was looking for! Thanks for the deatiled answer. My god that homegrown framework must have been a beast to convert, but I bet the app is sure happier now that its using Struts. Best, Riyad On Wednesday 26 May 2004 03:00 pm, None None wrote: My config file for a project I'm currently working on is 7k, and that's NOT counting comments (something like 16k counting them - I'm a comment freak). Since it's only parsed once at startup, I wouldn't be too overly concerned about performance. Yes, your talking about a lookup for each request, and I'm not familiar with how it's stored internally (just a HashMap maybe?), but I wouldn't suspect it's a huge concern. I can't speak to how typical that size is of course, but it's one example. I should also point out that the app I'm referring to was originally built on a homegrown framework (I didn't write it, so don't laugh at ME when I tell you this)... it used a very convoluted mapping XML file structure, much more complex than struts-config, and the that version of the file was 43k! Again, NOT counting comments! And to make matter worse, this file was actually parsed WITH EACH REQUEST!! But, and here's where I get to a point (aside from the fact that those that wrote that framework didn't know their a** from their elbows)... performance even under those conditions with a halfway decent load (50 concurrent users at any given time on average) was perfectly acceptable. And it wasn't a monstrous server either (Dual P2-550's with 1G RAM and a SCSI array internally). So, I wouldn't be too concerned with the size of your struts-config, unless someone else has reason to disagree. A couple of K wouldn't concern me. From: Riyad Kalla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: How long are your struts-config files? Should I worry about performance? Date: Wed, 26 May 2004 12:36:58 -0700 I'm curious what the size of some of the verteran programmer's struts-config.xml files are. Mine is approaching 2k lines right now, and I'm about 1/2 done with the project I'm working on. I don't know if I should really start worrying about performance/other issues, or if this is normal and I should smile and keep working. Thanks! Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself with the new version of MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts modules question
Hi, I have two modules in my application Module A - default (contains common functionality like logout etc) Module B - specific funtionality developed by a separate team. Can actions in module B have access to the ones in Module A ? i.e. can I lookup a Struts Action defined in Module A from doing a lookup in an Action defined in Module B vice versa ? Do modules in Struts follow any hierarchial structure ? Ashwin. __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How long are your struts-config files? Should I worry about performance?
I'm still working on the conversion after two weeks. It took me probably two days to identify all the changes that had to be made, and then about 5 days of mostly search-and-replaces, and ever since then dealing with the unexpected problems during testing. One of the tough parts was that this framework only allowed a single destination page mapped to an action, and if the flow of your logic coming out of your actions (app controllers they were called in this thing), you actually had to throw a specially-constructed custom exception class that the controlling servlet would use to redirect. Worse still, the destination was actually encoded into the exception, not simply defined in an XML file, so you had what would be in struts-config actually hardcoded in some places in the controllers! And that was just the start of my misery! :) I don't know if the app is any happier being on Struts, but *I* sure am! :) From: Riyad Kalla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: How long are your struts-config files? Should I worry about performance? Date: Wed, 26 May 2004 15:01:21 -0700 None, That was EXACTLY the kind of information I was looking for! Thanks for the deatiled answer. My god that homegrown framework must have been a beast to convert, but I bet the app is sure happier now that its using Struts. Best, Riyad On Wednesday 26 May 2004 03:00 pm, None None wrote: My config file for a project I'm currently working on is 7k, and that's NOT counting comments (something like 16k counting them - I'm a comment freak). Since it's only parsed once at startup, I wouldn't be too overly concerned about performance. Yes, your talking about a lookup for each request, and I'm not familiar with how it's stored internally (just a HashMap maybe?), but I wouldn't suspect it's a huge concern. I can't speak to how typical that size is of course, but it's one example. I should also point out that the app I'm referring to was originally built on a homegrown framework (I didn't write it, so don't laugh at ME when I tell you this)... it used a very convoluted mapping XML file structure, much more complex than struts-config, and the that version of the file was 43k! Again, NOT counting comments! And to make matter worse, this file was actually parsed WITH EACH REQUEST!! But, and here's where I get to a point (aside from the fact that those that wrote that framework didn't know their a** from their elbows)... performance even under those conditions with a halfway decent load (50 concurrent users at any given time on average) was perfectly acceptable. And it wasn't a monstrous server either (Dual P2-550's with 1G RAM and a SCSI array internally). So, I wouldn't be too concerned with the size of your struts-config, unless someone else has reason to disagree. A couple of K wouldn't concern me. From: Riyad Kalla [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: How long are your struts-config files? Should I worry about performance? Date: Wed, 26 May 2004 12:36:58 -0700 I'm curious what the size of some of the verteran programmer's struts-config.xml files are. Mine is approaching 2k lines right now, and I'm about 1/2 done with the project I'm working on. I don't know if I should really start worrying about performance/other issues, or if this is normal and I should smile and keep working. Thanks! Riyad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Express yourself with the new version of MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Learn to simplify your finances and your life in Streamline Your Life from MSN Money. http://special.msn.com/money/0405streamline.armx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts modules question
I wasn't involved in implementing modules, but from discussions and experience, my understanding is that modules are conceived as pretty isolated components, despite the fact that they are in one web application. It is possible to switch between modules using the SwitchAction, for instance, and the JSP tags have some support for indicating paths in alternate modules (which has mostly happened since the 1.1 release). In my development, my primary motivation was simply to compartmentalize the config files. Once I learned that you can specify any number of struts-config.xml files in web.xml and, similarly, you can specify any number of tiles and validation files in the plugin configurations for those components, I haven't used modules. I've become quite fond of a pattern like this: /WEB-INF/sectionA/struts-config.xml /WEB-INF/sectionA/tiles-definitions.xml /WEB-INF/sectionA/validation.xml /WEB-INF/sectionB/struts-config.xml /WEB-INF/sectionB/tiles-definitions.xml /WEB-INF/sectionB/validation.xml /sectionA/Foo.jsp /sectionA/Bar.jsp /sectionB/Baz.jsp /sectionB/Qux.jsp /sectionB/Quux.jsp This parallelism keeps any individual config file from getting too large while providing a pretty clear rule for where to go looking for the various components of a solution. It can sometimes be unclear how to section things, but mostly it's very straightforward. I think many developers begin using modules expecting more interoperability and perhaps hierarchical configuration. Since Struts is open source, there's no reason people couldn't build that out -- but I've found that I don't actually need modules, so I don't use them. Joe At 3:12 PM -0700 5/26/04, Ashwin Desai wrote: Hi, I have two modules in my application Module A - default (contains common functionality like logout etc) Module B - specific funtionality developed by a separate team. Can actions in module B have access to the ones in Module A ? i.e. can I lookup a Struts Action defined in Module A from doing a lookup in an Action defined in Module B vice versa ? Do modules in Struts follow any hierarchial structure ? -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts - not compatible with IE 5.2 on MacIntosh???
Kendell, Have you turned on Javascript debugging (if it is available) in your Mac IE to see if it has any issues with the Javascript itself? Regards, David -Original Message- From: None None [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 10:27 PM To: [EMAIL PROTECTED] Subject: RE: Struts - not compatible with IE 5.2 on MacIntosh??? Have you verified what is being passed to the server? I use a tool called HTTPWatch, but I'm betting it's not available for Mac, but I'm sure there are comperable tools available. I can't imagine the browser isn't passing the data, unless you have some script running before the for is submitted that might be wacking the fields... You could of course just dump the contents of the request object first thing in your ActionForm (or maybe in an Action, just to be sure nothing is going wrong before that), but I would first verify wether it's being passed or not, and I would do that independant of Struts, or even your app server. From: Kendell Churchwell [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts - not compatible with IE 5.2 on MacIntosh??? Date: Thu, 27 May 2004 02:12:37 + (UTC) Hi - I deployed a web application this week that was written in Websphere 5.2, Struts 1.0 - One of our users is running IE 5.2 (which is apparently the latest version on MacIntosh). One of my forms, when filled in with data, and you submit, nulls out the fields. Then, my Struts validation setup, returns errors to screen saying the fields are null and required, then, when you look at the screen - they were nulled out during submission process. That is, they were there before we clicked submit. It appears to me that this is only on the form where I have validation on the action tag in struts-config - as previous screens use form handling but, are not configured for Validation. Again - this same application works fine on all Windows platforms, IE 6.0 - Netscape 7.1, etc. Any ideas? Could this hopefully be a configuration setting on the browser? Or, am I forced to pull out my Struts Validation from this screen??? Thanks! --Kendell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Strategies for Clearing Session Objects
I've only really been concerned with such a thing in one instance, and that was because we were caching some returned ResultSets, and they could be very large... What I wound up doing is wrapping each ResultSet in a HashMap, and I had two other elements, one storing the datetime stamp the object was created, and another specifying how long the object shoud live... Then, on every subsequent request I would check those values and null out any object older than it's specified time to live. It's not the most elegant solution, but the usage pattern of this particular application made it rather effective. I also considered starting a daemon thread when the app started up that would periodically do cleanup chores, but I never got around to doing the research to see if it could gain access to the session information. I've used daemon threads in a number of cases for periodic tasks when I wanted the tasks to be intrinsically linked to the app (i.e., started and stopped with it, dependant on some server resources shared with the app, etc.), but never for cleanup tasks like this. My bet is it's possible, but most probably server-specific, so I'm not sure I'd want to do that as I hate being tied to any particular app server. Another option I considered but never tried to implement that SHOULD work is to write custom classes that will be stored in session that extend Thread. Then you can have a member that tells how long it can live for, and just kill it in run() when it's time. I've never done this because the idea of spawning all those threads sounds obviously bad, but again it comes down to the usage pattern of the system I suspect... If you maybe have a ResultSet that you want to keep reusing if it exists, but you want it to always refresh after five minutes for instance, and you know your not going to have so many concurrent sessions that the number of threads wouldn't kill you, it might be a good way to go. I'm not sure what number of threads starts to be cause for concern, it has a lot to do obviously with server resources and expected system load, but this idea actually had quite a bit of appeal to me, it was just quicker to implement what I wound up doing (and time to market was the primary driver, as it usually is, and what the business wants and when tends to trump design work unfortunately). From: Mike Duffy [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Strategies for Clearing Session Objects Date: Wed, 26 May 2004 19:04:52 -0700 (PDT) System performance will obviously increase if unnecessary objects are cleared from the session. I'd be interested in the strategies used by members of this list to clear unnecessary objects from the session. I think the most basic solution is not to clutter the session in the first place, but beyond that, please share any specific strategies that you think are useful. Thanks. Mike __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http://join.msn.click-url.com/go/onm00200362ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts - not compatible with IE 5.2 on MacIntosh???
At 10:38 PM -0400 5/26/04, David Friedman wrote: Kendell, Have you turned on Javascript debugging (if it is available) in your Mac IE to see if it has any issues with the Javascript itself? Unfortunately, MSIE 5.2 doesn't give very good feedback. I can confirm that MSIE 5.2 and Struts aren't fundamentally incompatible -- most of our web artists use Mac IE 5.2 at least some of the times. There is a known incompatibility with MSIE 5.2/Mac and the commons-fileupload component. http://issues.apache.org/bugzilla/show_bug.cgi?id=23229 Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining. -- Jef Raskin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically sized form using dynavalidator
... and also, you're probably going to need to look into populating an empty array or List called from your reset method. Pain in the butt, but there is a lot in the archives about ways to handle it. For testing puprposes to start with just give the form session scope which will avoid the problem (but not necessarily the best thing in the world to do). Rick Reumann wrote: I haven't tested this and it's late.. but your form property is cart not item.. so if you are going to use JSTL (and not the nested tag which is actually easier) it would be something like... c:forEach var=item items=${cartitems} varStatus=status html:text property=cart[${status.index}].unitPrice value=${item.unitPrice} /br /c:forEach Using the nested tag it would be: nested:iterate property=cartitems nested:text property=unitPrice / nested:text property=quantity / /nested:iterate Jim Kennedy wrote: Just to clarify something. My expectation is that I can generate a form that can grow (row-wise) at runtime and change/modify values in that form. The processing action could then retrieve the dynaform and the changed values would be saved back to whatever (array, collection list...) -Original Message- From: Jim Kennedy [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 26, 2004 6:52 PM To: 'Struts Users Mailing List' Subject: Dynamically sized form using dynavalidator I have defined a form that will grow dynamically at runtime. The problem I'm having is that the values entered in the form do not save. The form pre-populated just fine. I have an action that delivers the form and another action that processes the form. Here's the strutsconfig: form-bean name=shoppingCartForm type=org.apache.struts.validator.DynaValidatorForm form-property name=cart type=com.je.common.ShoppingCartItem[]//form-bean actionpath=/propmgmt/viewcart type=com.je.struts.action.pm.ViewCartAction name=shoppingCartForm scope=session input= validate=false forward name=viewcart path=/tmpl_propmgmt2.jsp?pageleft=/propmgmt/leftmenu.jspamp;pagecenter=/pr opmgmt/viewcart.jspamp;pagetitle=home.title.key / /action actionpath=/propmgmt/checkout type=com.je.struts.action.pm.CheckOutAction name=shoppingCartForm scope=session input= validate=false forward name=checkoutform path=/tmpl_propmgmt2.jsp?pageleft=/propmgmt/leftmenu.jspamp;pagecenter=/pr opmgmt/checkout.jspamp;pagetitle=home.title.key / /action = Here's the JSP: html:form action=/propmgmt/checkout.exe method=post scope=session table border=0 width=96% class=listings trthShopping Cart Items/ththPrice/ththLength of Ad/ththItem Total/th/tr c:forEach var=item items=${cartitems} tr tdc:out value=${item.id} //td tdhtml:text name=item indexed=true property=unitPrice size=6 //tdtdhtml:text name=item indexed=true property=quantity//td %--tdhtml:text name=total value= size=7//td--% /tr /c:forEach /table html:submit value=Proceed to Checkout--/ /html:form Like I said, the form prepopulates but when I enter new values I don't see them in the checkout action. The original entered values aren't getting overwritten. === Here's what the gen'd HTML looks like: form name=shoppingCartForm method=post action=/rentworx/propmgmt/checkout.exe table border=0 width=96% class=listings trthShopping Cart Items/ththPrice/ththLength of Ad/ththItem Total/th/tr tr td2702wes8172/tdtdinput type=text name=item[0].unitPrice size=6 value=9.95/tdtdinput type=text name=item[0].quantity value=1/td /tr tr td30712iv8164/tdtdinput type=text name=item[1].unitPrice size=6 value=9.95/tdtdinput type=text name=item[1].quantity value=1/td /tr tr td665brya8155/tdtdinput type=text name=item[2].unitPrice size=6 value=9.95/tdtdinput type=text name=item[2].quantity value=1/td /tr /table input type=submit value=Proceed to Checkout-- /form - 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] -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Set DynaActionForm to see values in textfields...(form-page)
Oh sorry, the HashMaps works correct, BUT only if you DONT use a DyaActionForm Formular. If you use the Validation you have to use also a DynaActionForm-Session Object (or request-Object). now i have find something which helps me!! http://radio.javaranch.com/channel/jason/2004/03/23/1080083794000.html I used all the code and now i can - put Database-Values into my formular to edit the values and update it into the database or - put really new Values into the Database Thanks for your help! Johannes -Ursprüngliche Nachricht- Von: johannes Schwarz [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 25. Mai 2004 13:54 An: '[EMAIL PROTECTED]' Betreff: AW: Set DynaActionForm to see values in textfields...(form-page) Thanks... For two minnutes i tested the following code in one Action bevor a struts-formular it works ;-) - HashMap linkMap = new HashMap(); linkMap.put(name, Schwarz); linkMap.put(vorname, Johannes); linkMap.put(textbereich, Johannes TEXTETXTEXT); session.setAttribute(PageA, linkMap); --- All fields have the values which are defined in the session. Thanks Johannes -Ursprüngliche Nachricht- Von: Nimish Chourey [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 25. Mai 2004 11:17 An: Struts Users Mailing List Betreff: Re: Set DynaActionForm to see values in textfields...(form-page) Hi Johannes , Are you sure this code works ?? code String field1 = (String) PageA.get(field1); String textfield2 = (String) PageA.get(textfield2); . DynaActionForm PageB = (DynaActionForm) session_automatic.getAttribute(PageB); String textfield1 = (String) PageB.get(textfield1); String textfield2 = (String) PageB.get(textfield2); /code Have you checked the text field values ? I feel only one form would be submited . You shoud be using the form in execute method and I feel One action is related to one form , so you would get only values of one form . public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { RegistrationForm regform = (RegistrationForm) form; } - Original Message - From: johannes Schwarz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 25, 2004 4:13 PM Subject: Set DynaActionForm to see values in textfields...(form-page) Hello, I have created more than one form-pages with struts. After validation i can read the values in the Action with: - HttpSession session = httpServletRequest.getSession(); DynaActionForm PageA = (DynaActionForm) session_automatic.getAttribute(PageA); //This is a DynaActionForm-Object in the Session String field1 = (String) PageA.get(field1); String textfield2 = (String) PageA.get(textfield2); . DynaActionForm PageB = (DynaActionForm) session_automatic.getAttribute(PageB); String textfield1 = (String) PageB.get(textfield1); String textfield2 = (String) PageB.get(textfield2); . -- All works! Now i would like to edit one entry from the Database. So i have to define the Sessions and after the definition i go to the form-page. Than the fields must have the values from the Database. But this doesn't work!! My Code: --- HttpSession session = httpServletRequest.getSession(); DynaActionForm PageA = new DynaActionForm(); PageA.set(textfield1,My Value); PageA.set(textfield2,My Value); DynaActionForm PageB = new DynaActionForm(); PageB.set(textfield1,My Value); PageB.set(textfield2,My Value); //Define a DynaActionForm-Object in the session session.setAttribute(PageA, PageA); session.setAttribute(PageB, PageB); - This breaks at the line PageA.set(). The ERROR is java.lang.NullPointerException Can you help me? 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]