Re: Struts 2 And JFreeChart
I don't see what Ajax has to do with this... It sounds more like an HTTP caching issue. Cree, if you do a page refresh, is the image updated correctly? I haven't used the JFreeChart result, but maybe it's not setting the right cache control headers. L. Randy Burgess wrote: Ajax is text only so you can't use it with an image type. Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC From: cree <[EMAIL PROTECTED]> Reply-To: Struts Users Mailing List Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT) To: Subject: Struts 2 And JFreeChart Hello Everyone, Got a quick question regarding the streaming of a JFreeChart (or any image) and how to be able to handle it on a jsp. I have create a servlet that will stream out an image to the jsp using a syntax similar to (in my struts.xml): 350 300 So if I, in my html, created an img tag such that http://www.nabble.com/Struts-2-And-JFreeChart-tp18740589p18740589.html Sent from the Struts - User mailing list archive at Nabble.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]
Create multiple struts configuration file problem
Hai, can anybody help me to solve the problem javax.servlet.jsp.JspException: Cannot retrieve mapping for action /pro. if i replace the content in struts-config-product.xml to struts-config.xml. it work. any idea??? web.xml config /WEB-INF/struts-config.xml config/product /WEB-INF/product/struts-config-product.xml struts-config-product.xml (product folder) http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";> ProductForm.java package app; import org.apache.struts.action.ActionForm; public class ProductForm extends ActionForm{ private int id; public int getId(){ return id; } public void setId(int id){ this.id=id; } } ProductAction.java package app; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; public class ProductAction extends Action{ public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ ProductForm product=(ProductForm)form; int iProduct=product.getId(); HttpSession session=request.getSession(); session.setAttribute("product",form); return mapping.findForward("success"); } } thank you. -- View this message in context: http://www.nabble.com/Create-multiple-struts-configuration-file-problem-tp18748135p18748135.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect after stream result
Thanks for your help. Regards, ManiKanta Laurie Harper wrote: ManiKanta G wrote: Hi, How can I redirect to another page after stream result. For example redirecting to another page saying successfully downloaded the file or adding some action message and redirecting to the same page. You can't; there can only be one response to an HTTP request. The same question was asked yesterday; see the thread 'ServletOutputStream' in the archives. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts record output and entry
In order to get a grasp of this, it would be helpful if you read the following: Succeeding With Struts: Dynaforms By James M. Turner http://www.developer.com/java/web/article.php/2214681 Succeeding With Struts: Indexed Properties and Beans as Properties By James M. Turner http://www.developer.com/java/ejb/article.php/2233591 Succeeding With Struts: Dynamically Sized Forms By James M. Turner http://www.developer.com/java/ejb/article.php/10931_3321521_1 Succeeding with Struts: Dynamically Allocated Forms By James Turner http://www.developer.com/java/ent/article.php/10933_3567701_1 Have fun! Eric -Original Message- From: news on behalf of Laurie Harper Sent: Wed 7/30/2008 4:53 PM To: user@struts.apache.org Cc: Subject:Re: struts record output and entry cpanon wrote: > Hello > I am having a difficult time designing and implementing an interaction of > displaying and accepting user input of multiple records at once. I can > create a collection of records, but records are complex, composed of other > objects that are themselves composed of text strings that I want rendered as > either simple html input boxes, checkboxes or radio. I have a sense that I > need to use the iterate to get iterate over the total collection, but how do > I record by record render the html input elements. Furthermore what do these > look like to the action that will receive the post? A simpler version of > this is being done on shopping carts a checkbox on each line, but that may be > hard coded. Is the way I need it even possible with struts 1.1? Without knowing anything about what your data structures look like, it's hard to offer specific advice; are you working directly with record sets? with business model classes persisted via JPA? etc. At a high level, what you want to do is certainly possible. How easy it will be will depend on what your data model looks like and whether you have the flexibility to change it. I would suggest you start out by reading up on how Struts manages the mapping between model data and HTML forms, and especially how data conversion works. Then build a simplified prototype that works with a minimal data model and build up from there until you have something representative of the end goal. It will be easier to get help when you have specific questions you can ask. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 And JFreeChart
Ajax is text only so you can't use it with an image type. Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC > From: cree <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT) > To: > Subject: Struts 2 And JFreeChart > > > Hello Everyone, > > Got a quick question regarding the streaming of a JFreeChart (or any image) > and how to be able to handle it on a jsp. I have create a servlet that will > stream out an image to the jsp using a syntax similar to (in my struts.xml): > > class="TestBarChart"> > > 350 > 300 > > > > So if I, in my html, created an img tag such that src="testChart.action"/ , it will correctly create the chart. My problem > arises when I am using it under a dynamic context. For example, if > initially I submit a form button (theme="ajax" targets="divTarget") then it > would render new data and an initial image. > > If I submit the form again with different user input the data would change > but the image is still the same. I assume it is the same buffered image that > it first loaded, but the action itself will never get reloaded. The action > would not get executed at all. > > My question is whether there is a way I can manually force the img tag to > invoke the action itself. > > Thanks for any input > -- > View this message in context: > http://www.nabble.com/Struts-2-And-JFreeChart-tp18740589p18740589.html > Sent from the Struts - User mailing list archive at Nabble.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: S2: possibly strange namespace use case
Andy Law wrote: Jeromy, That's enormously helpful - thanks. A short follow-up. Can you point me towards a description of where/when the Action object gets created and where Interceptors fit into the process. The architect's guide is a good place to start. http://struts.apache.org/2.0.11.2/docs/big-picture.html There's nothing better than a good book though. I need to understand how I'm going to get the leading part of the URL into the action object and my head really, really hurts right now... :o}. I'm wondering if an interceptor might be a better, more understandable (to me) option? If I'm reading things right as of now, the ActionMapper route will fire (and complete) before the Action object is created (since the ActionMapper decides *which* Action gets created) so my options there are to put the details of what I find in the URL path into the request object where it can be pulled by the Action (which makes testing slightly harder), whereas an Interceptor allows me to just magic the details into the Action. On the other hand, the Interceptor requires a signature on the Action which could be overruled with a Parameter in the URL? Creating a custom interceptor or custom action mapper is a fine way to go about it. The ParametersInterceptor is responsible for setting properties of your action from params in the request. There's also two other ParametersInterceptor variations; one that sets static parameters defined in struts.xml, and another that sets parameters created by the ActionMapper. You could also create your own interceptor that checks if your action implements a particular interface, and if so, extract some information from the request and sets a property. The plugins I mentioned previously do that for you in their own ways but if none are suitable then I'd probably create a custom ActionMapper that exends the default but also looks for that param in the URI and returns it in the parameter map of the ActionMapping. Hope that makes sense. regards, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Strange Behaviour in FireFox3
Hi all, Was really not sure which mailing list to post to ... I have a java application that uses struts 2 (actions, etc). Every time I access a page (which goes through an action), my browser gets to that page, but then it "skips" (for want of a better term) onto a blank page (with the URL intact). I am using JBoss 4.2.2 GA. This problem only occurs with FireFox version 3.0.1 (the latest version). It does not occur with FireFox version 2.0.0.16, Internet Explorer or Safari. Has anyone had this problem? Cheers
Re: Wierd Validation
Gundersen, Richard wrote: Hi When validation succeeds on my form, I still get returned to the input page. My execute() method does not seem to be getting called even when validation is OK. This is my Action (no @Validation annotation after I read that was deprecated) === @Validations(visitorFields = { @VisitorFieldValidator(message = "Default message", fieldName = "surname", appendPrefix = false) }) public String execute() { ... @RequiredStringValidator(message="Validation error", key="validate.surname") public String getSurname() { return surname; } ... === Do you have a setSurname(String) method? Without it, Struts can't pass the input data into your action. This is my struts.xml snippet, with the correct result attributes home welcome In the logs, when I enter an empty surname, I see "surname is invalid" when I expect. The same message is not in the logs when I enter a valid value, so I would expect it to then drop into my 'execute' method. But it doesn't, it just returns to the 'input' page... Any ideas? If you do have the setter in your action and you're getting this, do you have any action errors/messages showing up when you get returned to the input page? L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ServletOutputStream
Thank you for the help guys. I got it working. - Original Message From: Gabriel Belingueres <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Wednesday, July 30, 2008 10:58:43 AM Subject: Re: ServletOutputStream A solution could be this: Store the excel data in session, then in your 'status completed' page add an onload event to its body, redirecting to the real download action: IIRC: http://blahblah/myaction.action';"> You can also add a meta in the head: http://blahblah/myaction.action";> 2008/7/30 Mike Rooney <[EMAIL PROTECTED]>: > Thank you for the reply. I know my action can only return one response. > However I want to avoid saving my file somewhere on the server and would like > the 'File Download' dialog to appear when the file is ready. How can I do > this in struts 2 while still forwarding to a 'status completed' page? Would > it be possible to store the file data in a session and somehow have the File > Download dialog show up? If so I am not sure how to do that. > > > > - Original Message > From: Gabriel Belingueres <[EMAIL PROTECTED]> > To: Struts Users Mailing List > Sent: Wednesday, July 30, 2008 3:59:29 AM > Subject: Re: ServletOutputStream > > Your action can not generate two responses (if that's what you asking). > If you forward to a 'status completed' page, then you need to save > your excel data somewhere to not loosing it. > > 2008/7/29 Mike Rooney <[EMAIL PROTECTED]>: >> I created a small webapp that extracts data from a DB, creates an Excel file >> from that data (using Apache POI), which then streams the file to the end >> user's browser. Everything is working fine, however I have to set the >> Action class' return type to 'NULL' since I am setting the servlet response >> type to 'application/vnd-ms-excel'. I want to change my application so that >> it returns to a 'status completed' page when the extraction is completed. >> However I cannot do this when I set the return type is null. How can I do >> this? >> >> Here is my code... >> >> public class ExtractAction extends ActionSupport { >> public String execute() throws Exception { >> HSSFWorkbook wb = new HSSFWorkbook(); >> HSSFSheet prodSheet = wb.createSheet("PROD"); >> HSSFSheet devSheet = wb.createSheet("DEV"); >> HSSFSheet testSheet = wb.createSheet("TEST"); >> ... >> HttpServletResponse response = ServletActionContext.getResponse(); >> response.setContentType("application/vnd.ms-excel"); >> ServletOutputStream outstream = response.getOutputStream(); >> wb.write(outstream); >> outstream.flush(); >> response.flushBuffer(); >> } >> return null; >> //return SUCCESS >> } >> >> and my struts.xml >> >> >> >> >> >> >> >> >> /example/index.jsp >> >> >> >> >> >> >> > > - > 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: Is it a bug in Struts 1.2 that you can't iterate through a java.util.Set?
Ylva Degerfeldt wrote: Hi everyone, I'm using Struts 1.2 (bundled with NetBeans 5.5.1) and I've noticed that I can't iterate through a java.util.Set using the logic:iterate tag. The code that I've tried: I get this exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot create iterator for this collection Does anyone know if this is a bug of Struts 1.2 and if there's a later version (not Struts 2) where it's been fixed? I'd really appreciate an answer to this! Thanks in advance! /Ylva Sets are unordered, so I believe both Struts's iterate and JSTL forEach tags treat them as non-iterable, even though they do implement Collection. If you can expose skillsFound.iterator() as a scripting variable or page/request scoped attribute to pass into logic:iterate that might work. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect after stream result
ManiKanta G wrote: Hi, How can I redirect to another page after stream result. For example redirecting to another page saying successfully downloaded the file or adding some action message and redirecting to the same page. You can't; there can only be one response to an HTTP request. The same question was asked yesterday; see the thread 'ServletOutputStream' in the archives. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts record output and entry
cpanon wrote: Hello I am having a difficult time designing and implementing an interaction of displaying and accepting user input of multiple records at once. I can create a collection of records, but records are complex, composed of other objects that are themselves composed of text strings that I want rendered as either simple html input boxes, checkboxes or radio. I have a sense that I need to use the iterate to get iterate over the total collection, but how do I record by record render the html input elements. Furthermore what do these look like to the action that will receive the post? A simpler version of this is being done on shopping carts a checkbox on each line, but that may be hard coded. Is the way I need it even possible with struts 1.1? Without knowing anything about what your data structures look like, it's hard to offer specific advice; are you working directly with record sets? with business model classes persisted via JPA? etc. At a high level, what you want to do is certainly possible. How easy it will be will depend on what your data model looks like and whether you have the flexibility to change it. I would suggest you start out by reading up on how Struts manages the mapping between model data and HTML forms, and especially how data conversion works. Then build a simplified prototype that works with a minimal data model and build up from there until you have something representative of the end goal. It will be easier to get help when you have specific questions you can ask. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strtus2 tags IE issue error loading page 200 ok
First I thought the problem was from ACEGI that I recently added to the project. So I took all of it out .However I encountered the same problem as above in IE. Then I thought the problem could be some leak in display tag . So i swithced back to normal table and the same thing again. So I realize that a Tabbed Panel inside a Tabbed Panel does not work if you click on the parent tab 5 to 6 times. Closing the IE window and opening it up works again for the next few clicks. It seems it has stored something in the session or something and is not cleaning it up. After I get the error below Error loading '/Dashboard/ViewOMTable.action?dojo.preventCache=1217258686015' (200 OK) none of the tabs are working and they all show the error above. It could be an IE issue cause its working fine in FireFox. Any work arounds or ideas will be greatly appreciated. Thanks. dynamicd wrote: > > Hi, > > I am new to Struts2 and I am having a problem displaying content with IE. > It works fine in Firefox. > I am using Struts2, Acegi for login, Hibernate for ORM and struts2 ajax > tags for display > > I have a parent tabbed panel and a child tabbed panel. > Once I login everything works fine however after a few clicks around I get > the following error. > > Error loading > '/Dashboard/ViewOMTable.action?dojo.preventCache=1217258686015' (200 OK) > > I am not sure why it is working when I log in and not after a few clicks. > Again it works as expected in Firefox. > > Myjsp looks like this > > Parent tab has the following tab > > /** this is for the > Acegi stuff */ > > id="OM" > label ="Operations Manager" > theme="ajax" > href="%{listOM}" > autoStart="false" > refreshOnShow="true" > errorText="Unable to retrieve data!"> > > > > This will get the child jsp which is below which is also tabbed panel > > > > > > > > id="allOM" > label ="LIST" > theme="ajax" > href="%{allOM}" > autoStart= "false" > refreshOnShow="true" > > > > > > > id="addOM" > label ="ADD" > theme="ajax" > href="%{addOM}" > autoStart= "false" > refreshOnShow="true" > > > > > > > > > > Any help is greatly appreciated > > > > > > -- View this message in context: http://www.nabble.com/Strtus2-tags-IE-issue-error-loading-page-200-ok-tp18691505p18742549.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] error style on s:textfield
2008/7/30 Dasgupta, Ranjan <[EMAIL PROTECTED]> > In your action set the fieldError: > addFieldError("someField", "someText") > > in your JSP: > > Thank you, Ranjan! The "cssErrorClass" parameter was forgotten from the tag reference guides. See for example: http://struts.apache.org/2.1.2/docs/textfield.html
RE: [S2] error style on s:textfield
In your action set the fieldError: addFieldError("someField", "someText") in your JSP: Thanks, -RD -Original Message- From: Pierre Thibaudeau [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2008 3:31 PM To: Struts Users Mailing List Subject: [S2] error style on s:textfield In Struts2, what is the equivalent of Struts1's "errorStyleClass" parameter of tag? In other words, how can I control the CSS style of a when there is an error over that field? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] error style on s:textfield
In Struts2, what is the equivalent of Struts1's "errorStyleClass" parameter of tag? In other words, how can I control the CSS style of a when there is an error over that field?
Struts 2 And JFreeChart
Hello Everyone, Got a quick question regarding the streaming of a JFreeChart (or any image) and how to be able to handle it on a jsp. I have create a servlet that will stream out an image to the jsp using a syntax similar to (in my struts.xml): 350 300 So if I, in my html, created an img tag such that testChart.action , it will correctly create the chart. My problem arises when I am using it under a dynamic context. For example, if initially I submit a form button (theme="ajax" targets="divTarget") then it would render new data and an initial image. If I submit the form again with different user input the data would change but the image is still the same. I assume it is the same buffered image that it first loaded, but the action itself will never get reloaded. The action would not get executed at all. My question is whether there is a way I can manually force the img tag to invoke the action itself. Thanks for any input -- View this message in context: http://www.nabble.com/Struts-2-And-JFreeChart-tp18740589p18740589.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] not re-executed on INPUT result
(Using Struts 2.1.2) I have a little "widget" (for want of a better word) which gets activated on most pages by a call to: the result of that action being a small JSP that will sit snuggly inside its little box on the overall page. That little widget is, in effect, independent and clueless of its surroundings, and very happy for it all. The sole job of the MyWidgetAction is gather the latest results and make these available to the widget through a getResults() method. Here is its original entry in struts.xml: widget.jsp The problem occurs when the widget appears on a JSP page with a form. When the user submits that form, if the ensuing action generates the INPUT result (say, because there was a problem with the content of the form), the JSP form page gets redisplayed, but it's clear that MyWidgetAction is not called anew, and Struts2 complains: ERROR ActionComponent:28 - Could not execute action: /widgets/myWidget No result defined for action com.infloox.tango.teaser.TeaserAction and result input If, on the other hand, I change the widget's result mapping (so as to catch results under any name): widget.jsp I then get the following error: WARN OgnlValueStack:50 - Caught an exception while evaluating expression 'results' against value stack Caught an Ognl exception while getting property results - Class: ognl.OgnlRuntime File: OgnlRuntime.java Method: getMethodValue Line: 935 - ognl/OgnlRuntime.java:935:-1 ... Caused by: ognl.OgnlException: results [java.lang.NullPointerException] ... ("results" being the property on MyWidgetAction (with a getResults() getter) which gets called by widget.jsp.) I suppose one solution would be to put the results of MyWidget on the session; on an INPUT result, at least something would get displayed (even though not the latest results). But using the session like that seems to go against Struts2's philosophy... Another (prospective) option would be to involve AJAX over this question. Alternatively, is there a way to force a re-execution of that specific ?
Re: ServletOutputStream
A solution could be this: Store the excel data in session, then in your 'status completed' page add an onload event to its body, redirecting to the real download action: IIRC: http://blahblah/myaction.action';"> You can also add a meta in the head: http://blahblah/myaction.action";> 2008/7/30 Mike Rooney <[EMAIL PROTECTED]>: > Thank you for the reply. I know my action can only return one response. > However I want to avoid saving my file somewhere on the server and would like > the 'File Download' dialog to appear when the file is ready. How can I do > this in struts 2 while still forwarding to a 'status completed' page? Would > it be possible to store the file data in a session and somehow have the File > Download dialog show up? If so I am not sure how to do that. > > > > - Original Message > From: Gabriel Belingueres <[EMAIL PROTECTED]> > To: Struts Users Mailing List > Sent: Wednesday, July 30, 2008 3:59:29 AM > Subject: Re: ServletOutputStream > > Your action can not generate two responses (if that's what you asking). > If you forward to a 'status completed' page, then you need to save > your excel data somewhere to not loosing it. > > 2008/7/29 Mike Rooney <[EMAIL PROTECTED]>: >> I created a small webapp that extracts data from a DB, creates an Excel file >> from that data (using Apache POI), which then streams the file to the end >> user's browser. Everything is working fine, however I have to set the >> Action class' return type to 'NULL' since I am setting the servlet response >> type to 'application/vnd-ms-excel'. I want to change my application so that >> it returns to a 'status completed' page when the extraction is completed. >> However I cannot do this when I set the return type is null. How can I do >> this? >> >> Here is my code... >> >> public class ExtractAction extends ActionSupport { >> public String execute() throws Exception { >>HSSFWorkbook wb = new HSSFWorkbook(); >>HSSFSheet prodSheet = wb.createSheet("PROD"); >>HSSFSheet devSheet = wb.createSheet("DEV"); >>HSSFSheet testSheet = wb.createSheet("TEST"); >>... >>HttpServletResponse response = ServletActionContext.getResponse(); >>response.setContentType("application/vnd.ms-excel"); >>ServletOutputStream outstream = response.getOutputStream(); >>wb.write(outstream); >>outstream.flush(); >>response.flushBuffer(); >> } >> return null; >> //return SUCCESS >> } >> >> and my struts.xml >> >> >> >> >> >> >> >> >> /example/index.jsp >> >> >> >> >> >> >> > > - > 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: S2: possibly strange namespace use case
Jeromy Evans - Blue Sky Minds wrote: > > Andy Law wrote: >> >> e.g. >> /foo/Action1.action runs action1 passing in 'foo' and /bar/Action1.action >> runs the same action passing in 'bar'. >> >> How should I code/configure/build this kind of thing. >> > > > In Struts 2.0.x, you may be able to use wildcards in the namespace > depending on how many variations you need. > > http://struts.apache.org/2.0.11.2/docs/wildcard-mappings.html > > In Struts 2.0.x, you may also be able to use the RestfulActionMapper to > pass simple properties to your action through the path. > > http://struts.apache.org/2.0.11.2/docs/restfulactionmapper.html > > Use it with a CompositeActionMapper. > > In Struts 2.1.x, use the NamedVariablePatternMatcher to pass parameters > through the namespace, as described in this thread: > http://www.nabble.com/REST-plugin-URL-syntax-td17855192i20.html > Jeromy, That's enormously helpful - thanks. A short follow-up. Can you point me towards a description of where/when the Action object gets created and where Interceptors fit into the process. I need to understand how I'm going to get the leading part of the URL into the action object and my head really, really hurts right now... :o}. I'm wondering if an interceptor might be a better, more understandable (to me) option? If I'm reading things right as of now, the ActionMapper route will fire (and complete) before the Action object is created (since the ActionMapper decides *which* Action gets created) so my options there are to put the details of what I find in the URL path into the request object where it can be pulled by the Action (which makes testing slightly harder), whereas an Interceptor allows me to just magic the details into the Action. On the other hand, the Interceptor requires a signature on the Action which could be overruled with a Parameter in the URL? Please tell me if I'm talking nonsense. I'm just kind of thinking out loud while I try to get a feel for the best way to do what I need. Later, Andy Law -- View this message in context: http://www.nabble.com/S2%3A-possibly-strange-namespace-use-case-tp18694697p18737366.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ServletOutputStream
To send only one response it's a inherent limitation or http, so you can only send a page, or the excel result or redirect, but not many at once. What you can do is put a "downloading page" and from that page use a script to begin the downloading of the excel data from a different action. If you want to show the save data dialog, use the content disponsition header. Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Wed, Jul 30, 2008 at 10:19, Mike Rooney <[EMAIL PROTECTED]> wrote: > Thank you for the reply. I know my action can only return one response. > However I want to avoid saving my file somewhere on the server and would like > the 'File Download' dialog to appear when the file is ready. How can I do > this in struts 2 while still forwarding to a 'status completed' page? Would > it be possible to store the file data in a session and somehow have the File > Download dialog show up? If so I am not sure how to do that. > > > > - Original Message > From: Gabriel Belingueres <[EMAIL PROTECTED]> > To: Struts Users Mailing List > Sent: Wednesday, July 30, 2008 3:59:29 AM > Subject: Re: ServletOutputStream > > Your action can not generate two responses (if that's what you asking). > If you forward to a 'status completed' page, then you need to save > your excel data somewhere to not loosing it. > > 2008/7/29 Mike Rooney <[EMAIL PROTECTED]>: >> I created a small webapp that extracts data from a DB, creates an Excel file >> from that data (using Apache POI), which then streams the file to the end >> user's browser. Everything is working fine, however I have to set the >> Action class' return type to 'NULL' since I am setting the servlet response >> type to 'application/vnd-ms-excel'. I want to change my application so that >> it returns to a 'status completed' page when the extraction is completed. >> However I cannot do this when I set the return type is null. How can I do >> this? >> >> Here is my code... >> >> public class ExtractAction extends ActionSupport { >> public String execute() throws Exception { >>HSSFWorkbook wb = new HSSFWorkbook(); >>HSSFSheet prodSheet = wb.createSheet("PROD"); >>HSSFSheet devSheet = wb.createSheet("DEV"); >>HSSFSheet testSheet = wb.createSheet("TEST"); >>... >>HttpServletResponse response = ServletActionContext.getResponse(); >>response.setContentType("application/vnd.ms-excel"); >>ServletOutputStream outstream = response.getOutputStream(); >>wb.write(outstream); >>outstream.flush(); >>response.flushBuffer(); >> } >> return null; >> //return SUCCESS >> } >> >> and my struts.xml >> >> >> >> >> >> >> >> >> /example/index.jsp >> >> >> >> >> >> >> > > - > 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: [S2] Form doesn't redirect
--- On Wed, 7/30/08, Nick Scavelli <[EMAIL PROTECTED]> wrote: > I'm replying to this because it's somewhat related > to an issue I'm having. Not really :p > Let's say I have the following control in my jsp: > targets="resultsDiv" indicator="indicator"/> > > But let's say my session has timed out, and I need to redirect to the > login page. In my circumstance the div is replaced by the login jsp, > which just looks strange. What are the best practices with dealing with > these situations using Ajax. I'm not sure what the *best* practice is, but one solution is to write an interceptor that checks if a request is an XHR. If it is, and the session is gone (or whatever other criteria is necessary), send back a 302 and the name of a global result (that's what we've done here, anyway). Even though it's an XHR the browser will redirect before the request gets back to your code--in essence making the request non-back-channel anymore. (I'm not entirely convinced that behavior is reasonable, but it's a browser thing, so hey.) Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disable validation when clicking back
Hi all, I have a multi-page form bean for a 2 step registration form. In the second page I have a back button like this: and in my action I check if it was pressed similarly to the cancel button: if (isCancelled(request)) { targetUrl = "goHome"; } else if (isBack(request)) { targetUrl = "goRegisterOrg"; } else { . private boolean isBack(HttpServletRequest request) { String back = (String)request.getParameter(EDConstants.BACK_BUTTON); return (back != null); } My problem is, how do I disable validator from checking the form? Currently the user presses the back button and validation errors show up, so he has to enter some valid values to go back. Any ideas? Thanks Dimitris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wierd Validation
Hi When validation succeeds on my form, I still get returned to the input page. My execute() method does not seem to be getting called even when validation is OK. This is my Action (no @Validation annotation after I read that was deprecated) === @Validations(visitorFields = { @VisitorFieldValidator(message = "Default message", fieldName = "surname", appendPrefix = false) }) public String execute() { ... @RequiredStringValidator(message="Validation error", key="validate.surname") public String getSurname() { return surname; } ... === This is my struts.xml snippet, with the correct result attributes home welcome In the logs, when I enter an empty surname, I see "surname is invalid" when I expect. The same message is not in the logs when I enter a valid value, so I would expect it to then drop into my 'execute' method. But it doesn't, it just returns to the 'input' page... Any ideas? Regards Richard Gundersen As a responsible corporate citizen, London Scottish Bank plc asks you to consider the environment before printing this email. *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. London Scottish Bank plc, Registered Office: 201 Deansgate, Manchester M3 3NW Registered Number 973008 England. Subsidiary Companies:- London Scottish Finance Limited, Registered Office: 201 Deansgate, Manchester M3 3NW Registered Number 233259 England. London Scottish Broking Limited, Registered Office: 201 Deansgate, Manchester M3 3NW Registered Number 230110 England. London Scottish Invoice Finance Limited, Registered Office: 201 Deansgate, Manchester M3 3NW Registered Number 2643766 England. Robinson Way & Company Limited, Registered Office: 201 Deansgate, Manchester M3 3NW Registered Number 885896 England. __ This email has been scanned by the MessageLabs Email Security System. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Form doesn't redirect
I'm replying to this because it's somewhat related to an issue I'm having. Let's say I have the following control in my jsp: This of course will update the div defined in my jsp: Everything works great under normal circumstances. But let's say my session has timed out, and I need to redirect to the login page. In my circumstance the div is replaced by the login jsp, which just looks strange. What are the best practices with dealing with these situations using Ajax. - Nick On Mon, Jul 28, 2008 at 8:28 AM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Mon, 7/28/08, Milan Milanovic <[EMAIL PROTECTED]> wrote: >> well I don't understand what is the problem, I use ajax >> for my first form, but not to second which should redirect? > > ... > > Not reloading the entire page is one of the main points of Ajax. > > If you want to reload the entire page (like with a redirect) and you're not > handling that yourself in JavaScript I don't really see the point (in > general; there are exceptions). > > You may want to read up on Ajax fundamentals; JJG's article is one of the > more popular ones, even though people have been doing it for a decade+ now. > > http://www.adaptivepath.com/ideas/essays/archives/000385.php > > The Wikipedia article gives a shorter, higher-level overview. The second > sentence may be informative: > > "With Ajax, web applications can retrieve data from the server asynchronously > in the background without interfering with the display and behavior of the > existing page." > > http://en.wikipedia.org/wiki/AJAX > > Dave > > > - > 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: [S2] Testing if session variable is present
So, scenario is like this: MyFirstAction.method1 [put session variable] -> show first.jsp -> user click on link in first.jsp page -> show second.jsp -> user click on link in second.jsp -> MySecondAction.someMethod is called -> show third.jsp where this session test should be done. I hope this helps. -- Thx, Milan Milan Milanovic wrote: > > Hi, > > just to note, I treid with this too: and it doesn't work. > I put my session variable in one action class, and then redirect to > another page which is connected to another action class. When that second > class method is runned, and resulting jsp is shown in that page I test > this. My both classes implements sessionAware. > > -- > Milan > > > > Milan Milanovic wrote: >> >> Well, this : doesn't >> work, event though my class implements sessionAware and I put my >> your_variable in session before displaying this jsp page. >> >> I should note that I put that variable in one action class and then that >> test is runned in jsp for another action class, but both classes >> implements sessionAware. >> >> What can I do ? >> >> -- >> Thx, Milan >> >> >> >> felipe.lorenz wrote: >>> >>> Hummm.. Struts 1 or 2? >>> >>> This code is to S2. >>> >>> >>> >>> do something >>> >>> >>> >>> I didnt test it, so im not sure about the code. >>> >>> But try it, and tell us. >>> >>> Felipe Lorenz >>> >>> On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic >>> <[EMAIL PROTECTED]>wrote: >>> Hi, I need to test in jsp if some session variable is present, and based on that to show some struts view code or not. How can I do that ? -- Thx, Milan -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18736124.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
Nop, it doesn't work. -- Milan Marcos Hermida-2 wrote: > > Have you tried this: > > > > Milan Milanovic escribió: >> Well, this : doesn't >> work, >> event though my class implements sessionAware and I put my your_variable >> in >> session before displaying this jsp page. >> >> What can I do ? >> >> -- >> Thx, Milan >> >> >> >> felipe.lorenz wrote: >> >>> Hummm.. Struts 1 or 2? >>> >>> This code is to S2. >>> >>> >>> >>> do something >>> >>> >>> >>> I didnt test it, so im not sure about the code. >>> >>> But try it, and tell us. >>> >>> Felipe Lorenz >>> >>> On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic >>> <[EMAIL PROTECTED]>wrote: >>> >>> Hi, I need to test in jsp if some session variable is present, and based on that to show some struts view code or not. How can I do that ? -- Thx, Milan -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html Sent from the Struts - User mailing list archive at Nabble.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] > > > -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18736048.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
Hi, just to note, I treid with this too: and it doesn't work. I put my session variable in one action class, and then redirect to another page which is connected to another action class. When that second class method is runned, and resulting jsp is shown in that page I test this. My both classes implements sessionAware. -- Milan Milan Milanovic wrote: > > Well, this : doesn't work, > event though my class implements sessionAware and I put my your_variable > in session before displaying this jsp page. > > I should note that I put that variable in one action class and then that > test is runned in jsp for another action class, but both classes > implements sessionAware. > > What can I do ? > > -- > Thx, Milan > > > > felipe.lorenz wrote: >> >> Hummm.. Struts 1 or 2? >> >> This code is to S2. >> >> >> >> do something >> >> >> >> I didnt test it, so im not sure about the code. >> >> But try it, and tell us. >> >> Felipe Lorenz >> >> On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic >> <[EMAIL PROTECTED]>wrote: >> >>> >>> Hi, >>> >>> I need to test in jsp if some session variable is present, and based on >>> that >>> to >>> show some struts view code or not. How can I do that ? >>> >>> -- >>> Thx, Milan >>> -- >>> View this message in context: >>> http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18735966.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
Have you tried this: Milan Milanovic escribió: Well, this : doesn't work, event though my class implements sessionAware and I put my your_variable in session before displaying this jsp page. What can I do ? -- Thx, Milan felipe.lorenz wrote: Hummm.. Struts 1 or 2? This code is to S2. do something I didnt test it, so im not sure about the code. But try it, and tell us. Felipe Lorenz On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic <[EMAIL PROTECTED]>wrote: Hi, I need to test in jsp if some session variable is present, and based on that to show some struts view code or not. How can I do that ? -- Thx, Milan -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html Sent from the Struts - User mailing list archive at Nabble.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: ServletOutputStream
Thank you for the reply. I know my action can only return one response. However I want to avoid saving my file somewhere on the server and would like the 'File Download' dialog to appear when the file is ready. How can I do this in struts 2 while still forwarding to a 'status completed' page? Would it be possible to store the file data in a session and somehow have the File Download dialog show up? If so I am not sure how to do that. - Original Message From: Gabriel Belingueres <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Wednesday, July 30, 2008 3:59:29 AM Subject: Re: ServletOutputStream Your action can not generate two responses (if that's what you asking). If you forward to a 'status completed' page, then you need to save your excel data somewhere to not loosing it. 2008/7/29 Mike Rooney <[EMAIL PROTECTED]>: > I created a small webapp that extracts data from a DB, creates an Excel file > from that data (using Apache POI), which then streams the file to the end > user's browser. Everything is working fine, however I have to set the Action > class' return type to 'NULL' since I am setting the servlet response type to > 'application/vnd-ms-excel'. I want to change my application so that it > returns to a 'status completed' page when the extraction is completed. > However I cannot do this when I set the return type is null. How can I do > this? > > Here is my code... > > public class ExtractAction extends ActionSupport { > public String execute() throws Exception { > HSSFWorkbook wb = new HSSFWorkbook(); > HSSFSheet prodSheet = wb.createSheet("PROD"); > HSSFSheet devSheet = wb.createSheet("DEV"); > HSSFSheet testSheet = wb.createSheet("TEST"); > ... > HttpServletResponse response = ServletActionContext.getResponse(); > response.setContentType("application/vnd.ms-excel"); > ServletOutputStream outstream = response.getOutputStream(); > wb.write(outstream); > outstream.flush(); > response.flushBuffer(); > } > return null; > //return SUCCESS > } > > and my struts.xml > > > > > > > > > /example/index.jsp > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: select tag: deselcting option
Without knowing anything about the JSP causing the error it will be more difficult to help. Dave --- On Wed, 7/30/08, ms.programmer.1 <[EMAIL PROTECTED]> wrote: I tried to use the tag but I get a FreeMarker > template error. > > *FreeMarker template error!* > > Error on line 122, column 65 in > template/simple/doubleselect.ftl > Expecting a string, date or number here, Expression > parameters.doubleNameValue is instead a > freemarker.ext.beans.ArrayModel > The problematic instruction: > -- > ==> ${parameters.doubleNameValue} [on line 122, column > 63 in > template/simple/doubleselect.ftl] > in include > "/${parameters.templateDir}/simple/doubleselect.ftl" > [on > line 25, column 1 in template/css_xhtml/doubleselect.ftl] > -- > > Java backtrace for programmers: > -- > freemarker.core.NonStringException: Error on line 122, > column 65 in > template/simple/doubleselect.ftl > Expecting a string, date or number here, Expression > parameters.doubleNameValue is instead a > freemarker.ext.beans.ArrayModel > at > freemarker.core.Expression.getStringValue(Expression.java:126) > > > at > freemarker.core.Expression.getStringValue(Expression.java:93) > at > freemarker.core.DollarVariable.accept(DollarVariable.java:76) > at freemarker.core.Environment.visit(Environment.java:196) > at > freemarker.core.MixedContent.accept(MixedContent.java:92) > at freemarker.core.Environment.visit(Environment.java:196) > at > freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) > at freemarker.core.Environment.visit(Environment.java:196) > at > freemarker.core.MixedContent.accept(MixedContent.java:92) > at freemarker.core.Environment.visit(Environment.java:196) > at > freemarker.core.Environment.include(Environment.java:1375) > at freemarker.core.Include.accept(Include.java:155) > at freemarker.core.Environment.visit(Environment.java:196) > at > freemarker.core.MixedContent.accept(MixedContent.java:92) > at freemarker.core.Environment.visit(Environment.java:196) > at > freemarker.core.Environment.process(Environment.java:176) > at freemarker.template.Template.process(Template.java:232) > at > org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:168) > at > org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530) > at > org.apache.struts2.components.UIBean.end(UIBean.java:484) > at > org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43) > > > > On Wed, Jul 30, 2008 at 9:23 AM, Gabriel Belingueres > <[EMAIL PROTECTED]>wrote: > > > See if tag fits your needs. > > > > 2008/7/30 ms. programmer. 1 > <[EMAIL PROTECTED]>: > > > I am populating the options in select list B > from the option selected > > in > > > select list A, when a button is clicked. When a > new option is selected in > > > select list A, I want the previous option in > select list B to be > > deselected. > > > The value for these select lists is being stored > in the session. I have > > been > > > trying to write a javascript function that I > would set the onchange > > > attribute to to do this but nothing I try is > working. I dont really know > > > javascript either. I was wondering if there is a > way that I can call a > > > method from my action class to achieve this. Is > there a way to set the > > > onchange attribute to a url that will call a > method in my action class? > > Or > > > is there another way I can get this to work. > > > > > > 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]
Re: [S2] Testing if session variable is present
Well, this : doesn't work, event though my class implements sessionAware and I put my your_variable in session before displaying this jsp page. What can I do ? -- Thx, Milan felipe.lorenz wrote: > > Hummm.. Struts 1 or 2? > > This code is to S2. > > > > do something > > > > I didnt test it, so im not sure about the code. > > But try it, and tell us. > > Felipe Lorenz > > On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic > <[EMAIL PROTECTED]>wrote: > >> >> Hi, >> >> I need to test in jsp if some session variable is present, and based on >> that >> to >> show some struts view code or not. How can I do that ? >> >> -- >> Thx, Milan >> -- >> View this message in context: >> http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18735618.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: select tag: deselcting option
I tried to use the tag but I get a FreeMarker template error. *FreeMarker template error!* Error on line 122, column 65 in template/simple/doubleselect.ftl Expecting a string, date or number here, Expression parameters.doubleNameValue is instead a freemarker.ext.beans.ArrayModel The problematic instruction: -- ==> ${parameters.doubleNameValue} [on line 122, column 63 in template/simple/doubleselect.ftl] in include "/${parameters.templateDir}/simple/doubleselect.ftl" [on line 25, column 1 in template/css_xhtml/doubleselect.ftl] -- Java backtrace for programmers: -- freemarker.core.NonStringException: Error on line 122, column 65 in template/simple/doubleselect.ftl Expecting a string, date or number here, Expression parameters.doubleNameValue is instead a freemarker.ext.beans.ArrayModel at freemarker.core.Expression.getStringValue(Expression.java:126) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.include(Environment.java:1375) at freemarker.core.Include.accept(Include.java:155) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:168) at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530) at org.apache.struts2.components.UIBean.end(UIBean.java:484) at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:43) On Wed, Jul 30, 2008 at 9:23 AM, Gabriel Belingueres <[EMAIL PROTECTED]>wrote: > See if tag fits your needs. > > 2008/7/30 ms. programmer. 1 <[EMAIL PROTECTED]>: > > I am populating the options in select list B from the option selected > in > > select list A, when a button is clicked. When a new option is selected in > > select list A, I want the previous option in select list B to be > deselected. > > The value for these select lists is being stored in the session. I have > been > > trying to write a javascript function that I would set the onchange > > attribute to to do this but nothing I try is working. I dont really know > > javascript either. I was wondering if there is a way that I can call a > > method from my action class to achieve this. Is there a way to set the > > onchange attribute to a url that will call a method in my action class? > Or > > is there another way I can get this to work. > > > > Thanks! > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [S2] Testing if session variable is present
I have one more question, not directly connected with this one. How can I ask user with popup windows if he want to proceed when he click to some link, without using Ajax and div tags ? -- Thx, Milan Milan Milanovic wrote: > > Hi, > > it is S2, I wrote this in subject of this topis. > > Thanks, I'll try it. > > -- > Regards, Milan > > > felipe.lorenz wrote: >> >> Hummm.. Struts 1 or 2? >> >> This code is to S2. >> >> >> >> do something >> >> >> >> I didnt test it, so im not sure about the code. >> >> But try it, and tell us. >> >> Felipe Lorenz >> >> On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic >> <[EMAIL PROTECTED]>wrote: >> >>> >>> Hi, >>> >>> I need to test in jsp if some session variable is present, and based on >>> that >>> to >>> show some struts view code or not. How can I do that ? >>> >>> -- >>> Thx, Milan >>> -- >>> View this message in context: >>> http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18734149.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo anchor: get widget id and targets attributes inside subscribed topic?
1.I've sent email to dojo-interest@ 2.http://dojotoolkit.org/ forum keeps silence. Maybe my problems have different solutions and I'm trying to solve in the wrong way? I've spent approximately 2 business days and nothing has been found. Jim Kiley wrote: > > What did the dojo mailing list [1] [2] recommend? > > jk > [1] [EMAIL PROTECTED] > [2] http://dojotoolkit.org/* > * > On Wed, Jul 30, 2008 at 8:57 AM, holod <[EMAIL PROTECTED]> wrote: > >> >> I use dojo anchor widget (). >> It successfully gets response in json from server, but I have several >> problems accessing widget, that published a topic. >> Please, see my code: >> dojo.event.topic.subscribe("/after", function(data, request, widget){ >>alert('inside a topic event. after request'); >>//data : text returned from request(the html) >>//request: XMLHttpRequest object >>//widget: widget that published the topic >> }); >> >> Problems: >> 1. Can't change data value. If I use inside dojo.event.topic.subscribe: >> data = "this my new data!"; >> alert("This is my new response from server: " + data); >> >> alert shows, that data value was changed, >> but targets of dojo anchor get previous value (why???). >> 2.I can't get widget properties: id of widget or targets. That's >> terrible, >> I >> need them very much. I've dumped the object widget, but there are no >> fields >> like id or targets. >> -- >> View this message in context: >> http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18732617.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > > -- View this message in context: http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18733244.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: select tag: deselcting option
See if tag fits your needs. 2008/7/30 ms. programmer. 1 <[EMAIL PROTECTED]>: > I am populating the options in select list B from the option selected in > select list A, when a button is clicked. When a new option is selected in > select list A, I want the previous option in select list B to be deselected. > The value for these select lists is being stored in the session. I have been > trying to write a javascript function that I would set the onchange > attribute to to do this but nothing I try is working. I dont really know > javascript either. I was wondering if there is a way that I can call a > method from my action class to achieve this. Is there a way to set the > onchange attribute to a url that will call a method in my action class? Or > is there another way I can get this to work. > > Thanks! > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dojo anchor: get widget id and targets attributes inside subscribed topic?
What did the dojo mailing list [1] [2] recommend? jk [1] [EMAIL PROTECTED] [2] http://dojotoolkit.org/* * On Wed, Jul 30, 2008 at 8:57 AM, holod <[EMAIL PROTECTED]> wrote: > > I use dojo anchor widget (). > It successfully gets response in json from server, but I have several > problems accessing widget, that published a topic. > Please, see my code: > dojo.event.topic.subscribe("/after", function(data, request, widget){ >alert('inside a topic event. after request'); >//data : text returned from request(the html) >//request: XMLHttpRequest object >//widget: widget that published the topic > }); > > Problems: > 1. Can't change data value. If I use inside dojo.event.topic.subscribe: > data = "this my new data!"; > alert("This is my new response from server: " + data); > > alert shows, that data value was changed, > but targets of dojo anchor get previous value (why???). > 2.I can't get widget properties: id of widget or targets. That's terrible, > I > need them very much. I've dumped the object widget, but there are no fields > like id or targets. > -- > View this message in context: > http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18732617.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
select tag: deselcting option
I am populating the options in select list B from the option selected in select list A, when a button is clicked. When a new option is selected in select list A, I want the previous option in select list B to be deselected. The value for these select lists is being stored in the session. I have been trying to write a javascript function that I would set the onchange attribute to to do this but nothing I try is working. I dont really know javascript either. I was wondering if there is a way that I can call a method from my action class to achieve this. Is there a way to set the onchange attribute to a url that will call a method in my action class? Or is there another way I can get this to work. Thanks!
dojo anchor: get widget id and targets attributes inside subscribed topic?
I use dojo anchor widget (). It successfully gets response in json from server, but I have several problems accessing widget, that published a topic. Please, see my code: dojo.event.topic.subscribe("/after", function(data, request, widget){ alert('inside a topic event. after request'); //data : text returned from request(the html) //request: XMLHttpRequest object //widget: widget that published the topic }); Problems: 1. Can't change data value. If I use inside dojo.event.topic.subscribe: data = "this my new data!"; alert("This is my new response from server: " + data); alert shows, that data value was changed, but targets of dojo anchor get previous value (why???). 2.I can't get widget properties: id of widget or targets. That's terrible, I need them very much. I've dumped the object widget, but there are no fields like id or targets. -- View this message in context: http://www.nabble.com/dojo-anchor%3A-get-widget-id-and-targets-attributes-inside-subscribed-topic--tp18732617p18732617.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: There is no Action mapped for namespace / and action name ...
I know...when I have two projects that use the same package namespace for my app source...I get this Action mapping error. Even when one project is "Closed" (in the Eclipse sense). I neglected to mention this previously in describing what I "changed" to make things work. There is still a 'fragility' that has crept into the Struts2.1.3-SNAPSHOT regarding dispatcher filters and actions. I would really like to setup Struts2.1.x as a Maven2 enabled MyEclipse project and explore things with a debugger. Maybe this weekend... too damn hot and humid to do much else. -John On Wed, Jul 30, 2008 at 6:10 AM, Pauli Savolainen < [EMAIL PROTECTED]> wrote: > Hi, > > I "fixed" the problem by reverting back to 2.1.1-SNAPSHOT version with > struts core and all the plugins. Changing eclipse to 5.0 is really not > a solution for me, so I couldn't do that. I wonder what in 2.1.2 makes > my program not work anymore. > > Pauli > > 2008/7/29 John Moose <[EMAIL PROTECTED]>: > > re-ordered the libraries and builders, forced JDK compiler compliance to > 5.0 > > ( definitely *not* 6.0 !!) in Eclipse and voila...runs great. never > > *really* thought it was a Struts2 problem ; ) > > > > On Tue, Jul 29, 2008 at 9:26 AM, John Moose <[EMAIL PROTECTED]> wrote: > > > >> A very wierd situation...I have two projects in the Eclipse workspace -- > >> Tagging and Dashbd They both use the REST plugin and follow the naming > >> conventions, etc. Tagging will build, re-deploy and run perfectly. When > I > >> close that project and open Dashbd, build, re-deploy and run I get the > >> Action mapping failure as described. Both projects have source files in > the > >> "com.myeclipse.ozone" package name(space). Is it possible that there is > some > >> very persistent caching going on ??? like over multiple starts and > re-starts > >> of Tomcat? just a WAG... > >> > >> -John > >> > >> > >> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen < > >> [EMAIL PROTECTED]> wrote: > >> > >>> Hi, > >>> > >>> I am having exactly the same problem. I was using Struts 2.1.1, > >>> switched to struts 2.1.2 (including the restful and codebehind > >>> plugins) and started to get this 'no action found' error. I am quite > >>> confident that I did not do anything that should've resulted in this. > >>> Of course I cannot be 100% sure, because I did goof around with my > >>> code a bit, but I checked and rechecked and rerechecked everthing > >>> twice and couldn't find a reason for this behaviour. > >>> > >>> John's web.xml and the stacktrace are identical to mine. I don't > >>> declare any namespaces in my struts.xml packages nor in the login form > >>> from which I try to invoke the login action >>> action="/login/execute" method="post">. (Also tried with an > >>> exclamation mark i.e. login!execute) I have a LoginAction.java with an > >>> execute method in the pacakge defined in the web.xml's actionPackages > >>> init parameter. At least this declaration used to send the control to > >>> the LoginAction's execute method. Doesn't do anymore. > >>> > >>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I > >>> include a tiles main layout which in turn includes sub-layouts (such > >>> as the login form). I don't know if this has anything got to do with > >>> the problem I'm having. > >>> > >>> So, is a result of something I did wrong or could it be something else? > >>> > >>> Thank you > >>> > >>> Pauli Savolainen > >>> > >>> 2008/7/28 Paul Benedict <[EMAIL PROTECTED]>: > >>> > What's the correct way of writing a good 404 or action not found > page? > >>> Does > >>> > s2 have something like a fallback action if nothing can be found? > >>> > > >>> > Paul > >>> > > >>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <[EMAIL PROTECTED]> > >>> wrote: > >>> > > >>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a > week > >>> or so > >>> >> ago that I haven't had time to re-visit--so it actually could be the > >>> web.xml > >>> >> (specifically the dispatcher being used) and I may have put my foot > in > >>> my > >>> >> mouth (again). > >>> >> > >>> >> Somebody followed up saying the original FilterDispatcher worked, > >>> though, > >>> >> so maybe not. Hrm. > >>> >> > >>> >> Dave > >>> >> > >>> >> --- On Mon, 7/28/08, John Moose <[EMAIL PROTECTED]> wrote: > >>> >> > and I probably should have included this as well: > >>> >> > > >>> >> > Struts Problem Report > >>> >> > > >>> >> > Struts has detected an unhandled exception: > >>> >> > *Messages*: > >>> >> > There is no Action mapped for namespace / and action name > >>> >> > dashbd. > >>> >> > -- > >>> >> > Stacktraces *There is no Action mapped for namespace / and > >>> >> > action name > >>> >> > dashbd. - [unknown location]* > >>> >> > > >>> >> > > >>> >> > > >>> >> > >>> > com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177) > >>> >> > > >>> >> > > >>> >> > >>> > com.opensymphony.xwork2.DefaultActionProxyFactory.createActionPro
Is it a bug in Struts 1.2 that you can't iterate through a java.util.Set?
Hi everyone, I'm using Struts 1.2 (bundled with NetBeans 5.5.1) and I've noticed that I can't iterate through a java.util.Set using the logic:iterate tag. The code that I've tried: I get this exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot create iterator for this collection Does anyone know if this is a bug of Struts 1.2 and if there's a later version (not Struts 2) where it's been fixed? I'd really appreciate an answer to this! Thanks in advance! /Ylva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ServletOutputStream
Your action can not generate two responses (if that's what you asking). If you forward to a 'status completed' page, then you need to save your excel data somewhere to not loosing it. 2008/7/29 Mike Rooney <[EMAIL PROTECTED]>: > I created a small webapp that extracts data from a DB, creates an Excel file > from that data (using Apache POI), which then streams the file to the end > user's browser. Everything is working fine, however I have to set the Action > class' return type to 'NULL' since I am setting the servlet response type to > 'application/vnd-ms-excel'. I want to change my application so that it > returns to a 'status completed' page when the extraction is completed. > However I cannot do this when I set the return type is null. How can I do > this? > > Here is my code... > > public class ExtractAction extends ActionSupport { > public String execute() throws Exception { > HSSFWorkbook wb = new HSSFWorkbook(); > HSSFSheet prodSheet = wb.createSheet("PROD"); > HSSFSheet devSheet = wb.createSheet("DEV"); > HSSFSheet testSheet = wb.createSheet("TEST"); > ... > HttpServletResponse response = ServletActionContext.getResponse(); > response.setContentType("application/vnd.ms-excel"); > ServletOutputStream outstream = response.getOutputStream(); > wb.write(outstream); > outstream.flush(); > response.flushBuffer(); > } > return null; > //return SUCCESS > } > > and my struts.xml > > > > > > > > > /example/index.jsp > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redirect after stream result
Hi, How can I redirect to another page after stream result. For example redirecting to another page saying successfully downloaded the file or adding some action message and redirecting to the same page. Thanks in advance Regards, ManiKanta G ** DISCLAIMER ** Information contained and transmitted by this E-MAIL is proprietary to Sify Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at [EMAIL PROTECTED]
Re: There is no Action mapped for namespace / and action name ...
Hi, I "fixed" the problem by reverting back to 2.1.1-SNAPSHOT version with struts core and all the plugins. Changing eclipse to 5.0 is really not a solution for me, so I couldn't do that. I wonder what in 2.1.2 makes my program not work anymore. Pauli 2008/7/29 John Moose <[EMAIL PROTECTED]>: > re-ordered the libraries and builders, forced JDK compiler compliance to 5.0 > ( definitely *not* 6.0 !!) in Eclipse and voila...runs great. never > *really* thought it was a Struts2 problem ; ) > > On Tue, Jul 29, 2008 at 9:26 AM, John Moose <[EMAIL PROTECTED]> wrote: > >> A very wierd situation...I have two projects in the Eclipse workspace -- >> Tagging and Dashbd They both use the REST plugin and follow the naming >> conventions, etc. Tagging will build, re-deploy and run perfectly. When I >> close that project and open Dashbd, build, re-deploy and run I get the >> Action mapping failure as described. Both projects have source files in the >> "com.myeclipse.ozone" package name(space). Is it possible that there is some >> very persistent caching going on ??? like over multiple starts and re-starts >> of Tomcat? just a WAG... >> >> -John >> >> >> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen < >> [EMAIL PROTECTED]> wrote: >> >>> Hi, >>> >>> I am having exactly the same problem. I was using Struts 2.1.1, >>> switched to struts 2.1.2 (including the restful and codebehind >>> plugins) and started to get this 'no action found' error. I am quite >>> confident that I did not do anything that should've resulted in this. >>> Of course I cannot be 100% sure, because I did goof around with my >>> code a bit, but I checked and rechecked and rerechecked everthing >>> twice and couldn't find a reason for this behaviour. >>> >>> John's web.xml and the stacktrace are identical to mine. I don't >>> declare any namespaces in my struts.xml packages nor in the login form >>> from which I try to invoke the login action >> action="/login/execute" method="post">. (Also tried with an >>> exclamation mark i.e. login!execute) I have a LoginAction.java with an >>> execute method in the pacakge defined in the web.xml's actionPackages >>> init parameter. At least this declaration used to send the control to >>> the LoginAction's execute method. Doesn't do anymore. >>> >>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I >>> include a tiles main layout which in turn includes sub-layouts (such >>> as the login form). I don't know if this has anything got to do with >>> the problem I'm having. >>> >>> So, is a result of something I did wrong or could it be something else? >>> >>> Thank you >>> >>> Pauli Savolainen >>> >>> 2008/7/28 Paul Benedict <[EMAIL PROTECTED]>: >>> > What's the correct way of writing a good 404 or action not found page? >>> Does >>> > s2 have something like a fallback action if nothing can be found? >>> > >>> > Paul >>> > >>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <[EMAIL PROTECTED]> >>> wrote: >>> > >>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week >>> or so >>> >> ago that I haven't had time to re-visit--so it actually could be the >>> web.xml >>> >> (specifically the dispatcher being used) and I may have put my foot in >>> my >>> >> mouth (again). >>> >> >>> >> Somebody followed up saying the original FilterDispatcher worked, >>> though, >>> >> so maybe not. Hrm. >>> >> >>> >> Dave >>> >> >>> >> --- On Mon, 7/28/08, John Moose <[EMAIL PROTECTED]> wrote: >>> >> > and I probably should have included this as well: >>> >> > >>> >> > Struts Problem Report >>> >> > >>> >> > Struts has detected an unhandled exception: >>> >> > *Messages*: >>> >> > There is no Action mapped for namespace / and action name >>> >> > dashbd. >>> >> > -- >>> >> > Stacktraces *There is no Action mapped for namespace / and >>> >> > action name >>> >> > dashbd. - [unknown location]* >>> >> > >>> >> > >>> >> > >>> >> >>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177) >>> >> > >>> >> > >>> >> >>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59) >>> >> > >>> >> > >>> >> >>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40) >>> >> > >>> >> > >>> >> >>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439) >>> >> > >>> >> > >>> >> >>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395) >>> >> > >>> >> > >>> >> >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) >>> >> > >>> >> > >>> >> >>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) >>> >> > >>> >> > >>> >> >>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) >>> >> > >>> >> > >>> >> >>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) >>> >> > >>> >> > >>> >> >
AW: Re: Implementing ParameterAware but still getting Unexpected Exception caught setting 'name' on 'class....
Hi Laurie, sorry if I expressed not totally clear what I mean - have still some problems with my english! ;) > What do you mean that the parameters passed to the action 'change every > now and then'? At random?!? If you just mean that there are a variable > number of them, no problem; that's what List- and array-backed > properties are for. I have some report objects that have different prompts, with those prompts I build a input form and pass them to my ParameterAware action. The parameter names, and also the parameter count changes from report to report. > Not sure I understand what you want. Do you just want to suppress the > exception report in the logs, or does the exception represent an actual > problem you need to fix? If the latter, you'll need to provide more details. I guess you can call it "suppress". Its more a cosmetic fix, but I try to understand more of s2 and how to avoid things like that. I have no functional problems with the exception - everything else works like expected! So thanks for your answer, it just would be fine to get rid of it, its not a show stopper, if it can be called like that! ;) Regards Jan Froehlich -Ursprüngliche Nachricht- Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Laurie Harper Gesendet: Mittwoch, 30. Juli 2008 07:34 An: user@struts.apache.org Betreff: Re: Implementing ParameterAware but still getting Unexpected Exception caught setting 'name' on 'class Jan Froehlich wrote: > Hi there... > > I have a page with a dynamic number of input fields that is submited to > an action that implements ParameterAware. > Cause the names of the parameters passed to that action change every now > and then I can't write getters and setters for them. > Thats what I thought ParameterAware is made for. ParameterAware is just a low-level mechanism for getting access to the raw request parameters. If you want to apply conversion or validation to your request data, or have it injected into your actions or model objects, it's probably not what you need. What do you mean that the parameters passed to the action 'change every now and then'? At random?!? If you just mean that there are a variable number of them, no problem; that's what List- and array-backed properties are for. > But even then I get those "Unexpected Exception caught setting.". > > Is there a way to tell s2 that it should stop doing it? > > Well, ok - not the most clever question, but I just want to get rid of > those Exceptions! Not sure I understand what you want. Do you just want to suppress the exception report in the logs, or does the exception represent an actual problem you need to fix? If the latter, you'll need to provide more details. L. - 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]
s:div tag and internationalization
Hello, I'm using s:div tag to load async the results of an action like this: my_action has as a result a jsp page in which we use . The text is loaded from language resource file but it is not displayed correctly. We need to display danish words and it works like this: in resource file: ... får målt ... in displayed result: ... f�r m�lt ... (firefox). If the text is loaded without s:div, it is ok. Thank you, Boris. -- View this message in context: http://www.nabble.com/s%3Adiv-tag-and-internationalization-tp18727898p18727898.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]