Re: Language Bundles outside of WAR's
One easy way, which I use during editing HTML pages is unpack war, rename folder to webappname.war and copy and paste your changed pages into folder. Kind regards, Markus > I just had a requirement of placing the language bundles for my > webapplication outside of WAR's so they can be more easily edited. > > I´m running JBOSS and it's works to have Language bundles uniquely > prefixed with the webapp name and placed in the server/conf directory, but > I would like to place them in a directory like server/conf/webappname so > the conf directory does not become crowded with language bundles and hard > to maintain. > > My problem is though that on startup JBOSS does not load properties files > >from subdirs of server/conf > > Is there a different way for me to do this? > > We've had the problem of having to edit text in resource bundles but do > not want to remake and redeploy WAR's when this is done. Anything to keep > our system up and running. > > > Best regards, > Bjossi > > --- > Björn Ingimundarson > Senior Developer > Hex Software :: We Build Character > www.hex.is | tel: +354 517 5456 | mobile: +354 824 4680 > email: [EMAIL PROTECTED] | weblog: http://bjossi.hexia.net > msn: [EMAIL PROTECTED] > > Hexia.net -as if by magic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing parameters
Hi all, just a simple question. I would like to pass a single parameter with a tag. I've searched the net, but there I understand that it is only possible to pass parameters via beans. Is the a simpler way to redender the following with : /myAction.do?action=edit I'm just a little confused now. Thank You, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSF with Struts
Hi everybody! can anybody tell me good links about using JSF with Struts? best regards, markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Arzttermin
Hallo Andreas, ich hab um 9:50 Uhr einen Arzttermin; ich meld mich dann noch mal und sag Bescheid, wann und ob ich heute noch komme. Zu MAP: Dein Programm hab ich gestern noch getestet (mit einer Schleife über alle Sätze aus vip_products), ich hab noch eine Änderung eingebaut, dann war's korrekt. Programm steht unter h:\orawork\map\stringpattern3.sql zu Excel-Reports: Da hab ich gestern das mit dem Password gemacht, hab das aber nur einmal kurz in der Entwicklung getestet. Da stehen die aktuellen Sourcen unter h:\work\java\article\reports\src...\servlet (3 neue Servlets). Falls Ihr eine Übergabe machen müßt. für Stefan zu Kostenlieferanten (hab weder Telefonnummer noch Emailadresse): Die Patche, ich meine *9320 und *9360 stehen im Project-Verzeichnis und sind bis auf die Änderungen vom Torsten vollständig. Die müssen nur in PVCS eingecheckt werden und können hochgeschickt werden. Damit Du noch an meine Sachen rankommst, mein Password (alles kleingeschrieben): Stadt, wo ich letzte Woche war mit angehängter vierstelliger Jahreszahl. Bis gleich Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
writing a FWRequestProcessor
Hello! I would like to write my own FWRequestProcessor. The reason is that I would like to catch some common exception in my Web application (e.g., general database failures). Everything else is done by the superclass. The following code basically works fine, but my problem is that I would like to add error information for the user (what is usually done within the action with context.addErrors(...)). So I wonder if there a way to access the context of the action forwarded to in the request processor? Thanks in advance, Markus protected ActionForward processActionPerform( javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.struts.action.Action action, org.apache.struts.action.ActionForm form, org.apache.struts.action.ActionMapping mapping) throws java.io.IOException, javax.servlet.ServletException { log.debug("processActionPerform()"); try { return super.processActionPerform(request, response, action, form, mapping); } catch (Exception e) { log.error("FWRequestProcessor caught exception: " + e.getMessage()); Throwable ex = e; while (ex instanceof ServletException) ex = ((ServletException) ex).getRootCause(); if (ex instanceof HibernateException) { ActionErrors errors = new ActionErrors(); errors.add("Persistenzfehler", new ActionMessage("error.hibernate.general", "ApplicationListAction " + e.getMessage())); // HibernateSessionFactory.getSession().connection().rollback(); // context.addErrors(errors); ActionForward f = new ActionForward(mapping.getInputForward()); return mapping.getInputForward(); } else if (ex instanceof SQLException) { log.error("SQLException!"); } log.error("throwing new ServletException()"); throw new ServletException(e); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LookupDispatchAction and struts-faces
Hi! I've been trying to migrate part of a web-application from struts to struts-faces. However, I'm having trouble converting those jsp pages that are mapped to a LookupDispatchAction. I did not find any similar questions in the mailing-list archive, so I decided to post this. In struts, the relevant snippet in event.jsp looked like this: , where function was the property used as a parameter in the actionmapping. This was rendered as: After converting the page to using JSF tags, the source snippet became and this was rendered as These are not even remotely similar. This causes problems for the LookupDispatchAction. When I converted other pages, they did work, even if the action was the path of the jsp page. Submitting the form led to the execute() method being run. However, when I try to submit this page, nothing happens. I presume that the execute() method is run, but since the function parameter is present, it ends up not finding the method it's supposed to run. Is there a workaround for any of this? -- Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[struts-faces] Empty Form in Action
Hi! I converted a page from struts to jsf, and I'm running to no end of problems using it. I previously posted a question about getting LookupDispatchActions to work. Since I received no replies and couldn't figure it out for myself, I made a new action that is specific to this page. Now the page is nothing special, jsut a lof of text-fields and a submit button. So part of it looks like this: Start of Problem In the struts-config file, the action maps an anctionform with the name "equipment" to the "/event" action. Now, the action is executed all right, but the form that is sent to the action is completely empty. Every field is null. Does anyone have any idea why this happens and how to fix it? Besides, I can't execute any action when I access the page "event.faces". When I enter event.faces into the address bar, the page loads correctly, but the action is not performed. When I enter event.do into the address bar, I land on the event page and the event is executed when the form is submitted. -- Markus Koivisto - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts-faces] Empty Form in Action
Now, the action is executed all right, but the form that is sent to the action is completely empty. Every field is null. Does anyone have any idea why this happens and how to fix it? It sounds like you are not returning an ActionForward from your action execute method. Make sure that you have a forward configured under your action or a global forward. Returning null will result in a blank page. Yes. Returning a null forward will result in a blank page. However, that's not what's happening. The Action does return a forward. What's happening is that the Servlet apparently creates a new ActionForm object that is empty instead of using the one tha user filled in. For clarity, the action looks something like this: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { log.info(((EventForm)form).getDesc()); return mapping.findForward("success"); } No matter what the user writes, the log will show that the the string is null. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Accessing VelocityEngine in action (struts2)
Dear everyone, I've setup my Webapp with Struts2 using Tiles, but I also want to use Velocity to read a template and send a newsletter email. It would be good if I could access the already configured VelocityEngine from within my action. Otherwise I would need to inject the ServletContext by myself when initializing Velocity since I want to use the WebappResourceLoader. The result type "velocity" work properly, but how can I read a Template? Thank you for any hint, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Creating menu bar based on session information
you could do something like this: ... where (bool) hasPrivilege(List,...) is a function in your action. Markus Am 15.04.2011 13:57, schrieb Christian Grobmeier: Hi all, this is probably a trivial question, but I am unsure how to solve it best. I have an object User user. It has the properties name, password and List roles. Now I would like to create a navigation bar in my struts 2.2.1 jsp pages. I wanted to avoid huge chunks of logic in my code. Therefore java code in my templates should be avoided. I have thought if the if/else struts tag would help me. But can I access a list and look if a specific role is there? How do others do that? Thanks in advance, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
XML Validation and slashes in action name
Hello, I have slashes in my Action names, e.g. ModelName/save What I want to do is to add validation only for the save action. As far as I understand, I can create a validation file specifically for the action name, and not for the method to be invoked. ModelAction-save-validation.xml does not seem to work. ModelAction-ModelName_save-validation.xml neither works. Is there any workaround? Or do I have to change my action names? Regards, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: XML Validation and slashes in action name
following post cleared my question: http://www.mail-archive.com/user@struts.apache.org/msg77238.html thanks. Am 24.06.2011 12:58, schrieb Markus Demetz: Hello, I have slashes in my Action names, e.g. ModelName/save What I want to do is to add validation only for the save action. As far as I understand, I can create a validation file specifically for the action name, and not for the method to be invoked. ModelAction-save-validation.xml does not seem to work. ModelAction-ModelName_save-validation.xml neither works. Is there any workaround? Or do I have to change my action names? Regards, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Access namespace-name or/and action name from jsp in Struts2
Hi, I would like to retrieve the name of the current namespace and possibly the action from the jsp page using Struts2. My intention is to assign a css class to a container to have a better control of the layout. e.g. ... Any hints? Thank you, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Call a function after invocation but before jsp rendering
hi there, my application uses struts2 (latest version), siles with JSP and hibernate. what I am trying to do is to call a method after the action has been executed, but before the JSP is getting rendered. to be concrete, I want to call a createTitle() method which is common for all my actions (extending BaseAction with a default implementation of createTitle()), but when I use an Interceptor for that and call it after the action invocation, the JSP has already been rendered. So my question is, at which point is the JSP rendered? can I do something between? since I want to be able to set the title according to eventual errors, I cannot do that before the action invocation. any suggestions? thanks, markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Call a function after invocation but before jsp rendering
perfect, didn't know that interceptor..! thank you!! Am 15.02.2012 21:54, schrieb Dave Newton: On Wed, Feb 15, 2012 at 3:52 PM, Markus Demetz wrote: to be concrete, I want to call a createTitle() method which is common for all my actions (extending BaseAction with a default implementation of createTitle()), but when I use an Interceptor for that and call it after the action invocation, the JSP has already been rendered. So my question is, at which point is the JSP rendered? can I do something between? Yes, your interceptor can use a PreResultListener to wedge itself in-between the invocation and render. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
nested property tag in action tag
hi all, when I use the tag inside a jsp with executeResult="true", so I can access the properties of that action with the tag inside the result. but is there a way to to access the same property without forwarding to a result, say doing it inline like this: // jsp code I assume that when executeResult="false" the action is not put onto the stack... I know I can put it manually onto the value stack like the docs say, but this currently confuses me... is there a better way or maybe one has a clear explanation? thanks, markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: nested property tag in action tag
ok, for now I got it working by doing it in this way: the thing is that I use the OpenSessionInView pattern with hibernate, so I get lazy exceptions here since the action already executed (now I prepared my specific properties in non lazy mode). I'm doing so, beacause I need the computation of another action (or other actions) to show some common things (e.g. an account summary shown in the left column for every action in the /account namespace) while executing my action without needing to provide a custom view for every call of , so I thought I could put it inline. regards, markus Am 21.03.2012 02:17, schrieb vEnkaTa mohAna rAo SriperumbUdUru: I think, you need to reconsider your design let us what you want to do? why are you doing so? On Tue, Mar 20, 2012 at 6:19 PM, Markus Demetz wrote: hi all, when I use the tag inside a jsp with executeResult="true", so I can access the properties of that action with the tag inside the result. but is there a way to to access the same property without forwarding to a result, say doing it inline like this: // jsp code I assume that when executeResult="false" the action is not put onto the stack... I know I can put it manually onto the value stack like the docs say, but this currently confuses me... is there a better way or maybe one has a clear explanation? thanks, markus --**--**- To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2
Hi, you have no result named "success" for your "user" action defined in struts.xml, but you return "success" in your execute method. also check the case sensitivity of "login.jsp" and "Login.jsp" defined as result. Markus Markus Am 03.07.2012 20:31, schrieb Avinash: login.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@taglib prefix="s" uri="/struts-tags"%> http://www.w3.org/TR/html4/loose.dtd";> Insert title here web.xml http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; id="WebApp_ID" version="3.0"> crs1 Login.jsp struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* LoginAction --- package com.it.action; import com.opensymphony.xwork2.ActionSupport; public class LoginAction extends ActionSupport { private static final long serialVersionUID = 1L; private String username; private String password; public String execute() { return SUCCESS; } public String getUsername() { return username; } public void setUsername(String username) { this.username=username; } public String getPassword() { return password; } public void setPassword(String password) { this.password=password; } } struts.xml -- http://struts.apache.org/dtds/struts-2.0.dtd";> /Login.jsp /Login.jsp -- View this message in context: http://struts.1045723.n5.nabble.com/Struts2-tp5710145p5710153.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Hibernate problem with OGNL
Hi, I don't know if this is the right place to ask, but maybe there is anyone who has experienced the same problem. I'm using Struts2 (latest version), with Hibernate (latest version) My database models all have getId(). I have situations, where the getId() method of my model class returns null when navigating through OGNL e.g. when calling . When I call getId() from the method in my action class (e.g. UserListAction iterating though users and calling user.getGallery().getId()), it returns the id as expected. If I do that first in my action class, then also my renders the id as expected; so I thought about a lazy loading issue... all my getId() methods are public, NOT final, and the Long id members are protected. I also tried to add a getMyId() method in the model which calls getId() from within the same class. getMyId() { return getId(); } This surprisingly works and outputs the correct id when calling Did anyone experience something simliar or has any suggestions? OGNL 3.0.6, Hibernate 4.2, Struts 2.3.12 Thanks, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Hibernate problem with OGNL
Hi, I have situations, where the getId() method of my model class returns null when navigating through OGNL e.g. when calling . Have you tried or No luck :-( I also tried with JSTL now without success. It's very strange, since sometimes it works and then it reappears again. I'll ask at the hibernate forum. Regards, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Hibernate problem with OGNL
Hi, I think I've found the problem. I had javassist 3.17.1 (latest) in my project but hibernate 4.2 ships with version 3.15.0 Now it seems to work! Thank you, and sorry for misplacing my question here! Regards, Markus Am 27.03.2013 17:23, schrieb Steve Higham: On 27/03/2013 10:42, Markus Demetz wrote: Hi, I have situations, where the getId() method of my model class returns null when navigating through OGNL e.g. when calling . Have you tried or No luck :-( I also tried with JSTL now without success. It's very strange, since sometimes it works and then it reappears again. I'll ask at the hibernate forum. Regards, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org I've seen this behavior on newly created instances. Hibernate doesn't know the ID until the object is persisted to the DB. Hibernate tries to delay this as long as possible to minimise DB writes. You would have thought a request for the ID would force a DB write but Hibernate doesn't seem to implement this behavior. If you want the ID you need to force the DB write first. Steve - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2-018, Struts 2.3.15.2: action: prefix for buttons not working after upgrade to Struts 2.3.15.2
Hi everyone, I have just upgraded a web application from Struts 2.3.15.1 to Struts 2.3.15.2 (running on Tomcat 7.0.27). Now, for any button using the "action:" prefix as described in S2-018, the action mapping does not working anymore. I.e., Backward Compatibility for the "action:" prefix is not given, at least not in my use case. Example: Clicking the following button... > id="..." value="..." class="...">Create ...yields this 404 report: > HTTP Status 404 - /my-server/user/createsubmit.action > > type: Status report > > message: /my-server/user/createsubmit.action > > description: The requested resource (/my-server/user/createsubmit.action) is > not available. > > Apache Tomcat/7.0.27 while with Struts 2.3.15.1 this was working okay. (I'm attaching the struts.xml section for reference, although it's obvious that that must be okay since it hasn't unchanged for the update.) Is there a way to fix this other than to write a custom ActionMapper as proposed in the Security Bulletin for S2-018 (see link below)? Any advice muchly appreciated, since I would like to get the securtiy threat out of the way. Markus http://struts.apache.org/release/2.3.x/docs/s2-018.html struts.xml: /user/create_success.ftl /user/create.ftl /user/create.ftl /user/error.ftl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: S2-018, Struts 2.3.15.2: action: prefix for buttons not working after upgrade to Struts 2.3.15.2
Hi Lukasz, > There is no other way - you must wait for new release (hope soon) or > write custom action mapper. many thanks for your fast reply and your continuing efforts in supporting the Struts community. Do you have any idea when the a release fixing the issue can be available? And is there any chance to get more information about the specifics of the vulnerability behind S2-018? We are currently considering to filter out "action:” elements via URL rewriting, but without knowing any further details we cannot be sure that that will prevent the potential exploit. Thanks, Markus [1] S2-018: http://struts.apache.org/release/2.3.x/docs/s2-018.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: S2-018, Struts 2.3.15.2: action: prefix for buttons not working after upgrade to Struts 2.3.15.2
>> Do you have any idea when the a release fixing the issue can be >> available? And is there any chance to get more information about the >> specifics of the vulnerability behind S2-018? > > It should be soon, patch is under review. I cannot share any details > now about the vulnerability. Many thanks, Lukasz. >> We are currently considering to filter out "action:” elements via URL >> rewriting, but without knowing any further details we cannot be sure >> that that will prevent the potential exploit. > > I'm not sure what you mean by "filter out by url rewriting" but maybe > you could share your solution here? And it looks like the right > direction. I'll check if that is feasible and post here if I think it can be useful for someone else. Best regards, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: S2-018, Struts 2.3.15.2: action: prefix for buttons not working after upgrade to Struts 2.3.15.2
Hi Greg. > So the statement about Backwards Compatibility on > http://struts.apache.org/release/2.3.x/docs/s2-018.html is incorrect? > > *Backward Compatibility* > After upgrading to Struts >= 2.3.15.2, applications using the "action:" > should still work as expected. > > This doesn't appear to be true. You are right, there is a bug in Struts 2.3.15.2 that breaks the "action:" functionality. According to Lukasz Lenart, a fix is currently under review and will hopefully available soon. Regards, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [ANN] Struts 2.3.15.2 GA release available - security fix
Hi Łukasz, > The latest version is here: > http://people.apache.org/builds/struts/2.3.15.3 thanks for the update and the quick turnaround on this. I can confirm that with Struts-2.3.15.3, my issues with "action:" buttons are fixed. I. e., Backward Compatibility for applications using the "action:" prefix as stated in S2-018 is restored. Many thanks! Markus http://struts.apache.org/release/2.3.x/docs/s2-018.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Is Struts 2.3.15.2 affected by the security vulnerability S2-018?
Dear group, I hope that you can help to clear up my confusion about the current status of Struts 2.3.15.2 with regards to the security vulnerability S2-018 (see [1]). So far, it was my understanding that S2-018 is fixed with the 2.3.15.2 release. And the release notes still suggest that this is the case (see [2]). Also, in [3] the vulnerability is categorized as only affecting Struts versions up to 2.3.15.1. But now I found that S2-018 is listed as vulnerability affecting Struts 2.3.15.2 (see [4]). Also, the description of S2-018 currently states the following: "In Struts 2 before 2.3.15.3, under certain conditions this can be used to bypass security constraints." I am aware that there are backward compatibility issues with the action: prefix not working with Struts 2.3.15.2. However, some of the projects I am administrating (and which are running Struts 2.3.15.2) do not make use of that feature. My question is: do I need to update those systems in order not to be affected by a security vulnerability? Or is S2-018 merely listed as affecting Struts 2.3.15.2 because of the backward compatibility issue, but the security issue is fixed? Many tanks in advance, Markus [1] http://struts.apache.org/development/2.x/docs/s2-018.html [2] http://struts.apache.org/development/2.x/docs/version-notes-23152.html [3] http://www.cvedetails.com/cve/CVE-2013-4310/ [4] http://struts.apache.org/downloads.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.3.17
Hi Łukasz and all. Am 26.04.2014 06:24, schrieb Lukasz Lenart: > Let me finish 2.3.16.2 ;-) First of all, many thanks to the whole team for getting out Struts 2.3.16.2 with the S2-021 fix that quick. I am now in a situation - probably like many other users on this list - that I have a number of systems running Struts 2.3.16.1 with the mitigation patch [1] applied. I am aware that these patches are not as secure as what is contained in the 2.3.16.2 release. However, with the Struts 2.3.17 release right ahead, I would rather avoid the efforts of updating all those systems twice within just a few days. On the other hand, if it should be more than only a few days until 2.3.17 is available, I would deploy the 2.3.16.2 update right away... So, do you have an updated ETA for Struts 2.3.17 for us? Many thanks and best regards, Markus [1] http://struts.apache.org/announce.html#a20140424 -- | | | knipp |Knipp Medien und Kommunikation GmbH ---Technologiepark Martin-Schmeisser-Weg 9 44227 Dortmund Germany Dipl.-Inform. Fon:+49 231 9703-0 Fax:+49 231 9703-200 Markus Fischer SIP:markus.fisc...@knipp.de Software DevelopmentE-Mail: markus.fisc...@knipp.de Register Court: District Court Dortmund, HRB 13728 Chief Executive Officers: Dietmar Knipp, Elmar Knipp - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Issues with latest struts upgrade:
Hi Satish, > Thanks Lukas. Correct me If I'm wrong.. struts-2.3.16.2 is supposed to > contain the previous fixes as well , is it not the case? If that's not > the case how to get the jar's with the fixes. Struts 2.3.16.2 does include previous fixes. That is most probably the reason for the issue you are experiencing. You might want to have a look at the version notes of the releases between 2.3.15.1 and 2.3.16.2 [1], especially [2]. HTH, Markus [1] http://struts.apache.org/downloads.html [2] http://struts.apache.org/development/2.x/docs/version-notes-2316.html >> On Tue, Apr 29, 2014 at 9:47 PM, Lukasz Lenart >> wrote: >> You missed three versions in between, please read version notes of each. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
ParameterNameAware issue
Hi, I am trying to upgrade my application from 2.3.15.2 to 2.3.16.3. Some of my actions implement the ParameterNameAware interface to check if a parameter will be accepted. I have parameters of the form like "user.username" (e.g. loginform) which will be passed to the acceptableParameterName(String) function of the LoginAction class. The LoginAction has a User Object with a setUsername method. I didn't want to use the model-driven approach. When upgrading to struts 2.3.16.3 the acceptableParameterName function is getting called multiple times with different combinations: "user.username", "user" and "username". Is it wrong to use dots in parameter names? Any suggestions? Best regards, Markus Demetz - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Is the Dojo plugin version shipped with Struts 2.3.x vulnerable?
Hi all, I have a question regarding the patch level of the Dojo plugin shipped with Struts 2.3.x. According to the Apache Struts 2 Documentation (see [1]), Struts 2.3.x ships with Dojo 0.4.3, which is vulnerable to two major security issues (CVE-2010-2276 and CVE-2010-2272, see [2]). Is a Struts 2.3.x system using the Dojo plugin vulnerable to these security issues, or have they been fixed somehow? Any information or links to further reading greatly appreciated. Cheers, Markus [1] http://struts.apache.org/release/2.3.x/docs/dojo-head.html [2] http://www.cvedetails.com/vulnerability-list/vendor_id-7641/product_id-12940/version_id-70187/Dojotoolkit-Dojo-0.4.3.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Is the Dojo plugin version shipped with Struts 2.3.x vulnerable?
Hi. >> Is a Struts 2.3.x system using the Dojo plugin vulnerable to [...] >> security issues, or have they been fixed somehow? Am 06.10.2014 um 16:10 schrieb Dave Newton: > I'd add that since the plugin has been deprecated since S2.1 it's unlikely > anything was ever done to deal with it. > > Lukasz Lenart wrote: > Probably it's a vulnerable version - I don't know if the plugin's > author did something special to build initial Dojo JS lib Many thanks for the quick answers to the both of you. This is what I have been expecting, too, especially since I haven't been able to find any hints regarding a potential fix or workaround despite a rather lengthy search. Looks like the best option is to strip the Dojo plugin / to replace the functionality by jQuery or some other library. Thanks again, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Is the Dojo plugin version shipped with Struts 2.3.x vulnerable?
Hi. Am 06.10.2014 um 16:43 schrieb Christoph Nenning: >> There's an S2-jQuery plugin, which for simple (and some complex) is a > solid >> replacement. >> >> I personally tend to do the JS stuff manually, YMMV. > you can find it here: > https://github.com/struts-community-plugins/struts2-jquery Thank you both for the helpful suggestions. :) Off the top of my head I would think that using a "regular" jQuery version (i.e., one that does not come bundled with Struts) would be a more flexible solution. Or are there any major improvements with the S2-jQuery plugin or major drawbacks with the regular jQuery library that I am missing? Thanks, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts2 Roadmap w.r.t. Dojo plugin (was Re: Is the Dojo plugin version shipped with Struts 2.3.x vulnerable?)
Hi all. >>> According to the Apache Struts 2 Documentation (see >>> [1]), Struts 2.3.x ships with Dojo 0.4.3, which is vulnerable to two >>> major security issues (CVE-2010-2276 and CVE-2010-2272, see [2]). >> Probably it's a vulnerable version > I'd add that since the plugin has been deprecated since S2.1 it's unlikely > anything was ever done to deal with it. Given that the plugin has been deprecated already, does anyone know for which release the removal is planned? I was not able to find any documentation regarding a Dojo plugin roadmap. Cheers, Markus >> [1] http://struts.apache.org/release/2.3.x/docs/dojo-head.html >> >> [2] >> http://www.cvedetails.com/vulnerability-list/vendor_id-7641/product_id-12940/version_id-70187/Dojotoolkit-Dojo-0.4.3.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 Roadmap w.r.t. Dojo plugin (was Re: Is the Dojo plugin version shipped with Struts 2.3.x vulnerable?)
Am 20.10.2014 um 16:55 schrieb Lukasz Lenart: > 2014-10-20 16:49 GMT+02:00 Markus Fischer : >> Given that the plugin has been deprecated already, does anyone know for >> which release the removal is planned? I was not able to find any >> documentation regarding a Dojo plugin roadmap. > > As from version 2.5 > https://cwiki.apache.org/confluence/display/WW/Struts+Next#StrutsNext-PlanforStruts2.5 Thank you, Łukasz. That is the information I was looking for (although I was hoping for a 2.3.X or 2.4 answer ;-). So, I second Dave's vote for a soon removal. Thanks, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Different name mapping in Struts 2.3.28 (was Re: [ANN] Apache Struts 2.3.28 GA)
Hi all, after migrating from Struts 2.3.24.1 to 2.3.28, I get several FreeMarker template errors for missing/null elements for expressions that worked fine before, like this: > FreeMarker template error > > The following has evaluated to null or missing: > ==> iPhone [in template "..." at line X, column Y] What the problematic expressions have in common is that the Java methods they refer to have camel case names with (at least?) two consecutive upper case letters, as in "isIPhone". This seems to be mapped in a different way with Struts 2.3.28 than it has been before. (See below for two examples of the different mapping behaviour in Struts 2.3.24.1 and 2.3.28). My question is: Is this a bug? Or is this something that was introduced intentionally to comply with some standard or convention? Examples for Freemarker expression evaluation ==> iPhone (Method name: isIPhone) Expr. | 2.3.24.1 | 2.3.28 iPhone | OK| error IPhone | OK| OK ==> hCardElements (getHCardElements) Expression | 2.3.24.1 | 2.3.28 hCardElements | OK| error HCardElements | OK| OK TIA Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Different name mapping in Struts 2.3.28 (was Re: [ANN] Apache Struts 2.3.28 GA)
Hi Łukasz, >> after migrating from Struts 2.3.24.1 to 2.3.28, I get several FreeMarker >> template errors for missing/null elements for expressions that worked >> fine before, like this: >> >> ==> iPhone (Method name: isIPhone) >> >> Expr. | 2.3.24.1 | 2.3.28 >> iPhone | OK| error >> IPhone | OK| OK > It's due to fixed OGNL version which properly supports JavaBean > Specifications now. You can revert to prior version of OGNL to keep > the old behaviour. thank you very much for the quick reply (and all your work for the Struts project). Cheers, Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Different name mapping in Struts 2.3.28 (was Re: [ANN] Apache Struts 2.3.28 GA)
Hi Martin, >>>> after migrating from Struts 2.3.24.1 to 2.3.28, I get several FreeMarker >>>> template errors for missing/null elements for expressions that worked >>>> fine before, like this: >>>> >>>> ==> iPhone (Method name: isIPhone) >>>> >>>> Expr. | 2.3.24.1 | 2.3.28 >>>> iPhone | OK| error >>>> IPhone | OK| OK > > MG>markus ..who/what generates text string iPhone instead of IPhone?..can i > assume this is USER-AGENT HTTP Header? "iPhone" is variable in a Freemarker template named that way by a programmer to refer to the underlying isIPhone Java method. So nothing that is automatically generated. > MG>does anyone know if new Freemarker 2.3.28+ will provide OGNL workaround > for this testcase? I'm afraid I don't. Markus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
extend tiles
Hi, I am new to tiles and I'm trying to do some thing like this: I want the subLayout to inherit the mainLayout's definition and the tile "myTile" to extend the subLayout. Is this possible in any way? Or does anybody know a tutorial about tiles with more levels of depth? Thanks, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: passing parameters
ok thanks, but I forgot that it should be dynamically, e.g: /myAction?action=<%= MyCons.EDIT %> but so it does not work. markus > -Ursprüngliche Nachricht- > Von: Gareth Evans [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 1. Februar 2006 12:14 > An: Struts Users Mailing List > Betreff: Re: passing parameters > > > Your Text > > Should do the trick. > > Note: You do not need the .do > > Gareth > > Markus wrote: > > > Hi all, > > > > just a simple question. > > > > I would like to pass a single parameter with a tag. > > I've searched the net, but there I understand that it is only > > possible to pass parameters via beans. > > > > Is the a simpler way to redender the following with : > > > > /myAction.do?action=edit > > > > I'm just a little confused now. > > > > Thank You, > > Markus > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > Gareth Evans > > MSoft eSolutions Limited > Technology Centre > Inward Way > Rossmore Business Park > Ellesmere Port > Cheshire > CH65 3EN > > -- > Tel:+44 (0)870 0100 704 > Fax:+44 (0)870 9010 705 > E-Mail: [EMAIL PROTECTED] > Web:www.msoft.co.uk > > -- > Terms: > Please note that any prices quoted within this e-mail are subject to VAT. > All program details and code described in this e-mail are subject to > copyright © of MSoft eSolutions Limited and remain the intellectual > property of MSoft eSolutions Limited. > Any proposal or pricing information contained within this e-mail are > subject to MSoft eSolutions' Terms and Conditions > -- > Disclaimer: > This message is intended only for use of the addressee. If this message > was sent to you in error, please notify the sender and delete this > message. MSoft eSolutions Limited cannot accept responsibility > for viruses, > so please scan attachments. Views expressed in this message do not > necessarily reflect those of MSoft eSolutions Limited who will not > necessarily be bound by its contents. > > > > - > 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]
FormFile validation
Hi all, I have a formfile and a bean with getters and setters. When validation fails, the other fields get the values already inserted, but the file input field gets empty and must be reselected. Is this normal, or is there a way to keep the file location in the input field? thanks, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
remove ActionForm from session
Hi all, i have some ActionForms which I declared with a session scope. This because I validate them over more steps. After a completed task (i.e. registration) I would like to remove them to keep session small. is there a simple way to do that? thanks! markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with enclosed by a
Hi, I'm trying to do a link over an image like this: But it doesn't work. It leads to a strange behaviour in Internet Explorer... The browser shows the link (in the statusbar) when the mouse is over the image, but the link doesn't work. When rightclicking->open in new window.. it works. In Mozilla it seems to work correctly... When replacing everything works fine, but i need the image to be context-root relative. Whats wrong? Thank you very much, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: problems with enclosed by a
> What does the raw html look like? produces: it works in mozilla but not in IE. markus > > >>> [EMAIL PROTECTED] 3/13/2006 9:38:48 AM >>> > Hi, > > I'm trying to do a link over an image like this: > > > > > > But it doesn't work. It leads to a strange behaviour in Internet > Explorer... > The browser shows the link (in the statusbar) when the mouse is over > the > image, but the link doesn't work. When rightclicking->open in new > window.. > it works. > In Mozilla it seems to work correctly... > > When replacing everything works fine, > but i need the image to be context-root relative. > > Whats wrong? > > Thank you very much, > Markus > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ > > Confidentiality Statement: > This email/fax, including attachments, may include confidential > and/or proprietary information and may be used only by the person > or entity to which it is addressed. If the reader of this > email/fax is not the intended recipient or his or her agent, the > reader is hereby notified that any dissemination, distribution or > copying of this email/fax is prohibited. If you have received > this email/fax in error, please notify the sender by replying to > this message and deleting this email or destroying this facsimile > immediately. > > - > 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]
AW: problems with enclosed by a
ok thank you for your answers. I'll fix it in some way... thanks, markus > -Ursprüngliche Nachricht- > Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 13. März 2006 18:40 > An: Struts Users Mailing List > Betreff: Re: problems with enclosed by a > > > I think the proper way is to have a regular link and to make it look > like an image with CSS. This way a link will stay a legible link in > text-only mode. Same works with a button. > > Image button is an atavism. > > On 3/13/06, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > per http://struts.apache.org/struts-taglib/tagreference-struts-html.html > > > > # Render an input tag of type "image" Renders an HTML > > tag of type "image" > > # Render an HTML img tag Renders an HTML element with > > the image at the specified URL > > > > > -Original Message- > > > From: Markus Demetz [mailto:[EMAIL PROTECTED] > > > Sent: Monday, March 13, 2006 11:38 AM > > > To: Struts Users Mailing List > > > Subject: AW: problems with enclosed by a > > > > > > > > > > > > > What does the raw html look like? > > > > > > > > > > > > > > > > > > > > > produces: > > > > > > > > name="" src="/images/mf.jpg"> > > > > > > it works in mozilla but not in IE. > > > > > > markus > > > > > > > > > > > >>> [EMAIL PROTECTED] 3/13/2006 9:38:48 AM >>> > > > > Hi, > > > > > > > > I'm trying to do a link over an image like this: > > > > > > > > > > > > > > > > > > > > > > > > But it doesn't work. It leads to a strange behaviour in Internet > > > > Explorer... The browser shows the link (in the statusbar) when the > > > > mouse is over the > > > > image, but the link doesn't work. When rightclicking->open in new > > > > window.. > > > > it works. > > > > In Mozilla it seems to work correctly... > > > > > > > > When replacing everything > > > works fine, > > > > but i need the image to be context-root relative. > > > > > > > > Whats wrong? > > > > > > > > Thank you very much, > > > > Markus > > > > > > > > > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > __ > > > > > > > > Confidentiality Statement: > > > > This email/fax, including attachments, may include > > > confidential and/or > > > > proprietary information and may be used only by the person > > > or entity > > > > to which it is addressed. If the reader of this email/fax > > > is not the > > > > intended recipient or his or her agent, the reader is > > > hereby notified > > > > that any dissemination, distribution or copying of this > > > email/fax is > > > > prohibited. If you have received this email/fax in error, please > > > > notify the sender by replying to this message and deleting > > > this email > > > > or destroying this facsimile immediately. > > > > > > > > > > > - > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts-Faces h:dataTable
Hi! I'm trying to integrate struts-faces to my Struts applications. In the execute(...) method I put a Collection of items ("bookList") to the request and forward to a faces page. I wondered if in the faces page i could do something like this: Title Author Available But this leads to an Assertion-Error. Is it possible in any way to use a request attribute as an input for the dataTable? Thanks, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s2 override request_locale
Dear All Consider the following scenario: The preferred language of the user is store in the database. I want to override any struts2 i18n settings when the user logs in. What is stored in the database is of higher priority than e.g. what the web browser sends in the HTTP request headers. How can I achieve my goal? I tried to override the "request_locale" and "locale" variables with my own Locale. But unfortunately this is not of a permanent nature for the users session. Any help is appreciated. Kind regards -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
s2 File Upload Progress Bar
Hello Has anyone tried to implement a file upload progress bar in s2? I have seen this technique on http://www.learntechnology.net/content/ajax/ajax_upload.jsp . Regards -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Keep Objects over request
Hi all! I'm looking for a convenience way to keep an Object over a single request. I know that i could put it into the session and remove it afterwards, but is there another way to handle this, without needing to remove it explicitely? For those who know Symfony (php framework) there is a setFlash(..) method which keeps objects alive over a request and deletes them afterwards. Is there something similar in Struts (ver.1) or some approach? Thank you, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s2 override request_locale
It is not the best solution to Implement the LovaleProvider and the getLocale() method: Instead I wrote my own Interceptor that manual set the Locale "invocation.getInvocationContext().setLocale()". Another thing that I do not understand is why in the default Interceptor stack the i18n intereceptor is called after the prepare interceptor. In the prepare() methode the Locale is not set, because the i18n interecptor is invoked later in the stack. I had to manualy regroup the defaultStack and swap the i18n and prepare interceptors. Maybe this should be re-arranged in the defaultStack? Regards and thanks for all the help Markus Stauffer On Wednesday 17 October 2007 14.07:14 Dave Newton wrote: > Have you tried overriding the getLocale() method of > ActionSupport-derived classes? > > --- Markus Stauffer <[EMAIL PROTECTED]> wrote: > > Dear All > > > > Consider the following scenario: The preferred > > language of the user is > > store in the database. I want to override any > > struts2 i18n settings > > when the user logs in. What is stored in the > > database is of higher > > priority than e.g. what the web browser sends in the > > HTTP request > > headers. > > > > How can I achieve my goal? I tried to override the > > "request_locale" > > and "locale" variables with my own Locale. But > > unfortunately this is > > not of a permanent nature for the users session. > > > > Any help is appreciated. > > > > Kind regards > > -- > > Markus Stauffer > > - > > > 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]
s2 tooltip
Hello What happened to all the tooltip parameters in the struts 2 tags? I can't use the parameters tooltipConfig, tooltipCssClass, tooltipDelay and tooltipIconPath in a s:textfield tag. They are not defined in the tld. I'm using struts 2.0.11 and I would like to set a custom image for the tooltip. Regards -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do i obtain the selected value of the select element
Hi name="concept" means the struts Action will call the setConcept() method with the selected value as parameter. You want to add an instance variable named conecept in your Action class. Add getters and setters as well. Regards -- Markus Stauffer On Wed, Feb 13, 2008 at 5:31 AM, Prashant Khanal <[EMAIL PROTECTED]> wrote: > Hello all, > I just started working on struts 2 and stuck in a problem. > I have a page that consists of a select element and a submit button: > > listKey="id" > listValue="bannerName" /> > > > The select element populates list of Banner objects. > @Entity > @Table(name="DTC_BANNER") > public class Banner implements Serializable { > > private Long id; > private String bannerName; > > @Id > @GeneratedValue(strategy=GenerationType.AUTO) > @Column(name="banner_id") > public Long getId() { > return id; > } > public void setId(Long id) { > this.id = id; > } > > @Column(name="banner_name") > public String getBannerName() { > return bannerName; > } > public void setBannerName(String bannerName) { > this.bannerName = bannerName; > } > > } > > So i fetch the list of available banners from the database and populate in > the select element. The select element displays correctly. > > Now after the user clicks on the submit button the > SequenceSelectionAction.java comes into act and now i want to fetch the > banner selected in the previous page. In fact i could only fetch the id of > the banner object selected as the listKey property is assigned "id". > > Is there any way i can get the Banner object rather than just id? > > -- > Thanks, > Prashant Khanal <[EMAIL PROTECTED]> > <http://www.nepalhomepage.com> > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how do i obtain the selected value of the select element
Have a look at the struts-showcase examples. There are lots of s:select tags with Actions. http://www.planetstruts.org/struts2-showcase/tags/ui/example!input.action Regards -- Markus Stauffer On Wed, Feb 13, 2008 at 9:17 AM, Prashant Khanal <[EMAIL PROTECTED]> wrote: > Hello Markus, > > Can you please elucidate your mail with an example? > Actually my requirement is if i use a list of objects to populate on the > select element, how can i get the selected element as an object. For example > if i populate select element using list of Banner objects, how can i get > the selected value as a Banner object not just as an id. > My be i am missing something as i am new to struts 2. > > > > > On 2/13/08, Markus Stauffer <[EMAIL PROTECTED]> wrote: > > > > Hi > > name="concept" means the struts Action will call the setConcept() > > method with the selected value as parameter. You want to add an > > instance variable named conecept in your Action class. Add getters and > > setters as well. > > > > Regards > > -- > > Markus Stauffer > > > > > > On Wed, Feb 13, 2008 at 5:31 AM, Prashant Khanal > > <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > I just started working on struts 2 and stuck in a problem. > > > I have a page that consists of a select element and a submit button: > > >> method="post"> > > > > > listKey="id" > > > listValue="bannerName" /> > > > > > > > > > The select element populates list of Banner objects. > > > @Entity > > > @Table(name="DTC_BANNER") > > > public class Banner implements Serializable { > > > > > > private Long id; > > > private String bannerName; > > > > > > @Id > > > @GeneratedValue(strategy=GenerationType.AUTO) > > > @Column(name="banner_id") > > > public Long getId() { > > > return id; > > > } > > > public void setId(Long id) { > > > this.id = id; > > > } > > > > > > @Column(name="banner_name") > > > public String getBannerName() { > > > return bannerName; > > > } > > > public void setBannerName(String bannerName) { > > > this.bannerName = bannerName; > > > } > > > > > > } > > > > > > So i fetch the list of available banners from the database and populate > > in > > > the select element. The select element displays correctly. > > > > > > Now after the user clicks on the submit button the > > > SequenceSelectionAction.java comes into act and now i want to fetch the > > > banner selected in the previous page. In fact i could only fetch the id > > of > > > the banner object selected as the listKey property is assigned "id". > > > > > > Is there any way i can get the Banner object rather than just id? > > > > > > -- > > > Thanks, > > > > > Prashant Khanal <[EMAIL PROTECTED]> > > > <http://www.nepalhomepage.com> > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > Thanks, > Prashant Khanal > [EMAIL PROTECTED] > Solutions for your information > _ > Yomari Pvt. Ltd. > HB Complex, Ekantakuna, Lalitpur. > G.P.O. Box: 21295 > Kathmandu, Nepal > Tel: 977 (1) 5000111, 2113000 > Fax: 977 (1) 5000157 > http://www.yomari.com > > Your guide to Nepal on the Net. > http://www.nepalhomepage.com > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2: How to access indexed property (map) with dynamic index?
Hello all, is it possible (and how) to access the values of an indexed property (a map) with the Struts2 "property" tag by providing a dynamicaly retrieved/calculated index? In detail: Let's assume that "fooMap" is a simple Map that's provided by a Struts2 action. That map holds a unique key (ID) and a description for a property of objects of the class "Item". It serves as source for a "select" tag to set that property when adding new items. On the same (JSP) page I want to list all existing items, using an "iterator" tag. That's quite easy, as long as I output the "fooId" as a simple property. What I want to achive is to output the "fooDescription", that is, the value that I would get by fooMap.get(item.fooId); I've played around with plenty variations of Alas to no avail so far. It's no problem to retrieve the "fooMap" values by providing a static index, for example will output the description to "ID1". But how can I provide the dynamicaly retrieved index from within the iterator? Any insight on this would be highly appreciated. :) Ciao, Markus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Struts2: How to access indexed property (map) with dynamic index?
Doh, I can't believe that I skipped that variation. It's the (inner) single quotation marks that I'd never ommited (since it's a string-index). So, you're (almost) perfectly right. does the job. Thx, you made my day! 8) -Ursprüngliche Nachricht- Von: Musachy Barroso [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 25. September 2008 16:06 An: Struts Users Mailing List Betreff: Re: Struts2: How to access indexed property (map) with dynamic index? try: #fooMap[#item.fooId] On Thu, Sep 25, 2008 at 9:45 AM, Keim, Markus <[EMAIL PROTECTED]> wrote: > Hello all, > > is it possible (and how) to access the values of an indexed property > (a map) with the Struts2 "property" tag by providing a dynamicaly > retrieved/calculated index? > > In detail: > Let's assume that "fooMap" is a simple Map that's > provided by a Struts2 action. That map holds a unique key (ID) and a > description for a property of objects of the class "Item". > It serves as source for a "select" tag to set that property when > adding new items. > > > > > > On the same (JSP) page I want to list all existing items, using an > "iterator" tag. > That's quite easy, as long as I output the "fooId" as a simple > property. > > > > > > > What I want to achive is to output the "fooDescription", that is, the > value that I would get by > > > fooMap.get(item.fooId); > > > I've played around with plenty variations of > > > > > > > > > > Alas to no avail so far. > It's no problem to retrieve the "fooMap" values by providing > a static index, for example > > > > > > > > > > > will output the description to "ID1". > But how can I provide the dynamicaly retrieved index > from within the iterator? > Any insight on this would be highly appreciated. :) > > > Ciao, > > Markus > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2.1.6, Sitemesh & FreeMarkerPageFilter
Hi, I am trying Struts 2.1.6 with Freemarker Sitemesh decorators. I am getting a NPE in the PageFilter HeadTag class. When debugging it seems the getPage() call in the class returns Null. This only happens for the decorator:head and not for the body or title (If I remove the <@decorator.head/> from my decorator it works fine). The error is: java.lang.NullPointerException at com.opensymphony.module.sitemesh.taglib.decorator.HeadTag.doEndTag(HeadTag.java:33) at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) at freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:370) at freemarker.core.Environment.visit(Environment.java:295) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.Environment.process(Environment.java:189) at freemarker.template.Template.process(Template.java:237) at org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerPageFilter.java:160) at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) I have tried to use the standard SiteMeshFilter instead of the FreeMarkerPageFilter and then I dont encounter any problem. But of course I can't access the struts value stack anymore, so I need to get the FreemarkerPageFilter working. Has anyone been successful in this combination? The relevant part of my web.xml looks like this: struts2test struts-cleanup org.apache.struts2.dispatcher.ActionContextCleanUp sitemesh com.opensymphony.sitemesh.webapp.SiteMeshFilter struts org.apache.struts2.dispatcher.FilterDispatcher actionPackages com.specieslog.action struts-cleanup /* REQUEST FORWARD sitemesh /* REQUEST FORWARD INCLUDE struts /* REQUEST FORWARD jspSupportServlet org.apache.struts2.views.JspSupportServlet 5 sitemesh-freemarker com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet TemplatePath / default_encoding UTF-8 1 sitemesh-freemarker *.dec My struts.xml is this minimal one, making Freemarker the default result type: /WEB-INF/pages/hello.ftl I have also tried 2 different sitemesh page parsers, HTMLPageParser and FastPageParser, but that didnt help either. Ah, and this is the decorator I am using: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> <#assign decorator=JspTaglibs["http://www.opensymphony.com/sitemesh/decorator";] /> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> <@decorator.title default="Struts2 Freemarker Sitemesh Hibernate"/> <@decorator.head/> <@decorator.body/> Any idea highly appreciated! Markus -- View this message in context: http://www.nabble.com/Struts-2.1.6%2C-Sitemesh---FreeMarkerPageFilter-tp21739507p21739507.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2.1.6, Sitemesh & FreeMarkerPageFilter
Not sure what the new ones are, but my Maven dependency uses version 2.1.6 of the struts2 sitemesh plugin: org.apache.struts struts2-sitemesh-plugin ${struts.version} ... 2.1.6 Is there any other filter I can try? Markus Musachy Barroso wrote: > > Did you try with the new filters? > > musachy > > On Thu, Jan 29, 2009 at 7:44 PM, Markus Doring wrote: >> >> Hi, >> I am trying Struts 2.1.6 with Freemarker Sitemesh decorators. I am >> getting a >> NPE in the PageFilter HeadTag class. When debugging it seems the >> getPage() >> call in the class returns Null. This only happens for the decorator:head >> and >> not for the body or title (If I remove the <@decorator.head/> from my >> decorator it works fine). The error is: >> >> >> java.lang.NullPointerException >>at >> com.opensymphony.module.sitemesh.taglib.decorator.HeadTag.doEndTag(HeadTag.java:33) >>at >> freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) >>at >> freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:370) >>at freemarker.core.Environment.visit(Environment.java:295) >>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) >>at freemarker.core.Environment.visit(Environment.java:209) >>at freemarker.core.MixedContent.accept(MixedContent.java:92) >>at freemarker.core.Environment.visit(Environment.java:209) >>at freemarker.core.Environment.process(Environment.java:189) >>at freemarker.template.Template.process(Template.java:237) >>at >> org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerPageFilter.java:160) >>at >> org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116) >>at >> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >> >> >> >> I have tried to use the standard SiteMeshFilter instead of the >> FreeMarkerPageFilter and then I dont encounter any problem. But of course >> I >> can't access the struts value stack anymore, so I need to get the >> FreemarkerPageFilter working. Has anyone been successful in this >> combination? >> >> The relevant part of my web.xml looks like this: >> >>struts2test >> >>struts-cleanup >> >> org.apache.struts2.dispatcher.ActionContextCleanUp >> >> >>sitemesh >> >> com.opensymphony.sitemesh.webapp.SiteMeshFilter >> >> >> >>struts >> >> org.apache.struts2.dispatcher.FilterDispatcher >> >>actionPackages >>com.specieslog.action >> >> >> >> >>struts-cleanup >>/* >>REQUEST >>FORWARD >> >> >>sitemesh >>/* >>REQUEST >>FORWARD >>INCLUDE >> >> >>struts >>/* >>REQUEST >>FORWARD >> >> >> >> >> >>jspSupportServlet >> >> org.apache.struts2.views.JspSupportServlet >>5 >> >> >> >>sitemesh-freemarker >> >> com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet >> >>TemplatePath >>/ >> >> >>default_encoding >>UTF-8 >> >>1 >> >> >>sitemesh-freemarker >>*.dec >> >> >> >> >> My struts.xml is this minimal one, making Freemarker the default result >> type: >> >> >> >>> class="org.apache.struts2.views.freemarker.FreemarkerResult" >> default="true"/> >> >> >>/WEB-INF/pages/hello.ftl >> >> >> >> >> >> I have also tried 2 different sitemesh page parsers, HTMLPageParser and >> FastPageParser, but that didnt help either. >> >> Ah, and this is the decorator I am using: >> >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> >> <#assign >> decorator=JspTaglibs["http://www.opensymphony.com/sitemesh/decorator";] /> &g
Re: Struts 2.1.6, Sitemesh & FreeMarkerPageFilter
Thanks Musachy, those filters seem to work with the regular SiteMeshFilter! I still get the same exception when using the FreeMarkerPageFilter, but the regular com.opensymphony.sitemesh.webapp.SiteMeshFilter works and I am able to access the ValueStack with Freemarker in my decorator without any problem! For those interested, my final minimal web.xml that allows me to use Freemarker for my Sitemesh decorators looks like this: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> struts2test contextConfigLocation classpath*:applicationContext*.xml struts-prepare org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter actionPackages org.gbif.action struts-execute org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter sitemesh com.opensymphony.sitemesh.webapp.SiteMeshFilter struts-prepare /* REQUEST FORWARD sitemesh /* REQUEST FORWARD INCLUDE struts-execute /* REQUEST FORWARD org.springframework.web.context.ContextLoaderListener jspSupportServlet org.apache.struts2.views.JspSupportServlet 5 sitemesh-freemarker com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet TemplatePath / default_encoding UTF-8 1 sitemesh-freemarker *.dec One last remark. Looking at the showcase example, there are several outcommented snippets at the end of the web.xml showing how to use velocity or freemarker alternatively. The Freemarker example still uses the old filters like I did together with the FreeMarkerPageFilter. Maybe you should replace this with the ng filters. many thanks again, Markus Musachy Barroso wrote: > > The new ones are: > > > struts-prepare > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter > > > > struts-execute > > org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter > > > look at the showcase web.xml for examples. I am not saying it will fix > your problem, but you should start using those in 2.1.6+ > > musachy > > On Fri, Jan 30, 2009 at 5:49 AM, Markus Doring wrote: >> >> Not sure what the new ones are, but my Maven dependency uses version >> 2.1.6 of >> the struts2 sitemesh plugin: >> >> >>org.apache.struts >> struts2-sitemesh-plugin >>${struts.version} >> >> ... >>2.1.6 >> >> >> Is there any other filter I can try? >> Markus >> >> >> Musachy Barroso wrote: >>> >>> Did you try with the new filters? >>> >>> musachy >>> >>> On Thu, Jan 29, 2009 at 7:44 PM, Markus Doring >>> wrote: >>>> >>>> Hi, >>>> I am trying Struts 2.1.6 with Freemarker Sitemesh decorators. I am >>>> getting a >>>> NPE in the PageFilter HeadTag class. When debugging it seems the >>>> getPage() >>>> call in the class returns Null. This only happens for the >>>> decorator:head >>>> and >>>> not for the body or title (If I remove the <@decorator.head/> from my >>>> decorator it works fine). The error is: >>>> >>>> >>>> java.lang.NullPointerException >>>>at >>>> com.opensymphony.module.sitemesh.taglib.decorator.HeadTag.doEndTag(HeadTag.java:33) >>>>at >>>> freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) >>>>at >>>> freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:370) >>>>at freemarker.core.Environment.visit(Environment.java:295) >>>>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) >>>>at freemarker.core.Environment.visit(Environment.java:209) >>>>at freemarker.core.MixedContent.accept(MixedContent.java:92) >>>>at freemarker.core.Environment.visit(Environment.java:209) >>>>at freemarker.core.Environment.process(Environ
Re: struts2 validation
If you want validation like in struts1 you can implement the interface com.opensymphony.xwork2.Validateable in your Action class. The method validate() is the same as in your struts1 FormBean. But maybe that's a bit old fashioned :) Regards -- Markus Stauffer On Mon, Jul 14, 2008 at 8:54 AM, Jeromy Evans <[EMAIL PROTECTED]> wrote: > Nicole Luneburg wrote: >> >> >> >> >> > > The validate attribute here is used to enable client-side validation only. > That will only work if you include the attribute in the page. > > >> >> >> My setup is that I have an Action class, which uses a Form to set and get >> f= ield values from the JSP page. >> >> In Struts1 I was using the validate(...) method in the Form class. >> >> It seems none of the Struts2 validation examples on the net are working >> for= me. >> >> > > You haven't mentioned whether you're using XML validation or > annotation-based validation. If by not working you mean "does nothing", > then your XML file is probably incorrectly named or your missing an > annotation. (You need to enable this separately from client-side > validation) > > Whatever the case, the main difference between Struts1 and Struts2 here is > that Struts2 performs validation on the Object, not on the form parameters. > That means, to check that "fieldName" is non-blank, it will call > getFieldName() after setFieldName() was called by the ParametersInterceptor. > > A common problem is to forget the getter, but in that case Struts will keep > returning INPUT (validation failed) instead of invoking your action. > > Hope that helps, > Jeromy Evans > > > > > > - > 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: struts2 validation
Struts2 does not have FormBeans anymore. All the form fields are instance variables directly in your Action class. Simply include a variable fieldName of type String with getters and setters in your Action class. The setFieldName() method will be called when you submit the form. In the execute() and validate() methods you can use the fieldName variable directly. What you can also do is put a instance variable of a bean in your Action class. You can then acces the getters and setters of this bean in the jsp: If you submit this form struts will call myaction.getMyBeanVariableName().setFieldName(selectedValue). Regards -- Markus Stauffer On Mon, Jul 14, 2008 at 9:16 AM, Nicole Luneburg <[EMAIL PROTECTED]> wrote: > ps. My post added some "3D" text that isn't supposed to be there ... > > Thanks Jeromy. > > Yes I do have a attribute, maybe not *exactly* but I have: > > > Apologies for the confusion. > What I meant in my pevious post was that I had tried a few ways to do this > validation task. > In my initial post I had described one of these attempts which I think should > have worked. > > What I am getting regardless of what sort of validation I try to implement is > this error: > > java.lang.StringIndexOutOfBoundsException: String index out of range: -7 > > You mentioned the getters and setters for the fieldnames ... this only works > though if the fields are stored in the action right? > coz the fields I have aren't stored in the action, they are stored in a Form > class. > > Ie my action looks something like: > > public String execute() { >MyForm myForm = (MyForm)super.form; >String myField = myForm.getFieldName(); > } > > Markus: Thanks for your reply too, I am trying it right now. Just want this > to work grrr > > > -Original Message- > From: Jeromy Evans [mailto:[EMAIL PROTECTED] > Sent: Monday, 14 July 2008 4:25 PM > To: Struts Users Mailing List > Subject: Re: struts2 validation > > Nicole Luneburg wrote: >> >> >> >> >> > The validate attribute here is used to enable client-side validation > only. That will only work if you include the attribute in the > page. > > >> >> >> My setup is that I have an Action class, which uses a Form to set and get f= >> ield values from the JSP page. >> >> In Struts1 I was using the validate(...) method in the Form class. >> >> It seems none of the Struts2 validation examples on the net are working for= >> me. >> >> > > You haven't mentioned whether you're using XML validation or > annotation-based validation. If by not working you mean "does nothing", > then your XML file is probably incorrectly named or your missing an > annotation. (You need to enable this separately from client-side > validation) > > Whatever the case, the main difference between Struts1 and Struts2 here > is that Struts2 performs validation on the Object, not on the form > parameters. > That means, to check that "fieldName" is non-blank, it will call > getFieldName() after setFieldName() was called by the ParametersInterceptor. > > A common problem is to forget the getter, but in that case Struts will > keep returning INPUT (validation failed) instead of invoking your action. > > Hope that helps, > Jeromy Evans > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > The contents of this email are confidential and may be subject to legal or > professional privilege and copyright. No representation is made that this > email is free of viruses or other defects. If you have received this > communication in error, you may not copy or distribute any part of it or > otherwise disclose its contents to anyone. Please advise the sender of your > incorrect receipt of this correspondence. > > - > 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: Dojo javascript errors with ajax theme. please help
Thanks a lot Jermoy! This fixed my issue with ff3. I created a custom dojo build andd disabled struts.widget.StrutsTimePicker. I don't use the DateTimePickers. The svn repo is here: http://svn.dojotoolkit.org/src/tags/release-0.4.0/ regards -- Markus Stauffer On Tuesday 22 July 2008 17.57:15 Pranav wrote: > Hi Jerome, > > You're a lifesaver. Thanks for your tips. I will try them out today. I > fixed my issue temporarily yesterday by extracting the jar file, and > manually creating copies of gregorian.js and gregorianExtras.js etc to > appropriate locations and the problem did go away but I will surely put > in this permanent fix to improve performance. > > Thanks > > > > - Original Message > From: Jeromy Evans <[EMAIL PROTECTED]> > To: Struts Users Mailing List > Sent: Tuesday, July 22, 2008 5:38:55 AM > Subject: Re: Dojo javascript errors with ajax theme. please help > > Pranav wrote: > > Hi, > > > > I am using in my jsp files. I have included > > everything as per struts2 docs. But when I launch the page in > > FireFox, they show me 404 errors for several javascript files. > > Example are: > > ../struts/dojo/src/i18n/calendar/nls/en-us/gregorian.js > > ../struts/dojo/src/i18n/calendar/nls/en/gregorianExtras.js > > ../struts/dojo/src/i18n/calendar/nls/en-us/gregorianExtras.js > > ../struts/dojo/src/widget/nls/en/TimePicker.js > > ../struts/dojo/src/widget/nls/en-us/TimePicker.js > > ../mcpages/struts/dojo/src/widget/nls/en/DropdownTimePicker.js > > ../struts/dojo/src/widget/nls/en-us/DropdownTimePicker.js > > > > When I opened the struts2-core-2.0.11.jar file that my project is > > using, I did not find these files at all. I am not using any of these > > components like date-time picker or calendar objects but for some > > reason dojo plugin tries to GET these files. This gives a lot of > > problem in our pre-prod system where firewalls and proxies are > > installed. Can someone please help me get rid of these errors? What > > will I have to do? I will really appreciate help from experts. > > > > Thanks > > Pranav > > In Struts 2.0.x, the files are bundled in the jar under > org/apache/struts/static or somewhere nearby. > > The are served by the struts filter only if the filter path enables it > (eg. /*) and if the property struts.serve.static=true (default true). > > In a production system, it's a very good idea to extract the files and > serve them directly from Apache or your container as there'll be a > significant performance improvement (very significant if apache serves > them). > > I'm not sure why it would be loading the timepicker and date picker if > you're not using them - check the html to see why there's a Requires > statement. > > In a production system, a good idea to create a custom dojo profile (in > this case, for example, to remove locale files). It makes a massive > performance improvement by reducing the large number of GETs. > > http://cwiki.apache.org/S2WIKI/creating-a-custom-dojo-profile-for-strut >s-20x.html > > Hope that helps. > Jeromy Evans > > - > 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] devMode + Maven2 + recompile classes
Can i do this with tomcat as well. I think it's called hot-deploy or something. Someone got it working with netbeans 6.1+ and maven2 project? regards -- Markus Stauffer On Tuesday 22 July 2008 22.36:51 Nils-Helge Garli Hegvik wrote: > Are you asking how to set up reloading of the webapp with the maven > jetty plugin? Did you check out the maven-jetty-plugin docs [1] and > the "scanIntervalSeconds" configuration element [2]? > > Nils-H > > [1] - http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin > [2] - > http://jetty.mortbay.org/jetty-6/maven-plugin/run-mojo.html#scanInterva >lSeconds > > On Tue, Jul 22, 2008 at 9:17 PM, Lukasz Lenart > > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm using Maven2 to develop my Struts2 application, as I discovered, > > it's possible to configure Maven2 to recompile modified classes and > > also update resource files, but I don't know how to setup that. I'm > > also using Jetty plugin with Maven2 and IntelliJ IDEA 7. Can someone > > help me? > > > > > > Regards > > -- > > Lukasz > > http://www.lenart.org.pl/ > > > > - > > 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: 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]
[S2] Validating Forms with Wildcard Mapping
Hello all Say I have a struts2 form: The javascript validation generated for this form is unfortunately invalid. Firefox complains about the "*" character. Is there any way to get around this without turning to server side validation? kind regards -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Validating Forms with Wildcard Mapping
I have this in my form: It works like a charm. But if i turn on client side validation there are warnings/errors. On 8/5/08, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: > AFAIK, wildcard mapping has sense only inside struts.xml. > In your form, you must specify exactly which action will be called, > like "Subscribe_dosomething" > > 2008/8/5 Markus Stauffer <[EMAIL PROTECTED]>: >> Hello all >> >> Say I have a struts2 form: >> >> >> >> >> >> >> The javascript validation generated for this form is unfortunately >> invalid. Firefox complains about the "*" character. >> >> Is there any way to get around this without turning to server side >> validation? >> >> kind regards >> -- >> Markus Stauffer >> >> - >> 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] > > -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Validating Forms with Wildcard Mapping
thanks, i will give it a try... On 8/5/08, Jim Kiley <[EMAIL PROTECTED]> wrote: > I can't see any reference anywhere that suggests that putting a wildcard in > the form's action attribute will work. Even if it does work with client > side validation turned off, I get the impression -- and I could be wrong -- > that you've stumbled into a weird corner case that just happens to work. If > you would like to have more consistency in your application's behavior, I > think that Gabriel's advice is the way to go. Have each submit send > "Subscription_execute" or "Subscription_cancel", and rely on the wildcarding > in struts.xml to route the request appropriately. > > jk > > On Tue, Aug 5, 2008 at 7:00 AM, Markus Stauffer > <[EMAIL PROTECTED]>wrote: > >> I have this in my form: >> >> >> >> >> >> >> >> >> It works like a charm. But if i turn on client side validation there >> are warnings/errors. >> >> >> >> >> >> On 8/5/08, Gabriel Belingueres <[EMAIL PROTECTED]> wrote: >> > AFAIK, wildcard mapping has sense only inside struts.xml. >> > In your form, you must specify exactly which action will be called, >> > like "Subscribe_dosomething" >> > >> > 2008/8/5 Markus Stauffer <[EMAIL PROTECTED]>: >> >> Hello all >> >> >> >> Say I have a struts2 form: >> >> >> >> >> >> >> >> >> >> >> >> >> >> The javascript validation generated for this form is unfortunately >> >> invalid. Firefox complains about the "*" character. >> >> >> >> Is there any way to get around this without turning to server side >> >> validation? >> >> >> >> kind regards >> >> -- >> >> Markus Stauffer >> >> >> >> - >> >> 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] >> > >> > >> >> >> -- >> Markus Stauffer >> >> - >> 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 > -- Markus Stauffer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts2 select onchange to trigger ajax call
I would like to have an onchange event from a select element to trigger an AJAX call that replaces a div. I was trying to use the struts 2.0.11 ajax theme, but I cant find a why to bind the select element to my div. In struts 2.1 I should be able to use sx:bind, but that is not available in 2.0.11 unfortunately. If I use a simple s:a anchor to trigger the call all works well: Any ideas how I can bind the select onChange() event to... well, to what really? I also tried to use dojo.connect() to bind the onchange to the onclick of the anchor like this without success: function init() { var sel = dojo.byId("rank"); var anch = dojo.byId("myBelovedTrigger"); dojo.event.connect(sel, "onChange", anch, "onClick"); } thanks, Markus -- View this message in context: http://www.nabble.com/struts2-select-onchange-to-trigger-ajax-call-tp18878122p18878122.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: struts2 select onchange to trigger ajax call
Thanks Dave, that works! I finally also found a working example here: http://javachamp.blogspot.com/2008/06/struts-2-ajax-drop-down-example.html You can actually get rid of any javascript functions and just publish the topic in the onchange and use die struts div tag to do the rest: pretty nice. Markus newton.dave wrote: > > Did you try publishing a topic onchange and having the div have that topic > in its listenTopics? > > Dave > > > --- On Thu, 8/7/08, Markus Doring <[EMAIL PROTECTED]> wrote: > >> From: Markus Doring <[EMAIL PROTECTED]> >> Subject: struts2 select onchange to trigger ajax call >> To: user@struts.apache.org >> Date: Thursday, August 7, 2008, 3:37 PM >> I would like to have an onchange event from a select element >> to trigger an >> AJAX call that replaces a div. >> >> I was trying to use the struts 2.0.11 ajax theme, but I >> cant find a why to >> bind the select element to my div. In struts 2.1 I should >> be able to use >> sx:bind, but that is not available in 2.0.11 unfortunately. >> >> If I use a simple s:a anchor to trigger the call all works >> well: >> >> > theme="ajax" action="statsByTaxon" >> namespace="/ajax"> >> > list="ranks" value="rank" >> theme="ajax"/> >> > targets="imgByTaxon" theme="ajax"> >> >> >> >> > namespace="/ajax" >> executeResult="true"/> >> >> >> >> Any ideas how I can bind the select onChange() event to... >> well, to what >> really? >> I also tried to use dojo.connect() to bind the onchange to >> the onclick of >> the anchor like this without success: >> >> function init() { >> var sel = dojo.byId("rank"); >> var anch = dojo.byId("myBelovedTrigger"); >> dojo.event.connect(sel, "onChange", anch, >> "onClick"); >> } >> >> >> thanks, >> Markus >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/struts2-select-onchange-to-trigger-ajax-call-tp18878122p18878122.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/struts2-select-onchange-to-trigger-ajax-call-tp18878122p18889588.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: struts2 select onchange to trigger ajax call
A little addition to my last post... It all seemed to work fine, but some of my html content that got back had | pipe symbols in image urls and Dojo did not seem to like that. My AJAX call was brining back statistics images based on Google Charts. And those URLs use | as dataset separators for labels. E.g. one of my response uses "Nigde|Antalya|Adana|Mugla|Ïsparta / Konya|Karaman|Ïzmir" and looks like that (look at underlying html if you are interested in the call): http://chart.apis.google.com/chart?cht=p&chs=320x160&chl=Nigde|Antalya|Adana|Mugla|Ïsparta / Konya|Karaman|Ïzmir&chts=00,16&chco=76A4FB,D7E9F5,18427D,80C65A,CA3D05,B4C24B,FF7C0A&chd=e:UeSkIUHrFIB7AA As soon as there were pipe symbols in the image source url the image did not get displayed. I couldnt figure out what exactly happened, but I am quite certain it must be the struts bundled Dojo. Therefore I finally went for plain self coded prototype javascript. Which surprisingly for me is not much more complex. All I had to do was this bit of scripting: function updateByRegion(){ var url = ''; var params = { region: $F("regionClass") }; var target = 'imgByRegion'; var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: params}); }; In context with the jsp page it looks like this (no need for struts ajax divs anymore): function updateByRegion(){ var url = '<s:property value="imgByRegionUrl"/>'; var params = { region: $F("regionClass") }; var target = 'imgByRegion'; var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: params}); }; $('regionClass').observe('change', updateByRegion); works very fine and I have to say I am impressed how easy prototype is. Markus Markus Doring wrote: > > Thanks Dave, that works! > > I finally also found a working example here: > http://javachamp.blogspot.com/2008/06/struts-2-ajax-drop-down-example.html > > You can actually get rid of any javascript functions and just publish the > topic in the onchange and use die struts div tag to do the rest: > > > action="occResourceStatsByRegion" namespace="/ajax"> > >onchange="dojo.event.topic.publish('imgByRegion_topic');return false;" > theme="ajax"/> > > namespace="/ajax" includeParams="none"/> > listenTopics="imgByRegion_topic" theme="ajax"> > > -- View this message in context: http://www.nabble.com/struts2-select-onchange-to-trigger-ajax-call-tp18878122p18892130.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]