Access to MessageResource from action.
How to do this in struts 2 ? In struts 1 i had: MessageResources resources = (MessageResources) getServlet().getServletContext().getAttribute(org.apache.struts.Globals.MESSAGES_KEY); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Connection Pooling
Thanks for helping. Sure, here are all my settings. I use MySQL 5.0.37, Tomcat 5.5.17 and Windows XP SP2 and MySQL Connector/J 5.0.5. The name of the database that I'd like to connect to is called "akr_db" and the name of my web-application is called "SZTGKR". 1) I have a context.xml file in my web/Meta-INF directory with the following contents: - CONTEXT.XML factory org.apache.commons.dbcp.BasicDataSourceFactory removeAbandoned true removeAbandonedTimeout 60 logAbandoned true maxActive 100 maxIdle 30 maxWait 1 username balazs password 12345 driverClassName com.mysql.jdbc.Driver url jdbc:mysql://localhost:3306 -END OF CONTEXT.XML I have a java class, that (presumably) creates (or returns...?) my connection pool: - DBTEST.JAVA package db_helpers; import javax.naming.*; import javax.sql.*; import java.sql.*; public class DBTest { String foo = "Not Connected"; String bar = "Empty"; public void init() { try{ Context ctx = new InitialContext(); if(ctx == null ) throw new Exception("Boom - No Context"); Context envCtx = (Context) ctx.lookup("java:comp/env"); DataSource ds = (DataSource) envCtx.lookup("jdbc/akr_db"); if (ds != null) { Connection conn = ds.getConnection(); if(conn != null) { foo = "Got Connection "+conn.toString(); Statement stmt = conn.createStatement(); ResultSet rst = stmt.executeQuery( "select ID_paciens, vezeteknev, keresztnev from torzs_paciens"); if(rst.next()) { foo=rst.getString(2); bar=rst.getString(3); } conn.close(); } } }catch(Exception e) { e.printStackTrace(); } } public String getFoo() { return foo; } public String getBar() { return bar;} } - END OF DBTEST.JAVA Here, my Connection conn = ds.getConnection(); statement fails. And finally I have a JSP, in which I'd like to use my connection pool: -- DBTEST.JSP ... <% db_helpers.DBTest tst = new db_helpers.DBTest(); tst.init(); %> Results Foo <%= tst.getFoo() %> Bar <%= tst.getBar() %> ... -- END OF DBTEST.JSP Do I have anything else to connect to my db using connection pooling? So again, it's the "Connection conn = ds.getConnection();", where my program fails, it says "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'" And yes, after the following statement, the url, driverclass and some other properties of my ds is null: DataSource ds = (DataSource) envCtx.lookup("jdbc/akr_db"); This might be the problem... why is that? Thanks for helping again!! Regards, BM - Original Message From: Christopher Schultz <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Monday, May 21, 2007 2:33:11 PM Subject: Re: [OT] Connection Pooling -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Balazs, Balazs Michnay wrote: > I still cannot estabilish database connection using connection pooling. > I think I made all the settings I need, but still nothing... > 1) I have a tag in my server.xml Can you show us the connection settings you are using? You only showed the code (which looked fine, except that you don't need to check for null after you create a new InitialContext... I'm pretty sure that an object creation can't return null). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGUZGG9CaO5/Lv0PARAm8OAJ0cXJTmHSXhX8prghRHixkEbU89KACeL71M LYCgqlaLzn1mIzUZsGo9c8A= =aJtP -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/
Re: Optiontransferselect button customization.
Hi, This is Vijay and currently using Struts2.0.6 production viersion in my application development. I have been used almost all tags in Struts2.0.6 but there are problem in tag. It doesn't include cssClass and cssStyle of Second Select box at run time. So Is there any solution for it? If any one has solved this problem in new version then please let me know. Even I want to change order of left move and right move button so can i do it? I am here giving code for this tag. Please help me ASAP. Thank you, Vijay Prajapati On 4/26/07, Laurie Harper <[EMAIL PROTECTED]> wrote: Felipe Rodrigues wrote: > Hi guys, > > Can I somehow change the button (e.g. addAllToLeft) of a > Optiontransferselect to some image? I imagine it can be done by changing the > ftl, but I'd like some clues to do that. For some documentation on themes and extending/customizing them, see here: http://struts.apache.org/2.x/docs/themes-and-templates.html http://struts.apache.org/2.x/docs/extending-themes.html > Would be great to define some id > for these buttons, then we could change it by css. > How about that? I don't know off hand what the markup looks like for this component, but that may already be possible with the appropriate selectors. If not, customize the theme and make it so :-) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to do the following in S@
In Struts 1.x we achieved the following by wrote: > Hi, > > One page we got a Iterator containing the Action > Names, which means Actions names are not known > earlier, > > How can we retrieve the value inside the URL tag. > > How can we retrieve the dynamic action names like > this > in S2 > > that is in value from the iterator > > > > > > > > /> > id="course"/> > > > > >Subjects > > > > > > > > Boardwalk > for $500? In 2007? Ha! Play Monopoly Here and Now > (it's updated for today's economy) at Yahoo! Games. > http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax - Submit a form
I FOUND IT. Apparently it's not possible to modify the DOM during the request. But when it's over we can do it: Here's the code: dojo.event.topic.subscribe("/disableAll" , function(data , type, request) { if (type == 'load') { disableInputs(true); } }); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I access a collection of object using struts tags?
Hi, if you are using struts 1.x you can use nested tags, look at this link for a sample http://www.laliluna.de/struts-nested-iteration-tutorial.html Thanks, Nuwan - Original Message - From: "hk" <[EMAIL PROTECTED]> To: Sent: Tuesday, May 22, 2007 12:57 AM Subject: How can I access a collection of object using struts tags? I have a bean, which has a class that contains a ArrayList of another class. In this case, how can I access the property of the last class in a JSP page. For example, the business object Movie has a class TitleStores that contains a property of titlestores, which is a conllection of a class store. And, I want to access and ourput a property of a store, such as storeID, name, etc by using struts tags, such as bean:write. public class Movie { private String studio = null; private Genres genres = null; // ArrayList private TitleStores titleStores = null; private String rating = null; private String language = null; private int availableStock = -1; // For test private CastMembers castMembers = null;// ArrayList } public class TitleStores { private ArrayList titleStores; private int storeID; private String name; private String phone; private String street; private String city; private String state; private String owner; private String zipCode; private String policy; } public class Store { private int storeID; private String name; private String phone; private String street; private String city; private String state; private String owner; private String zipCode; private String policy; //private Policies policies; ... } -- View this message in context: http://www.nabble.com/How-can-I-access-a-collection-of-object-using-struts-tags--tf3793680.html#a10729836 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]
How to do the following in S@
Hi, One page we got a Iterator containing the Action Names, which means Actions names are not known earlier, How can we retrieve the value inside the URL tag. How can we retrieve the dynamic action names like this in S2 that is in Subjects Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax - Submit a form
I am still having this problem. Did any one went through some thing similar when using ajax to submit a form from a link or a submit Button and when used notifyTopic ? The problem is that the form fields are never populated in the action ! Any help ? Mansour wrote: No, I can not see any thing logged. Here' the whole JSP. it should give you an idea about what I am doing. I am trying to save/update an account and run a JS to disable the inputs. <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib uri="http://displaytag.sf.net"; prefix="display"%> function disableInputs(flag) { if (flag == 'null') flag = true; var inputs = document.getElementById("data_table"); inputs = inputs.getElementsByTagName('input'); for ( i = 0 ;i < inputs.length ; i++ ) inputs[i].disabled = flag ; } function showMessage(){ alert('test message!'); disableInputs(true); } /> value="Save from inside the form w/o ajax">dojo.event.topic.subscribe("/disableAll" , function(data, type, request) {showMessage(); }); onclick="disableInputs(false);">edit save - 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 can I access a collection of object using struts tags?
I have a bean, which has a class that contains a ArrayList of another class. In this case, how can I access the property of the last class in a JSP page. For example, the business object Movie has a class TitleStores that contains a property of titlestores, which is a conllection of a class store. And, I want to access and ourput a property of a store, such as storeID, name, etc by using struts tags, such as bean:write. public class Movie { private String studio = null; private Genres genres = null; // ArrayList private TitleStores titleStores = null; private String rating = null; private String language = null; private int availableStock = -1; // For test private CastMembers castMembers = null;// ArrayList } public class TitleStores { private ArrayList titleStores; private int storeID; private String name; private String phone; private String street; private String city; private String state; private String owner; private String zipCode; private String policy; } public class Store { private int storeID; private String name; private String phone; private String street; private String city; private String state; private String owner; private String zipCode; private String policy; //private Policies policies; ... } -- View this message in context: http://www.nabble.com/How-can-I-access-a-collection-of-object-using-struts-tags--tf3793680.html#a10729836 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: Problems with an applet inside a struts + tiles jsp
As I cannot guess the contents please display the appropriate web.xml M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Oren Livne" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, May 21, 2007 6:44 PM Subject: Re: Problems with an applet inside a struts + tiles jsp Dear Martin, Thanks so much for your kind reply, but unfortunately I didn't understand it and I don't think it answers my question. You might be referring to Struts 2, but I am still using Struts 1.3.8 so my action servlet is declared as follows: action org.apache.struts.action.ActionServlet My problem is an applet tag in a JSP. But maybe you did answer and I didn't understand your answer. Could you kindly tell me again? Thanks so much, Oren Livne Martin Gainty wrote: Good Evening Mr Levine I wanted to address your question If we look at the action servlet declaration in /WEB-INF/web.xml we are displayed action com.opensymphony.webwork.dispatcher.ServletDispatcher action *.action Any files with extension of 'action' has an assigned identifier of action ALL forward which results to extension of action are served by class com.opensymphony.webwork.dispatcher.ServletDispatcher Does this answer your question? Martin -- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Oren Livne" <[EMAIL PROTECTED]> To: Sent: Monday, May 21, 2007 5:30 PM Subject: Problems with an applet inside a struts + tiles jsp Dear All, I am writing a Struts 1.3.8 web application. I'm using tiles, and in one of the JSPs participating a tiles definition I placed an tag. The tiles processor throws a path-not-found-exception, but the page is displayed correctly and the applet works flawlessly. This is the error message I get in my console: 15:22:11,421 INFO InvalidPathExceptionServlet:103 - Requested path was not found: /RU2/error/404 15:22:11,421 INFO InvalidPathExceptionServlet:104 - Requesting user: N/A 15:22:11,421 INFO TilesPreProcessor:216 - Tiles process complete; forward to /WEB-INF/common/tiles/template.jsp (/RU2 is my context and /error/404 is a path configured in web.xml to handle HTTP 404 codes; so the exception is handled, but I don't even want to see any exception!). Here are the relevant pieces of the code. I would greatly appreciate an advice on how to get rid of this exception. Maybe it's related to my exception handling. I don't know. Thanks so much in advance, Oren Livne - tiles definition: (extends a common definition whose pages don't seem to have any problems) /> - demoEE.jsp: (when I remove the applet tags in the code below, the exception is gone) <%-- ### demoEE.jsp Nava L. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E University of Utah, Salt Lake City, UT 84112 Oren E. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-D Protected by U.S. Provisional Patent U-4003, February 2006 Mathematical expression parser demo page with the WebEQ equation editor applet that generates inputs for the parser. ### --%> <%@ page language="java"%> <%@ page import="net.ruready.struts.common.imports.WebAppNames" %> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%> <%@ taglib uri="http://ruready.net/catalog"; prefix="catalog"%> <%-- Useful definitions ==--%> var="WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES"> <%="" + WebAppNames.REQUEST.ATTRIBUTE.OLS_PARSER_DEMO_ARITHMETIC_MODES%> <%="" + WebAppNames.REQUEST.ATTRIBUTE.TOKEN.PARSER_DEMO_RESULT%> <%-- JSP body begins here --%> <%-- =
Re: Problems with an applet inside a struts + tiles jsp
Dear Martin, Thanks so much for your kind reply, but unfortunately I didn't understand it and I don't think it answers my question. You might be referring to Struts 2, but I am still using Struts 1.3.8 so my action servlet is declared as follows: action org.apache.struts.action.ActionServlet My problem is an applet tag in a JSP. But maybe you did answer and I didn't understand your answer. Could you kindly tell me again? Thanks so much, Oren Livne Martin Gainty wrote: Good Evening Mr Levine I wanted to address your question If we look at the action servlet declaration in /WEB-INF/web.xml we are displayed action com.opensymphony.webwork.dispatcher.ServletDispatcher action *.action Any files with extension of 'action' has an assigned identifier of action ALL forward which results to extension of action are served by class com.opensymphony.webwork.dispatcher.ServletDispatcher Does this answer your question? Martin -- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Oren Livne" <[EMAIL PROTECTED]> To: Sent: Monday, May 21, 2007 5:30 PM Subject: Problems with an applet inside a struts + tiles jsp Dear All, I am writing a Struts 1.3.8 web application. I'm using tiles, and in one of the JSPs participating a tiles definition I placed an tag. The tiles processor throws a path-not-found-exception, but the page is displayed correctly and the applet works flawlessly. This is the error message I get in my console: 15:22:11,421 INFO InvalidPathExceptionServlet:103 - Requested path was not found: /RU2/error/404 15:22:11,421 INFO InvalidPathExceptionServlet:104 - Requesting user: N/A 15:22:11,421 INFO TilesPreProcessor:216 - Tiles process complete; forward to /WEB-INF/common/tiles/template.jsp (/RU2 is my context and /error/404 is a path configured in web.xml to handle HTTP 404 codes; so the exception is handled, but I don't even want to see any exception!). Here are the relevant pieces of the code. I would greatly appreciate an advice on how to get rid of this exception. Maybe it's related to my exception handling. I don't know. Thanks so much in advance, Oren Livne - tiles definition: (extends a common definition whose pages don't seem to have any problems) value="/WEB-INF/parser/jsp/demoEE.jsp" /> - demoEE.jsp: (when I remove the applet tags in the code below, the exception is gone) <%-- ### demoEE.jsp Nava L. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E University of Utah, Salt Lake City, UT 84112 Oren E. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-D Protected by U.S. Provisional Patent U-4003, February 2006 Mathematical expression parser demo page with the WebEQ equation editor applet that generates inputs for the parser. ### --%> <%@ page language="java"%> <%@ page import="net.ruready.struts.common.imports.WebAppNames" %> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%> <%@ taglib uri="http://ruready.net/catalog"; prefix="catalog"%> <%-- Useful definitions ==--%> var="WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES"> <%="" + WebAppNames.REQUEST.ATTRIBUTE.OLS_PARSER_DEMO_ARITHMETIC_MODES%> <%="" + WebAppNames.REQUEST.ATTRIBUTE.TOKEN.PARSER_DEMO_RESULT%> <%-- JSP body begins here --%> <%-- == Page title and demo instructions == --%> <%-- /> --%> <%-- == Top table: submit form + options control == --%> <%-- Notify the action that the input is in EE format (default value: false) --%> <%-- Display validation errors unless this is a fresh form --%> <%-- Form data fields %%%
Re: Problems with an applet inside a struts + tiles jsp
Dear Martin, Thanks so much for your kind reply, but unfortunately I didn't understand it and I don't think it answers my question. You might be referring to Struts 2, but I am still using Struts 1.3.8 so my action servlet is declared as follows: action org.apache.struts.action.ActionServlet My problem is an applet tag in a JSP. But maybe you did answer and I didn't understand your answer. Could you kindly tell me again? Thanks so much, Oren Livne Martin Gainty wrote: Good Evening Mr Levine I wanted to address your question If we look at the action servlet declaration in /WEB-INF/web.xml we are displayed action com.opensymphony.webwork.dispatcher.ServletDispatcher action *.action Any files with extension of 'action' has an assigned identifier of action ALL forward which results to extension of action are served by class com.opensymphony.webwork.dispatcher.ServletDispatcher Does this answer your question? Martin -- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Oren Livne" <[EMAIL PROTECTED]> To: Sent: Monday, May 21, 2007 5:30 PM Subject: Problems with an applet inside a struts + tiles jsp Dear All, I am writing a Struts 1.3.8 web application. I'm using tiles, and in one of the JSPs participating a tiles definition I placed an tag. The tiles processor throws a path-not-found-exception, but the page is displayed correctly and the applet works flawlessly. This is the error message I get in my console: 15:22:11,421 INFO InvalidPathExceptionServlet:103 - Requested path was not found: /RU2/error/404 15:22:11,421 INFO InvalidPathExceptionServlet:104 - Requesting user: N/A 15:22:11,421 INFO TilesPreProcessor:216 - Tiles process complete; forward to /WEB-INF/common/tiles/template.jsp (/RU2 is my context and /error/404 is a path configured in web.xml to handle HTTP 404 codes; so the exception is handled, but I don't even want to see any exception!). Here are the relevant pieces of the code. I would greatly appreciate an advice on how to get rid of this exception. Maybe it's related to my exception handling. I don't know. Thanks so much in advance, Oren Livne - tiles definition: (extends a common definition whose pages don't seem to have any problems) value="/WEB-INF/parser/jsp/demoEE.jsp" /> - demoEE.jsp: (when I remove the applet tags in the code below, the exception is gone) <%-- ### demoEE.jsp Nava L. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E University of Utah, Salt Lake City, UT 84112 Oren E. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-D Protected by U.S. Provisional Patent U-4003, February 2006 Mathematical expression parser demo page with the WebEQ equation editor applet that generates inputs for the parser. ### --%> <%@ page language="java"%> <%@ page import="net.ruready.struts.common.imports.WebAppNames" %> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%> <%@ taglib uri="http://ruready.net/catalog"; prefix="catalog"%> <%-- Useful definitions ==--%> var="WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES"> <%="" + WebAppNames.REQUEST.ATTRIBUTE.OLS_PARSER_DEMO_ARITHMETIC_MODES%> <%="" + WebAppNames.REQUEST.ATTRIBUTE.TOKEN.PARSER_DEMO_RESULT%> <%-- JSP body begins here --%> <%-- == Page title and demo instructions == --%> <%-- /> --%> <%-- == Top table: submit form + options control == --%> <%-- Notify the action that the input is in EE format (default value: false) --%> <%-- Display validation errors unless this is a fresh form --%> <%-- Form data fields %%%
Re: Problems with an applet inside a struts + tiles jsp
Good Evening Mr Levine I wanted to address your question If we look at the action servlet declaration in /WEB-INF/web.xml we are displayed action com.opensymphony.webwork.dispatcher.ServletDispatcher action *.action Any files with extension of 'action' has an assigned identifier of action ALL forward which results to extension of action are served by class com.opensymphony.webwork.dispatcher.ServletDispatcher Does this answer your question? Martin -- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: "Oren Livne" <[EMAIL PROTECTED]> To: Sent: Monday, May 21, 2007 5:30 PM Subject: Problems with an applet inside a struts + tiles jsp Dear All, I am writing a Struts 1.3.8 web application. I'm using tiles, and in one of the JSPs participating a tiles definition I placed an tag. The tiles processor throws a path-not-found-exception, but the page is displayed correctly and the applet works flawlessly. This is the error message I get in my console: 15:22:11,421 INFO InvalidPathExceptionServlet:103 - Requested path was not found: /RU2/error/404 15:22:11,421 INFO InvalidPathExceptionServlet:104 - Requesting user: N/A 15:22:11,421 INFO TilesPreProcessor:216 - Tiles process complete; forward to /WEB-INF/common/tiles/template.jsp (/RU2 is my context and /error/404 is a path configured in web.xml to handle HTTP 404 codes; so the exception is handled, but I don't even want to see any exception!). Here are the relevant pieces of the code. I would greatly appreciate an advice on how to get rid of this exception. Maybe it's related to my exception handling. I don't know. Thanks so much in advance, Oren Livne - tiles definition: (extends a common definition whose pages don't seem to have any problems) - demoEE.jsp: (when I remove the applet tags in the code below, the exception is gone) <%-- ### demoEE.jsp Nava L. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E University of Utah, Salt Lake City, UT 84112 Oren E. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-D Protected by U.S. Provisional Patent U-4003, February 2006 Mathematical expression parser demo page with the WebEQ equation editor applet that generates inputs for the parser. ### --%> <%@ page language="java"%> <%@ page import="net.ruready.struts.common.imports.WebAppNames" %> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%> <%@ taglib uri="http://ruready.net/catalog"; prefix="catalog"%> <%-- Useful definitions ==--%> var="WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES"> <%="" + WebAppNames.REQUEST.ATTRIBUTE.OLS_PARSER_DEMO_ARITHMETIC_MODES%> <%="" + WebAppNames.REQUEST.ATTRIBUTE.TOKEN.PARSER_DEMO_RESULT%> <%-- JSP body begins here --%> <%-- == Page title and demo instructions == --%> <%-- /> --%> <%-- == Top table: submit form + options control == --%> <%-- Notify the action that the input is in EE format (default value: false) --%> <%-- Display validation errors unless this is a fresh form --%> <%-- Form data fields --%> <%-- Reference string label --%> <%-- Reference string text area --%> <%-- WebEQ EE applet --%> <%-- Vertical space --%> <%-- Parser Control Options --%> <%-- Title --%>
Problems with an applet inside a struts + tiles jsp
Dear All, I am writing a Struts 1.3.8 web application. I'm using tiles, and in one of the JSPs participating a tiles definition I placed an tag. The tiles processor throws a path-not-found-exception, but the page is displayed correctly and the applet works flawlessly. This is the error message I get in my console: 15:22:11,421 INFO InvalidPathExceptionServlet:103 - Requested path was not found: /RU2/error/404 15:22:11,421 INFO InvalidPathExceptionServlet:104 - Requesting user: N/A 15:22:11,421 INFO TilesPreProcessor:216 - Tiles process complete; forward to /WEB-INF/common/tiles/template.jsp (/RU2 is my context and /error/404 is a path configured in web.xml to handle HTTP 404 codes; so the exception is handled, but I don't even want to see any exception!). Here are the relevant pieces of the code. I would greatly appreciate an advice on how to get rid of this exception. Maybe it's related to my exception handling. I don't know. Thanks so much in advance, Oren Livne - tiles definition: (extends a common definition whose pages don't seem to have any problems) - demoEE.jsp: (when I remove the applet tags in the code below, the exception is gone) <%-- ### demoEE.jsp Nava L. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-E University of Utah, Salt Lake City, UT 84112 Oren E. Livne <[EMAIL PROTECTED]> Academic Outreach and Continuing Education (AOCE) 1901 East South Campus Dr., Room 2197-D Protected by U.S. Provisional Patent U-4003, February 2006 Mathematical expression parser demo page with the WebEQ equation editor applet that generates inputs for the parser. ### --%> <%@ page language="java"%> <%@ page import="net.ruready.struts.common.imports.WebAppNames" %> <%@ taglib uri="http://struts.apache.org/tags-bean"; prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic"; prefix="logic"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%> <%@ taglib uri="http://ruready.net/catalog"; prefix="catalog"%> <%-- Useful definitions ==--%> <%="" + WebAppNames.REQUEST.ATTRIBUTE.OLS_PARSER_DEMO_ARITHMETIC_MODES%> <%="" + WebAppNames.REQUEST.ATTRIBUTE.TOKEN.PARSER_DEMO_RESULT%> <%-- JSP body begins here --%> <%-- == Page title and demo instructions == --%> <%-- --%> <%-- == Top table: submit form + options control == --%> <%-- Notify the action that the input is in EE format (default value: false) --%> <%-- Display validation errors unless this is a fresh form --%> <%-- Form data fields --%> <%-- Reference string label --%> <%-- Reference string text area --%> <%-- WebEQ EE applet --%> <%-- Vertical space --%> <%-- Parser Control Options --%> <%-- Title --%> <%-- Implicit multiplication --%> key="parser.demo.options.implicitMultiplication.label" /> property="implicitMultiplication" /> <%-- #digits --%> key="parser.demo.options.digits.label" /> size="1" /> <%-- Arithmetic mode drop-down menu --%> key="parser.demo.options.arithmeticMode.label" /> property="arithmeticModeStr"> name="${WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES}" />
RE: OOM Error (Java heap space) from 1800+ form elements, am I doing something wrong?
Posting to the group, since I believe a solution has been found. It appears that my issue was something like a buffer overrun in the jsp. A solution that we are testing is the following code snippet: <%@ page buffer="1024kb" autoFlush="false" %> The current size might be a little overkill but, my issue seems to have vanished. Thanks goes to my co-worker you pointed me in this direction. Thanks, also to the great support from this mailing list. Mike -Original Message- From: Forsberg, Mike Sent: Friday, May 18, 2007 2:06 PM To: user@struts.apache.org Subject: OOM Error (Java heap space) from 1800+ form elements, am I doing something wrong? A form of approximately 1800 form elements is causing "java.lang.OutOfMemoryError: Java heap space". When 1000 form elements are used, no such error. The environment: - JBoss 4.0.5 - Struts 1.1 - A jsp page using struts tags to start and end the form block. Then inside the form, xslt is used to parse a 300 element xml document into 6 input tags per element. What seems to be happening, the reset method for the form bean is called. Then before any set methods are called, the OOME is thrown. Any help would be appreciated. Mike Forsberg Software Engineer II APM - APC T 512.602.0220 - 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: ajax - Submit a form
No, I can not see any thing logged. Here' the whole JSP. it should give you an idea about what I am doing. I am trying to save/update an account and run a JS to disable the inputs. <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib uri="http://displaytag.sf.net"; prefix="display"%> function disableInputs(flag) { if (flag == 'null') flag = true; var inputs = document.getElementById("data_table"); inputs = inputs.getElementsByTagName('input'); for ( i = 0 ;i < inputs.length ; i++ ) inputs[i].disabled = flag ; } function showMessage(){ alert('test message!'); disableInputs(true); } value="Save from inside the form w/o ajax"> dojo.event.topic.subscribe("/disableAll" , function(data, type, request) { showMessage(); }); onclick="disableInputs(false);">edit save - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax - Submit a form
If you add and use the ajax theme, is any error logged? musahcy On 5/21/07, Mansour <[EMAIL PROTECTED]> wrote: Yes they are submitted provided that the submit button is inside the form. Here's my code : dojo.event.topic.subscribe("/disableAll" , function(data, type, request) { showMessage(); }); edit save using ajax - 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
Re: ajax - Submit a form
Yes they are submitted provided that the submit button is inside the form. Here's my code : value="Save from inside the form w/o ajax">dojo.event.topic.subscribe("/disableAll" , function(data, type, request) {showMessage(); }); onclick="disableInputs(false);">edit save using ajax - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [S2] Problem with ! notation
> > Yes, Tiger is the webapp. > > My struts.xml contains > class="com.mysite.ecommerce.actions.StartOrderAction" method="input"> > /startOrder.jsp > > > My struts.properties is located in WEB_INF/classes along with the > struts.xml file and contains > struts.devMode = true > struts.enable.DynamicMethodInvocation = true > > If I call http://localhost:8084/Tiger/StartOrder.action then I can see > that the input() method is called on StartOrder.action through using > System.out.println(). However > http://localhost:8084/Tiger/StartOrder!input.action gives There is no > Action mapped for namespace / and action name StartOrder!input. - > [unknown location] > > Is there anything else you need to see? I don't want to send too much > unneccassary data > It appears that you are hardcoding your call to the input method... Typically, I specify a method using wildcards. Your setup would look like this - Then whichever method I specify in the URL will be called. Of course, in my scenario it defaults to 'execute' unless I specify otherwise. -Wes -- Wes Wannemacher Director of Operations Double A Trailer Sales, Inc. [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: [S2] Problem with ! notation
Is dynamic method invocation turned on? As an aside, why is dynamic method invocation turned off by default. From experience this suggests that either the functionality is experimental, or is not the sort of thing you should be using unless you have good reason and know what you're doing. Are there any gotchas I should know about? Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax - Submit a form
Use a regular submit (no ajax) and see if you values are submitted. musachy On 5/21/07, Mansour <[EMAIL PROTECTED]> wrote: I still don't what wrong with this. I fixed few problems but still can not get the javascript function to execute when the request is being made. It send the request but the values for the form are not populated. Hopefully someone can find out what's wrong with my code. dojo.event.topic.subscribe("/disableAll" , function(data, type, request) { showMessage(); }); edit save - 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
[S2] form population problem
I can't seem to get values retrieved from the DB to populate on the form. The list jsp and retrieving from DB work great, but values don't seem to make it to the jsp. I pass the ID into the action method, retrieve the record, and want to display the results. struts.xml: jsps/errors.jsp jsps/edit_dept.jsp DepartmentAction: public String findById () throws Exception { this.dept = getDaoManager().getDeptDao().findById(this.getId()); return SUCCESS; } Method fills dept object. also, getDept() & setDept() in action. edit_dept.jsp: ID: I have to be doing something simple wrong, I just don't see it. shadman -- View this message in context: http://www.nabble.com/-S2--form-population-problem-tf3792422.html#a10725666 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: ajax - Submit a form
I still don't what wrong with this. I fixed few problems but still can not get the javascript function to execute when the request is being made. It send the request but the values for the form are not populated. Hopefully someone can find out what's wrong with my code. dojo.event.topic.subscribe("/disableAll" , function(data, type, request) { showMessage(); }); onclick="changeState(true);">edit save - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Deploy error
Hi all, i'm developing an application using Struts 2 + Spring + Hibernate + Tiles 2. I'm using the Jdeveloper 10.1.3 as the IDE. When i run the app inside the IDE, everything works fine. But when i generate an EAR file and try to deploy to server (OC4J or Tomcat), i receive the following message: INFO - ContextLoader.initWebApplicationContext(174) | Root WebApplicationContext : initialization started ERROR - ContextLoader.initWebApplicationContext(205) | Context initialization fa iled java.lang.IllegalArgumentException: Name must not be null at org.springframework.util.Assert.notNull(Assert.java:113) at org.springframework.util.ClassUtils.forName(ClassUtils.java:162) at org.springframework.util.ClassUtils.forName(ClassUtils.java:147) at org.springframework.web.context.ContextLoader.determineContextClass(C ontextLoader.java:273) at org.springframework.web.context.ContextLoader.createWebApplicationCon text(ContextLoader.java:230) at org.springframework.web.context.ContextLoader.initWebApplicationConte xt(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitiali zed(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77 I also tried to put this in my web.xml (But here's another doubt: Why i have to do this in web.xml for deploy and for running standalone not): contextClass org.springframework.web.context.support.XmlWebApplicationContext Then the stacktrace changes: INFO - ContextLoader.initWebApplicationContext(174) | Root WebApplicationContext : initialization started ERROR - ContextLoader.initWebApplicationContext(205) | Context initialization fa iled org.springframework.beans.factory.BeanDefinitionStoreException: IOException pars ing XML document from ServletContext resource []; nested exception is java.io.Fi leNotFoundException: Could not open ServletContext resource [] Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [] at org.springframework.web.context.support.ServletContextResource.getInp utStream(ServletContextResource.java:99) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:351) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea nDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126) at org.springframework.beans.factory.support.AbstractBeanDefinitionReade r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142) at org.springframework.web.context.support.XmlWebApplicationContext.load BeanDefinitions(XmlWebApplicationContext.java:123) at org.springframework.web.context.support.XmlWebApplicationContext.load BeanDefinitions(XmlWebApplicationContext.java:91) at org.springframework.context.support.AbstractRefreshableApplicationCon text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94) at org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:294) at org.springframework.web.context.support.AbstractRefreshableWebApplica tionContext.refresh(AbstractRefreshableWebApplicationContext.java:156) at org.springframework.web.context.ContextLoader.createWebApplicationCon text(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationConte xt(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitiali zed(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 334) Anyone has a tip or suggestion of what is happening? The strange is that application runs fine inside the ide. Thanks in advance. Lauro -- View this message in context: http://www.nabble.com/-S2--Deploy-error-tf3792174.html#a10724834 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: submitting a form using java script on IE
It's working now. It's my fault. The onclick function needs a return value: href="javascript://"> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: submitting a form using java script on IE
Sorry, that was my fault as I was reorganizing the code for the post. The keyword "this" was not taken off: And I really don't think this is the issue. ID email Address Phone Fax action="/fe/getAccountById.action" method="post"> John Smith Forsberg, Mike wrote: >From my understanding the onSubmit="return true;" code just allows the form to be submitted. See http://www.htmlcodetutorial.com/forms/_FORM_onSubmit.html I noticed in your pasted output, the "this" is removed from the anchor tags. Could this be the issue? Mike -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 12:53 PM To: Struts Users Mailing List Subject: Re: submitting a form using java script on IE Mike: I tried this one too and I tried using getElementByID and I tried document.all[frmName], they all worked fine. I was able to get the object successfully under FF and IE. I view the contents of this object using simple alerts and JS console in FF. The problem is when submitting the form the event doens't go through. S2 adds the attribute for the form (onSubmit="return true;") which is making things harder. It works fine when using buttons to submit but with anchors it's not . :/ Forsberg, Mike wrote: I've never used the this.parentNode.submit() in a form. That might only work in Firefox. (I make no claim if this is true, as I didn't look it up) What I generally use is document.formName.submit(). Hope I helped, Mike -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 12:22 PM To: Struts Users Mailing List Subject: submitting a form using java script on IE I need a table that contains anchors. Clicking on this anchors executes the Action I need. The table is working great in FF but not in IE. IE is getting the form object correctly put can not submit it. When I click on the anchor in IE, the page stays there and no action is taken. When I looked at the html source generated I found that s2 automatically sets the onSubmit attribute of the form. I am not sure if this has anything to do with IE not submitting the form. the generated html looks like: ID email Address Phone Fax onclick="parentNode.submit();"> JohnSmith - 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: submitting a form using java script on IE
>From my understanding the onSubmit="return true;" code just allows the form to be submitted. See http://www.htmlcodetutorial.com/forms/_FORM_onSubmit.html I noticed in your pasted output, the "this" is removed from the anchor tags. Could this be the issue? Mike -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 12:53 PM To: Struts Users Mailing List Subject: Re: submitting a form using java script on IE Mike: I tried this one too and I tried using getElementByID and I tried document.all[frmName], they all worked fine. I was able to get the object successfully under FF and IE. I view the contents of this object using simple alerts and JS console in FF. The problem is when submitting the form the event doens't go through. S2 adds the attribute for the form (onSubmit="return true;") which is making things harder. It works fine when using buttons to submit but with anchors it's not . :/ Forsberg, Mike wrote: > I've never used the this.parentNode.submit() in a form. That might only > work in Firefox. (I make no claim if this is true, as I didn't look it > up) > > What I generally use is document.formName.submit(). > > Hope I helped, > > Mike > > -Original Message- > From: Mansour [mailto:[EMAIL PROTECTED] > Sent: Monday, May 21, 2007 12:22 PM > To: Struts Users Mailing List > Subject: submitting a form using java script on IE > > I need a table that contains anchors. Clicking on this anchors executes > the Action I need. The table is working great in FF but not in IE. IE is > > getting the form object correctly put can not submit it. When I click on > > the anchor in IE, the page stays there and no action is taken. When I > looked at the html source generated I found that s2 automatically sets > the onSubmit attribute of the form. I am not sure if this has anything > to do with IE not submitting the form. > > > > > name="frm${row.id}" id="frm${row.id}" > > href="javascript://"> > > > > > > > > the generated html looks like: > > > > > > ID > email > Address > Phone > Fax > > > > > action="/fe/getAccountById.action" method="post"> > > > John Smith > > > > > > > > > Any Idea what's going on or what to do to fix this ? > > > > - > 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: submitting a form using java script on IE
Mike: I tried this one too and I tried using getElementByID and I tried document.all[frmName], they all worked fine. I was able to get the object successfully under FF and IE. I view the contents of this object using simple alerts and JS console in FF. The problem is when submitting the form the event doens't go through. S2 adds the attribute for the form (onSubmit="return true;") which is making things harder. It works fine when using buttons to submit but with anchors it's not . :/ Forsberg, Mike wrote: I've never used the this.parentNode.submit() in a form. That might only work in Firefox. (I make no claim if this is true, as I didn't look it up) What I generally use is document.formName.submit(). Hope I helped, Mike -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 12:22 PM To: Struts Users Mailing List Subject: submitting a form using java script on IE I need a table that contains anchors. Clicking on this anchors executes the Action I need. The table is working great in FF but not in IE. IE is getting the form object correctly put can not submit it. When I click on the anchor in IE, the page stays there and no action is taken. When I looked at the html source generated I found that s2 automatically sets the onSubmit attribute of the form. I am not sure if this has anything to do with IE not submitting the form. the generated html looks like: ID email Address Phone Fax JohnSmith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: submitting a form using java script on IE
I've never used the this.parentNode.submit() in a form. That might only work in Firefox. (I make no claim if this is true, as I didn't look it up) What I generally use is document.formName.submit(). Hope I helped, Mike -Original Message- From: Mansour [mailto:[EMAIL PROTECTED] Sent: Monday, May 21, 2007 12:22 PM To: Struts Users Mailing List Subject: submitting a form using java script on IE I need a table that contains anchors. Clicking on this anchors executes the Action I need. The table is working great in FF but not in IE. IE is getting the form object correctly put can not submit it. When I click on the anchor in IE, the page stays there and no action is taken. When I looked at the html source generated I found that s2 automatically sets the onSubmit attribute of the form. I am not sure if this has anything to do with IE not submitting the form. the generated html looks like: ID email Address Phone Fax JohnSmith
submitting a form using java script on IE
I need a table that contains anchors. Clicking on this anchors executes the Action I need. The table is working great in FF but not in IE. IE is getting the form object correctly put can not submit it. When I click on the anchor in IE, the page stays there and no action is taken. When I looked at the html source generated I found that s2 automatically sets the onSubmit attribute of the form. I am not sure if this has anything to do with IE not submitting the form. the generated html looks like: ID email Address Phone Fax John Smith
Re: [S2] Problem with ! notation
On 21/05/07, Roger Varley <[EMAIL PROTECTED]> wrote: > > You might have to post config snippets... I'm assuming > Tiger is the webapp? > Dave Forget the previous post - it's working after a fashion. http://localhost:8084/Tiger/StartOrder.action runs OK and calls StartOrder.input(). http://localhost:8084/Tiger/StartOrder!input.action runs OK and calls StartOrder.input() http://localhost:8084/Tiger/StartOrder!execute.action fails even though I have an execute method. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with ! notation
You might have to post config snippets... I'm assuming Tiger is the webapp? Yes, Tiger is the webapp. My struts.xml contains /startOrder.jsp My struts.properties is located in WEB_INF/classes along with the struts.xml file and contains struts.devMode = true struts.enable.DynamicMethodInvocation = true If I call http://localhost:8084/Tiger/StartOrder.action then I can see that the input() method is called on StartOrder.action through using System.out.println(). However http://localhost:8084/Tiger/StartOrder!input.action gives There is no Action mapped for namespace / and action name StartOrder!input. - [unknown location] Is there anything else you need to see? I don't want to send too much unneccassary data Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with ! notation
--- Roger Varley <[EMAIL PROTECTED]> wrote: > restarted Tomcat but no joy I'm afraid - > http://localhost:8084/Tiger/StartOrder!execute.action > still gives me the error message. You might have to post config snippets... I'm assuming Tiger is the webapp? d. You snooze, you lose. Get messages ASAP with AutoCheck in the all-new Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/newmail_html.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with ! notation
Is dynamic method invocation turned on? ("Hey dynamic method invocation... you sure are looking good today," he cajoled, breathily.) It wasn't. I've changed the struts.properties file from struts.enable.DynamicMethodInvocation = false to struts.enable.DynamicMethodInvocation = true and restarted Tomcat but no joy I'm afraid - http://localhost:8084/Tiger/StartOrder!execute.action still gives me the error message. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Problem with ! notation
--- Roger Varley <[EMAIL PROTECTED]> wrote: > I'm obviously missing something Is dynamic method invocation turned on? ("Hey dynamic method invocation... you sure are looking good today," he cajoled, breathily.) d. Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] Problem with ! notation
Hi I'm trying to call a method on my action using the ! notation as explained in the CRUD demo. If I call my action from the browser bar as http://localhost:8084/Tiger/StartOrder.action then the execute() method runs. If I call http://localhost:8084/Tiger/StartOrder!execute.action then I get the Struts error page with the message There is no Action mapped for namespace / and action name StartOrder!execute. - [unknown location] (I've checked it with !Execute as well). I'm obviously missing something Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and
Thanx Antonio Petrelli wrote: 2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: Because i allready have a template like this value="/tiles/footers/admin/footer.jsp" /> ... and i want the toolbar definition not to dispayed at .content.before.delete I see, then in , when you insert the "toolbar" attribute, add: ignore="true" This will skip the missing resource. HTH Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and
2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: Because i allready have a template like this ... and i want the toolbar definition not to dispayed at .content.before.delete I see, then in , when you insert the "toolbar" attribute, add: ignore="true" This will skip the missing resource. HTH Antonio
Re: Tiles and
Because i allready have a template like this path="/tiles/layouts/templates/admin/blackplazza_admin/mainLayout.jsp"> value="/tiles/layouts/templates/admin/blackplazza_admin/mainMenu.jsp" /> ... and i want the toolbar definition not to dispayed at .content.before.delete Antonio Petrelli wrote: 2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: Antonio Petrelli wrote: > 2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: >> >> Hello >> >> I am having the follwoing definition at tiles-defs.xml >> >> >> >> >> >> >> >> how can i set that "toolbar" definition will be null? > > > > What is that "{$1}"? I really cannot understand it. So you want to put a null value as an attribute? If it has not been defined in ".content" definition, then you simply need to remove the element corresponding to the toolbar attribute. If it already defined in ".content", I think that you cannot do it in the XML file, but you can still do it by adding a Tiles controller that will remove that attribute value before rendering definition. BTW, why do you want to put an attribute with a null value? Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles and
2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: Antonio Petrelli wrote: > 2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: >> >> Hello >> >> I am having the follwoing definition at tiles-defs.xml >> >> >> >> >> >> >> >> how can i set that "toolbar" definition will be null? > > > > What is that "{$1}"? I really cannot understand it. So you want to put a null value as an attribute? If it has not been defined in ".content" definition, then you simply need to remove the element corresponding to the toolbar attribute. If it already defined in ".content", I think that you cannot do it in the XML file, but you can still do it by adding a Tiles controller that will remove that attribute value before rendering definition. BTW, why do you want to put an attribute with a null value? Antonio
Re: Tiles and
Antonio Petrelli wrote: 2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: Hello I am having the follwoing definition at tiles-defs.xml how can i set that "toolbar" definition will be null? What is that "{$1}"? I really cannot understand it. Antonio I was just like null and i want something like this - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Validation on datetimepicker
You can use the notify topics to validate the date and cancel the request if the date is not valid. On 2.0.6 I don't think there is any way to get Struts do it for you. On 2.1 you can mix ajax with validation so any validation supported by struts can be used with the ajax tags. musachy On 5/21/07, Julien Leonard <[EMAIL PROTECTED]> wrote: Hello all, I'm using a datetimepicker in a search form, the result of the form is displayed in a s:div (thanks theme="ajax" on s:submit ). My problem is, when the user set a wrong value in the datetimepicker ( "toto"), the s:div is updated but with the error page. In fact it's another form with a header etc... How can I validate the date to have the error message on the first form? Julien -- "Hey you! Would you help me to carry the stone?" Pink Floyd
Re: Tiles and
2007/5/21, Jim Theodoridis <[EMAIL PROTECTED]>: Hello I am having the follwoing definition at tiles-defs.xml how can i set that "toolbar" definition will be null? What is that "{$1}"? I really cannot understand it. Antonio
Tiles and
Hello I am having the follwoing definition at tiles-defs.xml how can i set that "toolbar" definition will be null? at tomcat 5.1.8 the works fine but at tomcat 5.5 i am getting an error like The requested resource (/tera/tiles/layouts/templates/admin/blackplazza_admin/{$1}) is not available i am using struts 1.2.9 tomcat 5.5.9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts1 and struts2
--- xiaojie han <[EMAIL PROTECTED]> wrote: > There is struts1 and struts2. what are the > differences between them? http://struts.apache.org/2.x/docs/comparing-struts-1-and-2.html d. Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts1 and struts2
I am new to struts. There is struts1 and struts2. what are the differences between them? Thanks. Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[S2] HTTP Status 404 - result 'null' not found
I am sure this issue is not new, and it must be a work around, but unfortunately I was not able to find it yet. We have a local Windows environment (Sun App Server 8.2) where our project works just fine. But once we deployed it on our server (Sun Solaris) we've got the following error on every action we have in struts configuration xml. + HTTP Status 404 - result 'null' not found type Status report message result 'null' not found description The requested resource (result 'null' not found) is not available. Sun-Java-System/Application-Server ++ After some checks of configurations on both servers (no major differences) and included jars I replaced our project with one from the struts tutorial HelloWorld. < http://struts.apache.org/2.0.6/docs/hello-world.html > This project built in our environment had the same behavior as our oroginal project - worked locally and got the "404 error" on Solaris. It must be some parsing of struts config file issue. Struts can "read" the action class, the method specified executes (checked in logs), but the result page is not read (recognized) (???) I think it's a major problem and hope that the solution can be found. -- View this message in context: http://www.nabble.com/-S2--HTTP-Status-404---result-%27null%27-not-found-tf3790310.html#a10718987 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] Validation on datetimepicker
Hello all, I'm using a datetimepicker in a search form, the result of the form is displayed in a s:div (thanks theme="ajax" on s:submit ). My problem is, when the user set a wrong value in the datetimepicker ( "toto"), the s:div is updated but with the error page. In fact it's another form with a header etc... How can I validate the date to have the error message on the first form? Julien
[OT] why hasn't apache foundation voted for JSR-277?
by searching for solutions for jar problems i had i came across this http://jcp.org/en/jsr/results?id=3238 and wondered has anyone from apache gave this thought? _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Connection Pooling
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Balazs, Balazs Michnay wrote: > I still cannot estabilish database connection using connection pooling. > I think I made all the settings I need, but still nothing... > 1) I have a tag in my server.xml Can you show us the connection settings you are using? You only showed the code (which looked fine, except that you don't need to check for null after you create a new InitialContext... I'm pretty sure that an object creation can't return null). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGUZGG9CaO5/Lv0PARAm8OAJ0cXJTmHSXhX8prghRHixkEbU89KACeL71M LYCgqlaLzn1mIzUZsGo9c8A= =aJtP -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] how do i know servlet.jar verison i have?
2007/5/21, אלחנן מעין <[EMAIL PROTECTED]>: hi... in my lib folder of an ear i've found a 'mystery' servlet.jar which has the size (76,877 kb) , i tried looking into manifest.mf but it says nothing about the version only: Manifest-Version: 1.0 Created-By: Ant 1.4 how do i know which version it is? (it causes problems with our jsp compliation based on custom tags). It should not be there! You have to use the one that comes with your servlet container! My suggestion is to remove it completely from the ear. Antonio
[OT] how do i know servlet.jar verison i have?
hi... in my lib folder of an ear i've found a 'mystery' servlet.jar which has the size (76,877 kb) , i tried looking into manifest.mf but it says nothing about the version only: Manifest-Version: 1.0 Created-By: Ant 1.4 how do i know which version it is? (it causes problems with our jsp compliation based on custom tags). _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT- need some help
Hi martin, Yes, Now that I look at Digester's faq, seems like this can be pretty useful.Once the info in the files are available through java beans, i can use them anywhere I want using the getter methods. However, in my current scenario, looks like a simple key value pair, ie having a .properties file would suit me better. public static ResourceBundle confBundle = ResourceBundle.getBundle("package name"); public static String getPropValue(String key){ String propValue = null; propValue = confBundle.getString(key); return propValue; } } And i could call getPropValue to access the value stored in the .properties file right? However, tonight is going to be spent on learning digester:) Thanks, Vikas. On 5/21/07, Martin Kindler <[EMAIL PROTECTED]> wrote: vikas rao schrieb: > No, Martin, I wasnt looking at plain xml reading ,in that case i could > just > use a normal parser and get the values right? > Thanks, > Vikas. Yes, sure, you could just use an XML parser and do your own stuff. The problem with this approach would be that changing your XML structure would probably mean changing a lot of the processing. This type of processing is handled by Digester which was originally made to deal with Struts config files. It will (called at an appropriate time in your app's lifecycle) convert your configuration information into (one or several) Java beans which your application can access. Seems for me exactly the thing you are looking for. The other question is whether this machinery is worthwhile, if you are just having a few key-value pairs which probably would be easier be put into some plain text file (e. g a .properties file). To give you an example how I do configuration in my Struts (1.x) based apps: I introduce a plugin where I pass the path of the config-file as a parameter in struts-config.xml. In the init-method of the plugin I use digester to transfer the information from my config file into a configuration bean which is put into application scope. From there it can be accessed when needed. Martin > On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> Can someone point out a tutorial or some place where I can learn how to >> read values from a .cfg file? >> Say I have a Input.cfg file which goes like: >> >> >>> inputDir="C:/vray/xml_files/" >> outputDir="C:/xm_output" >>/> >> >> >> >> Now, if I need the inputDir value inside my program, how do I do it? >> >> Sorry that this is off topic from struts, but i cant seem to find some >> sensible help. >> >> Any help will be appreciated. >> Thanks. >> Vikas. >> > -- -- Martin Kindler Kaulbachstr. 20a D-12247 Berlin Deutschland E-Mail: [EMAIL PROTECTED] Tel. +49 (030) 260 78 48 1 Fax +49 (030) 260 78 48 3 GSM +49 (0160) 977 636 14 Skype martin.kindler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT- need some help
On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Can you give me an example? The reason I chose to do it this way is basically I can change the inputDirectory, outputdirectory and other values without making any changes in the code, hence using it anywhere becomes easy. In our company, we have a jar file which is included in the build path and then we access the config files like: Config configRoot = ConfigFactory.create(ConfigFactory.DEFAULT); and then using the Config object, go onto access the values in the .cfg files...but If i want to use this elsewhere, how would i do a similar thing? As long as your jar file and the cfg file are under the same classpath, it shouldn't be any problem to read the value. That was my question. Thanks. Vikas. On 5/21/07, MK Tan <[EMAIL PROTECTED]> wrote: > > Hi, > > Just wonder why you need to do this in xml way? > Wasn't it much simpler if you do it in properties (key value) format? > Most of the time, I just found it people like to overuse xml :-p > > Best regards, > MK Tan > > On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Can someone point out a tutorial or some place where I can learn how to > > read > > values from a .cfg file? > > Say I have a Input.cfg file which goes like: > > > > > > > inputDir="C:/vray/xml_files/" > > outputDir="C:/xm_output" > >/> > > > > > > > > Now, if I need the inputDir value inside my program, how do I do it? > > > > Sorry that this is off topic from struts, but i cant seem to find some > > sensible help. > > > > Any help will be appreciated. > > Thanks. > > Vikas. > > >
Re: OT- need some help
vikas rao schrieb: No, Martin, I wasnt looking at plain xml reading ,in that case i could just use a normal parser and get the values right? Thanks, Vikas. Yes, sure, you could just use an XML parser and do your own stuff. The problem with this approach would be that changing your XML structure would probably mean changing a lot of the processing. This type of processing is handled by Digester which was originally made to deal with Struts config files. It will (called at an appropriate time in your app's lifecycle) convert your configuration information into (one or several) Java beans which your application can access. Seems for me exactly the thing you are looking for. The other question is whether this machinery is worthwhile, if you are just having a few key-value pairs which probably would be easier be put into some plain text file (e. g a .properties file). To give you an example how I do configuration in my Struts (1.x) based apps: I introduce a plugin where I pass the path of the config-file as a parameter in struts-config.xml. In the init-method of the plugin I use digester to transfer the information from my config file into a configuration bean which is put into application scope. From there it can be accessed when needed. Martin On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file? Say I have a Input.cfg file which goes like: Now, if I need the inputDir value inside my program, how do I do it? Sorry that this is off topic from struts, but i cant seem to find some sensible help. Any help will be appreciated. Thanks. Vikas. -- -- Martin Kindler Kaulbachstr. 20a D-12247 Berlin Deutschland E-Mail: [EMAIL PROTECTED] Tel. +49 (030) 260 78 48 1 Fax +49 (030) 260 78 48 3 GSM +49 (0160) 977 636 14 Skype martin.kindler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection Pooling
Hi there, This post might not be struts-related, but I read so many posts on this issue, that I thought I might ask... Having read all the posts, I still cannot estabilish database connection using connection pooling. I think I made all the settings I need, but still nothing... 1) I have a tag in my server.xml 2) I used the following source code to connect: 1.Context ctx = new InitialContext(); 2.if(ctx == null ) throw new Exception("No Context"); 3. 4.Context envCtx = (Context) ctx.lookup("java:comp/env"); 5.DataSource ds = (DataSource) envCtx.lookup("jdbc/akr_db"); 6. 7.if (ds != null) { 8.Connection conn = ds.getConnection(); 9. 10.if(conn != null) { . . . I can get the datasource (5th line), but I cannot get connection (8th line). It exits with the following error message, however, I have set both the driver class name and url in my server.xml: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'" Any ideas what's next? Thanks a lot, BM Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367
Re: OT- need some help
No, Martin, I wasnt looking at plain xml reading ,in that case i could just use a normal parser and get the values right? Thanks, Vikas. On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file? Say I have a Input.cfg file which goes like: Now, if I need the inputDir value inside my program, how do I do it? Sorry that this is off topic from struts, but i cant seem to find some sensible help. Any help will be appreciated. Thanks. Vikas.
Re: OT- need some help
Can you give me an example? The reason I chose to do it this way is basically I can change the inputDirectory, outputdirectory and other values without making any changes in the code, hence using it anywhere becomes easy. In our company, we have a jar file which is included in the build path and then we access the config files like: Config configRoot = ConfigFactory.create(ConfigFactory.DEFAULT); and then using the Config object, go onto access the values in the .cfg files...but If i want to use this elsewhere, how would i do a similar thing? That was my question. Thanks. Vikas. On 5/21/07, MK Tan <[EMAIL PROTECTED]> wrote: Hi, Just wonder why you need to do this in xml way? Wasn't it much simpler if you do it in properties (key value) format? Most of the time, I just found it people like to overuse xml :-p Best regards, MK Tan On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: > > Hi, > > Can someone point out a tutorial or some place where I can learn how to > read > values from a .cfg file? > Say I have a Input.cfg file which goes like: > > > inputDir="C:/vray/xml_files/" > outputDir="C:/xm_output" >/> > > > > Now, if I need the inputDir value inside my program, how do I do it? > > Sorry that this is off topic from struts, but i cant seem to find some > sensible help. > > Any help will be appreciated. > Thanks. > Vikas. >
Re: OT- need some help
Hi, Just wonder why you need to do this in xml way? Wasn't it much simpler if you do it in properties (key value) format? Most of the time, I just found it people like to overuse xml :-p Best regards, MK Tan On 5/21/07, vikas rao <[EMAIL PROTECTED]> wrote: Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file? Say I have a Input.cfg file which goes like: Now, if I need the inputDir value inside my program, how do I do it? Sorry that this is off topic from struts, but i cant seem to find some sensible help. Any help will be appreciated. Thanks. Vikas.
Re: OT- need some help
Seems like you are looking for some type of XML reading. I would propose to look at Digester (which stems from the Struts project originally) (http://jakarta.apache.org/commons/digester/) or Betwixt (also from Apache Jakarta Commons http://jakarta.apache.org/commons/betwixt/) which builds on Digester and as an add-on allows you to write Java beans to an XML file. Both are fairly easy to use and if your application is Struts based you should already have Digester included. Tutorials and docs can be found on the Jakarta Commons site. Martin vikas rao schrieb: Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file? Say I have a Input.cfg file which goes like: Now, if I need the inputDir value inside my program, how do I do it? Sorry that this is off topic from struts, but i cant seem to find some sensible help. Any help will be appreciated. Thanks. Vikas. -- -- Martin Kindler Kaulbachstr. 20a D-12247 Berlin Deutschland E-Mail: [EMAIL PROTECTED] Tel. +49 (030) 260 78 48 1 Fax +49 (030) 260 78 48 3 GSM +49 (0160) 977 636 14 Skype martin.kindler - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OT- need some help
Hi, Can someone point out a tutorial or some place where I can learn how to read values from a .cfg file? Say I have a Input.cfg file which goes like: Now, if I need the inputDir value inside my program, how do I do it? Sorry that this is off topic from struts, but i cant seem to find some sensible help. Any help will be appreciated. Thanks. Vikas.
Re: showcase file download in jetty server
HI I have got the solution posted on the forum. just change the'\' slashes to '/'slashes.:) sudeepj2ee wrote: > > HI > > I am using jetty server and the zip file download part of showcase is not > working in the jetty its giving the following error-: > > java.lang.IllegalArgumentException: Can not find a java.io.InputStream > with the name [inputStream] in the invocation stack. Check the tag > specified for this action. > at > org.apache.struts2.dispatcher.StreamResult.doExecute(StreamResult.java:189) > at > org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178) > at > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:343) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) > at > com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:213) > at > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) > at > org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) > at > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:161) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219) > at > com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216) > at > com.opensymphony.xwork2.intercept
RE: [OT] Re: frames
You can find lots of useful links about struts and frames at this URL; http://www.google.co.uk/search?q=struts+frames -Original Message- From: jalal udeen [mailto:[EMAIL PROTECTED] Sent: 21 May 2007 05:57 To: Struts Users Mailing List Subject: Re: [OT] Re: frames hi im using struts 1.2.7 how can i frames using struts tag in jsp thanks jalal On 5/19/07, Mansour <[EMAIL PROTECTED]> wrote: > > jalal udeen: > We need more info to be able to help. What version of struts are you > using. If you you are using struts 2, then you can use the target > attribute in the same way you use html. So, in your form tag you need > to use the attribute target like this: > > > > > for more info about this check the reference. > > http://struts.apache.org/2.x/docs/tag-reference.html > > > > > Dave Newton wrote: > > --- jalal udeen <[EMAIL PROTECTED]> wrote: > > > >> how can i use frame using struts in jsp its an urgent requirement > >> > > > > I am most definitely *not* speaking for everyone on the newsgroup, > > but I really think you need to explore other options for asking > > non-Struts related questions. > > > > If you want to pay me for doing your work I will consider a > > sub-contracting position, although I am fairly busy of late and am > > relatively expensive. > > > > Others on the list will probably be much nicer than I am, and more > > helpful, but there's a point at which the OT stuff needs to go > > somewhere else. > > > > Sorry, > > Dave > > > > > > > > > > > __ > __You snooze, you lose. Get messages ASAP with AutoCheck > > in the all-new Yahoo! Mail Beta. > > http://advision.webevents.yahoo.com/mailbeta/newmail_html.html > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get Exception info when I use global exception mappings?
Thanks for your help, I got it. As an aside, it may be worth pointing out that exposing your users to a detailed StackTrace is not usually considered to be a good idea. Firstly, a stack trace means nothing to your users and may actually intimidate them, and secondly, if your application is web facing (as opposed to an intranet) then you are probably revealing too much information about your system and it's set up. Regards Roger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Re: [S2] Understanding RestfulActionMapper and Restful2ActionMapper
Hi Laurie, Finally I'm working with DefaultActionMapper and wildcards: Struts.properties: struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMa pper struts.xml {1} {2} /Results.jsp /Error.jsp and my friendly URLs looks like http://localhost/app/Search/manager/london.action Best regards! Jordi Rubio Moreno -Mensaje original- De: news [mailto:[EMAIL PROTECTED] En nombre de Laurie Harper Enviado el: martes, 15 de mayo de 2007 23:05 Para: user@struts.apache.org Asunto: Re: [S2] Understanding RestfulActionMapper and Restful2ActionMapper I haven't used the restful mappers at all, so I'm just guessing, but it may be that you need to use prefix mapping instead of suffix mapping in web.xml. Either way, if you are going to use suffix mapping, the suffix would always be the last thing in the URL (not including any query part that is). You could try these posibilities: http://localhost:8080/example/HelloWord/1.action http://localhost:8080/example/HelloWord/id/1.action but I would think if you want restful URLs, switching to prefix mapping and getting rid of the .action suffix would be what you want anyway... L. Jordi Rubio Moreno wrote: > Hi, > > I'm testing HelloWorld struts 2 example with friendly url's. I have > read > > http://struts.apache.org/2.0.6/docs/restfulactionmapper.html > http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2 > /d > ispatcher/mapper/Restful2ActionMapper.htmlhttp://struts.apache.org/2.0 > .6 > /docs/restfulactionmapper.html > (and a lot of pages found in Google speaking about Restful way) > > and I don't understand what I'm doing wrong. > > I have declared the HelloWord action as > > > {1} > /HelloWorld.jsp > > > using wildcards to pass parameters. The HelloWord class has an "id" > member variable, with it's public getters and setters. > > The struts.properties has the next lines configurated: > > > struts.mapper.class=org.apache.struts2.dispatcher.mapper.Restful2Actio > nM > apper > struts.action.extension=action > struts.enable.DynamicMethodInvocation = false > struts.enable.SlashesInActionNames = true > > (I have tested with RestfulActionMapper and DefaultActionMapper > objects > too) > > I have read all documentation sections that speak about URL syntax > (http://HOST/ACTION_NAME/PARAM_NAME1/PARAM_VALUE1/PARAM_NAME2/PARAM_VA > LU E2, etc etc), but my example doesn't works. I have tried this > combinations: > > > http://localhost:8080/example/HelloWord.action/1 > > http://localhost:8080/example/HelloWord.action/id/1 > > http://localhost:8080/example/id/1/HelloWord.action > > http://localhost:8080/example/1/HelloWord.action > > > always with the same result: There is no Action mapped for action name > blablabla/blablabla > > Please, I need to understand what I'm doing wrong, because I believe > I'm doing the things as tutorials and articles show, but without right > results... > > Thanks a lot! > > Jordi Rubio Moreno > > > - 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] Freemarker vs struts taglibs
Hi Musachy, Thanks a lot for the response :) Cheers! Jordi Rubio Moreno -Mensaje original- De: Musachy Barroso [mailto:[EMAIL PROTECTED] Enviado el: jueves, 17 de mayo de 2007 17:55 Para: Struts Users Mailing List Asunto: Re: [S2] Freemarker vs struts taglibs FreeMarker is a template engine, with it's own syntax. JSP tags can be used in FreeMarker, adding some configuration. In the case of Struts tags, no configuration is required, and you can use them like you would in JSP except a few differences, see this for details: http://struts.apache.org/2.x/docs/freemarker.html musachy On 5/17/07, Jordi Rubio Moreno <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm a bit confused. I need to decide if I'll use Freemarker or Struts > taglibs, and I don't know the differences between both. E.g. what's > the difference between and <@s.iterator>, and > <@s.url>, etc etc... > > I have seen all the tutorials and examples I have found working with > taglibs, but people says WebWork and Struts 2's choice is Freemarker... > > Please, help me to understand why taglibs or Freemarker :) > > Thanks a lot! > > Cheers! > -- "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: ajax - Submit a form
NotifyTopics is not working. I don't know why, but I tried every possible thing. I can not understand what's wrong with this. The function showMessage() is called only once, when the page loads !! and nothing after that causes it to execute. It's just a smiple message for testing: function showMessage(){ alert('test message!'); } dojo.event.topic.subscribe("/saveData" , showMessage() ) ; onclick="changeState(true);">edit notifyTopics="/saveData" > save Jeromy Evans wrote: Depending on what your js function does, you may also be able to use the notifyTopics/listenTopics event mechanisms. Look at the example in "Preventing a Request" at http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-preventingRequest Otherwise try the handler="" attribute to call your own js function before making the request yourself (I haven't tried this though and can't point to any examples) Mansour wrote: OK I found my problem. I shouldn't add onClick event to the anchor, but what do I do to execute a js function when this anchor is clicked. I tried using onMouseDown, but the same results. Mansour wrote: Thank you. That helped but still can not submit a form using an anchor out side that form. The fields are not populated in the action. The code on the Site : Using the anchor tag to submit a form: Submit form My code: onclick="changeState(true);">edit value="/updateAccount.action"> onclick="changeState(false);"> save value="${acc.firstName}" /> That's not a big deal as I can move the anchors inside the form, but may be I am missing something here. Jeromy Evans wrote: Ensure you've included to include the required javascript and try turning on ajax debugging (theme="ajax" debug="true">). Ensure the javascript exists in your html. See the top of http://struts.apache.org/2.x/docs/ajax-tags.html Mansour wrote: I am populating some fields that can be edited and saved. Trying to do this using ajax. The action is getting called but the form is never submitted, and the updated data is lost. value="${acc.firstName}" /> save - 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]