> -----Original Message----- > From: Leandro Melo [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 11, 2004 2:13 PM > To: struts jakarta > Subject: Re: Importing context with Struts > > > Jim, > as i said i have a page with only one line of code, > wich is the error page. > It only has this: > > <html:errors/>
Try this instead of html:errors: <logic:messagesPresent> <ul> <html:messages id="error" message="false"> <li class="error"><bean:write name="error" /></li> </html:messages> </ul> </logic:messagesPresent> If that works then you can mangle the html however you want of course. > > Suppose now we want to register a company in the > application, i got then an form with all the necessary > inputs in a page registercompanycustominforeq.jsp. > Here's the page for registering. We have the same setup.. the differenece being that mines working,and yours isn't. So if we start looking for differences.. one is that i'm using the code above instead of <html:errors/>. I would have sworn that's what I was using for dumping my error messages. Another would be the way we're generating these messages... I use the Struts validation stuff, so it does it all automagically. > > <html:form action="/registercompanycustominforeq"> > <%@ include > file="/functionalBlocks/companyHTMLcomponent.jsf" %> > </html:form> > > The user sees the following definition when he's > filling the company info. > <definition > name=".PartyPlace.RegisterCompanyCustomInfoReq" > extends=".PartyPlace"> > <put name="body" > value="/register/registercompanycustominforeq.jsp"/> > <put name="pageComment" > value="/pageComments/registercompanycustominforeq_PAGECOMMENT.jsp"/> > <put name="sideBar" > value="/functionalSideBars/registercompany_SideBar.jsp"/> > </definition> > > If your remember, the base class ".PartyPlace" has > already inserts the error page. > > I don't know what you meant about "WHat scope are > your errors beign put in?". How do i find out that? > > The only thing i know is if the user request is > blocked in validation, my html:errors tag doesn't show > anything. > BUT, if i place the html:errors tag inside the page > with the registercompanycustominfo action, it works > fine. > In other words, if i modify my > registercompanycustominforeq.jsp to this: > <html:form action="/registercompanycustominforeq"> > <html:errors/> > <%@ include > file="/functionalBlocks/companyHTMLcomponent.jsf" %> > </html:form> > > Everything works!!! The errors tag works. > > > > > OKay... I have the exact same setup, and validation > > works just fine with this setup. The one thing I'm > > not doing is the ${name} that you are, but that > > shouldn't make a difference at all. WHat scope are > > your errors beign put in? That could be an issue. > > > > Here's my base layout: > > <definition name="mainLayout" > > path="/layout/layout2.jsp"> > > <put name="title" value="This is a title" > > /> > > <putList name="headerList"> > > <!-- Where the <html:errors/> tag is, the action > > itself grabs messages from the database, and > > forwards to a jsp page with the message list from > > the db and <html:errors/> on it. One of these days > > I'll break out into seperate JSPs :) --> > > <add value="/showMessages.do"/> > > </putList> > > <putList name="leftSideList"> > > <add value="/borrowerDemographics.jsp"/> > > <add > > value="/showPaymentHistory.do?detail=summary"/> > > </putList> > > <putList name="centerList"> > > <add value="/layout/body.jsp"/> > > </putList> > > <putList name="rightSideList"> > > <add value="/resources.jsp"/> > > <add value="/layout/links.jsp"/> > > <add value="/showDeferments.do"/> > > <add value="/showForebearances.do"/> > > </putList> > > <putList name="footerList"> > > <add value="/layout/footer.jsp"/> > > </putList> > > </definition> > > > > > > > > > > Here's the simple > > > /functionalBlocks/errorHTMLcomponent.jsp page: > > > <%@ taglib uri="/WEB-INF/struts-html.tld" > > > prefix="html"%> > > > <html:errors/> > > > > > > > > > I have a page for registering company data, wich > > is > > > part of the following definition: > > > <definition > > > name=".PartyPlace.RegisterCompanyCustomInfoReq" > > > extends=".PartyPlaceSideBar"> > > > <put name="body" > > > > > value="/register/registercompanycustominforeq.jsp"/> > > > <put name="pageComment" > > > > > > value="/pageComments/registercompanycustominforeq_PAGECOMMENT.jsp"/> > > > <put name="sideBar" > > > > > > value="/functionalSideBars/registercompany_SideBar.jsp"/> > > > </definition> > > > > > > > > > The registercompanycustominforeq.jsp page is the > > > following one: > > > <html:form action="/registercompanycustominforeq"> > > > <%@ include > > > file="/functionalBlocks/companyHTMLcomponent.jsf" > > %> > > > <%@ include > > > file="/functionalBlocks/buttonsHTMLcomponent.jsf" > > %> > > > > > > </html:form> > > > > > > > > > NOTE that the tag html:errors is not in > > > registercompanycustominforeq.jsp page, it's in the > > > errorHTMLcomponent.jsp page (as i showed). > > > When i submit a request the hits the validate > > method, > > > it comes back, but i cannot see the error because > > the > > > html:errors tag is in another page. > > > That's why i wanted to import the Struts > > context... > > > However, if there's a Tiles way to workaround > > that, > > > please, would you explain it to me? > > > Maybe with some code... > > > > > > Thank you very much, > > > ltcmelo > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Michael McGrady > > > > [mailto:[EMAIL PROTECTED] > > > > > Sent: Tuesday, August 10, 2004 3:51 PM > > > > > To: Struts Users Mailing List > > > > > Subject: RE: Importing context with Struts > > > > > > > > > > > > > > > I thought that digester actually created > > classes > > > > out of this > > > > > stuff, Jim. No? > > > > > > > > Not quite.... the defintiion file gets turned > > into > > > > one java bean per definition. These java beans > > are > > > > then used to pull the parts together for the > > tags ( > > > > paraphrased from SIA Chap 11.1 pg 324). > > > > Since all jsp files are converted to a servlet > > > > first, then compiled, I would tend to say that > > all > > > > the jsps being declared in a tile definition > > being > > > > in the same class couldn't happen... however I > > can't > > > > seem to find out where websphere puts it's > > working > > > > stuff *SIGH* to verify this I can't say for > > sure. > > > > > > > > However, after digging through the tiles code I > > came > > > > across this: > > > > > > > > > > http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org > > > > > > /apache/struts/tiles/TilesUtilImpl.java?rev=1.9&view=markup > > > > The part that answers the question: > > > > public void doInclude( > > > > String uri, > > > > HttpServletRequest request, > > > > HttpServletResponse response, > > > > ServletContext servletContext) > > > > throws IOException, ServletException { > > > > > > > > > > > > > > request.getRequestDispatcher(uri).include(request, > > > > response); > > > > } > > > > Which means no..... all those jsp files are > > _NOT_ > > > > compiled into one big huge class..... they are > > > > individual servlets in keeping with the spec. > > > > > > > > > > > > > > > > > > At 03:23 PM 8/10/2004, you wrote: > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Michael McGrady > > > > [mailto:[EMAIL PROTECTED] > > > > > > > Sent: Tuesday, August 10, 2004 3:14 PM > > > === message truncated === > > > ATTACHMENT part 11 message/rfc822 > > Assunto: RE: stopping threads when sever stops > > Data: Wed, 11 Aug 2004 08:44:57 -0700 > > De: "Jim Barrows" <[EMAIL PROTECTED]> > > Para: "Struts Users Mailing List" > > <[EMAIL PROTECTED]>, > > <[EMAIL PROTECTED]> > > > > > > > > > > > -----Original Message----- > > > From: Jignesh Patel > > [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, August 11, 2004 4:05 PM > > > To: Struts Users Mailing List > > > Subject: stopping threads when sever stops > > > > > > > > > Hi Rick, > > > > > > We are developing our software using struts and > > quartz with tomcat. > > > When we stop our web server it never stops the > > back end > > > running threads. > > > > > > We tried by developing separate listener but we > > never able to shutdown > > > our application properly. > > > > > > any suggestion will be helpful on this. > > > > Servlet Context listener, listen on the context > > destroyed method and nuke your threads. > > > > > ATTACHMENT part 12 message/rfc822 > > Assunto: Problem depoying struts-blank.war > > Data: Wed, 11 Aug 2004 08:45:25 -0700 > > De: "Kenneth Litwak" <[EMAIL PROTECTED]> > > Para: <[EMAIL PROTECTED]> > > > > I am trying to teach myself Struts while writing > > a real application. > > I followed an tutorial that said to start by putting > > the > > struts-blank.war in the webapps directory of Tomcat > > 5. Unfortunately, > > here's what I got: > > > > > > > > Aug 11, 2004 8:24:50 AM > > org.apache.struts.util.PropertyMessageResources > > <init> > > > > INFO: Initializing, > > > config='org.apache.webapp.admin.ApplicationResources', > > retur > > > > nNull=true > > > > Aug 11, 2004 8:24:55 AM > > org.apache.catalina.core.StandardHostDeployer > > install > > > > INFO: Processing Context configuration file URL > > file:C:\tomcat50\conf\Catalina\l > > > > ocalhost\balancer.xml > > > > Aug 11, 2004 8:24:55 AM > > org.apache.catalina.core.StandardHostDeployer > > install > > > > INFO: Processing Context configuration file URL > > file:C:\tomcat50\conf\Catalina\l > > > > ocalhost\manager.xml > > > > Aug 11, 2004 8:24:56 AM > > org.apache.catalina.core.StandardHostDeployer > > install > > > > INFO: Installing web application at context path > > /struts-blank from URL > > file:C:/ > > > > tomcat50/webapps/struts-blank > > > > Aug 11, 2004 8:24:59 AM > > org.apache.struts.tiles.TilesPlugin > > initDefinitionsFacto > > > > ry > > > > INFO: Tiles definition factory loaded for module ''. > > > > Aug 11, 2004 8:24:59 AM > > org.apache.struts.validator.ValidatorPlugIn > > initResource > > > > s > > > > INFO: Loading validation rules file from > > '/WEB-INF/validator-rules.xml' > > > > Aug 11, 2004 8:24:59 AM > > org.apache.struts.validator.ValidatorPlugIn > > initResource > > > > s > > > > INFO: Loading validation rules file from > > '/WEB-INF/validation.xml' > > > > Aug 11, 2004 8:25:00 AM > > org.apache.commons.digester.Digester error > > > > SEVERE: Parse Error at line 45 column 15: The > > content of element type > > "formset" > > > > is incomplete, it must match "(constant*,form+)". > > > > org.xml.sax.SAXParseException: The content of > > element type "formset" is > > incomple > > > > te, it must match "(constant*,form+)". > > > > at > > > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un > > > > known Source) > > > > at > > > org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown > > Source) > > > > at > > > org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source) > > > > at > > > org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source) > > > > at > > > org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown > > S > > > > ource) > > > > at > > > org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown > > Source) > > > > > > > > at > > > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow > > > > n Source) > > > > at > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent > > > > Dispatcher.dispatch(Unknown Source) > > > > at > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un > > > > known Source) > > > > at > > > org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > Source) > > > > at > > > org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > Source) > > > > at > > org.apache.xerces.parsers.XMLParser.parse(Unknown > > Source) > > > > at > > > org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > > Source) > > > > at > > > org.apache.commons.digester.Digester.parse(Digester.java:1567) > > > > at > > > org.apache.commons.validator.ValidatorResources.<init>(ValidatorResou > > > > rces.java:159) > > > > at > > > org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPl > > > > ugIn.java:233) > > > > at > > > org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java > > > > :164) > > > > at > > > org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServle > > > > t.java:839) > > > > at > > > org.apache.struts.action.ActionServlet.init(ActionServlet.java:332) > > > > at > > > javax.servlet.GenericServlet.init(GenericServlet.java:256) > > > > at > > > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. > > > > java:1044) > > > > at > > > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:88 > > > > 7) > > > > at > > > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex > > > > t.java:3959) > > > > at > > > org.apache.catalina.core.StandardContext.start(StandardContext.java:4 > > > > 284) > > > > at > > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase > > > > > === message truncated === > > ===== > _________________________________ > Leandro Terra C. Melo > Eng. de Controle e Automação - UFMG > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.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]