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 user@struts.apache.org Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT) To: user@struts.apache.org 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): action name=testChart class=TestBarChart result name=success type=chart 350 300 /result /action So if I, in my html, created an img tag such that img 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]
Regarding Struts 1.3 and Eclipse 3.3
HI, How to configure struts 1.3 with eclipse 3.3.please help me regarding this,it's little bit urgent. I am using following software's Jdk1.6 Eclipse3.3 Tomcat6.0 or is there any related stuff please post me. Thanks in Advance BHBA -- View this message in context: http://www.nabble.com/Regarding-Struts-1.3-and-Eclipse-3.3-tp18749217p18749217.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: Strange Behaviour in FireFox3
I had the exact same problem. Turns out it is a problem in dojo 0.4.0 that is shipped with struts2. I include my own build of dojo to solve the problem. kind regards -- Markus Stauffer On 7/31/08, nauke. [EMAIL PROTECTED] wrote: 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 -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange Behaviour in FireFox3
ohh thank you thank you sooo much! I'm about to go home now but I'll try it out first thing tomorrow and let you all know how it went! thanks again, nicole On Thu, Jul 31, 2008 at 4:57 PM, Markus Stauffer [EMAIL PROTECTED]wrote: I had the exact same problem. Turns out it is a problem in dojo 0.4.0 that is shipped with struts2. I include my own build of dojo to solve the problem. kind regards -- Markus Stauffer On 7/31/08, nauke. [EMAIL PROTECTED] wrote: 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 -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s:a dojo-anchor, seems like better not to use it and realize it yourself
And I will explain why. If I make any mistakes, please, tell me. This is my struts2 tag: s:a id=AncorId showLoadingText=false targets=%{'linkattachedMainDocRow' + #document.count} theme=ajax href=%{#deleteDocumentAction} notifyTopics=/afterDeleteLaw Click me! /s:a this is my JS code: dojo.event.topic.subscribe(/afterDeleteLaw, _listeners, test1); var _listeners = { test1: function(sourceId){ alert(sourceId); } }; Do you know what will happen? I'll tell you. test(sourceId) will be invoked twice. The first time sourceId = id of dojo anchor widget (AncorId) The second time sourceId = response text (text which my action returned). This is amazing logic: The first time you get widget, that sends request, the second time you get response and you don't have any opportunity to determine, which anchor recieved this response! Imagine such situation: Inside s:iterator you make several s:a widgets, you generate unique s:url for them and id attribute. User starts to click on widgets, they all start to send requests and receive responses. As you know, JS in not thread safe, it means in a few seconds you get terrible mix of widgets and responses inside subscribed topic. I've spent three days trying to solve it, the right solution is: do not use dojo anchor tag, use jQuery or your own custom ajax functions. Please, take into consideration, it's extremely hard to get on with listeners, I was lucky and got an idea of using listeners inside google.code. I still don't understand how it works. As I understand, the idea of ajax tags is to simplyfy the work, not to make it as complicated, as possible. RFC. -- View this message in context: http://www.nabble.com/%3Cs%3Aa-dojo-anchor%2C-seems-like-better-not-to-use-it-and-realize-it-yourself-tp18749842p18749842.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: Is it a bug in Struts 1.2 that you can't iterate through a java.util.Set?
Thank you, Laurie! But I'm going to switch to Struts 2 now so that issue is not so important anymore. Thanks anyway! /Ylva On Wed, Jul 30, 2008 at 11:11 PM, Laurie Harper [EMAIL PROTECTED] wrote: 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: logic:iterate collection = skillsFound id= thisSkill scope = session 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] - 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: 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. That's agreed! What do you recommend? I have Kurniawan's Struts 2 Design and Programming and Roughley's Practical Apache Struts2 Web 2.0 projects and Starting Struts 2. None of them go into any kind of detail about this section of things (which is understandable since (a) it seems to be an edge case, (b) it is a somewhat moving target and (c) the documentation on-line is 'less than optimal') Later, Andy -- View this message in context: http://www.nabble.com/S2%3A-possibly-strange-namespace-use-case-tp18694697p18750616.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
No one have any idea how to access session variable in jsp in this kind of simple scenario ? -- Milan Milan Milanovic wrote: 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: s:if test=#session.your_variable != null 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 : s:if test=%{#session.your_variable != null} 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 s:if 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. s:if test=%{#session.your_variable != null} do something /s:if 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-tp18716278p18752896.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: s:a dojo-anchor, seems like better not to use it and realize it yourself
Another option is to read the documentation, which indicates that the JavaScript function will be called twice (although it's better-stated in the 2.1 docs), once getting the id, and then again on success or error, with the HTML result. http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-anchorTag When you specify a handler you can use closure to include the ID of the widget you're creating the handler for, but that's a JS issue, not Struts. JS has a few major warts (yeah, thanks for binding this all goofy, JS) but it's very powerful when used with skill. If you're interested in programming JS I'd recommend the Crockford videos. Well worth the time, and it'll improve your programming in other languages as well. Dave --- On Thu, 7/31/08, holod [EMAIL PROTECTED] wrote: From: holod [EMAIL PROTECTED] Subject: s:a dojo-anchor, seems like better not to use it and realize it yourself To: user@struts.apache.org Date: Thursday, July 31, 2008, 4:16 AM And I will explain why. If I make any mistakes, please, tell me. This is my struts2 tag: s:a id=AncorId showLoadingText=false targets=%{'linkattachedMainDocRow' + #document.count} theme=ajax href=%{#deleteDocumentAction} notifyTopics=/afterDeleteLaw Click me! /s:a this is my JS code: dojo.event.topic.subscribe(/afterDeleteLaw, _listeners, test1); var _listeners = { test1: function(sourceId){ alert(sourceId); } }; Do you know what will happen? I'll tell you. test(sourceId) will be invoked twice. The first time sourceId = id of dojo anchor widget (AncorId) The second time sourceId = response text (text which my action returned). This is amazing logic: The first time you get widget, that sends request, the second time you get response and you don't have any opportunity to determine, which anchor recieved this response! Imagine such situation: Inside s:iterator you make several s:a widgets, you generate unique s:url for them and id attribute. User starts to click on widgets, they all start to send requests and receive responses. As you know, JS in not thread safe, it means in a few seconds you get terrible mix of widgets and responses inside subscribed topic. I've spent three days trying to solve it, the right solution is: do not use dojo anchor tag, use jQuery or your own custom ajax functions. Please, take into consideration, it's extremely hard to get on with listeners, I was lucky and got an idea of using listeners inside google.code. I still don't understand how it works. As I understand, the idea of ajax tags is to simplyfy the work, not to make it as complicated, as possible. RFC. -- View this message in context: http://www.nabble.com/%3Cs%3Aa-dojo-anchor%2C-seems-like-better-not-to-use-it-and-realize-it-yourself-tp18749842p18749842.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: Struts 2 And JFreeChart
it does sound like a caching issue.. try this directive before your html % response.setHeader(Cache-Control, no-cache); //HTTP 1.1 response.setHeader(Pragma, no-cache); //HTTP 1.0 response.setDateHeader(Expires, 0); //prevents caching at the proxy server % ? Martin - Original Message - From: Laurie Harper [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, July 31, 2008 2:28 AM Subject: 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 user@struts.apache.org Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT) To: user@struts.apache.org 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): action name=testChart class=TestBarChart result name=success type=chart 350 300 /result /action So if I, in my html, created an img tag such that img 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect after stream result
URL url=new URL(http://www.fubar.com); string encoded_url = httpServletReponse.encodeRedirectURL(url); httpServletResponse.sendRedirect(encoded_url); Is there a reason why you would'nt want to use Struts prescribed method of that is return a valid ActionForward via findMapping from execute() method actionMapping.findForward(error) ? Martin- - Original Message - From: ManiKanta G [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 30, 2008 6:16 AM Subject: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Redirect after stream result
Hi, I m using Struts2 (S2), not Struts1. In S2 there is a standard result called 'stream' for downloading files. I m using that only. Thanks any way. Regards, ManiKanta Martin wrote: URL url=new URL(http://www.fubar.com); string encoded_url = httpServletReponse.encodeRedirectURL(url); httpServletResponse.sendRedirect(encoded_url); Is there a reason why you would'nt want to use Struts prescribed method of that is return a valid ActionForward via findMapping from execute() method actionMapping.findForward(error) ? Martin- - Original Message - From: ManiKanta G [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Wednesday, July 30, 2008 6:16 AM Subject: 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] - 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: There's nothing better than a good book though. That's agreed! What do you recommend? I have Kurniawan's Struts 2 Design and Programming and Roughley's Practical Apache Struts2 Web 2.0 projects and Starting Struts 2. None of them go into any kind of detail about this section of things (which is understandable since (a) it seems to be an edge case, (b) it is a somewhat moving target and (c) the documentation on-line is 'less than optimal') True. The Struts 2 in Action book goes into the next level detail: http://www.manning.com/dbrown/excerpt_contents.html but still doesn't cover exactly what you're trying to do. I know others works are in progress but not the details or schedules. You may need to delve into the source near the DefaultActionMapper and ParametersInterceptor variations to understand how it ties together. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
--- On Thu, 7/31/08, Milan Milanovic [EMAIL PROTECTED] wrote: No one have any idea how to access session variable in jsp in this kind of simple scenario ? That's one explanation. So, scenario is like this: [...] I am unable to duplicate the inability to test session variables for non-existence/null. If I have an action implementing SessionAware (properly), set foo1 into session, and do not set foo2 into session, the following tests work: s:if test=#session.foo1 == null ... s:if test=#session.foo2 != null ... They continue to work if I go through multiple actions using the exact same JSP to test for their presence/non-presence. It is likely you are doing something wrong. I suppose that means you'll need to post the relevant SessionAware implementation, the code that sets the session variable(s), any action code in the application path that could modify session variables, the JSP that currently doesn't work, and any variants of the JSP code you've tried that also hasn't worked. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Create multiple struts configuration file problem
Are you deliberately using modules (if so, I have no idea--I always found them more trouble than they're worth)? If not you can just use a comma-separated list. Dave --- On Thu, 7/31/08, angelwei [EMAIL PROTECTED] wrote: From: angelwei [EMAIL PROTECTED] Subject: Create multiple struts configuration file problem To: user@struts.apache.org Date: Thursday, July 31, 2008, 1:48 AM 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 init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-nameconfig/product/param-name param-value/WEB-INF/product/struts-config-product.xml/param-value /init-param struts-config-product.xml (product folder) ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config !-- Data Sources -- data-sources /data-sources !-- Form Beans -- form-beans form-bean name=productForm type=app.ProductForm/ /form-beans !-- Global Exceptions -- global-exceptions /global-exceptions !-- Global Forwards -- global-forwards /global-forwards !-- Action Mappings -- action-mappings action path=/pro type=app.ProductAction name=productForm scope=request forward name=success path=/success.html/ /action /action-mappings /struts-config 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Browser url parameters
Hi guys, I am wondering if it's possible to modify the url format to get an url of file format. Current pattern: www.myfunnyurl.com/namespace/actionname.action?param1=value1param2=value2 I am looking for something like this: www.myfunnyurl.com/namespace/actionname/value1/value2 Thanks, -- *Pascal Lalonde Programmeur Analyste*
Re: namespace question
Yes. I started my project with Tomcat in Netbeans and I have not set context. The url look like: http://localhost:8080/index.action When I set namespace : namespace=/manager the url look like: http://localhost:8080/manager/indet.action and the server return me HTTP Status 404. Then I set context for Tomcat in Netbeans and it work perfect. The url then look like: http://localhost:8080/project/manager/indet.action goodbye Laurie Harper wrote: Leonidas Papadakis wrote: Hi there, i've came across a very strange issue : i have developed an application locally on my pc (running only tomcat 5.5.23) and then i deployed the application to an apache + tomcat under a domain i.e. www.test.com I have set up a backoffice package at namespace /backoffice. The problem is that although i a can call an action when running the local aplication at http://localhost:8080/app/backoffice/test.action, the same under http://www.test.com/backoffice/test.action returns : HTTP Status 404 - /backoffice/test.action type Status report message /backoffice/test.action description The requested resource (/backoffice/test.action) is not available. Apache Tomcat/5.5.23 All the actions that are mapped to / are called fine ... I am really stack so i would appreciate your help Thank you very much Leonidas This sounds like a Tomcat configuration issue rather than a Struts issue. If you deploy the web app to the /app context, omitting the /app portion of the URL isn't going to work. To call the app with the URL you want, you'll need to deploy it to the ROOT context. You can achieve that with a deployment descriptor in the WAR file; check the Tomcat docs for details. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/namespace-question-tp12690713p18754572.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: Stuts 2 and Custom TextProvider
Did you substitute your custom provider in the xml declaration? The default from struts-default.xml is: bean type=com.opensymphony.xwork2.TextProvider name=struts class=...TextProviderSupport / so you will need to plug your implementation. Peace, Scott ayavorskiy wrote: Hi, Is there a way to substitute default, bundle-based TextProvider in Struts 2 with a custom one? We have a very custom message resolution needs with our Struts 2 based application. Per other posts and explanation from Struts In Action, overriding of all getText methods in the base Action class does the trick for 90% of what we need. However, there is an issue around Visitor validator that apparently goes through a different path for error string resolution and does not call getText() methods on the action. Apparently, when model-driven Action design is used and my model-validation.xml is stored next to the model class, error messages (message key=... ../) defined in validation XML get routed to the default TextProvider. Is there a way to plug in a custom Text Provider, system-wide? The TextProviderFactory makes it seem like custom provider is injectable (see below), but I have not been able to get it to ever inject anything. Seems like it always creates a new instance of TextProviderSupport() behind the scenes. Any help is much appreciated!!! private TextProvider textProvider; @Inject public void setTextProvider(TextProvider textProvider) { this.textProvider = textProvider; } protected TextProvider getTextProvider() { if (this.textProvider == null) { return new TextProviderSupport(); } else { return textProvider; } } -- View this message in context: http://www.nabble.com/Stuts-2-and-Custom-TextProvider-tp18658000p18754686.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: possibly strange namespace use case
Jeromy Evans - Blue Sky Minds wrote: True. The Struts 2 in Action book goes into the next level detail: http://www.manning.com/dbrown/excerpt_contents.html but still doesn't cover exactly what you're trying to do. I know others works are in progress but not the details or schedules. Thanks. I'll order that and see where it takes me (although it gets a panning on Amazon UK - reviews on Amazon.com are more favourable). Jeromy Evans - Blue Sky Minds wrote: You may need to delve into the source near the DefaultActionMapper and ParametersInterceptor variations to understand how it ties together. Already been there all morning :o} Thanks a lot for all the advice and discussion. It's been really helpful. I think that - for now - I'm going with a straightforward wild-card mapping coupled with a single-set property in the Action which appears in my empirical testing to guard against form parameter over-riding of the property. The down-side is the configuration overhead. My separate actions have distinct results so, although I have a dozen actions that need to share this behaviour, I have to configure them separately to do it. If I build it later into an Interceptor then I will be able to just add that to the default interceptor stack for a package/packages so I may take that route at a later date. I *think* that sounds sensible, but I've stared at too much code, struts 'documentation' and Netbeans screens over the past few days to be sure. Later, Andy -- View this message in context: http://www.nabble.com/S2%3A-possibly-strange-namespace-use-case-tp18694697p18754927.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]
My Action was three times executed
since using struts 2.1.2 my actions was three times executed when i submit a form with dojo and sx:submit Is this a bug, or a configuration error? -- View this message in context: http://www.nabble.com/My-Action-was-three-times-executed-tp18755679p18755679.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: Struts 2 And JFreeChart
I don't use the Ajax theme or any of the Dojo integration but I assumed that if theme=ajax on the submit button that it would be using Ajax. Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC From: Laurie Harper [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Thu, 31 Jul 2008 02:28:41 -0400 To: user@struts.apache.org Subject: 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 user@struts.apache.org Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT) To: user@struts.apache.org 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): action name=testChart class=TestBarChart result name=success type=chart 350 300 /result /action So if I, in my html, created an img tag such that img 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
Hi Dave, newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic [EMAIL PROTECTED] wrote: No one have any idea how to access session variable in jsp in this kind of simple scenario ? That's one explanation. So, scenario is like this: [...] I am unable to duplicate the inability to test session variables for non-existence/null. If I have an action implementing SessionAware (properly), set foo1 into session, and do not set foo2 into session, the following tests work: s:if test=#session.foo1 == null ... s:if test=#session.foo2 != null ... They continue to work if I go through multiple actions using the exact same JSP to test for their presence/non-presence. Yes, I tried with this, but session variable is not found. I think that you didn't understand what is my scenario. I have implemented SessionAware interface for both of my action classes and that works perfectly in the case of jsp's that are connected to that classes. But in this case, I have this: MyFirstActionClass - show first.jsp - user click on link - MyFirstActionClass.method where I set session variable (getSession().put(variable); - show second.jsp - user click on some link - MySecondActionClass.method is called to return some results - show third.jsp with those results, and in this page I test if my session.variable is present, but there is not !! But, my variables that are set in MySecondActionClass.method are present in session for third.jsp! What is the problem ? -- Thx in advance, Milan newton.dave wrote: It is likely you are doing something wrong. I suppose that means you'll need to post the relevant SessionAware implementation, the code that sets the session variable(s), any action code in the application path that could modify session variables, the JSP that currently doesn't work, and any variants of the JSP code you've tried that also hasn't worked. Dave - 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-tp18716278p18756012.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
It seems that my session variable is deleted somehow when first action method of the second Action class is called: MyFirstActionClass - show first.jsp - user click on link - MyFirstActionClass.method where I set session variable (getSession().put(variable, new Boolean(true)); - show second.jsp (here I see my variable) - user click on some link - MySecondActionClass.method-third.jsp (here I don't see my variable). I should note that in MySecondActionClass.method I don't clear session or something similar, I just add remove some other variables and set some new. -- Thx, Milan Milan Milanovic wrote: Hi Dave, newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic [EMAIL PROTECTED] wrote: No one have any idea how to access session variable in jsp in this kind of simple scenario ? That's one explanation. So, scenario is like this: [...] I am unable to duplicate the inability to test session variables for non-existence/null. If I have an action implementing SessionAware (properly), set foo1 into session, and do not set foo2 into session, the following tests work: s:if test=#session.foo1 == null ... s:if test=#session.foo2 != null ... They continue to work if I go through multiple actions using the exact same JSP to test for their presence/non-presence. Yes, I tried with this, but session variable is not found. I think that you didn't understand what is my scenario. I have implemented SessionAware interface for both of my action classes and that works perfectly in the case of jsp's that are connected to that classes. But in this case, I have this: MyFirstActionClass - show first.jsp - user click on link - MyFirstActionClass.method where I set session variable (getSession().put(variable); - show second.jsp - user click on some link - MySecondActionClass.method is called to return some results - show third.jsp with those results, and in this page I test if my session.variable is present, but there is not !! But, my variables that are set in MySecondActionClass.method are present in session for third.jsp! What is the problem ? -- Thx in advance, Milan newton.dave wrote: It is likely you are doing something wrong. I suppose that means you'll need to post the relevant SessionAware implementation, the code that sets the session variable(s), any action code in the application path that could modify session variables, the JSP that currently doesn't work, and any variants of the JSP code you've tried that also hasn't worked. Dave - 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-tp18716278p18756151.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: Re: Wierd Validation
Hi Laurie Thanks for the reply. I finally figured it out. Removing the visitorFields pattern fixed the problem. I'm guessing my combination of annotations is incorrect. So I had CLASS LEVEL --- @Validation Execute() method: @Validations(visitorFields = { @VisitorFieldValidator(message = Default message, fieldName = surname, appendPrefix = false) }) setSurname() method: @RequiredStringValidator(message=Validation error, key=validate.surname) I'm guessing that I'm not supposed to use the visitorFields annotation with the others. Was giving me some really strange behaviour. Will hunt for some better examples... Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Wednesday, July 30, 2008 10:18 PM To: user@struts.apache.org Subject: 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 action name=login method=execute class=loginAction result name=success type=tileshome/result result name=input type=tileswelcome/result /action 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] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ 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
Re: [S2] Testing if session variable is present
No one have any idea how to access session variable in jsp in this kind of simple scenario ? You may access your session variable just like you would do without S2. There is no difference. Then use either the s:test tag from struts or c:if from the standard tag library. Piero - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
--- On Thu, 7/31/08, Milan Milanovic wrote: I think that you didn't understand what is my scenario. I'm reasonably certain that I did. What is the problem ? I still don't know, because you still didn't include the code I asked for. That would have saved at least one posting (this one). I duplicated your scenario, except for that whole mine works thing. I store things in session all the time and have never seen this issue (except one time when our replication wasn't working properly, which isn't a Struts issue). I know of no default mechanism that would remove a session variable without being told to do so. Unless you provide more information it's unlikely you will get any replies that will magically solve your problem. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:a dojo-anchor, seems like better not to use it and realize it yourself
Dave thanks again for your help. I will watch these three videos. Early I've used Google Web Toolkit for making complicated WEB UI My brain will blow up If there would appear another version of docs for struts2. I've googled all around, but I didn't find fact about two invocations. newton.dave wrote: Another option is to read the documentation, which indicates that the JavaScript function will be called twice (although it's better-stated in the 2.1 docs), once getting the id, and then again on success or error, with the HTML result. http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-anchorTag When you specify a handler you can use closure to include the ID of the widget you're creating the handler for, but that's a JS issue, not Struts. JS has a few major warts (yeah, thanks for binding this all goofy, JS) but it's very powerful when used with skill. If you're interested in programming JS I'd recommend the Crockford videos. Well worth the time, and it'll improve your programming in other languages as well. Dave --- On Thu, 7/31/08, holod [EMAIL PROTECTED] wrote: From: holod [EMAIL PROTECTED] Subject: s:a dojo-anchor, seems like better not to use it and realize it yourself To: user@struts.apache.org Date: Thursday, July 31, 2008, 4:16 AM And I will explain why. If I make any mistakes, please, tell me. This is my struts2 tag: s:a id=AncorId showLoadingText=false targets=%{'linkattachedMainDocRow' + #document.count} theme=ajax href=%{#deleteDocumentAction} notifyTopics=/afterDeleteLaw Click me! /s:a this is my JS code: dojo.event.topic.subscribe(/afterDeleteLaw, _listeners, test1); var _listeners = { test1: function(sourceId){ alert(sourceId); } }; Do you know what will happen? I'll tell you. test(sourceId) will be invoked twice. The first time sourceId = id of dojo anchor widget (AncorId) The second time sourceId = response text (text which my action returned). This is amazing logic: The first time you get widget, that sends request, the second time you get response and you don't have any opportunity to determine, which anchor recieved this response! Imagine such situation: Inside s:iterator you make several s:a widgets, you generate unique s:url for them and id attribute. User starts to click on widgets, they all start to send requests and receive responses. As you know, JS in not thread safe, it means in a few seconds you get terrible mix of widgets and responses inside subscribed topic. I've spent three days trying to solve it, the right solution is: do not use dojo anchor tag, use jQuery or your own custom ajax functions. Please, take into consideration, it's extremely hard to get on with listeners, I was lucky and got an idea of using listeners inside google.code. I still don't understand how it works. As I understand, the idea of ajax tags is to simplyfy the work, not to make it as complicated, as possible. RFC. -- View this message in context: http://www.nabble.com/%3Cs%3Aa-dojo-anchor%2C-seems-like-better-not-to-use-it-and-realize-it-yourself-tp18749842p18749842.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/%3Cs%3Aa-dojo-anchor%2C-seems-like-better-not-to-use-it-and-realize-it-yourself-tp18749842p18756299.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 Dave, one question, is it possible that Acegi security remove my session variable, because it sometimes ask to login between actions ? But, I'm not sure for this. -- Regards, Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: I think that you didn't understand what is my scenario. I'm reasonably certain that I did. What is the problem ? I still don't know, because you still didn't include the code I asked for. That would have saved at least one posting (this one). I duplicated your scenario, except for that whole mine works thing. I store things in session all the time and have never seen this issue (except one time when our replication wasn't working properly, which isn't a Struts issue). I know of no default mechanism that would remove a session variable without being told to do so. Unless you provide more information it's unlikely you will get any replies that will magically solve your problem. Dave - 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-tp18716278p18756303.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]
[OT] new Boolean(true)? Re: [S2] Testing if session variable is present
--- On Thu, 7/31/08, Milan Milanovic wrote: (getSession().put(variable, new Boolean(true)); Use Boolean.TRUE rather than instantiating a new object. Note also that the Javadocs for Boolean state in big bold letters: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
Hi Dave, no, I think that this is not an issue. I tried with Boolean.TRUE and it is the same, but I earlier used new Boolean(true) and that worked. -- Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: (getSession().put(variable, new Boolean(true)); Use Boolean.TRUE rather than instantiating a new object. Note also that the Javadocs for Boolean state in big bold letters: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. Dave - 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-tp18716278p18756698.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: Struts 2 And JFreeChart
I am having a similar issue. I am using Ajax and I want to update the div with an image but it renders it in byte code.. since the div does not know that its an image. I am not sure how to handle this either. I am thinking one way is to use the ChartUtils and write an image on the filesystem and have an image tag that has the source to that image file. Let me know how you do it .. IT will help other as well Randy Burgess-4 wrote: I don't use the Ajax theme or any of the Dojo integration but I assumed that if theme=ajax on the submit button that it would be using Ajax. Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC Regards, Randy Burgess Sr. Software Architect D5 Systems, LLC From: Laurie Harper [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Thu, 31 Jul 2008 02:28:41 -0400 To: user@struts.apache.org Subject: 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 user@struts.apache.org Date: Wed, 30 Jul 2008 12:14:02 -0700 (PDT) To: user@struts.apache.org 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): action name=testChart class=TestBarChart result name=success type=chart 350 300 /result /action 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Struts-2-And-JFreeChart-tp18740589p18757115.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: Re: [S2] Testing if session variable is present
Sure it's possible. Milan Milanovic wrote: Hi Dave, one question, is it possible that Acegi security remove my session variable, because it sometimes ask to login between actions ? But, I'm not sure for this. -- Regards, Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: I think that you didn't understand what is my scenario. I'm reasonably certain that I did. What is the problem ? I still don't know, because you still didn't include the code I asked for. That would have saved at least one posting (this one). I duplicated your scenario, except for that whole mine works thing. I store things in session all the time and have never seen this issue (except one time when our replication wasn't working properly, which isn't a Struts issue). I know of no default mechanism that would remove a session variable without being told to do so. Unless you provide more information it's unlikely you will get any replies that will magically solve your problem. Dave - 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-tp18716278p18756303.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: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
I didn't say it wouldn't work. I, and the Sun documentation I quoted, said it was a known bad programming practice. Dave Milan Milanovic wrote: Hi Dave, no, I think that this is not an issue. I tried with Boolean.TRUE and it is the same, but I earlier used new Boolean(true) and that worked. -- Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: (getSession().put(variable, new Boolean(true)); Use Boolean.TRUE rather than instantiating a new object. Note also that the Javadocs for Boolean state in big bold letters: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. Dave - 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-tp18716278p18756698.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: Stuts 2 and Custom TextProvider
Yes, I tried this. Unfortunately, the minute I include below in struts.xml bean type=com.opensymphony.xwork2.TextProvider name=struts class=...MyCustomTextProvider / Struts complains on startup that bean with the same name has already been defined. Additionally, stepping through struts validation code, I can see that it is not even using this bean definition, but instead, proceeds to create a new instance of the default TextProviderSupport. It is simply hardcoded to do so. Thanks, Alex -- View this message in context: http://www.nabble.com/Stuts-2-and-Custom-TextProvider-tp18658000p18757659.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: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
Dear Dave, O.K. But when you look at this scenario: MyFirstActionClass - show first.jsp - user click on link - MyFirstActionClass.method where I set session variable (getSession().put(variable, new Boolean(true)); - show second.jsp (here I see my variable) - user click on some link - MySecondActionClass.method-third.jsp (here I don't see my variable). I should note that in MySecondActionClass.method I don't clear session or something similar, I just add remove some other variables and set some new. Why my session is obviously cleared when action from another namespace is called ? -- Thx, Milan newton.dave wrote: I didn't say it wouldn't work. I, and the Sun documentation I quoted, said it was a known bad programming practice. Dave Milan Milanovic wrote: Hi Dave, no, I think that this is not an issue. I tried with Boolean.TRUE and it is the same, but I earlier used new Boolean(true) and that worked. -- Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: (getSession().put(variable, new Boolean(true)); Use Boolean.TRUE rather than instantiating a new object. Note also that the Javadocs for Boolean state in big bold letters: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. Dave - 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-tp18716278p18756698.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-tp18716278p18758095.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: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
I already told you I don't know and you continue to refuse to provide the information I've asked for. You also added new information about Acegi, which I responded to by saying that yes, if you're getting logged out it's unlikely you'd keep the same session, as that would somewhat defeat the purpose of any reasonable login/logout mechanism. I don't think I have anything further of value to offer you. I don't know of any issues with session variables; if you're having an Acegi issue then pursue the issue on a Spring forum. Dave Milan Milanovic wrote: Dear Dave, O.K. But when you look at this scenario: MyFirstActionClass - show first.jsp - user click on link - MyFirstActionClass.method where I set session variable (getSession().put(variable, new Boolean(true)); - show second.jsp (here I see my variable) - user click on some link - MySecondActionClass.method-third.jsp (here I don't see my variable). I should note that in MySecondActionClass.method I don't clear session or something similar, I just add remove some other variables and set some new. Why my session is obviously cleared when action from another namespace is called ? -- Thx, Milan newton.dave wrote: I didn't say it wouldn't work. I, and the Sun documentation I quoted, said it was a known bad programming practice. Dave Milan Milanovic wrote: Hi Dave, no, I think that this is not an issue. I tried with Boolean.TRUE and it is the same, but I earlier used new Boolean(true) and that worked. -- Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: (getSession().put(variable, new Boolean(true)); Use Boolean.TRUE rather than instantiating a new object. Note also that the Javadocs for Boolean state in big bold letters: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. Dave - 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-tp18716278p18756698.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-tp18716278p18758095.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]
S2: struts.xml includes not actually loaded in order?
Hi everyone, Our struts.xml file is getting beastly, so I attempted to break it down into multiple files. I read this page: http://struts.apache.org/2.x/docs/can-we-break-up-a-large-strutsxml-file-into-smaller-pieces.html Specifically: You can use include elements in your struts.xml interchangeably with package elements. The configuration objects will be loaded in the order of appearance. The framework reads the configuration from top to bottom and adds objects as they are referenced. Given that note above, I added the included file *after* my base package (where some interceptor stacks are defined). For example (struts.xml): struts package name=baseEAP extends=struts-default abstract=true interceptors interceptor name=DataPrep class= xxx.web.interceptor.DataPreparation / interceptor-stack name=dataPrepStack interceptor-ref name=defaultStack/ interceptor-ref name=DataPrep/ /interceptor-stack /interceptors /package include file=struts-ajax.xml / /struts Further down in struts.xml other packages extend baseEAP and have some actions reference the dataPrepStack interceptor stack --- works great. In struts-ajax.xml, the package also extends baseEAP and one action references dataPrepStack: struts package name=ajax extends=baseEAP,gwt-default !-- supports ajax calls in the menu management section of support portal -- action name=ajaxManageMenus class= xxx.web.action.MenuManagementServiceImpl interceptor-ref name=dataPrepStack / interceptor-ref name=gwt/ /action /package /struts I had hoped this would work like a charm too... but alas no: Jul 31, 2008 9:55:49 AM PDT Error HTTP BEA-101165 Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher. Unable to load configuration. - interceptor-ref - file:/C:/workspace_bea10/mhnEAP/exploded/mhnEAP.ear/mhnEAP.war/WEB-INF/classes/struts-ajax.xml:10:53 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:213) at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:320) Truncated. see log file for complete stacktrace Unable to find interceptor class referenced by ref-name dataPrepStack - interceptor-ref - file:/C:/workspace_bea10/mhnEAP/exploded/mhnEAP.ear/mhnEAP.war/WEB-INF/classes/struts-ajax.xml:10:53 at com.opensymphony.xwork2.config.providers.InterceptorBuilder.constructInterceptorReference(InterceptorBuilder.java:46) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.lookupInterceptorReference(XmlConfigurationProvider.java:1081) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildInterceptorList(XmlConfigurationProvider.java:536) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:374) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:465) Truncated. see log file for complete stacktrace Thoughts? Thanks, -B - This message, together with any attachments, is intended only for the use of the individual or entity to which it is addressed. It may contain information that is confidential and prohibited from disclosure. If you are not the intended recipient, you are hereby notified that any dissemination or copying of this message or any attachment is strictly prohibited. If you have received this message in error, please notify the original sender immediately by telephone or by return e-mail and delete this message, along with any attachments, from your computer. Thank you. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 on Websphere portal 6.1.0.0
Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0.0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts And I get the following exception. [7/30/08 23:48:05:386 PDT] 002a XmlConfigurat E com.opensymphony.xwork2.config.providers.XmlConfigurationProvider reloadRequiredPackages Unable to find parent packages struts-portlet-default [7/30/08 23:48:05:401 PDT] 002a ObjectTypeDet I com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory clinit Setting DefaultObjectTypeDeterminer as default ... [7/30/08 23:48:05:448 PDT] 002a Jsr168Dispatc E org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher serviceAction Could not find action [7/30/08 15:15:05:782 PDT] 003f Jsr168Dispatc E org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher serviceAction Could not find action There is no Action mapped for namespace /view and action name index. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:34) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:415) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:299) at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:128) at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:185) at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:120) at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:573) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114) at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doRender(PortletServletCollaborator.java:68) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105) at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doRender(RRDServerPortletServletCollaborator.java:123) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105) at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doRender(CacheCollaborator.java:92) I have made sure that class loader loads one ones included in webApp first. What else could I be possibly missing? Pls let me know if you need more info Thanks Dinesh
Re: Struts2 on Websphere portal 6.1.0.0
Did you include file=struts-portlet-default.xml/ in your struts.xml? On Thu, Jul 31, 2008 at 9:26 PM, Dinesh Narayanan [EMAIL PROTECTED] wrote: Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0.0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts And I get the following exception. [7/30/08 23:48:05:386 PDT] 002a XmlConfigurat E com.opensymphony.xwork2.config.providers.XmlConfigurationProvider reloadRequiredPackages Unable to find parent packages struts-portlet-default [7/30/08 23:48:05:401 PDT] 002a ObjectTypeDet I com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory clinit Setting DefaultObjectTypeDeterminer as default ... [7/30/08 23:48:05:448 PDT] 002a Jsr168Dispatc E org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher serviceAction Could not find action [7/30/08 15:15:05:782 PDT] 003f Jsr168Dispatc E org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher serviceAction Could not find action There is no Action mapped for namespace /view and action name index. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:34) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:415) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:299) at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:128) at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:185) at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:120) at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:573) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114) at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doRender(PortletServletCollaborator.java:68) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105) at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doRender(RRDServerPortletServletCollaborator.java:123) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105) at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doRender(CacheCollaborator.java:92) I have made sure that class loader loads one ones included in webApp first. What else could I be possibly missing? Pls let me know if you need more info Thanks Dinesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 on Websphere portal 6.1.0.0
That was the issue. I did not include *struts-portlet-default.xml* in struts.xml. Thanks a lot for your help. Dinesh On Thu, Jul 31, 2008 at 12:55 PM, Nils-Helge Garli Hegvik [EMAIL PROTECTED]wrote: Did you include file=struts-portlet-default.xml/ in your struts.xml? On Thu, Jul 31, 2008 at 9:26 PM, Dinesh Narayanan [EMAIL PROTECTED] wrote: Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0.0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts And I get the following exception. [7/30/08 23:48:05:386 PDT] 002a XmlConfigurat E com.opensymphony.xwork2.config.providers.XmlConfigurationProvider reloadRequiredPackages Unable to find parent packages struts-portlet-default [7/30/08 23:48:05:401 PDT] 002a ObjectTypeDet I com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory clinit Setting DefaultObjectTypeDeterminer as default ... [7/30/08 23:48:05:448 PDT] 002a Jsr168Dispatc E org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher serviceAction Could not find action [7/30/08 15:15:05:782 PDT] 003f Jsr168Dispatc E org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher serviceAction Could not find action There is no Action mapped for namespace /view and action name index. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:34) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(Jsr168Dispatcher.java:415) at org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.render(Jsr168Dispatcher.java:299) at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:128) at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:185) at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:120) at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:573) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114) at com.ibm.isclite.container.collaborator.PortletServletCollaborator.doRender(PortletServletCollaborator.java:68) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105) at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doRender(RRDServerPortletServletCollaborator.java:123) at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105) at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doRender(CacheCollaborator.java:92) I have made sure that class loader loads one ones included in webApp first. What else could I be possibly missing? Pls let me know if you need more info Thanks Dinesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: Re: [OT] new Boolean(true)? Re: [S2] Testing if session variable is present
Hi Dave, excuse me for disturbing this list or you personally, I asked for this in Spring forum ( http://forum.springframework.org/showthread.php?p=194333#post194333 http://forum.springframework.org/showthread.php?p=194333#post194333 ). I figured out what I do in those method with session which forces user to log in again, that I don't do in other methods, I do this: // Test if session is valid if (session instanceof org.apache.struts2.dispatcher.SessionMap) { try { ((org.apache.struts2.dispatcher.SessionMap)session ).invalidate(); } catch (IllegalStateException e) { logger.error(Session is not valid!, e); return Action.ERROR; } } Is this possible to erase session ? -- Thx, Milan newton.dave wrote: I already told you I don't know and you continue to refuse to provide the information I've asked for. You also added new information about Acegi, which I responded to by saying that yes, if you're getting logged out it's unlikely you'd keep the same session, as that would somewhat defeat the purpose of any reasonable login/logout mechanism. I don't think I have anything further of value to offer you. I don't know of any issues with session variables; if you're having an Acegi issue then pursue the issue on a Spring forum. Dave Milan Milanovic wrote: Dear Dave, O.K. But when you look at this scenario: MyFirstActionClass - show first.jsp - user click on link - MyFirstActionClass.method where I set session variable (getSession().put(variable, new Boolean(true)); - show second.jsp (here I see my variable) - user click on some link - MySecondActionClass.method-third.jsp (here I don't see my variable). I should note that in MySecondActionClass.method I don't clear session or something similar, I just add remove some other variables and set some new. Why my session is obviously cleared when action from another namespace is called ? -- Thx, Milan newton.dave wrote: I didn't say it wouldn't work. I, and the Sun documentation I quoted, said it was a known bad programming practice. Dave Milan Milanovic wrote: Hi Dave, no, I think that this is not an issue. I tried with Boolean.TRUE and it is the same, but I earlier used new Boolean(true) and that worked. -- Milan newton.dave wrote: --- On Thu, 7/31/08, Milan Milanovic wrote: (getSession().put(variable, new Boolean(true)); Use Boolean.TRUE rather than instantiating a new object. Note also that the Javadocs for Boolean state in big bold letters: Note: It is rarely appropriate to use this constructor. Unless a new instance is required, the static factory valueOf(boolean) is generally a better choice. It is likely to yield significantly better space and time performance. Dave - 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-tp18716278p18756698.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-tp18716278p18758095.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-tp18716278p18764848.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]
Is there any way I can put package.properties file outside war file?
Hi, In our application, currently package.properties is packaged inside the war file at \web-inf\classes directory. But we would like to move it out to a directory like /server/default/conf inside the jboss. Is there anyway this can be done? If yes, can someone please guide me with step-by-step instructions. It will be a great help. Thanks Pranav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is there any way I can put package.properties file outside war file?
Basically Struts just loads the properties from the classpath, so anywhere on the classpath should work. (*Chris*) On Thu, Jul 31, 2008 at 4:18 PM, Pranav [EMAIL PROTECTED] wrote: Hi, In our application, currently package.properties is packaged inside the war file at \web-inf\classes directory. But we would like to move it out to a directory like /server/default/conf inside the jboss. Is there anyway this can be done? If yes, can someone please guide me with step-by-step instructions. It will be a great help. Thanks Pranav - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 on Websphere portal 6.1.0.0
I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE PORTAL. You need to keep the followings in mind: 1- You need to have at least fixpack 13 or 15 ( I am not sure which one, otherwise you CAN NOT RUN STRUTS 2 ON WAS) 2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is missing a patch), so you need to downgrade to 2.0.11.1 till next release (2.0.11.3 or 2.0.12) 3- Once the above you are done with above steps, you need to set the following custom property for WAS server: com.ibm.ws.webcontainer.invokefilterscompatibility = true If you do not set the above property, you can not run struts 2 on WAS as well. However; I did a project using struts on Websphere portal 6.0. IBM provides its own customized struts that works with portal (which is based on struts1), and it is pretty good. I recommend use the IBM's struts that comes with Portal server as you would have a hard time using struts 2 with websphere portal. Hope this helps, - Original Message From: Dinesh Narayanan [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, July 31, 2008 3:26:20 PM Subject: Struts2 on Websphere portal 6.1.0.0 Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0..0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts Thanks Dinesh __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strange Behaviour in FireFox3
Hi, This is how I fixed it: 1. open the struts2-core-2.0.11.jar file 2. extract template\simple\head.ftl 3. edit it and set the debugAtAllCosts attribute to false 4. replace that file in the jar Thanks Markus! Nicole On Thu, Jul 31, 2008 at 5:03 PM, nauke. [EMAIL PROTECTED] wrote: ohh thank you thank you sooo much! I'm about to go home now but I'll try it out first thing tomorrow and let you all know how it went! thanks again, nicole On Thu, Jul 31, 2008 at 4:57 PM, Markus Stauffer [EMAIL PROTECTED] wrote: I had the exact same problem. Turns out it is a problem in dojo 0.4.0 that is shipped with struts2. I include my own build of dojo to solve the problem. kind regards -- Markus Stauffer On 7/31/08, nauke. [EMAIL PROTECTED] wrote: 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 -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] problem still with actionRedirect and redirect results (Struts2.1.2)
I have read a number of reports spanning the last year and describing the problem of wanting to attach parameters to an actionRedirect, as in the following example: result name=input type=redirectAction param name=actionNamemyAction/param param name=id23/param /result This issue has been raised a number of times, I believe, but I am not certain what the official current status is nowadays. I seem to gather that some people think it has been resolved prior to 2.1.2, yet I keep getting the same error messages as described in earlier posts about it (OGNL complaining that the id parameter cannot be applied to ServletActionRedirectResult, or something of the kind). The JIRA tracker lists the following issues: https://issues.apache.org/struts/browse/WW-1714 as fixed in version 2.0.8, but it certainly doesn't work in 2.1.2. (To be honest, my moving from Struts1 to Struts2 has been a very positive experience---apart for OGNL's idiosyncracies, which are very trying. But this one problematic issue about redirectAction is a real shock and disappointment. Assuming that I am right that there is still a bug there (and I hope I am wrong!), I would personally vote for giving that issue the highest level of priority.)
Re: Struts2 on Websphere portal 6.1.0.0
Thanks for the summary, although I disagree with your conclusion ;) Nils-H On Fri, Aug 1, 2008 at 2:21 AM, Struts Two [EMAIL PROTECTED] wrote: I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE PORTAL. You need to keep the followings in mind: 1- You need to have at least fixpack 13 or 15 ( I am not sure which one, otherwise you CAN NOT RUN STRUTS 2 ON WAS) 2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is missing a patch), so you need to downgrade to 2.0.11.1 till next release (2.0.11.3 or 2.0.12) 3- Once the above you are done with above steps, you need to set the following custom property for WAS server: com.ibm.ws.webcontainer.invokefilterscompatibility = true If you do not set the above property, you can not run struts 2 on WAS as well. However; I did a project using struts on Websphere portal 6.0. IBM provides its own customized struts that works with portal (which is based on struts1), and it is pretty good. I recommend use the IBM's struts that comes with Portal server as you would have a hard time using struts 2 with websphere portal. Hope this helps, - Original Message From: Dinesh Narayanan [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, July 31, 2008 3:26:20 PM Subject: Struts2 on Websphere portal 6.1.0.0 Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal 6.1.0..0? I am running into issues when I tried a very simple JSR168 example. Any help would be appreciated. Is there some example of struts2 sample in websphere portal 6.1? A) My portlet.xml contains the following entries init-param nameviewNamespace/name value/view/value /init-param !-- The default action to invoke in view mode. -- init-param namedefaultViewAction/name valueindex/value /init-param B) My struts.xml is struts package name=view extends=struts-portlet-default namespace=/view action name=index class=com.myCompany.proj1.ExampleAction result name=success/WEB-INF/view/index.jsp/result /action /package /struts Thanks Dinesh __ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca - 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]