Re: struts 2 - excepting starting filter
Thanks for your help! I found a struts jar in my tomcat\lib folder Dave Newton gmail.com> writes: > > The error message says it all, you need to remove the struts/etc. libs you > put in the tomcat lib directory and deploy only the application's copies. > > Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2 - excepting starting filter
Here is log with the error jars I am using commons-fileupload-1.2.2.jar commons-io-2.0.1.jar commons-lang-2.5.jar commons-logging-1.1.1.jar commons-logging-api-1.1.jar freemarker-2.3.18.jar javassist-3.11.0.GA.jar ognl-3.0.4.jar struts2-core-2.3.1.2.jar xwork-core-2.3.1.2.jar log4j-1.2.14.jar Here is log information: Mar 1, 2012 9:12:46 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 Unable to load configuration. - bean - jar:file:/C:/apache-tomcat-7.0.26/webapps/ Basic_Struts2_Ant/WEB-INF/lib/struts2-core-2.3.1.2.jar! /struts-default.xml:29:72 at org.apache.struts2.dispatcher.Dispatcher.init (Dispatcher.java:449) at org.apache.struts2.dispatcher.ng.InitOperations. initDispatcher(InitOperations.java:69) at org.apache.struts2.dispatcher.ng.filter. StrutsPrepareAndExecuteFilter.init (StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig. initFilter(ApplicationFilterConfig.java:277) at org.apache.catalina.core.ApplicationFilterConfig. getFilter(ApplicationFilterConfig.java:258) at org.apache.catalina.core.ApplicationFilterConfig. setFilterDef(ApplicationFilterConfig.java:382) at org.apache.catalina.core.ApplicationFilterConfig. (ApplicationFilterConfig.java:103) at org.apache.catalina.core.StandardContext. filterStart(StandardContext.java:4638) at org.apache.catalina.core.StandardContext. startInternal(StandardContext.java:5294) at org.apache.catalina.util.LifecycleBase. start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase. addChildInternal(ContainerBase.java:895) at org.apache.catalina.core.ContainerBase. addChild(ContainerBase.java:871) at org.apache.catalina.core.StandardHost. addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig. deployWAR(HostConfig.java:958) at org.apache.catalina.startup.HostConfig$ DeployWar.run(HostConfig.java:1599) at java.util.concurrent.Executors$RunnableAdapter. call(Executors.java:441) at java.util.concurrent.FutureTask$Sync. innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask. run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker. runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker. run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: Unable to load configuration. - bean - jar:file:/C:/apache-tomcat-7.0.26/webapps/Basic_Struts2_Ant/ WEB-INF/lib/struts2-core-2.3.1.2.jar!/struts-default.xml:29:72 at com.opensymphony.xwork2.config.ConfigurationManager. getConfiguration(ConfigurationManager.java:69) at org.apache.struts2.dispatcher.Dispatcher. init_PreloadConfiguration(Dispatcher.java:390) at org.apache.struts2.dispatcher.Dispatcher. init(Dispatcher.java:436) ... 20 more Caused by: Unable to load bean: type: class:com.opensymphony. xwork2.ObjectFactory - bean - jar:file:/C:/apache-tomcat-7.0.26/ webapps/Basic_Struts2_Ant/WEB-INF/lib/struts2-core-2.3.1.2.jar! /struts-default.xml:29:72 at com.opensymphony.xwork2.config.providers. XmlConfigurationProvider.register(XmlConfigurationProvider.java:235) at org.apache.struts2.config.StrutsXmlConfigurationProvider. register(StrutsXmlConfigurationProvider.java:102) at com.opensymphony.xwork2.config.impl.DefaultConfiguration. reloadContainer(DefaultConfiguration.java:180) at com.opensymphony.xwork2.config.ConfigurationManager. getConfiguration(ConfigurationManager.java:66) ... 22 more Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/C:/apache-tomcat-7.0.26/lib/struts2-core-2.3.1.2.jar! /struts-default.xml:29:72 - bean - jar:file:/C:/apache-tomcat-7.0.26 /webapps/Basic_Struts2_Ant/WEB-INF/lib/struts2-core-2.3.1.2.jar! /struts-default.xml:29:72 at com.opensymphony.xwork2.config.providers. XmlConfigurationProvider.register(XmlConfigurationProvider.java:219) ... 25 more Mar 1, 2012 9:12:46 PM org.apache.catalina.core.ApplicationContext log - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
struts 2 - excepting starting filter
I downloaded from google code Basic_Struts2_Ant and modified web.xml, added struts.xml and index.jsp along with log4j stuff according to instructions on struts website for this example. The app does not work on tomcat 7.0 I built with ant and deployed on tomcat jars I am using commons-fileupload-1.2.2.jar commons-io-2.0.1.jar commons-lang-2.5.jar commons-logging-1.1.1.jar commons-logging-api-1.1.jar freemarker-2.3.18.jar javassist-3.11.0.GA.jar ognl-3.0.4.jar struts2-core-2.3.1.2.jar xwork-core-2.3.1.2.jar log4j-1.2.14.jar struts.xml http://struts.apache.org/dtds/struts-2.0.dtd";> /index.jsp web.xml http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; id="WebApp_ID" version="3.0"> Basic_Struts2_Ant index.html index.htm index.jsp default.html default.htm default.jsp struts2 org.apache.struts2.dispatcher.ng.filter. StrutsPrepareAndExecuteFilter struts2 /* basic index.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> http://www.w3.org/TR/html4/loose.dtd";> Insert title here Welcome one and all to Strut2 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
struts 2 exception - SEVERE: Exception starting filter struts2
I have created simple struts 2 app with latest struts2 jar files. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
StrutsPrepareFilter, StrutsExecuteFilter, Sitemesh and TagUtils
I've upgraded to 2.1.6. I'm using the new StrutsPrepareFilter and StrutsExecuteFilter, instead of the ActionContextCleanUp and FilterDispatcher. I was using the built-in Dojo module. So, I've gone about using the dojo plugin, and importing the taglibs as described here - http://struts.apache.org/2.1.6/docs/version-notes-216.html. When I log on to my app now, I see the error below. I looked at the JSP (well, its generated java source), and the exception occurs at a (struts head tage, not the dojo version) I have defined in an included jsp fragment. Any ideas? == 21:57:04,956 ERROR [jsp]:711 - Servlet.service() for servlet jsp threw exception The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location] at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60) at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48) at org.apache.jsp.WEB_002dINF.decorators.main_jsp._jspx_meth_st_005fhead_005f0(main_jsp.java:725) at org.apache.jsp.WEB_002dINF.decorators.main_jsp._jspService(main_jsp.java:247) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:965) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:600) at com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag.doEndTag(ApplyDecoratorTag.java:258) at org.apache.jsp.WEB_002dINF._404_005fpage_jsp._jspx_meth_sp_005fapplyDecorator_005f0(_404_005fpage_jsp.java:94) at org.apache.jsp.WEB_002dINF._404_005fpage_jsp._jspService(_404_005fpage_jsp.java:67) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:364) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:285) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.co
My Own stack for all package and global result
Hi everybody, my struts.xml is modularized and consists of several xml module files. I have defined a new stack in one of the module include files. /user/loginForm.action /exception.jsp Now each package to use this stack, they need to include these lines. Question1: Is there a way, I define this somewhere and have the packages extend "secure-stack" (and not "struts-default")? If the main struts.xml extend this, will the included files have this stack as default? Question2: Can i have a global "login" result so it can be referred from all packages. As i understand, a result is global only inside the package in which its defined. Thanks a lot Jay -- View this message in context: http://www.nabble.com/My-Own-stack-for-all-package-and-global-result-tp21615829p21615829.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Dojo and TabbedPanel in Internet Explorer 7
I'm using Struts-2.0.11.1 in Dev-Mode. The Dojo Head is also in Debug Mode. I have a tabbedPanel with one dynamic tab (for the purposes of this question). In FireFox-2.0.X, the tab loads properly. In Internet Explorer-7.0, the tab does not load properly. I've included the Dojo Debug statements for both browsers. Any ideas? Just a side note: the page loads properly if I hold Ctrl and "force" a refresh of the same page. Dojo Debug Statements for FF2 - expected debug output == DEBUG: DEPRECATED: dojo.style replaced by dojo.html.style -- will be removed in version: 0.5 DEBUG: DEPRECATED: dojo.animation.AnimationEvent is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.animation.Animation is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.animation.AnimationSequence is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.Animation.* is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.graphics.color.Color is now dojo.gfx.color.Color. 0.5 DEBUG: [message] Listening to msg_update to refresh DEBUG: DEPRECATED: selectedTab deprecated, use selectedChild instead, will be removed in 0.5 DEBUG: dojo.widget.Parse: error:TypeError: page has no properties DEBUG: widget ID collision on ID: subjectPanel == Dojo Debug Statements for IE7 - unexpected debug output == DEBUG: failed loading /appraiser/struts/dojo/src/widget/Manager.js with error: [TypeError: '__clobberAttrs__' is null or not an object] DEBUG: failed loading /appraiser/struts/dojo/src/widget/PageContainer.js with error: [TypeError: 'dojo.widget.manager' is null or not an object] DEBUG: failed loading /appraiser/struts/dojo/src/widget/TabContainer.js with error: [TypeError: 'dojo.widget.manager' is null or not an object] DEBUG: failed loading /appraiser/struts/dojo/src/widget/ContentPane.js with error: [TypeError: 'dojo.widget.manager' is null or not an object] DEBUG: failed loading /appraiser/struts/dojo/src/widget/LinkPane.js with error: [TypeError: 'dojo.widget.manager' is null or not an object] DEBUG: failed loading /appraiser/struts/dojo/src/widget/PopupContainer.js with error: [TypeError: 'dojo.widget.manager' is null or not an object] DEBUG: failed loading /appraiser/struts/dojo/src/widget/Tooltip.js with error: [TypeError: 'dojo.widget.manager' is null or not an object] DEBUG: DEPRECATED: dojo.style replaced by dojo.html.style -- will be removed in version: 0.5 DEBUG: DEPRECATED: dojo.animation.AnimationEvent is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.animation.Animation is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.animation.AnimationSequence is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.Animation.* is slated for removal in 0.5; use dojo.lfx.* instead. 0.5 DEBUG: DEPRECATED: dojo.graphics.color.Color is now dojo.gfx.color.Color. 0.5 DEBUG: dojo.widget.Parse: error:[object Error] DEBUG: dojo.widget.Parse: error:[object Error] DEBUG: dojo.widget.Parse: error:[object Error] == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display the Image from the Database
Vaani, try the Stream result type - http://struts.apache.org/2.x/docs/stream-result.html --- Vaani <[EMAIL PROTECTED]> wrote: > > Hi i am new to struts... > > how to display the created image from database.i got the image in byte > array format. can any one tell me > how to convert the byte array format into image format and display it using > struts. > > Thanks in Advance > > With Regards > vani - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel in Struts2
OK User error: I had the struts.serve.static property set to false, and did not actually have all the required files copied over. All, thanks for your quick responses. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel in Struts2
I do have debug on. No errors or config warnings are coming up. --- Dave Newton <[EMAIL PROTECTED]> wrote: > Do you have Dojo debugging turned on in your tag? > > Do you have an tag, I guess? I don't recall having had > any major issues with it, but it was awhile ago I used it. > > Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel in Struts2
I saw this page, but no real help - http://struts.apache.org/2.0.11/docs/ajax-tags.html#AjaxTags-tabbedPanelTag Any help would be greatly appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TabbedPanel in Struts2
No, not at all. I get Dojo-ififed tags, but they have no label or anything else, for that matter. They are just divs with the content of the tab, but no label. I will list the JSP content I'm using, and the resulting output. The JSP code == <%@ taglib uri="/struts-tags" prefix="st" %> One Two == The output == dojo.require("dojo.widget.TabContainer"); dojo.require("dojo.widget.LinkPane"); dojo.require("dojo.widget.ContentPane"); One Two == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TabbedPanel in Struts2
I was using tabbedPanel, with the Ajax theme in WebWork-2; no problem. After my upgrade to Struts-2.0.11, I no longer get decorated tabs. The ajax recipes were not as helpful as I would have liked (http://struts.apache.org/2.x/docs/ajax-and-javascript-recipes.html#AjaxandJavaScriptRecipes-TabbedPanel). Has anyone been able to use the ajax tabbedPanel in Struts-2.0.6+ (pre-2.1.x)? Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionValidatorManagerFactory
While I used WebWork-2, and the XWork associated with it, I was able to programmatically retrieve action validation using the ActionValidatorManagerFactory. Now, it seems this class was removed. Any suggestions on how to programmatically get a ValidatorFactory instance? Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Email Notifications and Struts
If you want the Action to return immediately, and have the emails sent asynchronously, then JMS is a definite option. Another option is the JDK's Timer functionality (http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html). --- jwynacht <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a Struts action that, when invoked, needs to send email to about 50 > people. From what I've read in this forum it seems I should use JMS for > this. Any suggestions on which route to take? I'm running Tomcat 5.5.20. Any > pointers? Is this overkill? Better solutions? > > Thanks, > > Jon > -- > View this message in context: > http://www.nabble.com/Email-Notifications-and-Struts-tp16992809p16992809.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] > > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionValidatorManagerFactory
While I used WebWork-2, and the XWork associated with it, I was able to programmatically retrieve action validation using the ActionValidatorManagerFactory. Now, it seems this class was removed. Any suggestions on how to programmatically get a ValidatorFactory instance? Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issue with forwarding to another .do
Hi, I hope every one is fine. Iam forwarding a 'login.do' to another path like this PROBLEM: when i see the jsp file the url in address bar contain login.do at the end, but i want defaultPage.do instead of login.do... The lesson i get from this is that struts does not consider the chain of .do in url, it only shows first .do iin url. Please help me to modify this property of struts. thanks -- View this message in context: http://www.nabble.com/Issue-with-forwarding-to-another-.do-tf3307243.html#a9199220 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: problem in
Thanks alot, it solved my problem Jay Puneet Lakhina wrote: > > On 10/6/06, Jay <[EMAIL PROTECTED]> wrote: >> >> >> Hi, iam using struts with tmocat 5. my struts-cofig.xml is like this one >> >> > path="/user" >> type="com.ufnasoft.cms.processaction.ProcessUser" >> name="createFolder" >> >> scope="request"> >> >> >> >> and form bean tag is >> >> >> Action class is as following: >> >> CreateFolderForm folders = (CreateFolderForm) form; >> File dir = new File("../users"); >> ArrayList dirList=new java.util.ArrayList(); >> String[] subdir = dir.list(); >> if (subdir == null) { >> // Either dir does not exist or is not a directory >> System.out.println("Either dir does not exist or is not a directory"); >> } else { >> System.out.println("Gotcha!!"); >> for(int i=0; i> { >> folders.setFolder(subdir); >> dirList.add(subdir); >> } >> } >> >> request.setAttribute("dirList", dirList); >> return mapping.findForward("success"); >> >> and ActionForm is >> >> String folder; >> String newFolder; >> /** >> * @return Returns the newFolder. >> */ >> public String getNewFolder() { >> return newFolder; >> } >> /** >> * @param newFolder The newFolder to set. >> */ >> public void setNewFolder(String newFolder) { >> this.newFolder = newFolder; >> } >> /** >> * @return Returns the folder. >> */ >> public String getFolder() { >> return folder; >> } >> /** >> * @param folder The folder to set. >> */ >> public void setFolder(String folder) { >> this.folder = folder; >> } >> >> from here problem starts, in my jsp file i try to get the values in >> select >> tag as >> > > > The above line is what is causing the problem. Its not able to find a > getter > method for this folder property. Check whether you have the proper action > in > your tag. > > >> >> >> but i get the error, as following >> 2006-10-06 15:42:49 StandardWrapperValve[action]: Servlet.service() for >> servlet action threw exception >> javax.servlet.jsp.JspException: No getter method available for property >> folder for bean under name org.apache.struts.taglib.html.BEAN >> at >> org.apache.struts.taglib.html.SelectTag.calculateMatchValues( >> SelectTag.java:285) >> at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:202) >> at >> org.apache.jsp.users.newuser_jsp._jspx_meth_html_select_0 >> (newuser_jsp.java:177) >> at >> org.apache.jsp.users.newuser_jsp._jspx_meth_html_form_0 >> (newuser_jsp.java:144) >> at >> org.apache.jsp.users.newuser_jsp._jspx_meth_html_html_0 >> (newuser_jsp.java:109) >> at org.apache.jsp.users.newuser_jsp._jspService(newuser_jsp.java:74) >> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> at >> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java >> :324) >> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java >> :292) >> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> at >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( >> ApplicationFilterChain.java:237) >> at >> org.apache.catalina.core.ApplicationFilterChain.doFilter( >> ApplicationFilterChain.java:157) >> at >> org.apache.catalina.core.ApplicationDispatcher.invoke( >> ApplicationDispatcher.java:704) >> at >> org.apache.catalina.core.ApplicationDispatcher.processRequest( >> ApplicationDispatcher.java:474) >> at >> org.apache.catalina.core.ApplicationDispatcher.doForward( >> ApplicationDispatcher.java:409) >> at >> org.apache.catalina.core.ApplicationDispatcher.forward( >> ApplicationDispatcher.java:312) >> at >> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java >> :1056) >> at >> org.apache.struts.tiles.TilesRequestProcessor.doForward( >> TilesRequestProcessor.java:261) >> at >> org.apache.struts.action.RequestProcessor.processForwardConfig( >> RequestProcessor.java:388) >> at >> org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig( >> TilesRequestProcessor.java:316) >> at >&g
problem in
Hi, iam using struts with tmocat 5. my struts-cofig.xml is like this one and form bean tag is Action class is as following: CreateFolderForm folders = (CreateFolderForm) form; File dir = new File("../users"); ArrayList dirList=new java.util.ArrayList(); String[] subdir = dir.list(); if (subdir == null) { // Either dir does not exist or is not a directory System.out.println("Either dir does not exist or is not a directory"); } else { System.out.println("Gotcha!!"); for(int i=0; i but i get the error, as following 2006-10-06 15:42:49 StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.jsp.JspException: No getter method available for property folder for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:285) at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:202) at org.apache.jsp.users.newuser_jsp._jspx_meth_html_select_0(newuser_jsp.java:177) at org.apache.jsp.users.newuser_jsp._jspx_meth_html_form_0(newuser_jsp.java:144) at org.apache.jsp.users.newuser_jsp._jspx_meth_html_html_0(newuser_jsp.java:109) at org.apache.jsp.users.newuser_jsp._jspService(newuser_jsp.java:74) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:316) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) plz help me to get out of this -- View this message in context: http://www.nabble.com/problem-in-%3Chtml%3Aoptions%3E-tf2394751.html#a6677038 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
in a string
Hi all, I want to store the value of value in a string. Or in other words, i have a variable of string data type. i want to set its value equal to value of String variable = ; any idea to do this thanks -- View this message in context: http://www.nabble.com/%3Cbean%3Awrite%3E-in-a-string-tf2343436.html#a6522856 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: has struts reached the saturation
+1 Jay | Jay Burgess [Vertical Technology Group] | http://www.vtgroup.com/ -Original Message- From: Asad Habib [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 1:28 PM To: Struts Users Mailing List Subject: Re: has struts reached the saturation Hello everyone. This thread has gone on way too long and quite honestly most of us are just basic Struts users who are still learning the framework. Various points have been made and all have their merits. Is it worth it to butcher each other over petty differences or to use our time wisely to make positive contributions? Thanks for listening. - Asad On Tue, 21 Mar 2006, Dakota Jack wrote: > This has been a thread that has covered about 200 different emails from > pillar to post, with the gurus and the outcasts all included. And you wish > it would go away, you think it is a disservice. The present committers and > their way of thinking or not thinking have in effect killed Struts and you > think this is just "spinning"? If you keep thinking like this, you too will > be a committer soon enough. > > > > On 3/21/06, Dave Newton <[EMAIL PROTECTED]> wrote: > >> I _do_ believe that >> this thread, in some ways, is doing a disservice to the Struts >> "umbrella". It's been disheartening in many ways, and I wish it would go >> away because for the most part we've been spinning over philosophical >> issues (perhaps we need a Struts and/or Jakarta and/or Apache meta-group). > > > > > > > > -- > "You can lead a horse to water but you cannot make it float on its back." > ~Dakota Jack~ > - 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]
help - scriplet interpretation in nested tag
In: <%=ind%> is not getting replaced with its value when I see the html source in the browser. How to make the <%=ind%> interpreted by the jsp engine? Thank you and have a great day... --Jay Jakilinki Verizon Wireless IT PFS System 908-306-7721 [EMAIL PROTECTED] The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you.
Struts html taglib and javascript
Hi I am trying to put dynamic javascript in html:text tag. I have a checkbox next to a name (names are backed up by a list) and whenever the user changes the name the checkbox next to the name is automatically checked. javascript: document.someform.chkbox[<%=indexId property in nested:iterate tag%>].checked=true; but whenever I put jsp expression in the onchange attribute of the html:text, it never gets parsed. How to get over it? To solve, i used the plain old html input tag but I would really like to use the struts html:text tag... Please help... The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you.
error-page design question
Our app currently throws a custom UnavailableException from a couple of places inside our Action handlers when the app is "offline" doing end-of-day processing. We thought we had this situation covered from the UI perspective, as we'd configured the following mapping in our web.xml: UnavailableException /unavailable.jsp However, our end-of-day processing now shuts down our web server, which causes the webapp to unload, and the unavailable.jsp to become inaccessible. The problem I've got is that if the user tries to access the webapp between the time it has started unloading and the time the web server goes down, instead of our unavailable.jsp, the user sees an ugly HTTP 500 error and a stack trace. What I'd like to do, as it affects the smallest amount of code, is something like the following: UnavailableException 503 That is, if the container catches the UnavailableException, generate a standard HTTP 503 error back to the browser. Is something like this possible to do in web.xml? (I don't see it in the DTD.) Or is my only option to catch the exception myself and do something like HttpServletResponse.sendError(SC_SERVICE_UNAVAILABLE) in the code? Thanks. Jay | Jay Burgess [Vertical Technology Group] | http://www.vtgroup.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forcing URL Rewriting over Cookies in an existing application.
Hi all, I have an application (Sun ONE 6.1 sp2, Struts 1.02 (I guess)) that uses Cookies for session handling and has been so for around 3/4 years. I have a requirement where I want to force URL Rewriting even if the browser supports cookies. Please help! Jay Broadband interface (RIA) + mail box saftey = http://Struts_User_List.roomity.com *Your* clubs, no sign up to read, ad supported; try broadband internet.
Conditional validation
I have a form field on my JSP that's being conditionally displayed based on the status of servlet context attribute: I'm using the Struts validator to validate this field: ... Obviously, I only want the client-side Javascript validations to fire if the field is present. Is there a way in VALIDATION.XML to conditionally include/exclude the Javascript validations, so they don't fire if the field isn't present? (They're currently firing and failing, stopping the other client-side validations as well.) Thanks. Jay | Vertical Technology Group | http://www.vtgroup.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.NullPointerException at org.apache.struts.action.RequestProcessor.getServletContext(RequestProcessor.java:1136)
This isn't really an answer to your question, but if I'm looking at the correct line of source (see below), it may be that "servlet" is null, hence the NPE: protected ServletContext getServletContext() { return (servlet.getServletContext()); } Jay | Jay Burgess [Vertical Technology Group] | "Essential Technology Links" | http://www.vtgroup.com/ -Original Message- From: Malik, Yousuff M [mailto:[EMAIL PROTECTED] Sent: Friday, October 14, 2005 10:11 AM To: Struts Users Mailing List Subject: RE: java.lang.NullPointerException at org.apache.struts.action.RequestProcessor.getServletContext(RequestProcessor.java:1136) I just wanted to follow up and see if any of you had seen this exception before. Basically, how can the servlet context be null?? -Original Message- From: Malik, Yousuff M Sent: Wednesday, October 12, 2005 4:52 PM To: user@struts.apache.org Subject: java.lang.NullPointerException at org.apache.struts.action.RequestProcessor.getServletContext(RequestProce ssor.java:1136) I need help. I am getting the following exception when I try to login in my web application I am using struts 1.1 and weblogic 7.0. Below is the stack trace <101017> <[ServletContext(id=130706 4407,name=web,context-path=/seal)] Root cause of ServletException java.lang.NullPointerException at org.apache.struts.action.RequestProcessor.getServletContext(RequestPr ocessor.java:1136) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor. java:1062) at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques tProcessor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 2) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:1075) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:418) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:306) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:5533) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic eManager.java:685) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:3164) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:2506) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:238) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:214) > <> <101017> <[ServletConte xt(id=1307064407,name=web,context-path=/seal)] Root cause of ServletException> java.lang.NullPointerException at org.apache.struts.action.RequestProcessor.getServletContext(RequestPr ocessor.java:1136) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor. java:1062) at org.apache.struts.action.RequestProcessor.processForwardConfig(Reques tProcessor.java:455) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja va:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148 2) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run (ServletStubImpl.java:1075) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:418) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:306) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio n.run(WebAppServletContext.java:5533) at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic eManager.java:685) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:3164) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:2506) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:238) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:214) <101002> <[ServletContext(id=130706 4407,name=web,context-path=/seal)] Could not deserialize context attribute java.io.NotSerializableException: org.apache.struts.action.RequestProcessor at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java(Compi led Code)) at java.io.ObjectOutputS
Re: debugging tomcat with eclipse
Thanks a lot. I had to add the source to the path. Regards, Jay On 8/28/05, zheng chengbao <[EMAIL PROTECTED]> wrote: > > i'am using myeclipse,it is very easy to debug > > 2005/8/27, Jay Sheth <[EMAIL PROTECTED]>: > > > > HI, > > > > It would be great if you could give some hints on how to debug tomcat > > with eclipse. > > > > I have tried the following: > > > > * Running tomcat with option jpda start and then running a remote java > > application to debug but doesn't work. > > * Running the tomcat application with start option. When I run the > > webapp, the break point is caught in the code, however it doesn't let > > me evaluate expression/ see the details of variable, saying "The > > selected stack frame must be associated with a java project in the > > workspace to perform an evaluation". > > > > > > The project is already in eclipse. We are copying the jar file to the > > tomcat lib folder and then running the tomcat app. > > > > Any help / pointers would be useful. > > > > Thanks, > > Jay > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >
debugging tomcat with eclipse
HI, It would be great if you could give some hints on how to debug tomcat with eclipse. I have tried the following: * Running tomcat with option jpda start and then running a remote java application to debug but doesn't work. * Running the tomcat application with start option. When I run the webapp, the break point is caught in the code, however it doesn't let me evaluate expression/ see the details of variable, saying "The selected stack frame must be associated with a java project in the workspace to perform an evaluation". The project is already in eclipse. We are copying the jar file to the tomcat lib folder and then running the tomcat app. Any help / pointers would be useful. Thanks, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing variables using logic:iterate
Thanks a lot. Got it. As you said, the naming conventions were followed, but I made a typo in the property attribute. Sorry for the trouble. Jay On 8/16/05, Dave Newton <[EMAIL PROTECTED]> wrote: > Jay Sheth wrote: > > >HI, > >When i do : > > > > > > > > > >it says not getter for employeeName in bean rtsummary. > >'recurringTaskSummary' is a vector and not a bean. > >I tried using the attribute type="SpRecurringTaskSummary" but got the > >same error. > > > >I think I am missing the big picture or something basic in logic:iterate. > > > > > (1) The 'type' attribute expects a full classname, but that's probably > not relevant here. > (2) What he was saying was that the Vector's objects must follow > JavaBean naming conventions. > > Dave > > > > - > 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: accessing variables using logic:iterate
HI, When i do : it says not getter for employeeName in bean rtsummary. 'recurringTaskSummary' is a vector and not a bean. I tried using the attribute type="SpRecurringTaskSummary" but got the same error. I think I am missing the big picture or something basic in logic:iterate. Thanks, Jay On 8/16/05, Stéphane Zuckerman <[EMAIL PROTECTED]> wrote: > Hi Jay, > > session.setAttribute("recurringTaskSummary",v_recurringTaskSummary), > > > SpRecurringTaskSummary [...] has certain variables such as > > EmployeeName, EmployeeRef etc. > > > > I am using logic:iterate as follows: > > > > > > > > > > The output is name of objects. However I want to somehow access the > > variables employeename, employeeref etc. How do I do that ? > > Just do something like : > > > > > > Don't forget to use the bean naming conventions, though. > > -- > Stéphane ZUCKERMAN > > - > 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]
accessing variables using logic:iterate
Hi, Currently I have a action class which does session.setAttribute("recurringTaskSummary",v_recurringTaskSummary), where v_recurringTaskSummary is a vector of type SpRecurringTaskSummary which has certain variables such as EmployeeName, EmployeeRef etc. I am using logic:iterate as follows: The output is name of objects. However I want to somehow access the variables employeename, employeeref etc. How do I do that ? Thanks, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validate() not called haunts
well, I have given up on calling the validate(), I have checked method sign etc... now i am renaming the validate to another method name e.g. validate_fields. I am calling the validate_fields from action. and using addErrors in action to add messages to jsp. Thanks, Jay On 8/10/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > That's right!!! I mean about the method signature!! I meant to write that > to you and then something else intervened and i forgot.. Yes, so do that > and let us know..:) > > Geeta > > "Duane Rosengartner" <[EMAIL PROTECTED]> wrote on 08/10/2005 > 02:51:42 PM: > > > >> p. Now i have got the debugging working. But > > Since debugging is working, try catching a breakpoint where validate is > > being called, then step-into... > > My best guess is the method signatures need to be verified. INO, are you > > overridding validate or overloading? You may be invoking the superclass > > validate instead of the intended forms' validate. If all else fails, > > place a breakpoint/sys.out in Struts' ActionForm.validate to see if it's > > getting there. > > > > Happy debugging, > > Duane > > > > -Original Message- > > From: Jay Sheth [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, August 10, 2005 9:23 AM > > To: Struts Users Mailing List > > Subject: validate() not called haunts > > > > Hi, > > Thanks for all the help. Now i have got the debugging working. But still > > the problem remains, validate() not being called. I tried all > > combinations...I made a simple action and form without any business > > logic etc...but i dont understand why validate method is being called in > > only a single form and not being called for any other forms. > > > > Most weird error. > > > > Even if I call validate from the corresponding action, it does not get > > called. However if I rename the validate method by another method e..g > > update then I can call the update method from action. > > > > Is there a way that the action errors created can be shown as error by > > jsp page ? > > > > Heres the code ; > > **action > > form.update(mapping,request); // form.validate() doesnt get called so i > > renamed > > to update() > > > > **form > > public ActionErrors update(ActionMapping mapping, ServletRequest > > request) { > > super.validate(mapping,servlet); > > errors = new ActionErrors(); > > if (nullOrBlank(m_location)) { > > errors.add("Location",new > > ActionError("errors.location.required")); > > } > > return new ActionErrors(); > > } > > > > So basically the action class can get the errors, but how should i > > display that errors on jsp (This is all because validate() not being > > called). > > > > Jay > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. > > > > > > > CONFIDENTIALITY NOTICE:This email is intended solely for the person > > or entity to which it is addressed and may contain confidential > > and/or protected health information. Any duplication, > > dissemination, action taken in reliance upon, or other use of this > > information by persons or entities other than the intended recipient > > is prohibited and may violate applicable laws. If this email has > > been received in error, please notify the sender and delete the > > information from your system. The views expressed in this email are > > those of the sender and may not necessarily represent the views of > > IntelliCare. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validate() finally called !!!!!!!
Hi, Thanks for all the help. Any1 wont believe what a silly mistake. I forgot to add the tag in the jsp page. I found out by when reading doc for the addErrors(). Thanks once again. Jay On 8/10/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Gareth Evans <[EMAIL PROTECTED]> wrote on 08/10/2005 10:28:31 AM: > > > You could manually set the errors in the page within your action > > with the method > > > > addErrors( request , form.update(mapping,request) ); > > > > the addErrors method is already defined in the class Action. > > It is saveErrors(request,..etc. isn't it? > Also, I think you're supposed to ActionMessages instead of ActionErrors.. > > Geeta > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validate() not called haunts
Hi, Thanks for all the help. Now i have got the debugging working. But still the problem remains, validate() not being called. I tried all combinations...I made a simple action and form without any business logic etc...but i dont understand why validate method is being called in only a single form and not being called for any other forms. Most weird error. Even if I call validate from the corresponding action, it does not get called. However if I rename the validate method by another method e..g update then I can call the update method from action. Is there a way that the action errors created can be shown as error by jsp page ? Heres the code ; **action form.update(mapping,request); // form.validate() doesnt get called so i renamed to update() **form public ActionErrors update(ActionMapping mapping, ServletRequest request) { super.validate(mapping,servlet); errors = new ActionErrors(); if (nullOrBlank(m_location)) { errors.add("Location",new ActionError("errors.location.required")); } return new ActionErrors(); } So basically the action class can get the errors, but how should i display that errors on jsp (This is all because validate() not being called). Jay On 8/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > oh ok I see where you are coming from.. I didn't know about this remote > debugging thing so it's good info..:) However, I didn't think the original > poster had this situation at all.. or maybe i grossly > misunderstood...(been known to happen..;)) > > > > > Ed Griebel <[EMAIL PROTECTED]> > 08/09/2005 01:43 PM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List > cc > > Subject > {Spam?} Re: {Spam?} Re: {Spam?} Re: {Spam?} Re: {Spam?} validate() not > called > > > > > > > No, not at all, it doesn't matter where tomcat is started from. As > long as tomcat was started with JDWP debugging, you can connect up > with any recent java debugger. Your tomcat can be in China and your > debugging session in NYC, it just doesn't matter, and it certainly > doesn't have to be in the same JVM. > > Try googling for JDWP and/or JPDA, or see > http://java.sun.com/products/jpda/ or > http://jakarta.apache.org/tomcat/faq/development.html > > -ed > > On 8/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Well, not only that, if you want eclipse to play nice with tomcat (and > > have eclipse obey break points and what not), then you in fact start > > tomcat from within eclipse, right? I have been doing this for a while > now > > so I don't see what the problem could be..? > > > > Would something like this link help: > > > http://plato.acadiau.ca/courses/comp/dsilver/2513/EclipseAndTomcatTutorial/ > > > > > Geeta > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > CONFIDENTIALITY NOTICE:This email is intended solely for the person or > entity to which it is addressed and may contain confidential and/or > protected health information. Any duplication, dissemination, action > taken in reliance upon, or other use of this information by persons or > entities other than the intended recipient is prohibited and may violate > applicable laws. If this email has been received in error, please notify > the sender and delete the information from your system. The views > expressed in this email are those of the sender and may not necessarily > represent the views of IntelliCare. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: {Spam?} Re: {Spam?} Re: {Spam?} validate() not called
HI, I have a problem here too. I dont understand how to configure this for tomcat5.5.9 which uses the UI for running it. The link which you mentioned has remedy for older tomcat, which uses files for configuration. Any help would be great. Jay On 8/8/05, Ed Griebel <[EMAIL PROTECTED]> wrote: > You don't need to have "tomcat work with eclipse" to debug action > classes. All you need is to make changes to the tomcat startup file to > enable JDWP debugging on a socket, and then tell eclipse to start > debugging at the socket and hostname if on a different host or > localhost if same box. Set a breakpoint in your project's source, and > you'll be all set. > > see the first few links here: http://www.google.com/search?q=xrunjdwp+tomcat > > -ed > > On 8/8/05, Jay Sheth <[EMAIL PROTECTED]> wrote: > > I cannot do that, since the 2 forms are having different fields. > > > > Somehow the tomcat 5.5.9 doesnt work with eclipse for my project. I am > > using ui to start tomcat. > > > > thanks anyways. > > > > Jay > > > > On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Do you use an IDE for development? Like eclipse or something? If you > > > don't, I would suggest you do because then you could set breakpoints and > > > debug that way.. System.out.printlns aren't the best way to debug - as you > > > are probably finding out..:) > > > > > > One more thing you could do is the following: change the > > > MaintainRecurringTasksPageForm in struts-config.xml to also point to > > > tasks.form.UpdateOverridePageForm. Restart to ensure you change "took" and > > > try again. Do you hit the validate method now? > > > > > > > > > > > > > > > Jay Sheth <[EMAIL PROTECTED]> > > > 08/08/2005 04:12 PM > > > Please respond to > > > "Struts Users Mailing List" > > > > > > > > > To > > > Struts Users Mailing List > > > cc > > > > > > Subject > > > {Spam?} Re: {Spam?} Re: {Spam?} validate() not called > > > > > > > > > > > > > > > > > > > > > checked that... > > > > > name="MaintainRecurringTasksPageForm" > > > type="tasks.form.MaintainRecurringTasksPageForm"/> > > > > > > > > type="tasks.form.UpdateOverridePageForm"/> > > > > > > Any other hints ? Is there a way to debug or something...? > > > > > > Just one more thing to tell...I have mapped the form for > > > updateoverridepageform in validation.xml but not mapped > > > maintain**form. Even if i map that doesnt help... > > > > > > I think there is some other mistake...but hard to find...any other > > > hints would help. > > > > > > Jay > > > > > > > > > On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Hi Jay: > > > > > > > > So the form beans you are using in both cases are different. So are you > > > > sure these two form bean names are mapped to the correct classes in your > > > > struts-config.xml? > > > > > > > > i.e. check what > > > > > name="MaintainRecurringTasksPageForm".. map to and see if you haven't > > > made > > > > a mistake there.. > > > > > > > > hth, > > > > Geeta > > > > > > > > > > > > > > > > > > > > Jay Sheth <[EMAIL PROTECTED]> > > > > 08/08/2005 03:57 PM > > > > Please respond to > > > > "Struts Users Mailing List" > > > > > > > > > > > > To > > > > Struts Users Mailing List > > > > cc > > > > > > > > Subject > > > > {Spam?} Re: {Spam?} validate() not called > > > > > > > > > > > > > > > > > > > > > > > > > > > > I am using the system.out. in both classes validate() and checking it > > > out. > > > > > > > > The working codes struts config & class: > > > > > > > > > > >path="/updateOverride" > > > >type="tasks.action.UpdateOverridePageAction" > > > >scope="request&
Re: {Spam?} Re: {Spam?} Re: {Spam?} validate() not called
I cannot do that, since the 2 forms are having different fields. Somehow the tomcat 5.5.9 doesnt work with eclipse for my project. I am using ui to start tomcat. thanks anyways. Jay On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Do you use an IDE for development? Like eclipse or something? If you > don't, I would suggest you do because then you could set breakpoints and > debug that way.. System.out.printlns aren't the best way to debug - as you > are probably finding out..:) > > One more thing you could do is the following: change the > MaintainRecurringTasksPageForm in struts-config.xml to also point to > tasks.form.UpdateOverridePageForm. Restart to ensure you change "took" and > try again. Do you hit the validate method now? > > > > > Jay Sheth <[EMAIL PROTECTED]> > 08/08/2005 04:12 PM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List > cc > > Subject > {Spam?} Re: {Spam?} Re: {Spam?} validate() not called > > > > > > > checked that... > name="MaintainRecurringTasksPageForm" > type="tasks.form.MaintainRecurringTasksPageForm"/> > > type="tasks.form.UpdateOverridePageForm"/> > > Any other hints ? Is there a way to debug or something...? > > Just one more thing to tell...I have mapped the form for > updateoverridepageform in validation.xml but not mapped > maintain**form. Even if i map that doesnt help... > > I think there is some other mistake...but hard to find...any other > hints would help. > > Jay > > > On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Jay: > > > > So the form beans you are using in both cases are different. So are you > > sure these two form bean names are mapped to the correct classes in your > > struts-config.xml? > > > > i.e. check what > name="MaintainRecurringTasksPageForm".. map to and see if you haven't > made > > a mistake there.. > > > > hth, > > Geeta > > > > > > > > > > Jay Sheth <[EMAIL PROTECTED]> > > 08/08/2005 03:57 PM > > Please respond to > > "Struts Users Mailing List" > > > > > > To > > Struts Users Mailing List > > cc > > > > Subject > > {Spam?} Re: {Spam?} validate() not called > > > > > > > > > > > > > > I am using the system.out. in both classes validate() and checking it > out. > > > > The working codes struts config & class: > > > > >path="/updateOverride" > >type="tasks.action.UpdateOverridePageAction" > >scope="request" > >name="UpdateOverridePageForm" > >attribute="UpdateOverridePageForm" > >parameter="updateOverride" > >validate="true" > > input="/jsp/tasks/UpdateOverridePage.jsp"> > > > path="/jsp/tasks/UpdateOverridePage.jsp" /> > > > > > > public ActionErrors validate(ActionMapping mapping, HttpServletRequest > > request) { > > // TODO Auto-generated method stub > > ActionErrors errors = > > super.validate(mapping, request); > > System.out.println("validate in update > > called"); > > > > -- This does come in the logs. > > > > The not working code : > > >path="/maintainRecurringTasks" > >type="tasks.action.MaintainRecurringTasksPageAction" > >scope="request" > >name="MaintainRecurringTasksPageForm" > >attribute="MaintainRecurringTasksPageForm" > >parameter="maintainRecurringTasks" > >validate="true"> > > > path="/jsp/tasks/MaintainRecurringTasks.jsp" /> > > > > > > public ActionErrors validate(ActionMapping mapping, ServletRequest > > request) { > > // TODO Auto-generated method stub > > > > ActionErrors errors = > > super.validate(mapping, request); > > System.out.println("validate in main > tain > > called "); > > > &
Re: {Spam?} Re: {Spam?} validate() not called
I have mapped only for the update**form (the one which works)... field[0] edit_delete fieldTest[0] EQUAL fieldValue[0] 2 fieldValue[0] 2 field[0] edit_delete fieldTest[0] EQUAL fieldValue[0] 2 field[0] edit_delete fieldTest[0] EQUAL fieldValue[0] 2 field[0] edit_delete fieldTest[0] EQUAL fieldValue[0] 2 I had also mapped for the maintain...but removed it...it doesnt work even with it... for maintain it was similar with one more field.. Jay On 8/8/05, Dave Newton <[EMAIL PROTECTED]> wrote: > Jay Sheth wrote: > > >Just one more thing to tell...I have mapped the form for > >updateoverridepageform in validation.xml but not mapped > >maintain**form. Even if i map that doesnt help... > > > > > What do the validation.xml configs look like? > > Dave > > > > - > 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: {Spam?} Re: {Spam?} validate() not called
checked that... Any other hints ? Is there a way to debug or something...? Just one more thing to tell...I have mapped the form for updateoverridepageform in validation.xml but not mapped maintain**form. Even if i map that doesnt help... I think there is some other mistake...but hard to find...any other hints would help. Jay On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Jay: > > So the form beans you are using in both cases are different. So are you > sure these two form bean names are mapped to the correct classes in your > struts-config.xml? > > i.e. check what name="MaintainRecurringTasksPageForm".. map to and see if you haven't made > a mistake there.. > > hth, > Geeta > > > > > Jay Sheth <[EMAIL PROTECTED]> > 08/08/2005 03:57 PM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List > cc > > Subject > {Spam?} Re: {Spam?} validate() not called > > > > > > > I am using the system.out. in both classes validate() and checking it out. > > The working codes struts config & class: > > path="/updateOverride" >type="tasks.action.UpdateOverridePageAction" >scope="request" >name="UpdateOverridePageForm" >attribute="UpdateOverridePageForm" >parameter="updateOverride" >validate="true" > input="/jsp/tasks/UpdateOverridePage.jsp"> > path="/jsp/tasks/UpdateOverridePage.jsp" /> > > > public ActionErrors validate(ActionMapping mapping, HttpServletRequest > request) { > // TODO Auto-generated method stub > ActionErrors errors = > super.validate(mapping, request); > System.out.println("validate in update > called"); > > -- This does come in the logs. > > The not working code : > path="/maintainRecurringTasks" >type="tasks.action.MaintainRecurringTasksPageAction" >scope="request" >name="MaintainRecurringTasksPageForm" >attribute="MaintainRecurringTasksPageForm" >parameter="maintainRecurringTasks" >validate="true"> > path="/jsp/tasks/MaintainRecurringTasks.jsp" /> > > > public ActionErrors validate(ActionMapping mapping, ServletRequest > request) { > // TODO Auto-generated method stub > > ActionErrors errors = > super.validate(mapping, request); > System.out.println("validate in main tain > called "); > > ...basically the same. Even though I use > input="/jsp/tasks/MaintainOverridePage.jsp"> it does not help. > Basically some silly mistake which i dont understand. > > Jay > > On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Jay, > > > > So how do you know that validate() isn't being called? Have you placed a > > break point in your validate and execute methods? Can you send us the > > snippets from struts-config.xml for both the classes and tell us which > > works and which doesn't? > > > > Geeta > > > > > > > > > > Jay Sheth <[EMAIL PROTECTED]> > > 08/08/2005 03:31 PM > > Please respond to > > "Struts Users Mailing List" > > > > > > To > > Struts Users Mailing List > > cc > > > > Subject > > {Spam?} validate() not called > > > > > > > > > > > > > > Hi, > > I am trying to use the validate() by extending the > > org.apache.struts.validator.ValidatorForm class. > > > > The problem is that the validate() is being called for one form class > > which I have created, however it is not being called for another > > similar form class. There are no errors which compiling etc...so i > > dont get to know why it is not being called. > > > > Any hints on how to debug as to why it is not called ? > > > > The snippet struts-config.xml is : > > >path="/maintainRecurringTasks" > >type="tasks.action.MaintainRecurringTasksPageAction" > >scope="request" > >name="Main
Re: {Spam?} validate() not called
I am using the system.out. in both classes validate() and checking it out. The working codes struts config & class: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub ActionErrors errors = super.validate(mapping, request); System.out.println("validate in update called"); -- This does come in the logs. The not working code : public ActionErrors validate(ActionMapping mapping, ServletRequest request) { // TODO Auto-generated method stub ActionErrors errors = super.validate(mapping, request); System.out.println("validate in main tain called "); ...basically the same. Even though I use input="/jsp/tasks/MaintainOverridePage.jsp"> it does not help. Basically some silly mistake which i dont understand. Jay On 8/8/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi Jay, > > So how do you know that validate() isn't being called? Have you placed a > break point in your validate and execute methods? Can you send us the > snippets from struts-config.xml for both the classes and tell us which > works and which doesn't? > > Geeta > > > > > Jay Sheth <[EMAIL PROTECTED]> > 08/08/2005 03:31 PM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List > cc > > Subject > {Spam?} validate() not called > > > > > > > Hi, > I am trying to use the validate() by extending the > org.apache.struts.validator.ValidatorForm class. > > The problem is that the validate() is being called for one form class > which I have created, however it is not being called for another > similar form class. There are no errors which compiling etc...so i > dont get to know why it is not being called. > > Any hints on how to debug as to why it is not called ? > > The snippet struts-config.xml is : > path="/maintainRecurringTasks" >type="tasks.action.MaintainRecurringTasksPageAction" >scope="request" >name="MaintainRecurringTasksPageForm" >attribute="MaintainRecurringTasksPageForm" >parameter="maintainRecurringTasks" >validate="true"> > path="/jsp/tasks/MaintainRecurringTasks.jsp" /> > > > Thanks, > > Jay > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > > CONFIDENTIALITY NOTICE:This email is intended solely for the person or > entity to which it is addressed and may contain confidential and/or > protected health information. Any duplication, dissemination, action > taken in reliance upon, or other use of this information by persons or > entities other than the intended recipient is prohibited and may violate > applicable laws. If this email has been received in error, please notify > the sender and delete the information from your system. The views > expressed in this email are those of the sender and may not necessarily > represent the views of IntelliCare. > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validate() not called
Hi, I am trying to use the validate() by extending the org.apache.struts.validator.ValidatorForm class. The problem is that the validate() is being called for one form class which I have created, however it is not being called for another similar form class. There are no errors which compiling etc...so i dont get to know why it is not being called. Any hints on how to debug as to why it is not called ? The snippet struts-config.xml is : Thanks, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: retrieving message from application.resources file
thnks a lot. it worked !!! Jay On 8/8/05, Gareth Evans <[EMAIL PROTECTED]> wrote: > From an Action class you can use: > String dateFormat = getResources( request ).getMessage( "global.format.date" > ); > > Or from anywhere else: > String dateFormat = MessageResources.getMessageResources( > "ApplicationResources" ).getMessage( > "global.format.date" ) > > I'm not sure how well this works with struts modules? > > Gareth > > > Jay Sheth wrote: > > > Hi, > > I need to read a property global.format.date = dd/mm/ in a form > > class (eg logonform.java) from application.properties file. > > > > How do i do tht ? > > > > thanks, > > Jay > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > Gareth Evans > > MSoft eSolutions Limited > Technology Centre > Inward Way > Rossmore Business Park > Ellesmere Port > Cheshire > CH65 3EN > > -- > Tel:+44 (0)870 0100 704 > Fax:+44 (0)870 9010 705 > E-Mail: [EMAIL PROTECTED] > Web:www.msoft.co.uk > > -- > Terms: > Please note that any prices quoted within this e-mail are subject to VAT. > All program details and code described in this e-mail are subject to > copyright (c) of MSoft eSolutions Limited and remain the intellectual > property of MSoft eSolutions Limited. > Any proposal or pricing information contained within this e-mail are > subject to MSoft eSolutions' Terms and Conditions > -- > Disclaimer: > This message is intended only for use of the addressee. If this message > was sent to you in error, please notify the sender and delete this > message. MSoft eSolutions Limited cannot accept responsibility for viruses, > so please scan attachments. Views expressed in this message do not > necessarily reflect those of MSoft eSolutions Limited who will not > necessarily be bound by its contents. > > > - > 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]
retrieving message from application.resources file
Hi, I need to read a property global.format.date = dd/mm/ in a form class (eg logonform.java) from application.properties file. How do i do tht ? thanks, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
retrieving message from application.resources file
Hi, I need to read a property global.format.date = dd/mm/ in a form class (eg logonform.java) from application.properties file. How do i do tht ? thanks, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts validation framework
Yes. It's because the leading zero is saying the numbers are "octal", so 01-07 are valid octals, 08-09 are invalid octals, and 10-12 are valid octals. Jat | Jay Burgess [Vertical Technology Group] | "Essential Technology Links via RSS" | http://www.vtgroup.com/ -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Sivakumar Santharam Sent: Thursday, July 14, 2005 2:07 PM To: user@struts.apache.org Subject: struts validation framework I am trying to restrict a field input value between 1 and 12. The user has to enter like 01 or 02.. thro 12. The validation fails if I enter 08 or 09 and for all other values from 01 thro 07 and 10 thro 12, it works fine. Again the problem is only if I enable javascript validation. Did anybody come across this peculiar behaviour? Any help is appreciated. This is my sample code: minlength 2 maxlength 2 min 1 max 12 - 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: Could someone on the dev team add link to mailing list on Struts site
Damn browser cache... :) Thanks to whoever made the change. Jay | Jay Burgess [Vertical Technology Group] | "Essential Technology Links via RSS" | http://www.vtgroup.com/ -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, May 26, 2005 11:10 AM To: Struts Users Mailing List Subject: Re: Could someone on the dev team add link to mailing list on Struts site From: "Jay Burgess" <[EMAIL PROTECTED]> > I've probably already exceeded my allotment of emails on this issue, but the > point I was trying to make is that the link you're talking about is not > available on the Struts main home page (http://struts.apache.org/index.html). Look again. :) On the home page, under 'Community,' where there used to be only a link to the [broken] archives, now there's a link to the mailing list page. -- Wendy Smoak - 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: Could someone on the dev team add link to mailing list on Struts site
Jeff, I've probably already exceeded my allotment of emails on this issue, but the point I was trying to make is that the link you're talking about is not available on the Struts main home page (http://struts.apache.org/index.html). I'm not aware of too many projects where you've got to hunt to find the mailing list info. And I did try searching for the post Dakota Jack referenced explaining why it was this way, but I never did find it. Jay | Jay Burgess [Vertical Technology Group] | "Essential Technology Links via RSS" | http://www.vtgroup.com/ -Original Message- From: Jeff Beal [mailto:[EMAIL PROTECTED] Sent: Thursday, May 26, 2005 10:16 AM To: Struts Users Mailing List Subject: Re: Could someone on the dev team add link to mailing list on Struts site It looks like they've made it easier than it had been in the past: >From the main menu, click "Mailing Lists" (under the "Community" subheading) Scroll down for links to multiple list archives and subscription information. On 5/25/05, Durham David R Jr Ctr 805 CSPTS/SCE <[EMAIL PROTECTED]> wrote: > > I actually use that one too. But for the first-time Struts user, we > > seem to be making it overly difficult to find, subscribe, and search > > the mailing lists. If Mr. Jack's assertion is correct, then I guess > > I need to go back to the previous discussion he's refering to and > > find out why... > > I found the mailing list stuff by clicking on "Learning" from the home > page and scrolling to "Learning More About Struts" section. That seems > appropriate to me. > > > - Dave > > - > 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: Could someone on the dev team add link to mailing list on Struts site
I actually use that one too. But for the first-time Struts user, we seem to be making it overly difficult to find, subscribe, and search the mailing lists. If Mr. Jack's assertion is correct, then I guess I need to go back to the previous discussion he's refering to and find out why... Jay -Original Message- From: Durham David R Jr Ctr 805 CSPTS/SCE [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 25, 2005 4:30 PM To: Struts Users Mailing List Subject: RE: Could someone on the dev team add link to mailing list on Struts site > Also, the "List Archive" link is broken, so it's doubly annoying > to someone coming in for the first time. I use this one: http://marc.theaimsgroup.com/?l=struts-user - Dave - 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: Could someone on the dev team add link to mailing list on Struts site
I believe the point was that this page is not linked to from the main Struts page (http://struts.apache.org/index.html)? If it is, I can't find it. And I don't understand why, as it's probably one of the first things a new user would look for. Also, the "List Archive" link is broken, so it's doubly annoying to someone coming in for the first time. Jay | Jay Burgess [Vertical Technology Group] | "Essential Technology Links via RSS" | http://www.vtgroup.com/ -Original Message- From: Durham David R Jr Ctr 805 CSPTS/SCE [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 25, 2005 9:54 AM To: Struts Users Mailing List Subject: RE: Could someone on the dev team add link to mailing list on Struts site > You won't believe this, Rick, but they actually make these things > hard to find on purpose. Check the archives if you think I am > kidding. Yeah, you've been quite the jokester so far. http://struts.apache.org/mail.html - Dave - 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 I check what version of struts I have?
Check the manifest.mf in meta-inf Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.1 Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.) Extension-Name: Struts Framework Specification-Title: Struts Framework Specification-Vendor: The Apache Software Foundation Specification-Version: 1.2.4 Implementation-Title: Struts Framework Implementation-Vendor: The Apache Software Foundation Implementation-Vendor-Id: org.apache Implementation-Version: 1.2.4 Class-Path: commons-beanutils.jar commons-collections.jar commons-dig ester.jar commons-logging.jar commons-validator.jar jakarta-oro.jar -Original Message- From: David Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, May 20, 2005 10:38 AM To: Struts Users Mailing List Subject: How to I check what version of struts I have? Is there a file in the struts.jar I can check? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to I check what version of struts I have?
Check the manifest.mf in meta-inf Manifest-Version: 1.0 Ant-Version: Apache Ant 1.6.1 Created-By: 1.4.2_04-b05 (Sun Microsystems Inc.) Extension-Name: Struts Framework Specification-Title: Struts Framework Specification-Vendor: The Apache Software Foundation Specification-Version: 1.2.4 Implementation-Title: Struts Framework Implementation-Vendor: The Apache Software Foundation Implementation-Vendor-Id: org.apache Implementation-Version: 1.2.4 Class-Path: commons-beanutils.jar commons-collections.jar commons-dig ester.jar commons-logging.jar commons-validator.jar jakarta-oro.jar -Original Message- From: David Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, May 20, 2005 10:38 AM To: Struts Users Mailing List Subject: How to I check what version of struts I have? Is there a file in the struts.jar I can check? -- -Dave [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Radio button
I think this write-up from Ted Husted explains it nicely: http://husted.com/struts/tips/016.html Jay | Jay Burgess [Vertical Technology Group] | "Essential Technology Links via RSS" | http://www.vtgroup.com/ -Original Message- From: Neil Meyer [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 10:02 AM To: Struts Users Mailing List Subject: Struts Radio button Hi All, I'm trying to do the following using the struts radio button. Please advise. small medium large I want to use the following but check one specific small medium large Regards Neil -Original Message- From: Vamsee Kanakala [mailto:[EMAIL PROTECTED] Sent: 18 January 2005 01:28 PM To: Struts Users Mailing List Subject: Re: JDBC Driver David Bolsover wrote: >What is wrong with the Microsoft driver? > > > Well, I can actually give a whole lot of reasons. One, it's extremely slow. Two, you can retrieve objects from ResultSet only in a certain order. Three, sometimes it just conks out giving strange errors. If you check for them on the Microsoft website, frequently they say "nothing can be done about it, that's how it was implemented". Thankfully, jTDS saved the day for me. It's fast, stable and implements JDBC 3. Vamsee. - 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: Meta Information in Action Form
We too use a PlugIn, and I'm now wondering based on Craig's explanation whether there are any advantages/disadvantages of one technique over the other? Jay Vertical Technology Group http://www.vtgroup.com/ -Original Message- From: Joe Germuska [mailto:[EMAIL PROTECTED] Sent: Friday, April 08, 2005 2:35 PM To: Struts Users Mailing List Subject: Re: Meta Information in Action Form Matt's general approach is the one we use also, except instead of ServletListeners and the database, we use the DigestingPlugIn, which produces objects based on XML and can put them in the application context. There's an example in the mailreader app which you should be able to just about cut-and-paste, with the exception of changing the XML which represents your menu items. Joe At 12:12 PM -0600 4/8/05, Matt Raible wrote: >As far as drop-downs, I typically populate all (or most) of mine >from a database at application startup using a ServletListener. I >stuff these into the application scope as Lists of LabelValue beans. >Then I code up a ReloadAction that can call my Listener to reload >them all. I've found this useful so I don't have to restart the app >if data changes. >If I have edit screens for the drop-downs, I'll replace the List in >application scope after saving. -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex - 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]
Two Data Base Connections in struts-config.xml ?
Hi, Is it possible to connect to two databases from a struts application. ie basically is it possible two add two database connectivity in struts-config.xml? Regards, Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using XML in struts
Hi all, How can i read XML files using struts? is this possible? Can any one provide a link or give an example for reading XML files using struts? :-) Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help : paging in struts view
Hi all, How can we read XML files using struts? is this possible. Can any one povide a link or give an example for reading XML files using struts? :-) Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding JBOSS
Hi, i am downloading JBOSS from the below link as per ur instructions. http://ovh.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.1RC1.zip is this ok for me . or should i download some other links. I can see lots of links for downloading JBOSS. jay - Original Message - From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" Sent: Thursday, January 13, 2005 9:21 PM Subject: RE: Regarding JBOSS > > I need to download JBOSS 4.0.1 for windows. Where can i get > > this ? What should i download? I can see lots of downloads > > for jboss. ie jboss4.0.1 RC1.zip, jboss4.0.1 RC2.zip.. etc. > > http://www.jboss.org/downloads/index > > JBoss Application Server > > > -- > Tim Slattery > [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: Regarding JBOSS
Thanks :-) Jay - Original Message - From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" Sent: Thursday, January 13, 2005 9:21 PM Subject: RE: Regarding JBOSS > > I need to download JBOSS 4.0.1 for windows. Where can i get > > this ? What should i download? I can see lots of downloads > > for jboss. ie jboss4.0.1 RC1.zip, jboss4.0.1 RC2.zip.. etc. > > http://www.jboss.org/downloads/index > > JBoss Application Server > > > -- > Tim Slattery > [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]
Regarding JBOSS
Hi all, I need to download JBOSS 4.0.1 for windows. Where can i get this ? What should i download? I can see lots of downloads for jboss. ie jboss4.0.1 RC1.zip, jboss4.0.1 RC2.zip.. etc. Which one should i download?? :-) Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts and Tomcat4.0.4
Hi, What is ur systems configuration ? Does it have enough free space ? What about swap space ? How much swap have you allocated at the time of installing OS ? Do delete the files in temporary directory and also clean up the log files. This may help. Regards, jAY. - Original Message - From: "Nadia Kunkov" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" ; "Jay Chandran" <[EMAIL PROTECTED]> Sent: Thursday, December 30, 2004 7:33 PM Subject: RE: struts and Tomcat4.0.4 Thanks, Connections were a part of my problem actually. But that got fixed and now the system hangs after I make changes to JSPs multiple times. Any ideas why is that? Thanks for your help. NK -Original Message- From: Jay Chandran [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 11:31 PM To: Struts Users Mailing List Subject: Re: struts and Tomcat4.0.4 if the problem is after executing the sql statement then u might not closed the connection properly. its always good to close the resultset, statement and connection. If ur action file does not close the sql connection the system hangs. - Original Message - From: "Nadia Kunkov" <[EMAIL PROTECTED]> To: "Struts help (E-mail)" Sent: Wednesday, December 29, 2004 9:12 PM Subject: struts and Tomcat4.0.4 Hi, I'm running tomcat4.0.4 on a Fedora core 1 box. I'm bulding an application with struts and I came across a problem. Every time my app has a problem like not finding the proper forward or problem with a sql statment my app hangs. When I fix the problem and go to restart the Tomcat it doesn't shutdown properly. I use "tomcat4 stop" and instead of usual: stopping service Tomcat-Standalone stopping service Tomcat-Apache I only get: stopping service Tomcat-Standalone After that tomcat can't be restarted since it's not shutdown properly and I have to restart my machine, which is rediculous. What is the way to force tomcat to shutdown? Why is Struts affecting tomcat this way? I didn't have problems with Tomcat4 before I started working with struts. Any ideas? Thanks NK - 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: struts and Tomcat4.0.4
if the problem is after executing the sql statement then u might not closed the connection properly. its always good to close the resultset, statement and connection. If ur action file does not close the sql connection the system hangs. - Original Message - From: "Nadia Kunkov" <[EMAIL PROTECTED]> To: "Struts help (E-mail)" Sent: Wednesday, December 29, 2004 9:12 PM Subject: struts and Tomcat4.0.4 Hi, I'm running tomcat4.0.4 on a Fedora core 1 box. I'm bulding an application with struts and I came across a problem. Every time my app has a problem like not finding the proper forward or problem with a sql statment my app hangs. When I fix the problem and go to restart the Tomcat it doesn't shutdown properly. I use "tomcat4 stop" and instead of usual: stopping service Tomcat-Standalone stopping service Tomcat-Apache I only get: stopping service Tomcat-Standalone After that tomcat can't be restarted since it's not shutdown properly and I have to restart my machine, which is rediculous. What is the way to force tomcat to shutdown? Why is Struts affecting tomcat this way? I didn't have problems with Tomcat4 before I started working with struts. Any ideas? Thanks NK - 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: Displaying applets
Thanks Ram and jack .. :-) - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 22, 2004 3:13 PM Subject: RE: Displaying applets Hi Jay, You can have an applet client, which talks to struts on the server side and displays the values. In this case, your client GUI should be applet and from the applet, you can communicate with struts action class. Use DTO's as data carriers between the client and Servlets. Try searching for applet servlet communication articles. This should throw some light. HTH Thanks and Regards, S.Ramkumar -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 22, 2004 2:57 PM To: Struts Users Mailing List; Jay Chandran Subject: Re: Displaying applets Struts is really fairly Applets agnostic, Jay. You don't have to make any connection with Struts to do Applets. I don't know if there is some special code out there tangential to Struts but connected, like Struts file upload. Jack On Wed, 22 Dec 2004 14:05:49 +0530, Jay Chandran <[EMAIL PROTECTED]> wrote: > Is it possible to display the output as an applet in struts? if so how is it > possible ? > > Thanks , > > Jay > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ --- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.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. - 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]
Displaying applets
Is it possible to display the output as an applet in struts? if so how is it possible ? Thanks , Jay - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to implement torque?
Thanks Eddie I will do that. Have u tried implementing the same? :) Jay Chandran. - Original Message - From: "Eddie Bush" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Jay Chandran" <[EMAIL PROTECTED]> Sent: Wednesday, December 22, 2004 11:32 AM Subject: Re: How to implement torque? > Have you tried surfing the Torque site for docs? They used to have > some decent docs ... been ages since I looked at it though. > > I believe they have a user list there - for Turbine, if not Torque. > That is likely a better spot to ask than here. > > On Wed, 22 Dec 2004 11:32:26 +0530, Jay Chandran > <[EMAIL PROTECTED]> wrote: > > Does any one knows how to implement TORQUE in an existing system implemented > > using struts and postgreSQL. > > > > :( > > > > Jay Chandran > > -- > Eddie Bush > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: file upload problem
how is ur file path given ??/ please try to give the full path ie like "C:\Program Files\Tomcat 5.0\webapps\cevm\uploadedimages\" ie filePath value should be C:\Program Files\Tomcat 5.0\webapps\cevm\uploadedimages\ ie in your jsp page give something as below . - Original Message - From: "uma.k" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>; "'Jay Chandran'" <[EMAIL PROTECTED]> Sent: Sunday, December 19, 2004 12:32 PM Subject: RE: file upload problem > Hi Jay, > I tried this way too, but I am actually getting FileNotFoundException. This > is the modified code > String filePath = theForm.getFilePath(); > System.out.println("filePath:"+filePath); > String fileName2 = filePath+fileName; > System.out.println("fileName2:"+fileName2); > //byte[] fileContent =file.getFileData(); > OutputStream bos = new FileOutputStream(new File(fileName2)); > int bytesRead = 0; > byte[] buffer = new byte[8192]; > while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) { > bos.write(buffer, 0, bytesRead); > } > bos.close(); > > In the catch block I made SOP to print the exception and this is the output > in Tomcat console. > > filePath:/upload/images/ > fileName2:/upload/images/test.jpg > fnfejava.io.FileNotFoundException: \upload\images\test.jpg (The system > cannot > find the path specified) > > Why is the system not able to find out the path? > > Uma > > > - > 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: file upload problem
change the below line of ur action file String fileName2 = filePath+"/"+fileName; to String fileName2 = filePath+fileName; - Original Message - From: "uma.k" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>; "'Jay Chandran'" <[EMAIL PROTECTED]> Sent: Saturday, December 18, 2004 3:44 PM Subject: RE: file upload problem > I get an error > "org.apache.jasper.compiler.CompileException: /upload/upload.jsp(32,4) > Attribute enctype invalid according to the specified TLD" > > I am already using enctype in the But when I hard code the > value to system path e.g. c:\\test\\mages then it works but I dont want > this. As I need to upload the file to the server. > > Any ideas? > > -Original Message- > From: Jay Chandran [mailto:[EMAIL PROTECTED] > Sent: Saturday, December 18, 2004 3:57 PM > To: Struts Users Mailing List > Subject: Re: file upload problem > > > include the below and check > > enctype="multipart/form-data"/> > > > - Original Message - > From: "uma.k" <[EMAIL PROTECTED]> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > Sent: Saturday, December 18, 2004 3:10 PM > Subject: file upload problem > > > > Hi, > > I am modifying the upload files given by struts and trying to upload the > > file to server without the user entering any path. > > > > I have modified the upload.jsp with > > > > > > Its means I am trying to upload to the same context in which the jsp is > > running (webapps/test/upload/images) > > > > I have modified the UploadAction.java as > > > > //else { > > //write the file to the file specified > > String filePath = theForm.getFilePath(); > > System.out.println("filePath:"+filePath); > > String fileName2 = filePath+"/"+fileName; > > System.out.println("fileName2:"+fileName2); > > OutputStream bos = new FileOutputStream(fileName2); > > int bytesRead = 0; > > byte[] buffer = new byte[8192]; > > while ((bytesRead = stream.read(buffer, 0, 8192)) > != -1) > > { > > bos.write(buffer, 0, bytesRead); > > } > > bos.close(); > > data = "The file has been written to \"" + > > theForm.getFilePath() + "\""; > > //} > > > > I get this output too > > filePath:/upload/images > > fileName2:/upload/images/test.jpg > > > > I do not have any error the page just becomes blank and the file is not > > uploaded. Any ideas? > > > > Uma > > > > > > - > > 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: Preview of an Image and text
1. From the jsp page select the image (image path) for uploading. Let the preview button be a submit button . function setHidValue() { document.frm.paramPassed.value="preview"; } ie when u click the preview button a java script function is called, in which we assign a value to the hidden variable as preview. this value is passed to the action file. ur struts config file willl be ur graphicsForm is import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.upload.FormFile; import org.apache.struts.upload.MultipartRequestHandler; public class GraphicsForm extends ActionForm { public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED = "MaxLengthExceeded"; /** * The value of the text the user has sent as form data */ protected String theText; /** * The value of the embedded query string parameter */ protected String queryParam; /** * Whether or not to write to a file */ protected boolean writeFile; /** * The file that the user has uploaded */ protected FormFile logoFile; /** * The file path to write to */ protected String filePath; /** * Retrieve the value of the text the user has sent as form data */ protected String paramPassed; public String getParamPassed() { return paramPassed; } public void setParamPassed(String argParamPassed) { this.paramPassed=argParamPassed; } /** * Retrieve the value of the query string parameter */ public String getQueryParam() { // queryParam="Successful"; return queryParam; } /** * Set the value of the query string parameter */ public void setQueryParam(String queryParam) { this.queryParam = queryParam; } /** * Retrieve a representation of the logoFile the user has uploaded */ public FormFile getLogoFile() { return logoFile; } /** * Set a representation of the logoFile the user has uploaded */ public void setLogoFile(FormFile logoFile) { this.logoFile = logoFile; } /** * Set whether or not to write to a file */ public void setWriteFile(boolean writeFile) { this.writeFile = writeFile; } /** * Get whether or not to write to a file */ public boolean getWriteFile() { return writeFile; } /** * Set the path to write a file to */ public void setFilePath(String filePath) { this.filePath = filePath; } /** * Get the path to write a file to */ public String getFilePath() { return filePath; } public void reset() { writeFile = false; } /** * Check to make sure the client hasn't exceeded the maximum allowed upload size inside of this * validate method. */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = null; //has the maximum length been exceeded? Boolean maxLengthExceeded = (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED); if ((maxLengthExceeded != null) && (maxLengthExceeded.booleanValue())) { errors = new ActionErrors(); errors.add(ERROR_PROPERTY_MAX_LENGTH_EXCEEDED, new ActionError("maxLengthExceeded")); } return errors; } } ur action file will be import java.io.ByteArrayOutputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.Calendar; import java.util.GregorianCalendar; import java.text.SimpleDateFormat; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.upload.FormFile; import org.apache.struts.action.ActionServlet; import java.sql.Connection; import javax.sql.DataSource; import java.sql.ResultSet; import java.sql.Statement; import java.sql.SQLException; import java.lang.String; import java.util.ArrayList; public final class GraphicsInfoDetailsAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(false);
Re: file upload problem
include the below and check - Original Message - From: "uma.k" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Saturday, December 18, 2004 3:10 PM Subject: file upload problem > Hi, > I am modifying the upload files given by struts and trying to upload the > file to server without the user entering any path. > > I have modified the upload.jsp with > > > Its means I am trying to upload to the same context in which the jsp is > running (webapps/test/upload/images) > > I have modified the UploadAction.java as > > //else { > //write the file to the file specified > String filePath = theForm.getFilePath(); > System.out.println("filePath:"+filePath); > String fileName2 = filePath+"/"+fileName; > System.out.println("fileName2:"+fileName2); > OutputStream bos = new FileOutputStream(fileName2); > int bytesRead = 0; > byte[] buffer = new byte[8192]; > while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) > { > bos.write(buffer, 0, bytesRead); > } > bos.close(); > data = "The file has been written to \"" + > theForm.getFilePath() + "\""; > //} > > I get this output too > filePath:/upload/images > fileName2:/upload/images/test.jpg > > I do not have any error the page just becomes blank and the file is not > uploaded. Any ideas? > > Uma > > > - > 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: [SOLVED] RE: NullPointerException
uma , Good Work.. its always better to take a backup of the working directory . hope u know it well . still reminding .. - Original Message - From: "uma.k" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Friday, December 17, 2004 11:52 AM Subject: [SOLVED] RE: NullPointerException > Thanks all for your replies. I created another context and copied all of my > files from the existing context to the new context and its working fine. But > I still do not understand why it didn't work in the existing context. > > Uma > > -Original Message- > From: Hubert Rabago [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 16, 2004 9:43 PM > To: Struts Users Mailing List > Subject: Re: NullPointerException > > > Struts does not support multiple mappings. See the first warning at > the bottom of > http://struts.apache.org/userGuide/configuration.html#dd_config_mapping > > Hubert > > On Thu, 16 Dec 2004 21:18:18 +0530, uma.k <[EMAIL PROTECTED]> wrote: > > It doesn't make any difference as the same works in another context. > > > > -Original Message- > > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow > > Sent: Thursday, December 16, 2004 9:12 PM > > To: [EMAIL PROTECTED] > > Subject: Re: NullPointerException > > > > Hmm -- I do see that you have two servlet mappings for the > > ActionServlet. You should only have one of these. > > > > uma.k wrote: > > > > > This is my web.xml file > > > > > > > > > > > > > > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" > > > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > > > > > > > > > > > > > > > > action > > > > org.apache.struts.action.ActionServlet > > > > > > config > > > /WEB-INF/struts-config.xml > > > > > > > > > debug > > > 2 > > > > > > > > > detail > > > 2 > > > > > > 2 > > > > > > > > > > > > > > > > > > action > > > /do/* > > > > > > > > > > > > > > > action > > > *.do > > > > > > > > > > > > > > > index.jsp > > > > > > > > > > > > > > > > > > /WEB-INF/struts-bean > > > /WEB-INF/struts-bean.tld > > > > > > > > > > > > /WEB-INF/struts-html > > > /WEB-INF/struts-html.tld > > > > > > > > > > > > /WEB-INF/struts-logic > > > /WEB-INF/struts-logic.tld > > > > > > > > > > > > /WEB-INF/struts-nested > > > /WEB-INF/struts-nested.tld > > > > > > > > > > > > /WEB-INF/struts-tiles > > > /WEB-INF/struts-tiles.tld > > > > > > > > > > > > jstl/c > > > /WEB-INF/c.tld > > > > > > > > > > > > > > > > > > > > > > > > -Original Message- > > > From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow > > > Sent: Thursday, December 16, 2004 8:34 PM > > > To: [EMAIL PROTECTED] > > > Subject: Re: NullPointerException > > > > > > > > > > > > Wierd -- it looks to me from the original message that you are getting > > > the error on line 1219 of TagUtils which is: > > > > > > resources = > > > (MessageResources) pageContext.getAttribute( > > > bundle + moduleConfig.getPrefix(), > > > PageContext.APPLICATION_SCOPE); > > > > > > This would seem to indicate that your 'moduleConfig' would be null. > > > What does your web.xml look like? > > > > > > uma.k wrote: > > > > > > > > >>If you look at the error message, I get NullPointer at this line in the > > >>generated java file > > >> > > >>int _jspx_eval_bean_message_0 = _jspx_th_bean_message_0.doStartTag(); > > >>//NULLPOINTER > > >> > > >>package org.apache.jsp; > > >> > > >>import javax.servlet.*; > > >>import javax.servlet.http.*; > > >>import javax.servlet.jsp.*; > > >>import org.apache.jasper.runtime.*; > > >> > > >> > > >>public class index$jsp extends HttpJspBase { > > >> > > >> > > >>static { > > >>} > > >>public index$jsp( ) { > > >>} > > >> > > >>private static boolean _jspx_inited = false; > > >> > > >>public final void _jspx_init() throws > > >>org.apache.jasper.runtime.JspException { > > >>} > > >> > > >>public void _jspService(HttpServletRequest request, > > > > > > HttpServletResponse > > > > > >>response) > > >>throws java.io.IOException, ServletException { > > >> > > >>JspFactory _jspxFactory = null; > > >>PageContext pageContext = null; > > >>HttpSession session = null; > > >>ServletContext application = null; > > >>ServletConfig config = null; > > >>JspWriter out = null; > > >>Object page = this; > > >>String _value = null; > > >>try { > > >> > > >>if (_jspx_inited == false) { > > >>synchronized (this) { > > >>if (_jspx_inited == false) { > > >>_jspx_init(); > > >>_jspx_inited = true; > > >>
Re: NullPointerException
i am not a fundu in struts but still ..:) please go through the below link and check whether it make sense. Null pointer exception usually arises when we are trying to extract some values from variables which are "null". Please check whether the variables u r calling when the action is performed Add An Article is taking null values. make sure that variables are not null. http://www.junlu.com/msg/127812.html - Original Message - From: "uma.k" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, December 16, 2004 6:16 PM Subject: NullPointerException > I get NullPointerException when I access this index.jsp page. I also have > ApplicationResources.properties file in web-inf/classes folder > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > > > > > > > > Add An Article > > > > This is my struts-config.xml file > > > >"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" > "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";> > > > > > > > > > > > forward="/articles/Template.jsp" /> > > path="/InsertArticle" > type="articles.ArticleAction" > name="articleForm" > scope="request" > validate="false" > input="/Template.jsp"> > > > > > > > parameter="ApplicationResources" > null="false" /> > > > > > > This is my complete exception > > java.lang.NullPointerException > at > org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:121 > 9) > at org.apache.struts.taglib.TagUtils.message(TagUtils.java:1082) > at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:226) > at org.apache.jsp.index$jsp._jspService(index$jsp.java:68) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja > va:201) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > FilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java:193) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja > va:243) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja > va:190) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 > 46) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 > ) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. > java:170) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 > ) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 64) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java > :174) > at > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > 66) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: > 1027) > at > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 > ) > at java.lang.Thread.run(Thread.java:595) > > > What could be wrong? > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For addition
Re: can i get solved example
Hi, You can go through "Professional jakarta Struts 1.1" written by james goodwill and richard hightower. its published by wrox . jay - Original Message - From: "Nishant" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, November 16, 2004 4:40 PM Subject: can i get solved example hi, can i get anywere solved struts examples because it will made easy to understand struts Nishant Patil Software Engineer Cybage Software Pvt. Ltd. (A CMM Level 3 Company) West Avenue , Kalyani Nagar, Pune - 411 006 Tel: 91-20-4041700 -355 Email: [EMAIL PROTECTED] Website: www.cybage.com There's a difference between knowing the path, and walking the path - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionMapping without a formbean
I am not a big struts giant :) But let me give my suggestions on ur doubt In the case of links we are just invoking a java (acion) file . If we need to send some value through links to action file we need to send as parameter from our link. HTML:FORM tag is mainly meant for passing form values from a jsp,vm page to the action. I think, If you can send parameters from ur tag, we can do this without form bean. Please try it out :) - Original Message - From: "Håkan Fransson" <[EMAIL PROTECTED]> To: "Struts User Llist (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, October 27, 2004 2:46 PM Subject: ActionMapping without a formbean > Hi! > I know that this is and old issue but i'm not satisfied with solutions. > We have used links with images to go to actions without forms and it works > fine. > Now we got demands that we must use html buttons on pages for accessability. > I've seen > two workarounds, use a dummy form or regular html form tag. But it's not so > nice with > dummy forms and an absolut path to the action on the jsp page. > Is there any other solution i can use and why doesn't html:form tag support > mappings without > formbeans. > > * > Håkan Fransson > System developer > Ladok, Umea University > SE-901 87 Umea, Sweden > Phone: +46 (0)90 786 6938 > Email: [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: Validation
Hello Ankur, I think u are getting the error page only because u did not define the output page. ie in Hope it helps u . Regards :) Krishna - Original Message - From: "Ankur Gupta" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Monday, October 18, 2004 11:47 PM Subject: Validation > Hello, > > > I have setup validation logic on a form, however, when I click on submit a > blank page is displayed. Following is my configuration: > > > > > type="org.apache.struts.validator.DynaValidatorForm"> > > > > > > > > type="com.bagnet.nettracer.tracing.actions.LogonAction" > name="logonForm" > scope="request" > validate="true" > input="/index.jsp"> > > > > What can I be doing wrong?? > > -ankur > > > - > 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 send batch emails
Hai , Please check the below code which helps u to send batch mails .. import javax.mail.Folder; import javax.mail.Store; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import java.util.Properties; import java.sql.Connection; import javax.sql.DataSource; import java.sql.ResultSet; import java.sql.Statement; import java.sql.SQLException; import java.util.Date; import java.util.Calendar; import java.util.GregorianCalendar; import java.lang.String; import java.text.SimpleDateFormat; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionServlet; import org.apache.struts.action.DynaActionForm; import java.util.ArrayList; public final class PricingInfoAction extends Action { private static final String SMTP_HOST_NAME = ""; public String emailMsgTxt = null; private static final String emailSubjectTxt = "Ad Order Details"; private static final String emailFromAddress = ""; public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // Add List of Email address to who email needs to be sent to String[] emailList = new String[2]; emailList[0]= new String("[EMAIL PROTECTED]"); emailList[1]= new String("[EMAIL PROTECTED]"); emailMsgTxt="Ad Order Details"; try { postMail( emailList, emailSubjectTxt, emailMsgTxt, emailFromAddress); }catch (Exception e) { return (mapping.findForward("mailfailure")); } }catch (Exception e) { return (mapping.findForward("submitadfail")); } return (mapping.findForward(target)); } public void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException { boolean debug = false; //Set the host smtp address Properties props = new Properties(); props.put("mail.smtp.host", SMTP_HOST_NAME); Session session = Session.getDefaultInstance(props, null); session.setDebug(debug); // set the from and to address InternetAddress addressFrom = new InternetAddress(from); msg.setFrom(addressFrom); InternetAddress[] addressTo = new InternetAddress[recipients.length]; for (int i = 0; i < recipients.length; i++) { addressTo[i] = new InternetAddress(recipients[i]); } msg.setRecipients(Message.RecipientType.TO, addressTo); // Setting the Subject and Content Type msg.setSubject(subject); msg.setContent(message, "text/plain"); Transport.send(msg); } } - Original Message - From: "Caroline Jen" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 2004 7:41 PM Subject: Re: how to send batch emails > I have been using the same utility class (JavaMail > API) to send e-mails. The code works OKay. > > Now, instead of the > > String toAddress > > I have String[] toAddress = > selectRecipientsForm.getSelectedEmailAddresses(); > > will the same code works for sending batch e-mails? > > > > --- Duncan Mills <[EMAIL PROTECTED]> wrote: > > > Its pretty simple to plug in the JavaMail API - > > here's a Utility class I > > call from an Action I use when resetting a User > > Password: It's quick and > > dirty but provides an example. The SMTP mail host > > is read from a > > properties file in this case, but equally could be > > passed in from the > > Appliciation scope. Note the total lack of any kind > > of useful error > > handling in this example - I think I better re-write > > it :-) > > > > [--Badly formmated code begin--] > > package com.groundside.util; > > import java.io.IOException; > > import java.io.InputStream; > > import java.util.Properties; > > import javax.mail.Message; > > import javax.mail.MessagingException; > > import javax.mail.Session; > > import javax.mail.Transport; > > import javax.mail.internet.Inter
Re: How To Upload Files from Clients' Machine?
Make sure you've set the enctype attribute on your form tag to be "multipart/form-data" On Mon, 4 Oct 2004 13:50:59 -0700 (PDT), Caroline Jen <[EMAIL PROTECTED]> wrote: > In my JSP I have this: > > code: > --- > > > > --- > > for visitors of the web page to browse their PCs' > directories to select a file to upload (when the > Submit button is clicked). The files can be .doc, > .txt, .pdf, .jpg, ..., etc. However, I do not have to > convert files into certain format. I simply retrieve > them from clients' machine and store them into a > database. Later on, clients can ask to view those > files in their original format. > > What appears in the text field: > > > > will be a file name. How do I get both the file name > and the content of that file to be saved in the > database? > > ___ > Do you Yahoo!? > Declare Yourself - Register online to vote today! > http://vote.yahoo.com > > --------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Yup. Jay. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Navigation Bar
Are you referring to a navigation bar (a list or menu on left hand side of page allowing navigation around a site) or paging controls (first / prev / next / last)? These are usually two different things. For navigation / menu controls, one possibility is Struts-Menu: http://struts-menu.sourceforge.net/ (demos here: http://raibledesigns.com/struts-menu/index.jsp). For paging controls, as previous poster suggested, http://jsptags.com/tags/navigation/pager/index.jsp. If you're looking for paging controls in conjunction with a table, have a look at DisplayTag: http://displaytag.sf.net. -- Jay Glanville > -Original Message- > From: Zaid [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 27, 2004 11:58 AM > To: Struts Users Mailing List > Subject: Navigation Bar > > > Dear Friends, > > I am new Struts developer, meanwhile I did huge coding in > PHP; however, I > am trying to find a custom tag which can work as a navigation bar, the > specification on the bar shoulf contain next, prev, first and last as > well. > > could anyone help me in finding useful one ? I would be very much > appreciated. > > Best Regards to all > > Zaid > > > > > - > 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]
Confirmation Requested: "development has stopped on the presentation tags"
> -Original Message- > From: Mike Duffy [mailto:[EMAIL PROTECTED] > Subject: RE: Are there any IDE's that understand Struts tags? > > > I would strongly suggest that you stay away from (or move > away from) the Struts presentation tags > and use JSTL instead. Development has essentially stopped on > the Struts presentation tags. JSTL > has more functionality and JSTL is the "standard". Can I get some clarification on the above paragraph, specifically the line, "Development has essentially stopped on the Struts presentation tags." Does this mean that the Struts-HTML tag library is no longer being developed or supported? When talking about the "struts presentation tags", it's the Struts-HTML tag library that I think of. However, I don't know of equivalent support for this library from the JSTL libraries. So, if Mike is correct and usage of the Struts-HTML library is discouraged, then what should I replace it with? My usage of this library is rather heavy right now (, plus all the associated HTML input tags) so if usage is discouraged, I'd really like to know. Now, I know that pretty much all of the Struts-Logic tag library (equality, iteration, etc) and some of the Struts-Bean library can be replaced with the JSTL. Mike, is this the "presentation library" that you're referring to? So, which libraries am I being discouraged from using? Apologies for being pedantic, but I'd like to be absolutely clear about the quoted paragraph. Thanks JDG -- Jay Glanville - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to best deal with circular work flow?
Hello all. What is the best way to deal with request parameters when the work flow goes: page -> action -> same page? Ok, let me see if I can more accurately describe the situation. I have a form. Within that form, I have a table listing entities with a column of indexed checkboxes which map to indexed properties on my form-bean. Also on that form, I have several buttons for batch-type actions like "delete", "disable", "enable", etc. These buttons need to be "submit" buttons so that the checkbox values can be copied to the form bean. When a user presses one of these buttons, the associated Action then looks at the array of buttons to see who was pressed, goes and performs the work associated with that button, and then returns an ActionForward that returns to the same page that the user originated from. This action forward needs to be of type "forward" (as opposed to "redirect") because they might be some ActionMessages or ActionErrors resulting from the work that was done. My problem is this: when the control returns to the page, because it's a forward, the request parameter for the button that was pressed previously also gets forwarded. This means that my action re-processes the button press which then re-forwards to the same page, causing infinite recursion. I'm currently working around the problem by having a check in my action where if any ActionMessages or ActionErrors exist in the request, then I ignore all button presses. However, I'm sure that this isn't the best way to implement this. One problem with this is that it relies on the batch-button implementations to set a message to prevent having this recursion. Basically, I want a way to remove the request parameter associated with the button. However, I know that's not possible without using a redirect, which in turn destroys my messages. What is the best/cleanest way to deal with this situation? Suggestions? Thanks -- Jay Glanville - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: what is the difference between forward and redirect?
You need to use a forward if you are using Action.setMessages() or Action.setErrors() in your action implementations. For example, I have a BeanDeleteAction class. If an error occures in the action (an exception being caught, wrong information being processed, database down, etc) then I use setErrors() to display error messages to the user. However, the error messages are stored in the request scope. Therefore, in the error path of my action, I need to ensure that the ActionForward that I return is of type forward and not redirect. You will often see action mappings like this: Where the failure path is a forward and the success is a redirect. I also have code like this try { ... } catch (NCIException e) { addError( request, ); ActionForward orig = mapping.findForward( "success" ); ActionForward f = new ActionForward( orig.getPath, false ); return f; } Where I force a redirect to be converted into a forward in order to have request scoped objects remain in scope. Well, this is the primary usage that I have for forwards. The rest of the time, I basically use redirects. I hope this helps. JDG PS: I'm sure the rest of the community will correct me if I'm wrong. -- Jay Glanville > -Original Message- > From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 15, 2004 8:27 AM > To: Struts Users Mailing List > Subject: Re: what is the difference between forward and redirect? > > > Hi, > I basically understood the technical diffence between forward > and redirect, > but from webapplications point of view, when do I use forward > or redirect. > > On which circumstances should I use a redirect for example? > > Wolfgang > > Sanoj, Antony (IE10) wrote: > > >Mike, > > > > forward is carried inside the servlet engine, whereas the > redirect goes to > >the browser, and then the browser sends the request to the resource > > forward preserves the request state, but redirect destroys > the original > >request as it completes a request/response cycle > > when the browser receives the redirect. > >regards > >Sanoj > > > >-Original Message- > >From: Mu Mike [mailto:[EMAIL PROTECTED] > >Sent: Thursday, April 15, 2004 3:00 PM > >To: [EMAIL PROTECTED] > >Subject: what is the difference between forward and redirect? > > > > > >when forward, what do we foward? > >when redirect, what we do different? > > > >Thanks&Regards > >Mike > > > >_ > >与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn > > > > > >- > >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: what is the difference between forward and redirect?
Another difference that has to be taken into consideration is that a forward keeps all the request scope parameters and attributes, whereas in a redirect, the request scoped parameters and attributes are lost. JDG -- Jay Glanville > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 15, 2004 5:55 AM > To: [EMAIL PROTECTED] > Subject: RE: what is the difference between forward and redirect? > > > The main difference is that the forward takes place on the > server, whereas > the redirect results in another HTTP request from the client. > A forward is > therefore invisible to the client, whereas the redirect is > something they > would see. > > Example 1: user types in http://myserver.com/page1 > /page1 forwards to /page2 > > User still thinks they are seeing http://myserver.com/page1 > > Example 2: user types in http://myserver.com/page1 > /page1 sends redirect to /page2 > Client then requests /page2 > > A browser would then show http://myserver.com/page2 in the address bar > > > -Original Message- > From: Mu Mike [mailto:[EMAIL PROTECTED] > Sent: 15 April 2004 10:30 > To: [EMAIL PROTECTED] > Subject: what is the difference between forward and redirect? > > > when forward, what do we foward? > when redirect, what we do different? > > Thanks&Regards > Mike > > _ > 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > -- > For more information about Barclays Capital, please > visit our web site at http://www.barcap.com. > > > Internet communications are not secure and therefore the Barclays > Group does not accept legal responsibility for the contents of this > message. Although the Barclays Group operates anti-virus programmes, > it does not accept responsibility for any damage whatsoever that is > caused by viruses being passed. Any views or opinions presented are > solely those of the author and do not necessarily represent > those of the > Barclays Group. Replies to this email may be monitored by > the Barclays > Group for operational or business reasons. > > -- > -- > > > - > 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: Problem
> > On a side note, why isn't there any reference to mailing > lists on the > > struts pages? I'm used to seeing something mentioned in > the navigation > > panel for all the other apache projects. > > > > Its here ... http://jakarta.apache.org/struts/mail.html > > I think the Struts pages are going through some changes too. > You can get > there from the Struts main page > http://jakarta.apache.org/struts/ > side bar link Struts, Using >> "join the mailing lists" ... Sorry. Probably mis-stated. I'm not inquiring where it is. I'm inquiring why I can't get there from the front page of struts. Heck, I can't even get there from any page within struts: I need to go external of struts to the jakarta pages to find the mailing lists. If you go to the front page (http://struts.apache.org), the only page the word 'mail' exists is in the following sentence: "This documentation bundle and the mailing lists are the primary ways to learn how to use Struts." No way for the uninitiated to find the mailing list. As a comparison, if you go to Ant (http://ant.apache.org), it's right there under "Contributing". It's the same with James, Jakarta-Commons, etc. Just a minor pet-peeve of mine. JDG -- Jay Glanville - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem
I believe that struts has moved to a top-level project. Therefore, it's no longer [EMAIL PROTECTED], but now [EMAIL PROTECTED] Therefore, why don't you try [EMAIL PROTECTED] That's what they say here: http://jakarta.apache.org/site/mail2.html#Struts. On a side note, why isn't there any reference to mailing lists on the struts pages? I'm used to seeing something mentioned in the navigation panel for all the other apache projects. JDG -- Jay Glanville > -Original Message- > From: Nina Bertilsdotter [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 8:12 AM > To: '[EMAIL PROTECTED]' > Subject: Problem > > > Ok, so I know this is not the right place, but I can't seem > to be able to > unsubscribe to this list (mails to > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> keep > bouncing back) and > I can't find any other mail address to use to report this problem. > > What to do? > > Thanks, > > Nina > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: what's the best way to have an if/else clause?
> If you are using Tomcat 5.0+ (JSP 2.0) you will have built-in > support JSTL in JSP. You wont have to add any libraries. I've taken the attitude not to rely on any container's library set. It doesn't make the web application very portable. Thanks for the suggest, none the less. JDG -- Jay Glanville - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: what's the best way to have an if/else clause?
It is an option that I didn't realize I had. Up to now, we've been using the struts tag library almost exclusively, as, up to now, it's provided us with all the JSP functionality we've needed. This situation my provide the impetus to add JSTL to our libraries. Thanks JDG -- Jay Glanville > -Original Message- > From: Butash, Bob [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 10:19 AM > To: 'Struts Users Mailing List' > Subject: RE: what's the best way to have an if/else clause? > > > Jay, > > Have you looked into JSTL's choose tag? > > > > > > > > > > > > > > > > > > > > > Hope this helps > > -Original Message- > From: Glanville, Jay [mailto:[EMAIL PROTECTED] > Sent: Friday, April 02, 2004 10:10 AM > To: [EMAIL PROTECTED] > Subject: what's the best way to have an if/else clause? > > > I want to iterate over a set of beans, creating widget A if > property is set, > widget B if not. Therefore, I'm looking for an "if/else" > structure. The > closest thing I can find is and . I'm > assuming that there is no straight forward way to implement > an 'else' clause > in tags, so I'm thinking that I need to so something like the > following: > > property="tableDesc.batchAction" > id="element" > > > > > > > > > > Basically, to implement the else clause by performing a > second if statement. > > Is this the correct way to do things? Is there a better way? > Would I be > better off using scriptlet code? > > JDG > > -- > Jay Glanville > > - > 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]
what's the best way to have an if/else clause?
I want to iterate over a set of beans, creating widget A if property is set, widget B if not. Therefore, I'm looking for an "if/else" structure. The closest thing I can find is and . I'm assuming that there is no straight forward way to implement an 'else' clause in tags, so I'm thinking that I need to so something like the following: Basically, to implement the else clause by performing a second if statement. Is this the correct way to do things? Is there a better way? Would I be better off using scriptlet code? JDG -- Jay Glanville - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]