Dojo not working in Struts2.
Hi All, Please find 'test4Dialog.jsp' in attachment. This .jsp file is placed inside /WEB-INF/pages directory. When I'm accessing this .jsp with (http://localhost:7001/hibernate/pages/test4Dialog.jsp), it is displaying 'dijit.TooltipDialog' correctly. The same page I configured in struts2 action with below code action name=Dojo result/pages/test4Dialog.jsp/result /action When I try to access this page with URL(http://localhost:7001/hibernate/events/Dojo.action), I'm getting below error message in firefox console. dojo is not defined dojo.require(dojo.parser); I didn't place any dojo plugin jar files in my library? I think struts2 is supporting Dojo inclusively. If I need to install Dojo plugin to correct this problem then where I can find this .jar file(dojo plugin)? Please let me know, how to correct this problem. Have a nice day. Thanks, Sharath. - Looking for last minute shopping deals? Find them fast with Yahoo! Search.html head s:head theme=ajax debug=true/ titleTooltipDialog demo/title script type=text/javascript djConfig = { parseOnLoad: true } /script script src=dojoroot/dojo/dojo.js/script style type=text/css @import dojoroot/dojo/resources/dojo.css; @import dojoroot/dijit/themes/tundra/tundra.css; /style script type=text/javascript dojo.require(dojo.parser); dojo.require(dijit.form.Button); dojo.require(dijit.Dialog); dojo.require(dijit.form.TextBox); function checkPw(dialogFields) { if (dialogFields.confirmpw != dialogFields.newpw) alert(Confirmation password is different.); } /script /head body class=tundra div dojoType=dijit.form.DropDownButton spanLogin Form/span div dojoType=dijit.TooltipDialog id=dialog1 title=Login Form execute=checkPw(arguments[0]); table tr tdlabel for=name title=User name Username/label/td tdinput dojoType=dijit.form.TextBox type=text name=oldpw/td /tr tr tdlabel for=locPassword: /label/td tdinput dojoType=dijit.form.TextBox type=password name=newpw/td /tr tr tdlabel for=descConfirm Password: /label/td tdinput dojoType=dijit.form.TextBox type=password name=confirmpw/td /tr tr td colspan=2 align=center button dojoType=dijit.form.Button type=submitLogin/button/td /tr /table /div /div /body /html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo not working in Struts2.
Hi Sharath, I am not quit sure, but I think it might help if you simply remove the s:head / tag. You see dojo is already configured inside of struts (inside the core jar and static folder or so) to be used with it's tags http://struts.apache.org/2.x/docs/tag-reference.html . Since you are not using any of those you can just remove the s:head /. This is what the head template looks like: http://struts.apache.org/2.x/docs/ajax-head-template.html You should thought consider using the struts2 tags. If you plan not to do so or you want to use a newer version of dojo since struts is a little behind you need to configure your web.xml file, as I believe, to use the static filter right to point to the location of your ajax files: filter filter-namestaticFilter/filter-name filter-classcom.bitpitch.webapp.filter.StaticFilter/filter-class init-param param-nameincludes/param-name param-value/scripts/dojo/*,/dwr/*/param-value /init-param /filter regards sharath karnati schrieb: Hi All, Please find 'test4Dialog.jsp' in attachment. This .jsp file is placed inside /WEB-INF/pages directory. When I'm accessing this .jsp with (http://localhost:7001/hibernate/pages/test4Dialog.jsp), it is displaying 'dijit.TooltipDialog' correctly. The same page I configured in struts2 action with below code action name=Dojo result/pages/test4Dialog.jsp/result /action When I try to access this page with URL(http://localhost:7001/hibernate/events/Dojo.action), I'm getting below error message in firefox console. dojo is not defined dojo.require(dojo.parser); I didn't place any dojo plugin jar files in my library? I think struts2 is supporting Dojo inclusively. If I need to install Dojo plugin to correct this problem then where I can find this .jar file(dojo plugin)? Please let me know, how to correct this problem. Have a nice day. Thanks, Sharath. Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping - 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]