Re: Please help a Tiles problem
Then you must be using an old pre-Struts version of Tiles. Sorry but I can't help you there. David From: Vernon [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Please help a Tiles problem Date: Sat, 05 Apr 2003 22:26:07 -0800 Where the plug-in configuration shall go? I don't use Struts, but Tiles only. According to the document on tiles-documentation.war, the TilesServlet shall be used, if my understanding is correct. On Sat, 05 Apr 2003 16:45:59 -0700, David Graham [EMAIL PROTECTED] wrote: I noticed in your debug output that you're using TilesServlet. Are you using Struts 1.1? You don't need the TilesServlet; all you need is to configure the TilesPlugin. plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml/ /plug-in David From: Vernon [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Please help a Tiles problem Date: Sat, 05 Apr 2003 15:23:14 -0800 I start getting quite frustrated on this issue after a few days of researching on the Tiles home page, Tiles Struts home page, Struts email archive, the tiles-documentation.war, and google on Tiles. The whole development is stop at this point. I have read somewhere at the email archive: it is not need to process the initialition if the definition is stored in a JSP file, which is the case I posted my previous post. I change the definition method, using a xml file instead. After having a xml file and modification of web.xml, I get the logging message when I start/reload the applicaiton: 8242 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet (I18n FactorySet.java:301) - definitions={FRONT={name=FRONT, path=/jsp/templates/mmSig nUpLayout.jsp, role=null, controller=null, controllerType=null, controllerInstan ce=null, attributes={footer=/jsp/homepage/footer.jsp, title=Front Page, header=/ jsp/signon/header.jsp, body=/jsp/frontpage/content.jsp}} } 8282 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet (I18n FactorySet.java:305) - factory loaded : {FRONT={name=FRONT, path=/jsp/templates/ mmSignUpLayout.jsp, role=null, controller=null, controllerType=null, controllerI nstance=null, attributes={footer=/jsp/homepage/footer.jsp, title=Front Page, hea der=/jsp/signon/header.jsp, body=/jsp/frontpage/content.jsp}} } 8292 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet (I18n FactorySet.java:269) - default factory:{FRONT={name=FRONT, path=/jsp/templates/m mSignUpLayout.jsp, role=null, controller=null, controllerType=null, controllerIn stance=null, attributes={footer=/jsp/homepage/footer.jsp, title=Front Page, head er=/jsp/signon/header.jsp, body=/jsp/frontpage/content.jsp}} } 8302 DEBUG [main] org.apache.struts.tiles.xmlDefinition.I18nFactorySet (I18n FactorySet.java:217) - Factory initialized from file '/WEB-INF/tiles- defs.xml'. 8312 INFO [main] org.apache.struts.tiles.TilesServlet (TilesServlet.java:1 17) - Tiles Factory successfully loaded The definition seems in place. However, when I point to the url of a page, I get the following error messages: java.lang.NullPointerException at org.apache.struts.taglib.tiles.InsertTag.processName(InsertTag.java:527) at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:486) at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:444) at org.apache.jsp.page_jsp._jspx_meth_tiles_insert_0(page_jsp.java:73) at org.apache.jsp.page_jsp._jspService(page_jsp.java:52) ... And in the translated JSP Java file, there is public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; javax.servlet.jsp.PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType(text/html;charset=ISO-8859-1); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write(\r\n\r\n); if (_jspx_meth_tiles_insert_0(pageContext)) === line 52 return; } catch (Throwable t) { out = _jspx_out; if (out != null out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } } private boolean _jspx_meth_tiles_insert_0(javax.servlet.jsp.PageContext pageContext) throws Throwable { JspWriter out = pageContext.getOut(); /* tiles:insert */
multipage form struts example
Correct me if I am wrong, but if you are doing a multipage form you have to put the form into the session scope in order to retain it throughout the duration of the wizard, am I right? The only way to avoid it would be to place hidden fields in the second and third pages to hold the values so they continue to get passed along which would be ridiculous. The reason I bring this up because the following snippet shows up in the validator example that ships with struts: !-- Multi-Part Registration Action -- actionpath=/multiRegistration type=org.apache.struts.webapp.validator.MultiRegistrationAction name=multiRegistrationForm scope=request validate=false forward name=success path=/index.jsp/ forward name=input1 path=/multiRegistration1.jsp/ forward name=input2 path=/multiRegistration2.jsp/ /action If the scope is request, how is it possible to retain the form values until the last step? If this is indeed an issue, perhaps it should be updated before struts 1.1 (I would also comment on the validate=false but I know that is a bug in the DynaValidatorForm with multipages, so I will leave that argument until post-1.1). Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - There is no such thing as a casual knowledge of xslt, either you know everything about it or you are sitting in the creek. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Documenting projects
[EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: As far as requirements, you should pick up a Rational Unified Process book and look at designing use-cases with Word. ...or KWord or swriter (OpenOffice/StarOffice) Design, you can use visio ArgoUML or Dia Sorry, just had to plug for the open source world, GO OPEN SOURCE! viva la code! Dan -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you are going to play the game of trial and error, don't be surprised when the results are revealing. -- me - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
idea for multipage form input attribute
When creating a multipage validating form wizard, it can often be inconvient if the user makes an error on the 6th page and is taken all the way to page 1 to notify the user of the error. This happens because the input attribute on an action-mapping can only be a single page. The following would be an idea to get around this: Make it a standard that pages in a multipage form have a forward name using input as the prefix and the page number as a suffix. Then, if the page attribute is being used and a validation fails, the user is returned to the input + getPage() rather than the mapping.getInput(). This will take the user back to the 6th page rather than all the way to the beginning in the above example. Thoughts? Dan p.s. I am definitely going to implement something homegrown for the time being. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Daniel Allen, [EMAIL PROTECTED] http://www.mojavelinux.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If you are going to play the game of trial and error, don't be surprised when the results are revealing. -- me - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
basic struts 1.1 questions
hi 1) in using dynaforms is it possible to set FormFile fields in the struts-config? if supported, what type would such a field be? java.lang.Class? 2) before i run my validator i want run all my actionform variables through a formatter. (eg: converting 2003/12/12 to 2003-12-12 and other conversions). obviously this has to happen after the form is populated and before the form is validated. where do i need to put this code if this is to work with automatic Validator validation ? would it work for manual validation (as in validate() in the action form) as well? Further, i will be using this for multiple web-apps. is there a way i can extend/modify struts itself so that the application writer don't have to worry about it? ie; form values set would alredy be formatted! thanx riyaz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: url rewriting
I think you can use html:rewrite. a href=test class=redbold onClick=TestWindow=window.open('html:rewrite page=?LINK.do? /','TestWindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes, resizable=no, width=620,height=250,left=20,top=20'); return false; Test Link/a Richard Raquepo wrote: yes by using the html:link , but i want to control the size of the created window? how can it be done? - Original Message - From: Claude Betancourt [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, April 03, 2003 1:51 PM Subject: Re: url rewriting the session is attached to the browser instance and not the individual window, so by popping a new window with a new action you'll carry the same session attributes without the need to specify the session id. -c - Original Message - From: Richard Raquepo [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, April 03, 2003 12:56 AM Subject: url rewriting i have this kind of link that will open a new window: a href=test class=redbold onClick=TestWindow=window.open('?LINK.do?','TestWindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes, resizable=no, width=620,height=250,left=20,top=20'); return false; Test Link/a i wan't to be able to transfer my current session to the new browser? what tag should i use so that i can passed the current sessionid in the ?LINK.do? ? or is it possible to use html:link tag that has a new window with my parameters in it? thanks a lot... - 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: Best way for Database Exception Handling
I don't like your idea, Harish. What if your information systems (EIS) change? I mean, i.e. you are using a Oracle database, your requirements change and you must store your data in a XML file. SQLException has no sense in your controller layer. I personally prefer to catch my EIS exceptions (SQLException or whatever) in the business logic layer and throw a EISException or something like that. Regards, Guido. On Sat, 5 Apr 2003, Harish Krishnaswamy wrote: } If your business logic cannot do anything with your DBException, what is the need for defining one } such exception? Why not just throw the SQLException and handle it in the controller? } } -Harish } } } --- Navjot Singh [EMAIL PROTECTED] wrote: } hi gurus, } } I have some facade layer for my database. } That every method in that facade layer, naturally, *catches* SQLException } and in return } throw new DBException( sqlexception); } } My DBException is extending java.lang.Exception. So, I have to explicity } throw it and later catch it in my business logic layer as well. Obviously, } if there is DBException, even business logic CANNOT do anything but to pass } the exception to presentation layer where it can be caught nicely by } global-exception } } What if i change my DBException to extend RunTimeException. } } __That way__ } + I need not to explicity throw and catch DBException. } + Few of my methods won't have to send 2-3 exceptions like }getBookList(int id) throws DBException, NoBookException } } __Qs__ } + Would this exception still be catched by global-exception? } + If YES, is it a nice thing to do? } } Any comments are welcome } - Navjot Singh } } } - } To unsubscribe, e-mail: [EMAIL PROTECTED] } For additional commands, e-mail: [EMAIL PROTECTED] } } } } __ } Do you Yahoo!? } Yahoo! Tax Center - File online, calculators, forms, and more } http://tax.yahoo.com } } - } To unsubscribe, e-mail: [EMAIL PROTECTED] } For additional commands, e-mail: [EMAIL PROTECTED] } Guido Garcia Bernardo [EMAIL PROTECTED] [EMAIL PROTECTED] stat rosa pristina nomine, nomina nuda tenemus. http://members.ud.com/services/teams/team.htm?id=D8624419-BFB6-4772-A01A-0045631F979F - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SecurityFilter used with JBoss?
Mick, I suspect that it wouldn't work, but I have never tested it. I offer my support if you want to try it out, but I don't have any experience with JBoss. -Max - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 20, 2003 12:09 AM Subject: SecurityFilter used with JBoss? JBoss has many PAM modules including one DatabaseServerLoginModule. Can this be used with the SecurityFilter? I ask because it seems to be a parameter to add such a realm module: !-- start with a Catalina realm adapter to wrap the Catalina realm defined below -- realm className=org.securityfilter.realm.catalina.CatalinaRealmAdapter / === Thank You Mick Knutson Sr. Designer - Project Trust aUBS AG, Financial - Zürich Office: +41 (0)1/234.42.75 Internal: 48194 Mobile: 079.726.14.26 Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - 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: Action change in form
Here is my code. Some how form is not submitted. Once i click the 'aboutus' link nothing is happening. Can some one tell me what is going on please. function setAction(action, link) { document.form.action = act; Shouldn't this be: action document.form.method = POST; document.form.selectedGlobalLink.value = link; // This is hidden filed to remember which link is selected document.form.submit(); } html:form action = /demo method = POST a href=# onClick=setAction('/aboutus','2');About Us/a You sure it isn't /aboutus.do? Regards, Marcel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]