[S2] form not retrieving values in IE
I have a form that works find in Firefox but when I tried to run it in Internet Explorer, all the values from the form input box are returned null. I dont know what should I do to fix this problem in IE, here is my form code s:form id=adminForm name=adminForm theme=ajax s:textfield name=employeeId id=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname id=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ s:textfield name=firstname id=firstname label=First Name labelposition=left value=%{edituser.firstName} size=30/ s:textfield name=middlename id=middlename label=Middle Name labelposition=left value=%{edituser.middleName} size=30/ s:textfield name=position id=position label=Position labelposition=left value=%{edituser.position} size=40/ s:textfield name=username id=username label=Username labelposition=left value=%{edituser.userName} size=15/ s:textfield name=password id=password label=Password labelposition=left value=%{edituser.password} size=15/ s:textfield name=password2 id=password2 label=Confirm Password value=%{edituser.password} labelposition=left size=15/ /s:form here is my action class code: public String save() { UserBean userBean = new UserBean(); User newUser = new User(); System.out.println(getLastname()); newUser.setLastName(getLastname()); newUser.setFirstName(getFirstname()); newUser.setMiddleName(getMiddlename()); newUser.setPosition(getPosition()); newUser.setEmpId(getEmployeeId()); newUser.setUserName(getUsername()); newUser.setPassword(getPassword()); selectedIds =getSelectedIds(); if(userid == null || userid.equals(false)){ userBean.addUser(newUser,selectedIds); }else{ newUser.setUserId(userid); userBean.updateUser(newUser,selectedIds); } userid=null; return SUCCESS; } public String getUserid() { return userid; } public void setUserid(String value) { this.userid = value; } public String[] getSelectedGroup() { return selectedGroup; } public void setSelectedGroup(String[] value) { this.selectedGroup=value; } public String getTask() { return task; } public void setTask(String task) { this.task = task; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getMiddlename() { return middlename; } public void setMiddlename(String middlename) { this.middlename = middlename; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public String getEmployeeId() { return employeeId; } public void setEmployeeId(String employeeId) { this.employeeId = employeeId; } 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; } public String getPassword2() { return password2; } public void setPassword2(String password2) { this.password2 = password2; } I have getter and setter for every input field in my form, i dont know whats causing the problem. when I try to print out lastname, it said it is null. please help me. this problem only appears in Internet Explorer. Thanks in advance -- View this message in context: http://www.nabble.com/-S2--form-not-retrieving-values-in-IE-tp15540602p15540602.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] form not retrieving values in IE
You're using the ajax theme which means it's probably a javascript problem. I can't see a submit button in your code, but a known problem in IE is that if the target div of the form contains the form itself the form's values are lost. ie. In IE, the Loading... text is written to the DOM prior to submitting the form, causing the values in the form to be discarded prior to posting to your action. You can fix this by adding showLoadingText=false to any ajax-themed tag that submits the form (the form, submit, anchor etc) I can't think of what else it could be unless there's other javascript not shown below. Hope that helps, Jeromy Evans carmi_cd wrote: I have a form that works find in Firefox but when I tried to run it in Internet Explorer, all the values from the form input box are returned null. I dont know what should I do to fix this problem in IE, here is my form code s:form id=adminForm name=adminForm theme=ajax s:textfield name=employeeId id=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname id=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ s:textfield name=firstname id=firstname label=First Name labelposition=left value=%{edituser.firstName} size=30/ s:textfield name=middlename id=middlename label=Middle Name labelposition=left value=%{edituser.middleName} size=30/ s:textfield name=position id=position label=Position labelposition=left value=%{edituser.position} size=40/ s:textfield name=username id=username label=Username labelposition=left value=%{edituser.userName} size=15/ s:textfield name=password id=password label=Password labelposition=left value=%{edituser.password} size=15/ s:textfield name=password2 id=password2 label=Confirm Password value=%{edituser.password} labelposition=left size=15/ /s:form here is my action class code: public String save() { UserBean userBean = new UserBean(); User newUser = new User(); System.out.println(getLastname()); newUser.setLastName(getLastname()); newUser.setFirstName(getFirstname()); newUser.setMiddleName(getMiddlename()); newUser.setPosition(getPosition()); newUser.setEmpId(getEmployeeId()); newUser.setUserName(getUsername()); newUser.setPassword(getPassword()); selectedIds =getSelectedIds(); if(userid == null || userid.equals(false)){ userBean.addUser(newUser,selectedIds); }else{ newUser.setUserId(userid); userBean.updateUser(newUser,selectedIds); } userid=null; return SUCCESS; } public String getUserid() { return userid; } public void setUserid(String value) { this.userid = value; } public String[] getSelectedGroup() { return selectedGroup; } public void setSelectedGroup(String[] value) { this.selectedGroup=value; } public String getTask() { return task; } public void setTask(String task) { this.task = task; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getMiddlename() { return middlename; } public void setMiddlename(String middlename) { this.middlename = middlename; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public String getEmployeeId() { return employeeId; } public void setEmployeeId(String employeeId) { this.employeeId = employeeId; } 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; } public String getPassword2() { return password2; } public void setPassword2(String password2) { this.password2 = password2; } I have getter and setter for every input field in my form, i dont know whats causing the problem. when I try to print out lastname, it said it is null. please help me. this problem only appears in Internet Explorer. Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ParametersInterceptor setting values using a String[]
Your right: looks like SiteMesh was sending the parameters through to another action. Thanks for the help. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 14 February 2008 11:17 To: Struts Users Mailing List Subject: Re: ParametersInterceptor setting values using a String[] Hi Matthew, The params interceptor is calling setId on ActionSupport (the default action), not on your action that has the setId method, so an exception is being thrown as there's no matching setter whatsoever. You may have a config error. All params are treated as arrays because its valid in HTTP for the same parameter to be specified multiple times in the same request. The default type conversion will call setId(Integer id) using the first element in the array if that's the first property to be matched. The error is only logged when the exception occurs and this is *infrequent* in normal use. Hope that helps! regards, Jeromy Evans This appears to have been mentioned a number of times in the Struts 2 and XWork forums but I cannot find a real answer: Using Struts 2.0.11 I am experiencing the following problem. I have an action with the method setId(Integer id) { ... } When this value is set via a HTTP request through the ParametersInterceptor it succeeds when using both GET and POST. However when a GET is performed I get the following exception logged SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'id' on 'class com.opensymphony.xwork2.ActionSupport: Error setting expression 'id' with value '[Ljava.lang.String;@1a1f635' XWork appears to store the a single GET parameters as an array of Strings and attempt to set the value using the String[] first, when that errors tries to convert it. The problem with this is it logs the first failure as an ERROR. Why is this happening and short of creating my own TypeConverter or blocking it in the logger config, how can I stop this error being logged for GET requests? Matthew Seaborn Software Architect t+44(0) 208 484 0729 m +44(0) 7949 465 142 e [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sussex House Plane Tree Crescent Feltham, Middlesex, TW13 7HE United Kingdom http://www.performgroup.com/ http://www.performgroup.com/ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipient's responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.
Problems setting up example applications
I am new to both Eclipse and Struts2 and I am having issues with the struts2 examples. First, I open eclipse and import the .war file for the blank project, and set the Eclipse configuration to add it is a Tomcat project. When I attempt to access the app, it fails to find the action mappings. It appears to crash at the following line of the index.html: META HTTP-EQUIV=Refresh CONTENT=0;URL=example/HelloWorld.action giving the error in the browser: The requested resource (There is no Action mapped for action name HelloWorld.) is not available. and in the console: There is no Action mapped for action name HelloWorld. - [unknown location] and, before it fails, the app forwards to the URL: http://localhost:8080/Blank/example/HelloWorld.action The action mapping is present in the example.xml which is included in the struts.xml. This is occurring with no modifications to the project. Upon importing the showcase .war file included in the struts2 download, I immediately receive seven errors of invalid /p tags in the .jsp's. All of these are following ol, ul or li tags. In an attempt to at least get it to start, I removed these end tags and configured it as a Tomcat project. When I restart the server, showcase fails (during the server restart) giving the following error: SEVERE: Error configuring application listener of class org.apache.struts2.showcase.chat.ChatSessionListener java.lang.ClassNotFoundException: org.apache.struts2.showcase.chat.ChatSessionListener at org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1358) at org.apache.catalina.loader.WebappClassLoader.loadClass( WebappClassLoader.java:1204) at org.apache.catalina.core.StandardContext.listenerStart( StandardContext.java:3773) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) The .java file is in the location listed, and the build file also appears to be in the proper location. I am running Eclipse Europa and tomcat 6 on an XP box with jre 6 and jdk 1.6with MySQL. Any help that you can offer would be greatly appreciated. Thank you, Chriss
tabbed panel refresh on input
Hi everyone. My problem is that I have a jsp page with a tabbed panel consisting of two tabs. The main action is showUpload that shows upload.jsp. In one of the tab, I've a form that the user should fill and send to the manualUpload action. If some required fields are not filled, I should show the appropriate messages. The problem is that if I show ManualUpload.jsp, the page is entirely shown in the browser, while what I want is to display the page, with the various input or error messages, in the tab of the tabbed panel. In short, I want to refresh the page that is shown is the tab of the panel without reinvoking all the action that shows the main upload.jsp (because doing this the form parameters and all the messages are lost). I can achieve that? Thank you very much. -- View this message in context: http://www.nabble.com/tabbed-panel-refresh-on-input-tp15542323p15542323.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: how to access the properties of one action by another action
Placing the object in the session is the least effort approach. Retrieving the objects again is a sensible approach too. Sometimes sending the object to the client and back again is sensible (encoded in some way in a cookie, hidden input or url param) The scope plugin is intended to simplify this task: http://cwiki.apache.org/S2PLUGINS/scope-plugin.html Prashant Khanal wrote: Hello all, I am fetching a list of objects in one action and i want to use the same list of objection when i move to another action from that action. How can i do that? Actually i use the list of objects to populate the table of a jsp page and the i want to access the same list of objects in the action that is triggered when the form of that jsp page is submitted. Do i have to fetch those objects again or is there any way that i can use the same list of objects fetched in earlier action? No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.7/1284 - Release Date: 17/02/2008 2:39 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Fetching request parameters in jsp
I'm in the process of learning struts and I have a very simple jsp with a very simple Action behind it (doing no processing, simply returning SUCCESS). I want to access a get parameter in the jsp and print it out. This page : http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html says that I can simply do saf: property value=#request.myId / in the jsp but that doesn't seem to work. My jsp is (a.jsp): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [EMAIL PROTECTED] prefix=s uri=/struts-tags % html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleHello World/title s:head / /head body Id is : saf property value=#request.id / /body /html And i'm accessing it using a.jsp?id=. Am I missing something really obvious here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Fetching request parameters in jsp
Request attributes are not the same as request parameters. Nils-H On Feb 18, 2008 2:16 PM, Gaurav Arora [EMAIL PROTECTED] wrote: I'm in the process of learning struts and I have a very simple jsp with a very simple Action behind it (doing no processing, simply returning SUCCESS). I want to access a get parameter in the jsp and print it out. This page : http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html says that I can simply do saf: property value=#request.myId / in the jsp but that doesn't seem to work. My jsp is (a.jsp): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [EMAIL PROTECTED] prefix=s uri=/struts-tags % html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleHello World/title s:head / /head body Id is : saf property value=#request.id / /body /html And i'm accessing it using a.jsp?id=. Am I missing something really obvious here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to come back to previous action?
Hello, How could I come back to an action I executed before? i.e.: User is in screen 1, then click the button search and some results are shown to her. She dbclick in a result item and it's shown the item's detail in screen 2. Then she wants to go back to screen 1 how must I implement the 'go back' action in order to execute the same action she did before?
Re: how to access the properties of one action by another action
Look at the chain result type. On Feb 17, 2008 11:31 PM, Prashant Khanal [EMAIL PROTECTED] wrote: Hello all, I am fetching a list of objects in one action and i want to use the same list of objection when i move to another action from that action. How can i do that? Actually i use the list of objects to populate the table of a jsp page and the i want to access the same list of objects in the action that is triggered when the form of that jsp page is submitted. Do i have to fetch those objects again or is there any way that i can use the same list of objects fetched in earlier action? -- Thanks, Prashant Khanal -- Scott [EMAIL PROTECTED]
Re: i18N jsp application on linux and windows
I need an help related to i18n (internationalization),… http://www.mail-archive.com/user@struts.apache.org/msg72581.html I am developing an application an struts application to be used in poland for English,polish language on tomcat. There is scenario to extract SAP messages and show to the user in browser in JSP page. I have written following method to read SAP message and Convert to IS0-559-2 charset( for Poland). This is working for me on XP and Windows 2000 in Hyderabad. I have used IS0-559-2 as encoding attribute in web.xml And in JSP pages %@ page contentType=text/html;charset=iso-8859-2 % But messages are corrupted some times and getting Question marks when deployed and tested application in Poland on Linux. Linux- Nr potwierdzenia 8018340248 nie zostaÅ‚ znaleziony (proszÄ™ sprawdzić wpis) Windows Nr potwierdzenia 22 nie zosta³ znaleziony (proszê sprawdziæ wpis) - private String convertTo_IS08559_2(HttpServletResponse response, String strMessage) throws UnsupportedEncodingException{ final String METHOD_NAME = convertTo_IS08559_2() : ; // holds method name for logger messages String charset = response.getCharacterEncoding(); String strFormatedMessage=null; // holds formatted message Log.info(CLASS_NAME + - +METHOD_NAME+ - response - +response); Log.info(CLASS_NAME + - +METHOD_NAME+ - charset - +charset); Log.info(CLASS_NAME + - +METHOD_NAME+ - strMessage - +strMessage); if(strMessage!=null strMessage.length()0){ try { strFormatedMessage = new String(strMessage.getBytes(charset), ISO-8859-2); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block //e.printStackTrace(); Log.error(CLASS_NAME + - +METHOD_NAME+ - UnsupportedEncodingException - +e); throw e; } } Log.info(CLASS_NAME + - +METHOD_NAME+ - str - +strFormatedMessage); return strFormatedMessage; }
Re: [S2] Validation
--- carmi_cd [EMAIL PROTECTED] wrote: Hi I have an application in Struts 2, my problem is when i try to submit the form even if there are values in the form input box it stills give validation message to the user to enter values for the required fields. here is my form fields. s:textfield name=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ You're validating on lastName etc; do you have getters and setters for lastName and so on, or are you assuming there's a getEdituser() and all the values are being set on the edituser bean? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18N jsp application on linux and windows
Did you see my previous reply? http://www.nabble.com/i18N--jsp-application-on-linux-and-windows-tp15451735p15467087.html And for the record, your convertTo... method probably isn't doing the right thing. If response.getCharacterEncoding() returns anything other than ISO-8859-2, your code will corrupt the string since it's explicitly trying to apply ISO-8859-2 encoding to a set of bytes in a different character set...! I'd start by ripping that code out all together. L. Raghuveer wrote: I need an help related to i18n (internationalization),… http://www.mail-archive.com/user@struts.apache.org/msg72581.html I am developing an application an struts application to be used in poland for English,polish language on tomcat. There is scenario to extract SAP messages and show to the user in browser in JSP page. I have written following method to read SAP message and Convert to IS0-559-2 charset( for Poland). This is working for me on XP and Windows 2000 in Hyderabad. I have used IS0-559-2 as encoding attribute in web.xml And in JSP pages %@ page contentType=text/html;charset=iso-8859-2 % But messages are corrupted some times and getting Question marks when deployed and tested application in Poland on Linux. Linux- Nr potwierdzenia 8018340248 nie zostaÅ‚ znaleziony (proszÄ™ sprawdzić wpis) Windows Nr potwierdzenia 22 nie zosta³ znaleziony (proszê sprawdziæ wpis) - private String convertTo_IS08559_2(HttpServletResponse response, String strMessage) throws UnsupportedEncodingException{ final String METHOD_NAME = convertTo_IS08559_2() : ; // holds method name for logger messages String charset = response.getCharacterEncoding(); String strFormatedMessage=null; // holds formatted message Log.info(CLASS_NAME + - +METHOD_NAME+ - response - +response); Log.info(CLASS_NAME + - +METHOD_NAME+ - charset - +charset); Log.info(CLASS_NAME + - +METHOD_NAME+ - strMessage - +strMessage); if(strMessage!=null strMessage.length()0){ try { strFormatedMessage = new String(strMessage.getBytes(charset), ISO-8859-2); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block //e.printStackTrace(); Log.error(CLASS_NAME + - +METHOD_NAME+ - UnsupportedEncodingException - +e); throw e; } } Log.info(CLASS_NAME + - +METHOD_NAME+ - str - +strFormatedMessage); return strFormatedMessage; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Problems setting up example applications
--- Chriss Nold [EMAIL PROTECTED] wrote: First, I open eclipse and import the .war file for the blank project, and set the Eclipse configuration to add it is a Tomcat project. When I attempt to access the app, it fails to find the action mappings. It appears to crash at the following line of the index.html: META HTTP-EQUIV=Refresh CONTENT=0;URL=example/HelloWorld.action giving the error in the browser: The requested resource (There is no Action mapped for action name HelloWorld.) is not available. Have you set up the project's build properties so it compiles to the appropriate directory? By default, Eclipse will build to ${projectDir}/build; for a web application you'll want it to build to ${projectDir}/WebContent/WEB-INF/classes, so the classes (and config files etc.) are on the web app's CLASSPATH. (Of course, as I was writing that, I imported it, right-clicked on the project and chose Run as = Run on Server and used a Tomcat 5.5 and it worked fine, so doing it that way must set up the classpath somehow.) In any case, you're most likely having a CLASSPATH issue. Upon importing the showcase .war file included in the struts2 download, I immediately receive seven errors of invalid /p tags in the .jsp's. All of these are following ol, ul or li tags. In an attempt to at least get it to start, It starts without removing the tags. If you remove the end tags you should probably remove the start tags as well, though. I'll open a JIRA for the bad HTML. SEVERE: Error configuring application listener of class org.apache.struts2.showcase.chat.ChatSessionListener java.lang.ClassNotFoundException: Same classpath issue; however you're starting the app and/or have your Europa configured etc. isn't getting your classpath configured correctly. As I said, when I import either project and run as=run on server it's working fine (although I'm using TC 5.5 and JSE 1.5), so I'd check to see how you're launching it and your project's classpath-related properties. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to come back to previous action?
I forgot to say that what I'm asking for is a Struts2 way to do that, a pattern, or a tool that S2 provides which could help me to do it. On 18/02/2008, Eduardo Yáñez Parareda [EMAIL PROTECTED] wrote: Hello, How could I come back to an action I executed before? i.e.: User is in screen 1, then click the button search and some results are shown to her. She dbclick in a result item and it's shown the item's detail in screen 2. Then she wants to go back to screen 1 how must I implement the 'go back' action in order to execute the same action she did before?
Re: CharacterEncoding bug in Struts2?
Asgaut wrote: Hi Laurie, And thanks for your quick answer! Here are my comments. I tried that first, changing the default encoding (in struts.xml) to utf-8. That works fine, in java and in our web application. The problem is our Sybase database which is configured to ISO-8859-1. And as our JDBC driver (jconn2) does not convert from utf-8 to iso-8859-1, it will throw an exception when trying to update or insert the characters it does not understand. I'm not sure why that's relevant to getting character data to and from the browser though. It seems that any encoding/charset munging should be happing at the database / JDBC level, not at the HTTP request level. The problem is specific to the database, so the solution should be too IMHO... So therefore I had to convert them myself. I can also add that there is a special case when it comes to the Euro (€) character. It did not exist when iso-8859-1 was created, but added as part of iso-8859-15. But our Sybase database still only understands iso-8859-1, so a conversion needs to take place. What I did was first convert it from utf-8 to iso-8859-15, then from iso-8859-15 to iso-8859-1. Here is the code: byte[] characters = charsBeforeConvert.getBytes(iso-8859-15); for (int i = 0; i characters.length; i++) { if (characters[i] == (byte) 0xa4) { //0x80 is control character and has no symbol in iso-8859-1. It is used for € in windows-1252 characters[i] = (byte) 0x80; } } return new String(characters, iso-8859-1); Kind of a hassle, but it works. I'll take your word for that; presumably you have code to perform the inverse mapping somewhere as well? It was a good idea to override the setCharacterEncoding method. This would open the opportunity to move my converting logic from the filter to an interceptor. But then another problem occurs. If I do the conversion in an interceptor, I would need to know exactly which parameters that would need to be converted. We are working with a solution for maintaining CV’s. I would then have to do something like (pseudocode): - String firstName = Request.getParamater(“firstName”); - get CV object from the value stack - firstName = performConversion(firstName) - cv.setFirstName(firstName) - put cv back on the value stack In some cases this would work fine, but I have so many parameters I need to retrieve and convert that it would not work as a proper solution. My filter takes care of all requests parameters without the need of specifying which parameter it is. All this seems like a lot of potential for confusion any time data comes in from the browser and gets sent back out again without the database getting involved (e.g. if a form fails validation). You now have these oddly munged, not quite normal string values moving through every layer of your app. I'd take another look to see if there's not a way to configure the JDBC driver to do the right thing automatically and, if there really isn't, to try and move the code to cope with that limitation as close to the problem as possible. L. To improve my code, I will move the converting logic to a utility class, so the filter can stay as thin as possible. I will post the entire code if you like to take a look at it. Any comments would be appreciated! Thanks import com.google.common.collect.Maps; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Map; /** * Filter to fix utf-8 to iso-8859-1 conversion * * @author Asgaut Mjolne * @version $Revision: 1.6 $, 05.feb.2008, modified by: $Author: fiasmjol */ public class CharsetEncodingFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) servletRequest; if (utf-8.equalsIgnoreCase(req.getCharacterEncoding())) { req = new CharsetRequestWrapper(req); req.getParameter(foo); //Needed to fill params. Do not remove } filterChain.doFilter(req, servletResponse); } @Override public void destroy() { } static class CharsetRequestWrapper extends HttpServletRequestWrapper { private static final byte ISO_8859_15_EURO_CODE_POINT = (byte) 0xa4; /** * Not in use in ISO-8859-1 */ private static final byte CP_1252_EURO_CODE_POINT = (byte) 0x80; public CharsetRequestWrapper(HttpServletRequest httpServletRequest) { super(httpServletRequest); } @Override public String
Re: populating ActionFormBean-s
auz wrote: hope some1 can help me out, i have a Struts ActionFormBean who has a complex type as an attribute (also ActionFormBean), the problem is i dont know how to populate it, tryed everything. i presume i have to extend RequestProcessor's populateProcess method or something like that, can any1 help. NOTE i'm using struts 1.3.9. I have tryed all options for property name on page using struts tags ie (property=bean1.bean2.id or bean2. bean2.id ) and also made various setters for property bean1 but nothing gave any result every time i get beanUtils populate exception tnx i know this can be done, just dunno how, some code would also be apritiated Ditto :-) Post the code you're using, the stack trace for the exception and any other relevant log output and perhaps someone can see where you're going wrong. This should work pretty easily. - Are both ActionFormBBean classes properly JavaBean compliant? - Do you have the appropriate getter/setter pairs on the 'outer' bean for the 'inner' one? (i.e. getBean2() / setBean2() methods) - how are you instantiating the inner bean? (statically? in bean1's constructor? in bean1's reset() method?) You could also try cranking log levels up to debug and see if you can spot a problem in the additional log messages. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to access the properties of one action by another action
That wont help across seperate requests, though. L. [EMAIL PROTECTED] wrote: Look at the chain result type. On Feb 17, 2008 11:31 PM, Prashant Khanal [EMAIL PROTECTED] wrote: Hello all, I am fetching a list of objects in one action and i want to use the same list of objection when i move to another action from that action. How can i do that? Actually i use the list of objects to populate the table of a jsp page and the i want to access the same list of objects in the action that is triggered when the form of that jsp page is submitted. Do i have to fetch those objects again or is there any way that i can use the same list of objects fetched in earlier action? -- Thanks, Prashant Khanal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Fetching request parameters in jsp
Yup; specifically, request attributes are available through #request while request parameters are available through #parameters: Nils-Helge Garli Hegvik wrote: Request attributes are not the same as request parameters. Nils-H On Feb 18, 2008 2:16 PM, Gaurav Arora [EMAIL PROTECTED] wrote: I'm in the process of learning struts and I have a very simple jsp with a very simple Action behind it (doing no processing, simply returning SUCCESS). I want to access a get parameter in the jsp and print it out. This page : http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html says that I can simply do saf: property value=#request.myId / in the jsp but that doesn't seem to work. My jsp is (a.jsp): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [EMAIL PROTECTED] prefix=s uri=/struts-tags % html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleHello World/title s:head / /head body Id is : saf property value=#request.id / /body /html And i'm accessing it using a.jsp?id=. Am I missing something really obvious here? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to come back to previous action?
The solution I'm going for is to implement a Filter or Interceptor which manages a stack of requests. I'll push the action and the request attributes in the stack, so when I have to go back, I can pop from the stack the action and attributes needed to make the same search as before. When user click another menu option, the filter must empty the stack and push the new action in it.
S2 NESTED iterators FLAT HashMaps:
hi, i have 4 hashmaps as follows: (1). HashMapString, HashSetString treesFruitsMap = new HashMap(); (2). HashMapString, HashSetString fruitsColourMap = new HashMap(); (3). HashMapString, String colourVitaminMap = new HashMap(); i.e. (1) has the mapping btw tree names and the fruits it bears (as a set of strings) (2) has the mapping btw fruit name and the possible colours it can come out in (3) mapping btw fruit and the vitamins it has in it. I need to display the output as follows: Fruit1 - Colour1 - Vitamin1 Fruit1 - Colour1 - Vitamin2 Fruit1 - Colour2 - corresponding vitamins ... any idea how to go with this? I tried as follows but its not working.. s:iterator id=frId status=frStat value=frColourMap.keySet() s:iterator id=coId status=coStatus value=top FE s:text name=%{top} / br/ BR s:text name=%{coStatus[top]} / br/ /s:iterator /s:iterator this is giving only the fruits names but not the colours... pl: help. -- View this message in context: http://www.nabble.com/S2-NESTED-iterators---FLAT-HashMaps%3A-tp15546918p15546918.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 NESTED iterators FLAT HashMaps:
--- ravi_eze [EMAIL PROTECTED] wrote: i have 4 hashmaps as follows: (1). HashMapString, HashSetString treesFruitsMap = new HashMap(); (2). HashMapString, HashSetString fruitsColourMap = new HashMap(); (3). HashMapString, String colourVitaminMap = new HashMap(); That's only three. any idea how to go with this? I tried as follows but its not working.. s:iterator id=frId status=frStat value=frColourMap.keySet() s:iterator id=coId status=coStatus value=top FE s:text name=%{top} / br/ BR s:text name=%{coStatus[top]} / br/ coStatus is your inner iterator's status var; I'm not sure why you're using it in the BR s:text.../ tag? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 NESTED iterators FLAT HashMaps:
When you use the iterator tag, the value of the id tag becomes the reference to the current object on that iteration(same as top on this case). When iterating over a map, the object is a Map.Entry, so you need to access the key and value properties, like s:iterator id=superMap value=myMap Key: s:property value=superMap.key / same as s:property value=key / Value: s:property value=superMap.value /same as s:property value=value / /s:iterator is not a direct answer to your question, but I think your problem is around that. //you can always do %{superMap[top.key]} to access the value, it is just harder to read regards musachy On Feb 18, 2008 11:21 AM, ravi_eze [EMAIL PROTECTED] wrote: hi, i have 4 hashmaps as follows: (1). HashMapString, HashSetString treesFruitsMap = new HashMap(); (2). HashMapString, HashSetString fruitsColourMap = new HashMap(); (3). HashMapString, String colourVitaminMap = new HashMap(); i.e. (1) has the mapping btw tree names and the fruits it bears (as a set of strings) (2) has the mapping btw fruit name and the possible colours it can come out in (3) mapping btw fruit and the vitamins it has in it. I need to display the output as follows: Fruit1 - Colour1 - Vitamin1 Fruit1 - Colour1 - Vitamin2 Fruit1 - Colour2 - corresponding vitamins ... any idea how to go with this? I tried as follows but its not working.. s:iterator id=frId status=frStat value=frColourMap.keySet() s:iterator id=coId status=coStatus value=top FE s:text name=%{top} / br/ BR s:text name=%{coStatus[top]} / br/ /s:iterator /s:iterator this is giving only the fruits names but not the colours... pl: help. -- View this message in context: http://www.nabble.com/S2-NESTED-iterators---FLAT-HashMaps%3A-tp15546918p15546918.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] -- 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]
RE: S2 NESTED iterators FLAT HashMaps:
FE and BR are the static text beside which the result would be displayed. I was using them to recognize the two results differently... did I answer ur question? -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2008 10:00 PM To: Struts Users Mailing List Subject: Re: S2 NESTED iterators FLAT HashMaps: --- ravi_eze [EMAIL PROTECTED] wrote: i have 4 hashmaps as follows: (1). HashMapString, HashSetString treesFruitsMap = new HashMap(); (2). HashMapString, HashSetString fruitsColourMap = new HashMap(); (3). HashMapString, String colourVitaminMap = new HashMap(); That's only three. any idea how to go with this? I tried as follows but its not working.. s:iterator id=frId status=frStat value=frColourMap.keySet() s:iterator id=coId status=coStatus value=top FE s:text name=%{top} / br/ BR s:text name=%{coStatus[top]} / br/ coStatus is your inner iterator's status var; I'm not sure why you're using it in the BR s:text.../ tag? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: S2 NESTED iterators FLAT HashMaps:
Hi, I am trying this way: s:iterator id=fruitsId status=fruitsStat value=fruitscolourandInfo fruits KEY s:property value=#fruitsId.key / colour/ fruits Val s:text name=%{fruitsStat.value} / colour/ s:iterator id=colourId status=colourStatus value=fruitsId.value colour s:text name=%{top.value} / colour/ /s:iterator /s:iterator The issue is that: Fruits key: is being displayed fine Fruits Val: nothing is being dislayed; infact when I tried similarly with fruits KEY even that is not being displayed. Any ideas how to get this working.. (in fact I need to get the results in textboxes next) Any help? Ravi -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2008 10:09 PM To: Struts Users Mailing List Subject: Re: S2 NESTED iterators FLAT HashMaps: When you use the iterator tag, the value of the id tag becomes the reference to the current object on that iteration(same as top on this case). When iterating over a map, the object is a Map.Entry, so you need to access the key and value properties, like s:iterator id=superMap value=myMap Key: s:property value=superMap.key / same as s:property value=key / Value: s:property value=superMap.value /same as s:property value=value / /s:iterator is not a direct answer to your question, but I think your problem is around that. //you can always do %{superMap[top.key]} to access the value, it is just harder to read regards musachy On Feb 18, 2008 11:21 AM, ravi_eze [EMAIL PROTECTED] wrote: hi, i have 4 hashmaps as follows: (1). HashMapString, HashSetString treesFruitsMap = new HashMap(); (2). HashMapString, HashSetString fruitsColourMap = new HashMap(); (3). HashMapString, String colourVitaminMap = new HashMap(); i.e. (1) has the mapping btw tree names and the fruits it bears (as a set of strings) (2) has the mapping btw fruit name and the possible colours it can come out in (3) mapping btw fruit and the vitamins it has in it. I need to display the output as follows: Fruit1 - Colour1 - Vitamin1 Fruit1 - Colour1 - Vitamin2 Fruit1 - Colour2 - corresponding vitamins ... any idea how to go with this? I tried as follows but its not working.. s:iterator id=frId status=frStat value=frColourMap.keySet() s:iterator id=coId status=coStatus value=top FE s:text name=%{top} / br/ BR s:text name=%{coStatus[top]} / br/ /s:iterator /s:iterator this is giving only the fruits names but not the colours... pl: help. -- View this message in context: http://www.nabble.com/S2-NESTED-iterators---FLAT-HashMaps%3A-tp15546918p 15546918.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] -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to come back to previous action?
On Feb 18, 2008 7:41 AM, Eduardo Yáñez Parareda [EMAIL PROTECTED] wrote: The solution I'm going for is to implement a Filter or Interceptor which manages a stack of requests. I'll push the action and the request attributes in the stack, so when I have to go back, I can pop from the stack the action and attributes needed to make the same search as before. When user click another menu option, the filter must empty the stack and push the new action in it. You might want to include a Marker interface so that you don't collect all the data from every request. If you have a BackAware interface (or BackTarget, or something else meaningful). Then your interceptor can check whether the Action implements BackAware and only then save the state. That should prevent you from saving a bunch of unnecessary data. (*Chris*)
Tabbed panel problem
Hello. I try to explain the problem as cleary as possible: I want to manage a jsp with two views: mainPage.jsp is a jsp with a tabbed panel. In the tabbed panel I've two tabs. In each tab calls an action and shows the resulting jsp correctly. Here's the code of mainPage.jsp tabbed panel: s:tabbedPanel id=upload_options s:url id=mu action=showManual/ s:div id=manual_upload_tab key=ContentUploadMain.Option.1 theme=ajax href=%{mu} /s:div s:div id=auto_upload_tab key=ContentUploadMain.Option.2 theme=ajax s:text name=manual / /s:div /s:tabbedPanel where the second tab is not implemented. The first tab shows the jsp resulting from the call to the action showManual, the jsp is ManualContentUpload.jsp When I post the form in this page, I get the ManualContentUpload action invoked: action name=ManualContentUpload class=actions.contents.upload.ManualUpload result name=success/pages/UploadSuccess.jsp/result result name=error/pages/ManualContentUpload.jsp/result result name=input/pages/ManualContentUpload.jsp/result result name=upload_denied type=redirect/pages/UploadDenied.jsp/result /action What I want is that all the resulting jsp's still be shown in the tab of the panel. How I can do this? Thank you for help! -- View this message in context: http://www.nabble.com/Tabbed-panel-problem-tp15547053p15547053.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 NESTED iterators FLAT HashMaps:
--- Ravichandra C [EMAIL PROTECTED] wrote: FE and BR are the static text beside which the result would be displayed. I was using them to recognize the two results differently... did I answer ur question? No. I asked why you're using the status variable of the inner iterator in the s:text.../ tag: BR s:text name=%{coStatus[top]} / br/ coStatus is your inner iterator's status var; I'm not sure why you're using it in the BR s:text.../ tag? The iterator status value has things like index, count, isOdd and so on. You're trying to use it as a map, and retrieving a value from it using the top value on the stack, which makes no sense. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action mapping not found - eclipse configuration problem???
Hello all, I have used struts before, but I have never configured it or eclipse before and I am new to Struts2. I am trying to configure that struts-blank project, but I am receiving the following error when I attempt to accept the page: SEVERE: Could not find action or result There is no Action mapped for action name HelloWorld. - [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.dispatcher.Dispatcher.serviceAction( Dispatcher.java:494) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter( FilterDispatcher.java:419) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java :447) at java.lang.Thread.run(Thread.java:619) The action is mapped in the example.xml: action name=HelloWorld class=example.HelloWorld result/example/HelloWorld.jsp/result /action Which is included in the struts.xml: include file=example.xml/ The action call is coming from the index.htm: META HTTP-EQUIV=Refresh CONTENT=0;URL=example/HelloWorld.action and is called from the Web.xml: welcome-file-list welcome-fileindex.jsp/welcome-file welcome-filedefault.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list Is there something in the configuration of Eclipse Europa that I need to change? Everything appears to be present, but the mapping is not being found. Any help would be appreciated.
Re: S2 NESTED iterators FLAT HashMaps:
fruits KEY s:property value=#fruitsId.key / Gets the key from the map entry and displays it; OK here. fruits Val s:text name=%{fruitsStat.value} / Gets the 'value' property of the iterator status object and uses that as a lookup key in the application's message resources. Umm... First, I'm not sure if the iterator status object has a value property, but wouldn't you want the value from the map entry? And second, do you have the message properties set up? That should probably be fruits Val s:text name=%{fruitsId.value} / and, for sanity checing (in case your message resources aren't set up correctly) you should start with just fruits Val s:property value=%{fruitsId.value} / L. Ravichandra C wrote: Hi, I am trying this way: s:iterator id=fruitsId status=fruitsStat value=fruitscolourandInfo fruits KEY s:property value=#fruitsId.key / colour/ fruits Val s:text name=%{fruitsStat.value} / colour/ s:iterator id=colourId status=colourStatus value=fruitsId.value colour s:text name=%{top.value} / colour/ /s:iterator /s:iterator The issue is that: Fruits key: is being displayed fine Fruits Val: nothing is being dislayed; infact when I tried similarly with fruits KEY even that is not being displayed. Any ideas how to get this working.. (in fact I need to get the results in textboxes next) Any help? Ravi -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Monday, February 18, 2008 10:09 PM To: Struts Users Mailing List Subject: Re: S2 NESTED iterators FLAT HashMaps: When you use the iterator tag, the value of the id tag becomes the reference to the current object on that iteration(same as top on this case). When iterating over a map, the object is a Map.Entry, so you need to access the key and value properties, like s:iterator id=superMap value=myMap Key: s:property value=superMap.key / same as s:property value=key / Value: s:property value=superMap.value /same as s:property value=value / /s:iterator is not a direct answer to your question, but I think your problem is around that. //you can always do %{superMap[top.key]} to access the value, it is just harder to read regards musachy On Feb 18, 2008 11:21 AM, ravi_eze [EMAIL PROTECTED] wrote: hi, i have 4 hashmaps as follows: (1). HashMapString, HashSetString treesFruitsMap = new HashMap(); (2). HashMapString, HashSetString fruitsColourMap = new HashMap(); (3). HashMapString, String colourVitaminMap = new HashMap(); i.e. (1) has the mapping btw tree names and the fruits it bears (as a set of strings) (2) has the mapping btw fruit name and the possible colours it can come out in (3) mapping btw fruit and the vitamins it has in it. I need to display the output as follows: Fruit1 - Colour1 - Vitamin1 Fruit1 - Colour1 - Vitamin2 Fruit1 - Colour2 - corresponding vitamins ... any idea how to go with this? I tried as follows but its not working.. s:iterator id=frId status=frStat value=frColourMap.keySet() s:iterator id=coId status=coStatus value=top FE s:text name=%{top} / br/ BR s:text name=%{coStatus[top]} / br/ /s:iterator /s:iterator this is giving only the fruits names but not the colours... pl: help. -- View this message in context: http://www.nabble.com/S2-NESTED-iterators---FLAT-HashMaps%3A-tp15546918p 15546918.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]
[OT] Re: Action mapping not found - eclipse configuration problem???
--- Chriss Nold [EMAIL PROTECTED] wrote: Is there something in the configuration of Eclipse Europa that I need to change? Everything appears to be present, but the mapping is not being found. You didn't answer any of the questions I asked regarding various project classpath settings, how you imported the WAR, etc. As I stated when I imported the WAR and run as = run on server everything just worked without me having to change anything. How did you run it? Asking the same question with slightly different words isn't likely to get a significantly different response. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: radio tag - how to have the items order vertically?
THANK YOU Jeromy this solved the question I presented. Jeromy Evans - Blue Sky Minds wrote: xianwinwin wrote: Thank you Jeramy! I tried to use the cssStyle for a while and came up with this: s:radio cssStyle={display: block;} label=Group name=groupSelect list=groups/ Unfortunately the the cssStyle is applied to the input, not to the label as well. As you're using a list to create the radio buttons you have little option but to create a custom theme. Alternatively you could still use theme=simple and an s:iterator to list them add and labels and breaks. However, creating a custom theme is much easier than it first seems. 1. create a directory template in your src directory. If you use maven that means src/main/resources/template. I any case it needs to be deployed at /WEB-INF/classes/template 2. create a directory template/mytheme. This is the name of your theme 3. create a file in template/mytheme/ called theme.properties containing: parent = simple That means that if you haven't provided a template in your theme, the template manager will search the simple theme for the template 4. COPY the following files to template/mytheme/: jar:struts2-core-2.0.9.jar!/template/simple/radiomap.ftl 5. Edit the file and add a br/ after the /label Optional 5a. If you're using the xhtml theme or css_xhtml theme by default, you may want to include the control header and footer. Add the following file to the start #include /${parameters.templateDir}/xhtml/controlheader.ftl / and end of the file: #include /${parameters.templateDir}/xhtml/controlfooter.ftl /#nt/ (Substitute css_xhtml if preferred). Have a look at radiomap.ftl in these themes for examples. 6. Reference the theme when you use the radio: s:radio theme=mytheme label=Group name=groupSelect list=groups / That's it Hope that helps, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/radio-tag---how-to-have-the-items-order-vertically--tp15468384p15547134.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: [OT] Re: Action mapping not found - eclipse configuration problem???
Sorry, Dave, I apparently did not receive your response and thought that may I should resubmit a more detailed description of the problem I was having. I am running TomCat 6.0 and the latest versions of the jre and jdk. I have successfully installed the tomcat plugin and have a tomcat server running in eclipse. I am importing the project into eclipse from the .war file with the j2ee preview enabled for the target runtime environment. I am then setting the project properties as follows: Java compiler level: 5.0 project facets: 5.0 Tomcat: Marked as a tomcat project. Context name: /Blank Subdirectory for web app root: /WebContent I start the server, and the project builds successfully. Am I missing a step? I didn't do anything regarding classpath configuration. On 2/18/08, Dave Newton [EMAIL PROTECTED] wrote: --- Chriss Nold [EMAIL PROTECTED] wrote: Is there something in the configuration of Eclipse Europa that I need to change? Everything appears to be present, but the mapping is not being found. You didn't answer any of the questions I asked regarding various project classpath settings, how you imported the WAR, etc. As I stated when I imported the WAR and run as = run on server everything just worked without me having to change anything. How did you run it? Asking the same question with slightly different words isn't likely to get a significantly different response. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Action mapping not found - eclipse configuration problem???
--- Chriss Nold [EMAIL PROTECTED] wrote: I am importing the project into eclipse from the .war file with the j2ee preview enabled for the target runtime environment. Not sure what all that is. What's in your .classpath file? Marked as a tomcat project. Context name: /Blank Subdirectory for web app root: /WebContent What URL are you using? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Action mapping not found - eclipse configuration problem???
The j2ee preview target runtime was included in order to resolve an issue with eclipse. I had to include it so that eclipse would see my javax classes. It was blowing up anytime HTTPServletRequest, HTTPServletResponse, or PageContext was used. I don't know if this is something specific to the Europa Release, but it fixes the problem. Thanks, Chriss On 2/18/08, Chriss Nold [EMAIL PROTECTED] wrote: Dave, Thank you for all of the help, I really appreciate it. I had to go into each project and manually create the classes folders in the WEB-INF folder and point the classpath to them and everything seems to be working correctly now for both projects. It never fails, one little thing and everything goes boom. Thank you again for you patience and help, Chriss On 2/18/08, Dave Newton [EMAIL PROTECTED] wrote: --- Chriss Nold [EMAIL PROTECTED] wrote: I am importing the project into eclipse from the .war file with the j2ee preview enabled for the target runtime environment. Not sure what all that is. What's in your .classpath file? Marked as a tomcat project. Context name: /Blank Subdirectory for web app root: /WebContent What URL are you using? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Re: Action mapping not found - eclipse configuration problem???
I think the preview thing is the option under Basic when you click Run on Server and choose to Manually define a new server. Try running on tomcat instead. In any case what is happening is that struts.xml is not on the classpath and the filter is not finding it musachy On Feb 18, 2008 1:59 PM, Dave Newton [EMAIL PROTECTED] wrote: --- Chriss Nold [EMAIL PROTECTED] wrote: I am importing the project into eclipse from the .war file with the j2ee preview enabled for the target runtime environment. Not sure what all that is. What's in your .classpath file? Marked as a tomcat project. Context name: /Blank Subdirectory for web app root: /WebContent What URL are you using? Dave - 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]
Re: [OT] Re: Action mapping not found - eclipse configuration problem???
Dave, Thank you for all of the help, I really appreciate it. I had to go into each project and manually create the classes folders in the WEB-INF folder and point the classpath to them and everything seems to be working correctly now for both projects. It never fails, one little thing and everything goes boom. Thank you again for you patience and help, Chriss On 2/18/08, Dave Newton [EMAIL PROTECTED] wrote: --- Chriss Nold [EMAIL PROTECTED] wrote: I am importing the project into eclipse from the .war file with the j2ee preview enabled for the target runtime environment. Not sure what all that is. What's in your .classpath file? Marked as a tomcat project. Context name: /Blank Subdirectory for web app root: /WebContent What URL are you using? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: populating ActionFormBean-s
yep both ActionFormBeans are java bean compliant here's the code note i didn't copy any irelevevant method (dont have reset() method for any bean) = bean1 == package beans.studyProgram; public class StudyProgram extends org.apache.struts.validator.ValidatorActionForm { private static final long serialVersionUID = -3131205735075358925L; private Integer id; private String name; private Integer duration; private Integer ects; private Boolean active; private String description; public StudyProgram() { super(); } public StudyProgram (Integer id) { this.id = id; } public StudyProgram(Integer id, String name, Integer duration, Integer ects, Boolean active, String description) { super(); this.id = id; this.name = name; this.duration = duration; this.ects = ects; this.active = active; this.description = description; } public StudyProgram (StudyProgram clone) { super (); this.id = clone.id; this.name= clone.name; this.duration= clone.duration; this.ects= clone.ects; this.active = clone.active; this.description = clone.description; } public StudyProgram clone (StudyProgram clone) { return new StudyProgram (clone); } public Integer getId() { return id; } public String getID () { return id.toString(); } public String getName() { return name; } public Integer getDuration() { return duration; } public Integer getEcts() { return ects; } public Boolean getActive() { return active; } public String getDescription() { return description; } public void setId(Integer id) { this.id = id; } public void setName(String name) { this.name = name; } public void setDuration(Integer duration) { this.duration = duration; } public void setEcts(Integer ects) { this.ects = ects; } public void setActive(Boolean active) { this.active = active; } public void setDescription(String description) { this.description = description; } } bean2 (has bean1 as a property) package beans.department; import beans.studyProgram.StudyProgram; public class Department extends org.apache.struts.validator.ValidatorActionForm { private static final long serialVersionUID = 4766571497570970495L; private Integer id; private String name; private Boolean active; private String description; private StudyProgram program; public Department() { super(); } public Department (Integer id) { this.id = id; } public Department(Integer id, String name, Boolean active, String description, StudyProgram program) { super(); this.id = id; this.name= name; this.active = active; this.description = description; this.program = program; } public Department (Department clone) { super (); this.id = clone.id; this.name= clone.name; this.active = clone.active; this.description = clone.description; if(clone.hasProgram()) this.program = clone.program; } public Department clone (Department clone) { return new Department (clone); } public boolean hasProgram () { return program!=null; } public Integer getId() { return id; } public String getID() { return id.toString(); } public String getName() { return name; } public Boolean getActive() { return active; } public String getDescription() { return description; } public StudyProgram getProgram() { return program; } public void setId(Integer id) { this.id = id; } public void setName(String name) { this.name = name; } public void setActive(Boolean active) { this.active = active; } public void setDescription(String description) { this.description = description; } public void setProgram (StudyProgram program) { this.program = program; } } == struts config file == struts-config form-beans form-bean name=User type=beans.user.User / form-bean name=StudyProgram type=beans.studyProgram.StudyProgram / form-bean name=Departmenttype=beans.department.Department / .. action input=/view/editDepartment.jsp name=Department path=/SaveD scope=request type=actions.department.SaveDAction forward name=fail path=/view/editDepartment.jsp/ /action = jsp page (just one part) no need to copy all = html:form action=/SaveD method=POST html:hidden property=program.id value=%=isNew? program.getID() : department.getProgram().getID()%/ html:hidden property=id
Availability of Struts 2.1.0? ... related to XWork 2.1.0
Hello, I'm wondering if the version 2.1.0 of Struts2 would have to be released one day as I found it was initially due in late October 2007. (see links below) Problem is I currently need a fix/enhancement about Enum native conversion, which was already resolved in... XWork 2.1.0 http://jira.opensymphony.com/browse/XW-564 As it seems both (XWork 2.1.0 current Struts2 GA = 2.0.11) are incompatible - I tested it, some XWork classes moved or disappeared -, I don't really know what to do actually. Any ideas...? Thanks, Maxx Version Notes 2.1.0 (due Oct. 29 2007) http://struts.apache.org/2.x/docs/version-notes-210.html Fix for 2.1.0 on JIRA https://issues.apache.org/struts/secure/IssueNavigator.jspa?reset=truepid=10030fixfor=21794 Struts 2.1.0 DONE https://issues.apache.org/struts/secure/IssueNavigator.jspa?mode=hiderequestId=10767 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Availability of Struts 2.1.0? ... related to XWork 2.1.0
On Feb 18, 2008 1:21 PM, Maxx [EMAIL PROTECTED] wrote: I'm wondering if the version 2.1.0 of Struts2 would have to be released one day as I found it was initially due in late October 2007. (see links below) Problem is I currently need a fix/enhancement about Enum native conversion, which was already resolved in... XWork 2.1.0 http://jira.opensymphony.com/browse/XW-564 As it seems both (XWork 2.1.0 current Struts2 GA = 2.0.11) are incompatible - I tested it, some XWork classes moved or disappeared -, I don't really know what to do actually. The best (only...) place to find out when Struts will be released is the dev list. In this case, you may be in luck! Don is talking about doing a build later this week. That's not a guarantee, Struts releases are never due on a particular date, and it still has to pass a vote before it can be released, but activity seems to be picking up for 2.1. Of course you can always build the framework(s) yourself. You'll probably need the latest of both XWork and Struts-- the latest XWork may not be compatible with older versions of Struts. -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Availability of Struts 2.1.0? ... related to XWork 2.1.0
--- Maxx [EMAIL PROTECTED] wrote: I'm wondering if the version 2.1.0 of Struts2 would have to be released one day as I found it was initially due in late October 2007. While Wendy already answered your question, I'll add that the comment at the bottom of the 2.1.0 release notes states that it's a *proposed* (not finalized) *tag* (not release) date. S2.1.0 was, in fact, tagged (and is available in the repository) but was only released as a test build (not GA). As it seems both (XWork 2.1.0 current Struts2 GA = 2.0.11) are incompatible - I tested it, some XWork classes moved or disappeared -, I don't really know what to do actually. You have two options: wait until it's released (hopefully soon; several people did a fair amount of work getting it ready) or build from the source yourself until it is officially released. I'm also curious as to your previous question, where you make several statements regarding the quality of the documentation and the level of helpfulness of the mailing list, since there was at least one answer you didn't respond to. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Fetching request parameters in jsp
On top of the OGNL error, your JSP page is also incorrect. Your taglib declaration points to 's' as the prefix, but you are using 'saf' as the prefix to the property tag. It should be 's:property' -Wes On Mon, 2008-02-18 at 10:19 -0500, Laurie Harper wrote: Oops, and here's the link: http://struts.apache.org/2.x/docs/ognl-basics.html Laurie Harper wrote: Yup; specifically, request attributes are available through #request while request parameters are available through #parameters: Nils-Helge Garli Hegvik wrote: Request attributes are not the same as request parameters. Nils-H On Feb 18, 2008 2:16 PM, Gaurav Arora [EMAIL PROTECTED] wrote: I'm in the process of learning struts and I have a very simple jsp with a very simple Action behind it (doing no processing, simply returning SUCCESS). I want to access a get parameter in the jsp and print it out. This page : http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html says that I can simply do saf: property value=#request.myId / in the jsp but that doesn't seem to work. My jsp is (a.jsp): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [EMAIL PROTECTED] prefix=s uri=/struts-tags % html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleHello World/title s:head / /head body Id is : saf property value=#request.id / /body /html And i'm accessing it using a.jsp?id=. Am I missing something really obvious here? - 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: Availability of Struts 2.1.0? ... related to XWork 2.1.0
If you cant wait for the release and want to build it by yourself this could help: http://struts.apache.org/2.x/docs/building-with-maven.html musachy On Feb 18, 2008 5:06 PM, Dave Newton [EMAIL PROTECTED] wrote: --- Maxx [EMAIL PROTECTED] wrote: I'm wondering if the version 2.1.0 of Struts2 would have to be released one day as I found it was initially due in late October 2007. While Wendy already answered your question, I'll add that the comment at the bottom of the 2.1.0 release notes states that it's a *proposed* (not finalized) *tag* (not release) date. S2.1.0 was, in fact, tagged (and is available in the repository) but was only released as a test build (not GA). As it seems both (XWork 2.1.0 current Struts2 GA = 2.0.11) are incompatible - I tested it, some XWork classes moved or disappeared -, I don't really know what to do actually. You have two options: wait until it's released (hopefully soon; several people did a fair amount of work getting it ready) or build from the source yourself until it is officially released. I'm also curious as to your previous question, where you make several statements regarding the quality of the documentation and the level of helpfulness of the mailing list, since there was at least one answer you didn't respond to. Dave - 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]
Re: Tabbed panel problem
I don't quite understand what you're asking for, but I suspect: - you're doing the right thing using a remote tab/remote div to load html fragments into your tabs asynchronously, but; - you also want to use the notifyTopics and listenTopics features of these tags to trigger refreshing/reloads See the topics section of :http://struts.apache.org/2.0.11/docs/ajax-tags.html Paranoid_Fabio wrote: Hello. I try to explain the problem as cleary as possible: I want to manage a jsp with two views: mainPage.jsp is a jsp with a tabbed panel. In the tabbed panel I've two tabs. In each tab calls an action and shows the resulting jsp correctly. Here's the code of mainPage.jsp tabbed panel: s:tabbedPanel id=upload_options s:url id=mu action=showManual/ s:div id=manual_upload_tab key=ContentUploadMain.Option.1 theme=ajax href=%{mu} /s:div s:div id=auto_upload_tab key=ContentUploadMain.Option.2 theme=ajax s:text name=manual / /s:div /s:tabbedPanel where the second tab is not implemented. The first tab shows the jsp resulting from the call to the action showManual, the jsp is ManualContentUpload.jsp When I post the form in this page, I get the ManualContentUpload action invoked: action name=ManualContentUpload class=actions.contents.upload.ManualUpload result name=success/pages/UploadSuccess.jsp/result result name=error/pages/ManualContentUpload.jsp/result result name=input/pages/ManualContentUpload.jsp/result result name=upload_denied type=redirect/pages/UploadDenied.jsp/result /action What I want is that all the resulting jsp's still be shown in the tab of the panel. How I can do this? Thank you for help! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to make Type Conversion work in Struts2
Did you ever resolve this? I always use a Map rather than a List because historically there was a problem accessing Lists via the OGNL implementation. I don't know whether it was fixed ie. Substitute the List with a Map and address the items by the appropriate key instead of the index s:property value=testList['0'] Moving to Map of course loses order but the Indexed Map conversion does work as stated in the docs. Maxx wrote: Hello, Refering to http://struts.apache.org/2.x/docs/type-conversion.html , I'm currently trying to make Type Conversion working on a really simple example. And unfortunately, nothing's working. Below are the sources. Could someone please tell what I'm doing wrong (I suspect something with the OGNL expressions but could not found what...) Greets, Maxx PS: the s:iterator doesn't display anything, but if you move the testList under a JavaBean (e.g. TestBean) and you change testList to testBean.testList as OGNL value everywhere it's used (esp. for the iterator), it displays the values in the list... BUT the textfields still do not work, as while submitting the form, there are some Exceptions in the log which say: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'testBean.testList(0)' on 'class com.mycompany.somepacakge.action.TestAction: Error setting expression 'testBean.testList(0)' with value '[Ljava.lang.String;@102011a' --- // TestAction.java public class TestAction { public String execute() { ListString testList = new ArrayListString(2); testList.add(LIST 1st VALUE); testList.add(LIST 2nd VALUE); setTestList(testList); return INPUT; } public ListString getTestList() { return (ListString) session.get(list); } public void setTestList(ListString list) { session.put(list, list); } } // TestAction-conversion.properties Element_testList=java.lang.String // test.jsp [EMAIL PROTECTED] language=java contentType=text/html; charset=ISO-8859-1% [EMAIL PROTECTED] prefix=s uri=/struts-tags% s:form id=testForm action=Test method=post pre Direct access: = does not work testList(0) = s:property value=testList(0) / testList(1) = s:property value=testList(1) / Regular iterator: = does not work s:iterator value=testList status=stat testList(s:property value=#stat.index/) = s:property value=top / // s:textfield name=testList(%{#stat.index}) / /s:iterator /pre s:submit id=submitBtn value=Submit Test action=Test / /s:form - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sitemesh Struts 2
On Feb 17, 2008 8:07 PM, Matthew Seaborn [EMAIL PROTECTED] wrote: Has anyone had much experience with SiteMesh and Struts 2? Do they 'play' together well? Are there better alternatives when styling/compiling pages? Thanks. As Don stated, SiteMesh plays very well with Struts2 The Tiles plugin also plays very well with Struts2 I personally use SiteMesh for page decoration and Tiles for components within a page. The strength of the former is that it can decorate pages without the pages needing to know about it. Perfect for large decorations (head, header, footer, sidebar etc) The strength of the latter for me is in the Tiles result type for HTML/JSP fragments (struts.xml names a Tile and Tiles allows me to override or extend it when necessary). I never reference a JSP/FTL/VT directly from struts.xml any more. I now use both in most applications. Either is much better than using s:include/jsp:include - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: i18N jsp application on linux and windows
Hello Lauri, This is with reference.. http://www.mail-archive.com/user@struts.apache.org/msg72782.html Your reply on list is helping me a lot to dig into the problem.Please continue your help . response.getCharacterEncoding()is returning ISO-8859-1. I have set it to charset - ISO-8859-2 in JSP pages but it is returning “charset - ISO-8859-1”. Same thing is happening in windows and Linux. It is working in windows with this conversion(convertTo_IS08559_2) but failing in Linux.. Regards, Raghu _ From: Laurie Harper [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 19, 2008 4:24 AM To: [EMAIL PROTECTED] Subject: Re: i18N jsp application on linux and windows Uh, yeah, I got that; that's why I've replied to you twice, on the list; see also: http://www.mail-archive.com/user@struts.apache.org/msg72782.html Please follow up on-list if you need further help, to keep the discussion where everyone can see it. L. On 18-Feb-08, at 8:50 AM, Raghuveer wrote: I need an help related to i18n (internationalization),… http://www.mail-archive.com/user@struts.apache.org/msg72581.html http://www.mail-archive.com/user@struts.apache.org/msg72581.html I am developing an application an struts application to be used in poland for English,polish language on tomcat. There is scenario to extract SAP messages and show to the user in browser in JSP page. I have written following method to read SAP message and Convert to charsetThis is working for me on XP and Windows 2000 in Hyderabad. IS0-559-2And in JSP pages %@ page contentType=text/html;charset=iso-8859-2 % But messages are corrupted some times and getting Question marks when deployed and tested application in Poland on Linux. Linux- Nr potwierdzenia 8018340248 nie zostaÅ‚ znaleziony (proszÄ™ sprawdzić wpis) Windows Nr potwierdzenia 22 nie zosta³ znaleziony (proszê sprawdziæ wpis) - String convertTo_IS08559_2(HttpServletResponse response, StringstrMessage) throws UnsupportedEncodingException{ String charset = response.getCharacterEncoding(); Log.info(CLASS_NAME + - +METHOD_NAME+ - charset - +charset); try { } catch (UnsupportedEncodingException e) { //e.printStackTrace(); throw e; } return strFormatedMessage;
RE: [S2] Fetching request parameters in jsp
Thanks. As I suspected I was missing something really obvious. -Original Message- From: Wes Wannemacher [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 19, 2008 4:04 AM To: Struts Users Mailing List Subject: Re: [S2] Fetching request parameters in jsp On top of the OGNL error, your JSP page is also incorrect. Your taglib declaration points to 's' as the prefix, but you are using 'saf' as the prefix to the property tag. It should be 's:property' -Wes On Mon, 2008-02-18 at 10:19 -0500, Laurie Harper wrote: Oops, and here's the link: http://struts.apache.org/2.x/docs/ognl-basics.html Laurie Harper wrote: Yup; specifically, request attributes are available through #request while request parameters are available through #parameters: Nils-Helge Garli Hegvik wrote: Request attributes are not the same as request parameters. Nils-H On Feb 18, 2008 2:16 PM, Gaurav Arora [EMAIL PROTECTED] wrote: I'm in the process of learning struts and I have a very simple jsp with a very simple Action behind it (doing no processing, simply returning SUCCESS). I want to access a get parameter in the jsp and print it out. This page : http://struts.apache.org/2.x/docs/accessing-application-session-re quest-objects.html says that I can simply do saf: property value=#request.myId / in the jsp but that doesn't seem to work. My jsp is (a.jsp): !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; [EMAIL PROTECTED] prefix=s uri=/struts-tags % html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head titleHello World/title s:head / /head body Id is : saf property value=#request.id / /body /html And i'm accessing it using a.jsp?id=. Am I missing something really obvious here? -- --- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Validation
i was able to identify the problem it was only in IE,I put the showLoadingText=false to my save button then it validates correctly before it wasn't able to get the form values in IE. still thanks newton.date. :-) newton.dave wrote: --- carmi_cd [EMAIL PROTECTED] wrote: Hi I have an application in Struts 2, my problem is when i try to submit the form even if there are values in the form input box it stills give validation message to the user to enter values for the required fields. here is my form fields. s:textfield name=employeeId label=Employee ID labelposition=left value=%{edituser.empId} size=10/ s:textfield name=lastname label=Lastname labelposition=left value=%{edituser.lastName} size=30/ You're validating on lastName etc; do you have getters and setters for lastName and so on, or are you assuming there's a getEdituser() and all the values are being set on the edituser bean? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-S2--Validation-tp15539111p15557767.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] IE does not refresh page
Hi i have program that when the user input data in the form and clicked the save button, it should display list of records that reflects changes made in the record edited thru the form. In Firefox it works perfectly but in IE the list does not reflect the changes made. It was refreshing the list before but when I put the ShowLoadingText=false in my save button, It does not refresh the list anymore. I really need to put the ShowLoadingText=false property in my save button to solve the issue in IE which is not retrieving the values from the form. Please help me. how should I solve this. thanks again in advance. -- View this message in context: http://www.nabble.com/-S2--IE-does-not-refresh-page-tp15560342p15560342.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: JSP Tree
Thank you friend. It is very helpful for me. Naveen On Feb 18, 2008 6:33 AM, santosh gokak [EMAIL PROTECTED] wrote: Hi Naveen, Got this from google.. http://jsptree.sourceforge.net/ ~Santosh On Feb 16, 2008 8:50 PM, Dave Newton [EMAIL PROTECTED] wrote: --- naveen k [EMAIL PROTECTED] wrote: I am using struts1.1 for my application. I want to show some links in tree view on JSP page. How can i do that in JSP pages? Is there any predefined tag for that? If possible can any one send me a sample code. There is no S1 tree tag shipped with S1. Have you tried searching the web? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Santosh G Gokak