Re: REST plugin URL syntax
Mike, Rest URLs doesn't work that way, so the plugin is correct and your needs are not in sync with REST standards (see http://en.wikipedia.org/wiki/Representational_State_Transfer for a more details on REST). If you want to do something with multiple IDs my suggestion would be URLs along the lines of; http://www.mydomain.com/rest/bookAndChapter/123_1 Al. Mike Watson wrote: Hi Folks, I'm trying to use the REST plugin to implement a service that serves resources using the following url syntax: http://www.mydomain.com/rest/book/123 (which works fine) http://www.mydomain.com/rest/book/123/chapter (which throws a 500 because my book controller doesn't have a chapter() method) http://www.mydomain.com/rest/book/123/chapter/1 (which returns 404) I'd expect the two chapter urls to access the ChapterController instead of the BookController. Being able to request resources 'within resources' like this is crucial to my application. Can anybody tell me how I can configure the rest plugin to behave like this, or point me at some documentation that does? Thanks in advance, Mike - 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: Some confusion trying to do ajax form submit
If it's useful to diagnose this, I made my action ParameterAware so I could inspect the request parameters directly. I received three parameter keys, "firstName", "lastName", and "[object Object]". The first two are expected. The last one is not expected, and that causes the exception I'm seeing. > -Original Message- > From: Karr, David > Sent: Sunday, June 15, 2008 8:14 PM > To: Struts Users Mailing List > Subject: RE: Some confusion trying to do ajax form submit > > --- > ognl.ExpressionSyntaxException: Malformed OGNL expression: > [object Object] [ognl.ParseException: Encountered "Object" at > line 1, column 9. > Was expecting one of: > "," ... > "=" ... > "?" ... > ... > /-- Encapsulated exception \ > ognl.ParseException: Encountered "Object" at line 1, column 9. > Was expecting one of: > "," ... > ... > \--/ > expr: [object Object] val: [Ljava.lang.String;@fa97f context: > [EMAIL PROTECTED] root:[EMAIL PROTECTED], > [EMAIL PROTECTED] value: > [Ljava.lang.String;@fa97f > Jun 15, 2008 8:06:10 PM > com.opensymphony.xwork2.util.logging.commons.CommonsLogger error > SEVERE: ParametersInterceptor - [setParameters]: Unexpected > Exception caught setting '[object Object]' on 'class > com.wamu.strutsform.FormAction: Error setting expression > '[object Object]' with value '[Ljava.lang.String;@fa97f' > Jun 15, 2008 8:06:10 PM com.wamu.strutsform.FormAction jsonSubmit > --- > > > > -Original Message- > > From: Musachy Barroso [mailto:[EMAIL PROTECTED] > > Sent: Sunday, June 15, 2008 5:09 PM > > To: Struts Users Mailing List > > Subject: Re: Some confusion trying to do ajax form submit > > > > Take a look at this (2.1 only): > > > > http://struts.apache.org/2.0.11.1/docs/ajax-validation.html > > > > musachy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DatePicker Button not generated
Hi, I turned on debugging and got this error. There is no Action mapped for namespace /struts/dojo/src/widget/templates and action name DatePicker. - [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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.cpt.his.webapp.filter.StaticFilter.doFilterInternal(StaticFilter.java:106) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) I have configured web.xml as -- staticFilter com.cpt.his.webapp.filter.StaticFilter includes /scripts/dojo/*,/dwr/* struts org.apache.struts2.dispatcher.FilterDispatcher staticFilter /* REQUEST FORWARD struts /* REQUEST FORWARD I am launching my page using extension .html. newton.dave wrote: > > --- On Sun, 6/15/08, StrutsUser <[EMAIL PROTECTED]> wrote: >> I have specified as . > > Okay, now turn on debugging and see if you get any errors. > >> I have not done any special S2 filter mapping. > > But you don't say what you *did* do, which would have saved an email. > > It should be mapped to /*. > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/DatePicker-Button-not-generated-tp17836292p17857507.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: Can't stop console warnings
Rsrs, it also aways happens to me. 2008/6/16 jefetech <[EMAIL PROTECTED]>: > > Thanks for the replies here everybody. I solved the issue. Stupid stupid > error on my part, of course. Always is. I had the log4j.jar but forgot to > copy over the commons-loggin.jar file. > > Works fine when the correct jars are included :) > > > > > jefetech wrote: > > > > Ya that looks just like mine. Maybe struts2.1 has issues with Jetty. > > Does this error have anything to do with log4j though? Maybe I need to > > shut that off in another config file or something. > > > > > > Jun 15, 2008 4:59:42 PM > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > warn > > WARNING: Could not find property [struts.valueStack] > > Jun 15, 2008 4:59:42 PM > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > warn > > WARNING: Could not find property [org.apache.catalina.jsp_file] > > > > > > > > > > > > Márcio Gurgel wrote: > >> > >> I'm also using struts 2.1 ... > >> Here are my log4j: > >> > >> ### direct log messages to stdout ### > >> log4j.appender.stdout=org.apache.log4j.ConsoleAppender > >> log4j.appender.stdout.Target=System.out > >> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > >> log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L > >> - > >> %m%n > >> > >> ### direct messages to file hibernate.log ### > >> #log4j.appender.file=org.apache.log4j.FileAppender > >> #log4j.appender.file.File=hibernate.log > >> #log4j.appender.file.layout=org.apache.log4j.PatternLayout > >> #log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L > - > >> %m%n > >> > >> ### set log levels - for more verbose logging change 'info' to 'debug' > >> stdout ### > >> > >> log4j.rootLogger=info > >> > >> #log4j.logger.org.hibernate=info > >> log4j.logger.org.hibernate=info > >> > >> ### log HQL query parser activity > >> #log4j.logger.org.hibernate.hql.ast.AST=debug > >> > >> ### log just the SQL > >> #log4j.logger.org.hibernate.SQL=debug > >> > >> ### log JDBC bind parameters ### > >> log4j.logger.org.hibernate.type=info > >> #log4j.logger.org.hibernate.type=debug > >> > >> ### log schema export/update ### > >> log4j.logger.org.hibernate.tool.hbm2ddl=debug > >> > >> ### log HQL parse trees > >> #log4j.logger.org.hibernate.hql=debug > >> > >> ### log cache activity ### > >> #log4j.logger.org.hibernate.cache=debug > >> > >> ### log transaction activity > >> #log4j.logger.org.hibernate.transaction=debug > >> > >> ### log JDBC resource acquisition > >> log4j.logger.org.hibernate.jdbc=debug > >> > >> ### enable the following line if you want to track down connection ### > >> ### leakages when using DriverManagerConnectionProvider ### > >> > #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace > >> > >> > >> This's a big problem, I had to iterate list with 100 rolls each roll had > >> two > >> if this warnings the page was loading in slow motion > >> mode.. > >> > >> If you need another configuration file just tell > >> > >> > >> 2008/6/15 jefetech <[EMAIL PROTECTED]>: > >> > >>> > >>> I've tried changing that, but it makes no difference with struts2.1. > No > >>> matter what I do with log4j.properties, it just keeps on spitting out > >>> warning messages. Frustrating! > >>> > >>> > >>> > >>> > >>> Márcio Gurgel wrote: > >>> > > >>> > Hi, I also had this problem, I solved setting this in my > >>> log4j.properties > >>> > file: > >>> > > >>> > ### set log levels - for more verbose logging change 'info' to > 'debug' > >>> > stdout ### > >>> > > >>> > log4j.rootLogger=info > >>> > > >>> > > >>> > > >>> > > >>> > 2008/6/15 Dave Newton <[EMAIL PROTECTED]>: > >>> > > >>> >> Are you actually using Log4J? > >>> >> > >>> >> > >>> >> --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: > >>> >> > >>> >> > From: jefetech <[EMAIL PROTECTED]> > >>> >> > Subject: Re: Can't stop console warnings > >>> >> > To: user@struts.apache.org > >>> >> > Date: Sunday, June 15, 2008, 9:45 PM > >>> >> > That makes sense, but unforunately did not do anything. > >>> >> > Here's what my > >>> >> > server spits out when starting up: > >>> >> > > >>> >> > 2008-06-15 16:16:54.855::INFO: Extract > >>> >> > jar:file:/usr/local/jetty/webapps/struts2.war!/ to > >>> >> > > >>> >> > >>> > /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp > >>> >> > Jun 15, 2008 4:16:55 PM > >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >>> >> > info > >>> >> > INFO: Parsing configuration file [struts-default.xml] > >>> >> > Jun 15, 2008 4:16:55 PM > >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >>> >> > info > >>> >> > INFO: Parsing configuration file [struts-plugin.xml] > >>> >> > Jun 15, 2008 4:16:55 PM > >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >>> >> > info > >>> >> > INFO: Parsing configuration file [struts.xml] > >>> >> > > >>> >> > > >>> >> > It seem to still think > >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >>>
Re: Can't stop console warnings
Thanks for the replies here everybody. I solved the issue. Stupid stupid error on my part, of course. Always is. I had the log4j.jar but forgot to copy over the commons-loggin.jar file. Works fine when the correct jars are included :) jefetech wrote: > > Ya that looks just like mine. Maybe struts2.1 has issues with Jetty. > Does this error have anything to do with log4j though? Maybe I need to > shut that off in another config file or something. > > > Jun 15, 2008 4:59:42 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger > warn > WARNING: Could not find property [struts.valueStack] > Jun 15, 2008 4:59:42 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger > warn > WARNING: Could not find property [org.apache.catalina.jsp_file] > > > > > > Márcio Gurgel wrote: >> >> I'm also using struts 2.1 ... >> Here are my log4j: >> >> ### direct log messages to stdout ### >> log4j.appender.stdout=org.apache.log4j.ConsoleAppender >> log4j.appender.stdout.Target=System.out >> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout >> log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L >> - >> %m%n >> >> ### direct messages to file hibernate.log ### >> #log4j.appender.file=org.apache.log4j.FileAppender >> #log4j.appender.file.File=hibernate.log >> #log4j.appender.file.layout=org.apache.log4j.PatternLayout >> #log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - >> %m%n >> >> ### set log levels - for more verbose logging change 'info' to 'debug' >> stdout ### >> >> log4j.rootLogger=info >> >> #log4j.logger.org.hibernate=info >> log4j.logger.org.hibernate=info >> >> ### log HQL query parser activity >> #log4j.logger.org.hibernate.hql.ast.AST=debug >> >> ### log just the SQL >> #log4j.logger.org.hibernate.SQL=debug >> >> ### log JDBC bind parameters ### >> log4j.logger.org.hibernate.type=info >> #log4j.logger.org.hibernate.type=debug >> >> ### log schema export/update ### >> log4j.logger.org.hibernate.tool.hbm2ddl=debug >> >> ### log HQL parse trees >> #log4j.logger.org.hibernate.hql=debug >> >> ### log cache activity ### >> #log4j.logger.org.hibernate.cache=debug >> >> ### log transaction activity >> #log4j.logger.org.hibernate.transaction=debug >> >> ### log JDBC resource acquisition >> log4j.logger.org.hibernate.jdbc=debug >> >> ### enable the following line if you want to track down connection ### >> ### leakages when using DriverManagerConnectionProvider ### >> #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace >> >> >> This's a big problem, I had to iterate list with 100 rolls each roll had >> two >> if this warnings the page was loading in slow motion >> mode.. >> >> If you need another configuration file just tell >> >> >> 2008/6/15 jefetech <[EMAIL PROTECTED]>: >> >>> >>> I've tried changing that, but it makes no difference with struts2.1. No >>> matter what I do with log4j.properties, it just keeps on spitting out >>> warning messages. Frustrating! >>> >>> >>> >>> >>> Márcio Gurgel wrote: >>> > >>> > Hi, I also had this problem, I solved setting this in my >>> log4j.properties >>> > file: >>> > >>> > ### set log levels - for more verbose logging change 'info' to 'debug' >>> > stdout ### >>> > >>> > log4j.rootLogger=info >>> > >>> > >>> > >>> > >>> > 2008/6/15 Dave Newton <[EMAIL PROTECTED]>: >>> > >>> >> Are you actually using Log4J? >>> >> >>> >> >>> >> --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: >>> >> >>> >> > From: jefetech <[EMAIL PROTECTED]> >>> >> > Subject: Re: Can't stop console warnings >>> >> > To: user@struts.apache.org >>> >> > Date: Sunday, June 15, 2008, 9:45 PM >>> >> > That makes sense, but unforunately did not do anything. >>> >> > Here's what my >>> >> > server spits out when starting up: >>> >> > >>> >> > 2008-06-15 16:16:54.855::INFO: Extract >>> >> > jar:file:/usr/local/jetty/webapps/struts2.war!/ to >>> >> > >>> >> >>> /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp >>> >> > Jun 15, 2008 4:16:55 PM >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >>> >> > info >>> >> > INFO: Parsing configuration file [struts-default.xml] >>> >> > Jun 15, 2008 4:16:55 PM >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >>> >> > info >>> >> > INFO: Parsing configuration file [struts-plugin.xml] >>> >> > Jun 15, 2008 4:16:55 PM >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >>> >> > info >>> >> > INFO: Parsing configuration file [struts.xml] >>> >> > >>> >> > >>> >> > It seem to still think >>> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >>> >> > should log "info" even though my log4j.properties >>> >> > has this line: >>> >> > >>> log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error >>> >> > >>> >> > Is there something I have to add to the struts.xml file? >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > Joachim Rohde wrote: >>> >> > > >>> >> > > Hi, >>> >> > > >>> >> > > add in you
RE: Some confusion trying to do ajax form submit
Ok, this looks promising. I changed the package in my struts.xml to the following: - true /form.jsp - I then copied in updated jars from 2.1.2, being: commons-fileupload-1.2.1.jar, xstream-1.2.2.jar, json-lib-2.1.jar, struts2-core-2.1.2.jar, xwork-2.1.1.jar, freemarker-2.3.12.jar, struts2-config-browser-plugin-2.1.2.jar My results are a bit worse than before, however. Now, whether it passes validation or not I see a long set of exceptions in the log. If it passes validation, I still get a good JSON result. If it doesn't pass validation, my responseText is the input JSP. --- ognl.ExpressionSyntaxException: Malformed OGNL expression: [object Object] [ognl.ParseException: Encountered "Object" at line 1, column 9. Was expecting one of: "," ... "=" ... "?" ... ... /-- Encapsulated exception \ ognl.ParseException: Encountered "Object" at line 1, column 9. Was expecting one of: "," ... ... \--/ expr: [object Object] val: [Ljava.lang.String;@fa97f context: [EMAIL PROTECTED] root:[EMAIL PROTECTED], [EMAIL PROTECTED] value: [Ljava.lang.String;@fa97f Jun 15, 2008 8:06:10 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting '[object Object]' on 'class com.wamu.strutsform.FormAction: Error setting expression '[object Object]' with value '[Ljava.lang.String;@fa97f' Jun 15, 2008 8:06:10 PM com.wamu.strutsform.FormAction jsonSubmit --- > -Original Message- > From: Musachy Barroso [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 15, 2008 5:09 PM > To: Struts Users Mailing List > Subject: Re: Some confusion trying to do ajax form submit > > Take a look at this (2.1 only): > > http://struts.apache.org/2.0.11.1/docs/ajax-validation.html > > musachy > > On Sun, Jun 15, 2008 at 8:02 PM, Karr, David > <[EMAIL PROTECTED]> wrote: > > I have a simple page with validation that I got working with a > > conventional submit and action. > > > > I'm now trying to explore doing an Ajax form submit, and getting a > > JSON response. I'm using YUI on the client side. I'd like > to see if > > I can get similar data in the JSON response that I would in > a normal > > submit, for instance, with field errors. > > > > There are a couple points I could use some help with, not > necessarily > > related to Ajax or JSON. Please don't hesitate to tell me if I'm > > doing something else wrong, or something I should be aware of. > > > > My first attempt actually did execute the Ajax request, and got the > > response, but it wasn't JSON. The responseText was just > the HTML of > > my source JSP, which is also the value of my "input" > result. I tried > > setting up the JSON action without an "input" result, but > it seemed to > > complain if I didn't have that. I would have thought the "input" > > parameter wouldn't be relevant in a Ajax/JSON action. If I > filled in > > all the required fields so it didn't result in any field > errors, the > > response was JSON, and it was reasonable (although setting > > "wrapWithComments" didn't appear to have any effect). I > guess there's > > no automatic provision for reporting field errors in a JSON > response, > > so I guess I'll have to build something like that by hand? > > > > Note that I tried to enable the logging interceptor, but I > didn't see > > any output from it. > > > > I have a single action that I was intending to use to > handle both the > > ajax and non-ajax submit. I tried to make it use two > different action > > names in the form, but it seemed to have trouble with that. > > > > I noticed in the generated HTML, I had this in the HTML for the form > > tag: > > > >onsubmit="return YAHOO.strutsform.submitform();; > return true;" > > > > I'm not sure if that "return true;" will cause me trouble, as I'm > > trying to bypass the normal form submission. I think by returning > > false from "submitform", I achieved that, however. > > > > I'll include here the relevant files. Please comment where > appropriate. > > Thanks for your input. > > ---form.jsp > > <%@ page language="java" contentType="text/html; charset=UTF-8" > >pageEncoding="UTF-8"%> > > <%@ taglib prefix="s" uri="/struts-tags" %> > "-//W3C//DTD HTML 4.01 Transitional//EN" > > "http://www.w3.org/TR/html4/loose.dtd";> > > > > > > > > Struts Form > > href="${pageContext.request.contextPath}/struts/css_xhtml/styles.css" > > type="text/css"> > > > href="${pageContext.request.contextPath}/style/form.css"> > > > > > > href="${pageContext.request.contextPath}/yui/reset-fonts-grids/reset-f > > on > > ts-grids.css"> > > > > href="${pageContext.request.contextPath}/yui/button/assets/skins/sam/b > > ut > > ton.css"> > >
Re: Can't stop console warnings
Ya that looks just like mine. Maybe struts2.1 has issues with Jetty. Does this error have anything to do with log4j though? Maybe I need to shut that off in another config file or something. Jun 15, 2008 4:59:42 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn WARNING: Could not find property [struts.valueStack] Jun 15, 2008 4:59:42 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn WARNING: Could not find property [org.apache.catalina.jsp_file] Márcio Gurgel wrote: > > I'm also using struts 2.1 ... > Here are my log4j: > > ### direct log messages to stdout ### > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > log4j.appender.stdout.Target=System.out > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - > %m%n > > ### direct messages to file hibernate.log ### > #log4j.appender.file=org.apache.log4j.FileAppender > #log4j.appender.file.File=hibernate.log > #log4j.appender.file.layout=org.apache.log4j.PatternLayout > #log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - > %m%n > > ### set log levels - for more verbose logging change 'info' to 'debug' > stdout ### > > log4j.rootLogger=info > > #log4j.logger.org.hibernate=info > log4j.logger.org.hibernate=info > > ### log HQL query parser activity > #log4j.logger.org.hibernate.hql.ast.AST=debug > > ### log just the SQL > #log4j.logger.org.hibernate.SQL=debug > > ### log JDBC bind parameters ### > log4j.logger.org.hibernate.type=info > #log4j.logger.org.hibernate.type=debug > > ### log schema export/update ### > log4j.logger.org.hibernate.tool.hbm2ddl=debug > > ### log HQL parse trees > #log4j.logger.org.hibernate.hql=debug > > ### log cache activity ### > #log4j.logger.org.hibernate.cache=debug > > ### log transaction activity > #log4j.logger.org.hibernate.transaction=debug > > ### log JDBC resource acquisition > log4j.logger.org.hibernate.jdbc=debug > > ### enable the following line if you want to track down connection ### > ### leakages when using DriverManagerConnectionProvider ### > #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace > > > This's a big problem, I had to iterate list with 100 rolls each roll had > two > if this warnings the page was loading in slow motion > mode.. > > If you need another configuration file just tell > > > 2008/6/15 jefetech <[EMAIL PROTECTED]>: > >> >> I've tried changing that, but it makes no difference with struts2.1. No >> matter what I do with log4j.properties, it just keeps on spitting out >> warning messages. Frustrating! >> >> >> >> >> Márcio Gurgel wrote: >> > >> > Hi, I also had this problem, I solved setting this in my >> log4j.properties >> > file: >> > >> > ### set log levels - for more verbose logging change 'info' to 'debug' >> > stdout ### >> > >> > log4j.rootLogger=info >> > >> > >> > >> > >> > 2008/6/15 Dave Newton <[EMAIL PROTECTED]>: >> > >> >> Are you actually using Log4J? >> >> >> >> >> >> --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: >> >> >> >> > From: jefetech <[EMAIL PROTECTED]> >> >> > Subject: Re: Can't stop console warnings >> >> > To: user@struts.apache.org >> >> > Date: Sunday, June 15, 2008, 9:45 PM >> >> > That makes sense, but unforunately did not do anything. >> >> > Here's what my >> >> > server spits out when starting up: >> >> > >> >> > 2008-06-15 16:16:54.855::INFO: Extract >> >> > jar:file:/usr/local/jetty/webapps/struts2.war!/ to >> >> > >> >> >> /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp >> >> > Jun 15, 2008 4:16:55 PM >> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> >> > info >> >> > INFO: Parsing configuration file [struts-default.xml] >> >> > Jun 15, 2008 4:16:55 PM >> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> >> > info >> >> > INFO: Parsing configuration file [struts-plugin.xml] >> >> > Jun 15, 2008 4:16:55 PM >> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> >> > info >> >> > INFO: Parsing configuration file [struts.xml] >> >> > >> >> > >> >> > It seem to still think >> >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> >> > should log "info" even though my log4j.properties >> >> > has this line: >> >> > >> log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error >> >> > >> >> > Is there something I have to add to the struts.xml file? >> >> > >> >> > >> >> > >> >> > >> >> > Joachim Rohde wrote: >> >> > > >> >> > > Hi, >> >> > > >> >> > > add in your web.xml following snippet: >> >> > > >> >> > > >> >> > > >> >> > log4jConfigLocation >> >> > > >> >> > /WEB-INF/classes/log4j.properties >> >> > > >> >> > > >> >> > > And in the log4j.properties you add following line: >> >> > > >> >> > > >> >> > >> log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=ERROR >> >> > > >> >> > > That should log only error-messages coming from this >> >> > class. >> >> > > >> >> >
Re: Can't stop console warnings
I'm also using struts 2.1 ... Here are my log4j: ### direct log messages to stdout ### log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n ### direct messages to file hibernate.log ### #log4j.appender.file=org.apache.log4j.FileAppender #log4j.appender.file.File=hibernate.log #log4j.appender.file.layout=org.apache.log4j.PatternLayout #log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n ### set log levels - for more verbose logging change 'info' to 'debug' stdout ### log4j.rootLogger=info #log4j.logger.org.hibernate=info log4j.logger.org.hibernate=info ### log HQL query parser activity #log4j.logger.org.hibernate.hql.ast.AST=debug ### log just the SQL #log4j.logger.org.hibernate.SQL=debug ### log JDBC bind parameters ### log4j.logger.org.hibernate.type=info #log4j.logger.org.hibernate.type=debug ### log schema export/update ### log4j.logger.org.hibernate.tool.hbm2ddl=debug ### log HQL parse trees #log4j.logger.org.hibernate.hql=debug ### log cache activity ### #log4j.logger.org.hibernate.cache=debug ### log transaction activity #log4j.logger.org.hibernate.transaction=debug ### log JDBC resource acquisition log4j.logger.org.hibernate.jdbc=debug ### enable the following line if you want to track down connection ### ### leakages when using DriverManagerConnectionProvider ### #log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace This's a big problem, I had to iterate list with 100 rolls each roll had two if this warnings the page was loading in slow motion mode.. If you need another configuration file just tell 2008/6/15 jefetech <[EMAIL PROTECTED]>: > > I've tried changing that, but it makes no difference with struts2.1. No > matter what I do with log4j.properties, it just keeps on spitting out > warning messages. Frustrating! > > > > > Márcio Gurgel wrote: > > > > Hi, I also had this problem, I solved setting this in my log4j.properties > > file: > > > > ### set log levels - for more verbose logging change 'info' to 'debug' > > stdout ### > > > > log4j.rootLogger=info > > > > > > > > > > 2008/6/15 Dave Newton <[EMAIL PROTECTED]>: > > > >> Are you actually using Log4J? > >> > >> > >> --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: > >> > >> > From: jefetech <[EMAIL PROTECTED]> > >> > Subject: Re: Can't stop console warnings > >> > To: user@struts.apache.org > >> > Date: Sunday, June 15, 2008, 9:45 PM > >> > That makes sense, but unforunately did not do anything. > >> > Here's what my > >> > server spits out when starting up: > >> > > >> > 2008-06-15 16:16:54.855::INFO: Extract > >> > jar:file:/usr/local/jetty/webapps/struts2.war!/ to > >> > > >> > /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp > >> > Jun 15, 2008 4:16:55 PM > >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> > info > >> > INFO: Parsing configuration file [struts-default.xml] > >> > Jun 15, 2008 4:16:55 PM > >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> > info > >> > INFO: Parsing configuration file [struts-plugin.xml] > >> > Jun 15, 2008 4:16:55 PM > >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> > info > >> > INFO: Parsing configuration file [struts.xml] > >> > > >> > > >> > It seem to still think > >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> > should log "info" even though my log4j.properties > >> > has this line: > >> > > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error > >> > > >> > Is there something I have to add to the struts.xml file? > >> > > >> > > >> > > >> > > >> > Joachim Rohde wrote: > >> > > > >> > > Hi, > >> > > > >> > > add in your web.xml following snippet: > >> > > > >> > > > >> > > > >> > log4jConfigLocation > >> > > > >> > /WEB-INF/classes/log4j.properties > >> > > > >> > > > >> > > And in the log4j.properties you add following line: > >> > > > >> > > > >> > > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=ERROR > >> > > > >> > > That should log only error-messages coming from this > >> > class. > >> > > > >> > > Joachim > >> > > > >> > > jefetech schrieb: > >> > >> I just converted from struts 1 to 2.1. I've > >> > got everything working, but > >> > >> I > >> > >> can't seem to stop this warning from being > >> > spit out in the console every > >> > >> time struts runs. Any help would be great. thank > >> > you. > >> > >> > >> > >> Jun 15, 2008 11:43:01 AM > >> > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> > >> warn > >> > >> WARNING: Could not find property > >> > [struts.valueStack] > >> > >> Jun 15, 2008 11:43:01 AM > >> > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> > >> warn > >> > >> WARNING: Could not find property > >> > [org.apache.catalina.jsp_file] > >> > >> > >> > > > >> > > > >
Re: Can't stop console warnings
I've tried changing that, but it makes no difference with struts2.1. No matter what I do with log4j.properties, it just keeps on spitting out warning messages. Frustrating! Márcio Gurgel wrote: > > Hi, I also had this problem, I solved setting this in my log4j.properties > file: > > ### set log levels - for more verbose logging change 'info' to 'debug' > stdout ### > > log4j.rootLogger=info > > > > > 2008/6/15 Dave Newton <[EMAIL PROTECTED]>: > >> Are you actually using Log4J? >> >> >> --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: >> >> > From: jefetech <[EMAIL PROTECTED]> >> > Subject: Re: Can't stop console warnings >> > To: user@struts.apache.org >> > Date: Sunday, June 15, 2008, 9:45 PM >> > That makes sense, but unforunately did not do anything. >> > Here's what my >> > server spits out when starting up: >> > >> > 2008-06-15 16:16:54.855::INFO: Extract >> > jar:file:/usr/local/jetty/webapps/struts2.war!/ to >> > >> /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp >> > Jun 15, 2008 4:16:55 PM >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> > info >> > INFO: Parsing configuration file [struts-default.xml] >> > Jun 15, 2008 4:16:55 PM >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> > info >> > INFO: Parsing configuration file [struts-plugin.xml] >> > Jun 15, 2008 4:16:55 PM >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> > info >> > INFO: Parsing configuration file [struts.xml] >> > >> > >> > It seem to still think >> > com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> > should log "info" even though my log4j.properties >> > has this line: >> > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error >> > >> > Is there something I have to add to the struts.xml file? >> > >> > >> > >> > >> > Joachim Rohde wrote: >> > > >> > > Hi, >> > > >> > > add in your web.xml following snippet: >> > > >> > > >> > > >> > log4jConfigLocation >> > > >> > /WEB-INF/classes/log4j.properties >> > > >> > > >> > > And in the log4j.properties you add following line: >> > > >> > > >> > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=ERROR >> > > >> > > That should log only error-messages coming from this >> > class. >> > > >> > > Joachim >> > > >> > > jefetech schrieb: >> > >> I just converted from struts 1 to 2.1. I've >> > got everything working, but >> > >> I >> > >> can't seem to stop this warning from being >> > spit out in the console every >> > >> time struts runs. Any help would be great. thank >> > you. >> > >> >> > >> Jun 15, 2008 11:43:01 AM >> > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> > >> warn >> > >> WARNING: Could not find property >> > [struts.valueStack] >> > >> Jun 15, 2008 11:43:01 AM >> > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> > >> warn >> > >> WARNING: Could not find property >> > [org.apache.catalina.jsp_file] >> > >> >> > > >> > > >> > - >> > > To unsubscribe, e-mail: >> > [EMAIL PROTECTED] >> > > For additional commands, e-mail: >> > [EMAIL PROTECTED] >> > > >> > > >> > > >> > >> > -- >> > View this message in context: >> > >> http://www.nabble.com/Can%27t-stop-console-warnings-tp17854725p17856624.html >> > Sent from the Struts - User mailing list archive at >> > Nabble.com. >> > >> > >> > - >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: >> > [EMAIL PROTECTED] >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/Can%27t-stop-console-warnings-tp17854725p17856731.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: Can't stop console warnings
Hi, I also had this problem, I solved setting this in my log4j.properties file: ### set log levels - for more verbose logging change 'info' to 'debug' stdout ### log4j.rootLogger=info 2008/6/15 Dave Newton <[EMAIL PROTECTED]>: > Are you actually using Log4J? > > > --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: > > > From: jefetech <[EMAIL PROTECTED]> > > Subject: Re: Can't stop console warnings > > To: user@struts.apache.org > > Date: Sunday, June 15, 2008, 9:45 PM > > That makes sense, but unforunately did not do anything. > > Here's what my > > server spits out when starting up: > > > > 2008-06-15 16:16:54.855::INFO: Extract > > jar:file:/usr/local/jetty/webapps/struts2.war!/ to > > > /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp > > Jun 15, 2008 4:16:55 PM > > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > info > > INFO: Parsing configuration file [struts-default.xml] > > Jun 15, 2008 4:16:55 PM > > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > info > > INFO: Parsing configuration file [struts-plugin.xml] > > Jun 15, 2008 4:16:55 PM > > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > info > > INFO: Parsing configuration file [struts.xml] > > > > > > It seem to still think > > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > should log "info" even though my log4j.properties > > has this line: > > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error > > > > Is there something I have to add to the struts.xml file? > > > > > > > > > > Joachim Rohde wrote: > > > > > > Hi, > > > > > > add in your web.xml following snippet: > > > > > > > > > > > log4jConfigLocation > > > > > /WEB-INF/classes/log4j.properties > > > > > > > > > And in the log4j.properties you add following line: > > > > > > > > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=ERROR > > > > > > That should log only error-messages coming from this > > class. > > > > > > Joachim > > > > > > jefetech schrieb: > > >> I just converted from struts 1 to 2.1. I've > > got everything working, but > > >> I > > >> can't seem to stop this warning from being > > spit out in the console every > > >> time struts runs. Any help would be great. thank > > you. > > >> > > >> Jun 15, 2008 11:43:01 AM > > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > >> warn > > >> WARNING: Could not find property > > [struts.valueStack] > > >> Jun 15, 2008 11:43:01 AM > > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger > > >> warn > > >> WARNING: Could not find property > > [org.apache.catalina.jsp_file] > > >> > > > > > > > > - > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > -- > > View this message in context: > > > http://www.nabble.com/Can%27t-stop-console-warnings-tp17854725p17856624.html > > Sent from the Struts - User mailing list archive at > > Nabble.com. > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Can't stop console warnings
Are you actually using Log4J? --- On Sun, 6/15/08, jefetech <[EMAIL PROTECTED]> wrote: > From: jefetech <[EMAIL PROTECTED]> > Subject: Re: Can't stop console warnings > To: user@struts.apache.org > Date: Sunday, June 15, 2008, 9:45 PM > That makes sense, but unforunately did not do anything. > Here's what my > server spits out when starting up: > > 2008-06-15 16:16:54.855::INFO: Extract > jar:file:/usr/local/jetty/webapps/struts2.war!/ to > /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp > Jun 15, 2008 4:16:55 PM > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > info > INFO: Parsing configuration file [struts-default.xml] > Jun 15, 2008 4:16:55 PM > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > info > INFO: Parsing configuration file [struts-plugin.xml] > Jun 15, 2008 4:16:55 PM > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > info > INFO: Parsing configuration file [struts.xml] > > > It seem to still think > com.opensymphony.xwork2.util.logging.jdk.JdkLogger > should log "info" even though my log4j.properties > has this line: > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error > > Is there something I have to add to the struts.xml file? > > > > > Joachim Rohde wrote: > > > > Hi, > > > > add in your web.xml following snippet: > > > > > > > log4jConfigLocation > > > /WEB-INF/classes/log4j.properties > > > > > > And in the log4j.properties you add following line: > > > > > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=ERROR > > > > That should log only error-messages coming from this > class. > > > > Joachim > > > > jefetech schrieb: > >> I just converted from struts 1 to 2.1. I've > got everything working, but > >> I > >> can't seem to stop this warning from being > spit out in the console every > >> time struts runs. Any help would be great. thank > you. > >> > >> Jun 15, 2008 11:43:01 AM > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> warn > >> WARNING: Could not find property > [struts.valueStack] > >> Jun 15, 2008 11:43:01 AM > >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger > >> warn > >> WARNING: Could not find property > [org.apache.catalina.jsp_file] > >> > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Can%27t-stop-console-warnings-tp17854725p17856624.html > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't stop console warnings
That makes sense, but unforunately did not do anything. Here's what my server spits out when starting up: 2008-06-15 16:16:54.855::INFO: Extract jar:file:/usr/local/jetty/webapps/struts2.war!/ to /usr/local/jetty/work/Jetty_0_0_0_0_80_struts2.war___struts2test_-f01z4v/webapp Jun 15, 2008 4:16:55 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Parsing configuration file [struts-default.xml] Jun 15, 2008 4:16:55 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Parsing configuration file [struts-plugin.xml] Jun 15, 2008 4:16:55 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info INFO: Parsing configuration file [struts.xml] It seem to still think com.opensymphony.xwork2.util.logging.jdk.JdkLogger should log "info" even though my log4j.properties has this line: log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=error Is there something I have to add to the struts.xml file? Joachim Rohde wrote: > > Hi, > > add in your web.xml following snippet: > > > log4jConfigLocation > /WEB-INF/classes/log4j.properties > > > And in the log4j.properties you add following line: > > log4j.category.com.opensymphony.xwork2.util.logging.jdk.JdkLogger=ERROR > > That should log only error-messages coming from this class. > > Joachim > > jefetech schrieb: >> I just converted from struts 1 to 2.1. I've got everything working, but >> I >> can't seem to stop this warning from being spit out in the console every >> time struts runs. Any help would be great. thank you. >> >> Jun 15, 2008 11:43:01 AM >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> warn >> WARNING: Could not find property [struts.valueStack] >> Jun 15, 2008 11:43:01 AM >> com.opensymphony.xwork2.util.logging.jdk.JdkLogger >> warn >> WARNING: Could not find property [org.apache.catalina.jsp_file] >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Can%27t-stop-console-warnings-tp17854725p17856624.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: Some confusion trying to do ajax form submit
--- On Sun, 6/15/08, Karr, David <[EMAIL PROTECTED]> wrote: > I'm now trying to explore doing an Ajax form submit, > and getting a JSON response. I'm using YUI on the > client side. I'd like to see if I can get similar > data in the JSON response that I would in a normal > submit, for instance, with field errors. For S2.0's JSON result just add getters for the error methods and they'll be serialized along with the rest (oh, snap!) of the action. I'm not as familiar with the RESTful plugin's JSON serilization but would suspect/assume it's similar. > I would have thought the "input" parameter wouldn't > be relevant in a Ajax/JSON action. Not sure how it would know the difference, since the JSON part is the result, not the action, but it might be different in S2.1 (I've tested the plugin to some extent but haven't used t in the real world yet.) > I guess there's no automatic provision for reporting field > errors in a JSON response, so I guess I'll have to build > something like that by hand? See the above. > onsubmit="return YAHOO.strutsform.submitform();; return true;" > > I'm not sure if that "return true;" will cause me trouble, > as I'm trying to bypass the normal form submission. > I think by returning false from "submitform", I achieved > that, however. Unless your JavaScript implementation is very, horribly broken, the first return will act like a return. Also note that once you're mucking about with Ajax requests you have to handle session expiration and exceptions in a more useful way; great fun, great fun. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Some confusion trying to do ajax form submit
Take a look at this (2.1 only): http://struts.apache.org/2.0.11.1/docs/ajax-validation.html musachy On Sun, Jun 15, 2008 at 8:02 PM, Karr, David <[EMAIL PROTECTED]> wrote: > I have a simple page with validation that I got working with a > conventional submit and action. > > I'm now trying to explore doing an Ajax form submit, and getting a JSON > response. I'm using YUI on the client side. I'd like to see if I can > get similar data in the JSON response that I would in a normal submit, > for instance, with field errors. > > There are a couple points I could use some help with, not necessarily > related to Ajax or JSON. Please don't hesitate to tell me if I'm doing > something else wrong, or something I should be aware of. > > My first attempt actually did execute the Ajax request, and got the > response, but it wasn't JSON. The responseText was just the HTML of my > source JSP, which is also the value of my "input" result. I tried > setting up the JSON action without an "input" result, but it seemed to > complain if I didn't have that. I would have thought the "input" > parameter wouldn't be relevant in a Ajax/JSON action. If I filled in > all the required fields so it didn't result in any field errors, the > response was JSON, and it was reasonable (although setting > "wrapWithComments" didn't appear to have any effect). I guess there's > no automatic provision for reporting field errors in a JSON response, so > I guess I'll have to build something like that by hand? > > Note that I tried to enable the logging interceptor, but I didn't see > any output from it. > > I have a single action that I was intending to use to handle both the > ajax and non-ajax submit. I tried to make it use two different action > names in the form, but it seemed to have trouble with that. > > I noticed in the generated HTML, I had this in the HTML for the form > tag: > >onsubmit="return YAHOO.strutsform.submitform();; return true;" > > I'm not sure if that "return true;" will cause me trouble, as I'm trying > to bypass the normal form submission. I think by returning false from > "submitform", I achieved that, however. > > I'll include here the relevant files. Please comment where appropriate. > Thanks for your input. > ---form.jsp > <%@ page language="java" contentType="text/html; charset=UTF-8" >pageEncoding="UTF-8"%> > <%@ taglib prefix="s" uri="/struts-tags" %> > "http://www.w3.org/TR/html4/loose.dtd";> > > > > Struts Form > href="${pageContext.request.contextPath}/struts/css_xhtml/styles.css" > type="text/css"> > href="${pageContext.request.contextPath}/style/form.css"> > > href="${pageContext.request.contextPath}/yui/reset-fonts-grids/reset-fon > ts-grids.css"> > href="${pageContext.request.contextPath}/yui/button/assets/skins/sam/but > ton.css"> > href="${pageContext.request.contextPath}/yui/logger/assets/skins/sam/log > ger.css"> > > src="${pageContext.request.contextPath}/yui/utilities/utilities.js"> ript> >