Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Quoting Lukas Latz [EMAIL PROTECTED]: Is there a problem with using Tomcat 3.23 and Struts 1.1 ? Yes, there is. Tomcat 3.2.x has many bugs with the way that class loading is handled that make it totally unsuitable for Struts 1.1 applications. You should upgrade to a more current Tomcat release -- if you want realistic support, then I'd recommend upgrading to the most recent Tomcat 5.0.x stable release. Craig McClanahan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
I see your confusion. I don't use TC, but remembered a while back there was a lot of conversation about certain versions people had trouble with. Perhaps it does work, but maybe you have to jump through hoops to get it to do so. The archives might have more background on the specific issues with TC 3.2.x. If you wanted, you could submit a bugzilla request for site documentation clarification. Good luck, Susan I've now upgraded to TC 3.3.2 and everything worked right away. I see your point about how 3.2.x might be considered workable with twists. Thanks Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
To find out what's going on, I created an even simpler project: All the struts 1.1 jars, tlds and dtds A simple index.jsp with NO struts related tags or taglib directives. An ActionServlet set to load on startup. The same failure as reported under problems with html:base/ happens, that shows the failure is not related to the jsp file that contained the html:base/ tag in my other project, but to the initial loading of the ActionServlet. I realized I hadn't run a struts 1.1 in this tomcat instance before, only the struts 1.0 logon application from the manning/husted struts book. Is there a problem with using Tomcat 3.23 and Struts 1.1 ? Otherwise, the only possible explanation could be missing items in the web.xml or struts-config.xml This is what the app currently look like: /index.jsp /META-INF/ /META-INF/MANIFEST.MF /WEB-INF/ /WEB-INF/struts-bean.tld /WEB-INF/struts-html.tld /WEB-INF/struts-logic.tld /WEB-INF/struts-nested.tld /WEB-INF/struts-template.tld /WEB-INF/struts-tiles.tld /WEB-INF/struts-config_1_0.dtd /WEB-INF/struts-config_1_1.dtd /WEB-INF/tiles-config.dtd /WEB-INF/tiles-config_1_1.dtd /WEB-INF/validation_1_1.dtd /WEB-INF/validator-rules_1_1.dtd /WEB-INF/web-app_2_2.dtd /WEB-INF/web-app_2_3.dtd /WEB-INF/web.xml /WEB-INF/struts-config.xml /WEB-INF/classes/ /WEB-INF/lib/ /WEB-INF/lib/commons-beanutils.jar /WEB-INF/lib/commons-collections.jar /WEB-INF/lib/commons-digester.jar /WEB-INF/lib/commons-fileupload.jar /WEB-INF/lib/commons-lang.jar /WEB-INF/lib/commons-logging.jar /WEB-INF/lib/commons-validator.jar /WEB-INF/lib/jakarta-oro.jar /WEB-INF/lib/struts-legacy.jar /WEB-INF/lib/struts.jar ** web.xml ** ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping !-- The Usual Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptors -- taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib /web-app ** struts-config.xml * ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config form-beans /form-beans global-forwards /global-forwards action-mappings /action-mappings /struts-config There must be a really simple reason for the failure, as there's really no application code my test app. any pointers much appreciated. Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
I just found the struts-blank.war in the Struts 1.1 binary distribution and deployed it to my Tomcat 2.32 . I fails in the same way! -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Lukas, I am not familiar with your previous posts, but will this archive post help? http://marc.theaimsgroup.com/?l=struts-userm=106326387004081w=2 Susan Bradeen Lukas Latz [EMAIL PROTECTED] wrote on 03/11/2004 10:22:44 AM: snip Is there a problem with using Tomcat 3.23 and Struts 1.1 ? Otherwise, the only possible explanation could be missing items in the web.xml or struts-config.xml This is what the app currently look like: /snip There must be a really simple reason for the failure, as there's really no application code my test app. any pointers much appreciated. Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - 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: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Lukas, I am not familiar with your previous posts, but will this archive post help? http://marc.theaimsgroup.com/?l=struts-userm=106326387004081w=2 Susan Bradeen Susan, this post somewhat contradicts the info on the Struts website, where they state: Apache's Tomcat (version 3.1 or later required, version 3.3 or later recommended). I'm not fundamentally opposed to upgrading to Tomcat 3.3, but I feel that if Tomcat 3.3 does not work with Struts 1.1 at all, it should be mentioned on the Struts website. I also saw the jaxp 1.1 vs 1.0 issue on the struts website, but as the Java that Tomcat uses here is 1.4 , thus the included jaxp 1.1 is presumably used. Thanks, Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WAS: problems with html:base/ - Help Please - ActionServlet fails on startup
Lukas Latz [EMAIL PROTECTED] wrote on 03/11/2004 11:12:26 AM: Lukas, I am not familiar with your previous posts, but will this archive post help? http://marc.theaimsgroup.com/?l=struts-userm=106326387004081w=2 Susan Bradeen Susan, this post somewhat contradicts the info on the Struts website, where they state: Apache's Tomcat (version 3.1 or later required, version 3.3 or later recommended). I'm not fundamentally opposed to upgrading to Tomcat 3.3, but I feel that if Tomcat 3.3 does not work with Struts 1.1 at all, it should be mentioned on the Struts website. I see your confusion. I don't use TC, but remembered a while back there was a lot of conversation about certain versions people had trouble with. Perhaps it does work, but maybe you have to jump through hoops to get it to do so. The archives might have more background on the specific issues with TC 3.2.x. If you wanted, you could submit a bugzilla request for site documentation clarification. Good luck, Susan I also saw the jaxp 1.1 vs 1.0 issue on the struts website, but as the Java that Tomcat uses here is 1.4 , thus the included jaxp 1.1 is presumably used. Thanks, Lukas -- +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz - 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]
Unable to find the JDBC Driver for Mysql using struts -- Help Please
I have configured tomcat residing on a linux box with a context for the mysql database within the server.xml file. I have used the same directives as specified in the How-To see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html But I get an error at the browser when I attempt to authenticate. It cannot find the driver mysql driver = org.gjt.mm.mysql.Driver This is the error: The Following SQL Error(s) occurred while processing your request: Cannot create JDBC driver of class '' for connect URL 'null' Sincerely, Paul Idusogie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unable to find the JDBC Driver for Mysql using struts -- Help Please
Did you copied the file mysql drive mm.mysql-2.0.4-bin.jar (for example) to your WEB-INF\lib of your Application ?? - Original Message - From: Paul Idusogie [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 14, 2003 8:49 PM Subject: Unable to find the JDBC Driver for Mysql using struts -- Help Please I have configured tomcat residing on a linux box with a context for the mysql database within the server.xml file. I have used the same directives as specified in the How-To see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html But I get an error at the browser when I attempt to authenticate. It cannot find the driver mysql driver = org.gjt.mm.mysql.Driver This is the error: The Following SQL Error(s) occurred while processing your request: Cannot create JDBC driver of class '' for connect URL 'null' Sincerely, Paul Idusogie - 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: Unable to find the JDBC Driver for Mysql using struts -- Help Please
yes I did I am using the 3.0.9 version of the mysql driver Sincerely, Paul Idusogie Chayil Corporation Enterprise Software Solutions Provider -Original Message- From: Mauricio T. Ferraz [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2003 4:56 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Unable to find the JDBC Driver for Mysql using struts -- Help Please Did you copied the file mysql drive mm.mysql-2.0.4-bin.jar (for example) to your WEB-INF\lib of your Application ?? - Original Message - From: Paul Idusogie [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 14, 2003 8:49 PM Subject: Unable to find the JDBC Driver for Mysql using struts -- Help Please I have configured tomcat residing on a linux box with a context for the mysql database within the server.xml file. I have used the same directives as specified in the How-To see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html But I get an error at the browser when I attempt to authenticate. It cannot find the driver mysql driver = org.gjt.mm.mysql.Driver This is the error: The Following SQL Error(s) occurred while processing your request: Cannot create JDBC driver of class '' for connect URL 'null' Sincerely, Paul Idusogie - 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: Unable to find the JDBC Driver for Mysql using struts -- Help Please
Thanks I'll check it out Sincerely, Paul Idusogie Chayil Corporation Enterprise Software Solutions Provider -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich Sent: Friday, November 14, 2003 6:40 PM To: [EMAIL PROTECTED] Subject: Re: Unable to find the JDBC Driver for Mysql using struts -- Help Please On home page of http://ibatis.com there is a mySQL tutorial. It examplains how to install mySQL and how to instal PetStore3 (a sample bluePrints/struts app). It also exaplins how to setup a jdbc driver. Maybe this can help, .V Paul Idusogie wrote: yes I did I am using the 3.0.9 version of the mysql driver Sincerely, Paul Idusogie Chayil Corporation Enterprise Software Solutions Provider -Original Message- From: Mauricio T. Ferraz [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2003 4:56 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Unable to find the JDBC Driver for Mysql using struts -- Help Please Did you copied the file mysql drive mm.mysql-2.0.4-bin.jar (for example) to your WEB-INF\lib of your Application ?? - Original Message - From: Paul Idusogie [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, November 14, 2003 8:49 PM Subject: Unable to find the JDBC Driver for Mysql using struts -- Help Please I have configured tomcat residing on a linux box with a context for the mysql database within the server.xml file. I have used the same directives as specified in the How-To see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html But I get an error at the browser when I attempt to authenticate. It cannot find the driver mysql driver = org.gjt.mm.mysql.Driver This is the error: The Following SQL Error(s) occurred while processing your request: Cannot create JDBC driver of class '' for connect URL 'null' Sincerely, Paul Idusogie -- -- - 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]
Help please -- How to provide a Back button?
Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce
Re: Help please -- How to provide a Back button?
for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce
RE: Help please -- How to provide a Back button?
a href=javascript:history.go(-1)Back/a -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 3:25 PM To: Struts Users Mailing List Subject: Re: Help please -- How to provide a Back button? for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help please -- How to provide a Back button?
Another solution if you don't want to use javascript, is to rely on the fact that the name and value atrributes of the submit button that was pressed are passed through the http request. The values for the other submit buttons aren't sent. So in your action you check for the existance of each submit buttons name to figure out which button the user pushed. So if you have the following submit buttons in your jsp file html:submit property=saveSAVE/html:submit html:submit property=cancelCANCEL/html:submit Then in your action you can do something like this: String saveAction = request.getParameter(save); String cancelAction = request.getParameter(cancel); if (saveAction != null) { doSave(); } else if (cancelAction != null) { doCancel(); } On Wed, 29 Oct 2003 14:24:54 -0600, [EMAIL PROTECTED] said: for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce -o- -o- -o- -o- -o- ishmael.riles brnr.tech 510.543.6109 -o- -o- -o- -o- -o- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help please -- How to provide a Back button?
Thanks for your fast response, it's of GREAT help, thanks a lot my friend. bruce - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:24 AM Subject: Re: Help please -- How to provide a Back button? for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce
Re: Help please -- How to provide a Back button?
Hi my friend, you solve my problem, thanks!! bruce - Original Message - From: ishmael riles [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Cc: ZYD [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 5:11 AM Subject: Re: Help please -- How to provide a Back button? Another solution if you don't want to use javascript, is to rely on the fact that the name and value atrributes of the submit button that was pressed are passed through the http request. The values for the other submit buttons aren't sent. So in your action you check for the existance of each submit buttons name to figure out which button the user pushed. So if you have the following submit buttons in your jsp file html:submit property=saveSAVE/html:submit html:submit property=cancelCANCEL/html:submit Then in your action you can do something like this: String saveAction = request.getParameter(save); String cancelAction = request.getParameter(cancel); if (saveAction != null) { doSave(); } else if (cancelAction != null) { doCancel(); } On Wed, 29 Oct 2003 14:24:54 -0600, [EMAIL PROTECTED] said: for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce -o- -o- -o- -o- -o- ishmael.riles brnr.tech 510.543.6109 -o- -o- -o- -o- -o- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help please -- How to provide a Back button?
thanks buddy! - Original Message - From: Jimmy Emmanual [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:44 AM Subject: RE: Help please -- How to provide a Back button? a href=javascript:history.go(-1)Back/a -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 3:25 PM To: Struts Users Mailing List Subject: Re: Help please -- How to provide a Back button? for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles help please...
I am getting a bean into a tile that has a checkbox in it. I get the NAME of the checkbox, but I need to see if the value is on or off, then set the disabled flay in an html:img. But, I always get null errors. Can someone help please? tiles:useAttribute id=beanName name=property classname=java.lang.String ignore=true / tiles:importAttribute name=bean / bean:define id=isChecked name=bean property='%= beanName %' type=java.lang.String value= / % if( isChecked == null || !isChecked.equals( true ) ) { //isChecked = false; % html:img bundle=IMAGE_RESOURCES_KEY height=15 width=15 srcKey=default.checked / % } else { % html:img bundle=IMAGE_RESOURCES_KEY height=15 width=15 srcKey=default.unchecked / % } % --- Thanks Mick Knutson The world is a playground...Play Hard, Play Smart. Visit http://www.YourSoS.com to learn how our Personal Emergency Alert Contact System can help you Play Smart. +00 1 (708) 570-2772 Fax MSN: mickknutson ICQ: 316498480 ICQ URL: http://wwp.icq.com/316498480 ---
SwitchAction not working - Help please
We have a large application wnd the size of struts-config.xml has grown big. I am trying to divide it into modules. It did not work. Then I downloaded simple-modules-example.tar.gz from http://sourceforge.net/projects/struts But even that is not working for me...what could be the reason ? Error is : javax.servlet.jsp.JspException: Missing message for key toDefaultModule.using.forward int org.apache.struts.taglib.bean.MessageTag.doStartTag() MessageTag.java:297 void _mod1._index._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/mod1/index.jsp] I am using Struts-1.1 Please help.!!! Regards, Puneet Agarwal Tata Consultancy Services, C-56, Phase - II, NOIDA 201305 (India) Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1044) FAX : +91-120-246 1521 Struts ... Action ... Struts in Action ... Action in Struts ... DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SwitchAction not working - Help please
It works fine for me, what container are you using? -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 770.822.3359 AIM:jmitchtx - Original Message - From: Puneet Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 4:01 AM Subject: SwitchAction not working - Help please We have a large application wnd the size of struts-config.xml has grown big. I am trying to divide it into modules. It did not work. Then I downloaded simple-modules-example.tar.gz from http://sourceforge.net/projects/struts But even that is not working for me...what could be the reason ? Error is : javax.servlet.jsp.JspException: Missing message for key toDefaultModule.using.forward int org.apache.struts.taglib.bean.MessageTag.doStartTag() MessageTag.java:297 void _mod1._index._jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) [/mod1/index.jsp] I am using Struts-1.1 Please help.!!! Regards, Puneet Agarwal Tata Consultancy Services, C-56, Phase - II, NOIDA 201305 (India) Phone: +91-120-2461001, 2, 7, 8, 9, 12, 13 (Ext. 1044) FAX : +91-120-246 1521 Struts ... Action ... Struts in Action ... Action in Struts ... DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - 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 please: Get session in a form ctor?
- Original Message - From: David Thielen To: Struts-Users Sent: Monday, September 08, 2003 9:54 PM Subject: Get session in a form ctor? Hi; Is there any way inside an ActionForm constructor to get the HttpSession? This would let me set up forms without having to call an action before displaying a page. thanks - dave
Help please: Get session in a form ctor?
Hi; Is there any way inside an ActionForm constructor to get the HttpSession? This would let me set up forms without having to call an action before displaying a page. thanks - dave
Help please - indexed field in ActionForm
Hi; I've been fighting this all day with no luck. And it has to be a simple thing to do. I have a form where I have N lines in it. Each line needs to have some text displayed and an edit box. How do I set this up in the .jsp file and in the ActionForm? I've found a number of examples on the web but they all have incomplete code and my guesses for the rest of the code have not been right so far. thanks - dave
RE: Help please - indexed field in ActionForm
Haven't used JSTL yet, but let me try this... class MyActionForm { private static final MAX_ENTRIES = 50; private ArrayList text; public MyActionForm() { text = new ArrayList(MAX_ENTRIES); for (int x = 0; x MAX_ENTRIES; x++) { text.add(); // avoids IndexOutOfBoundsException later in setText } } // used by MyAction public ArrayList getText() {return text;} // Used by Struts public void setText(int index, String newText) {text.set(index, newText);} } my.jsp html:html body html:form action=MyAction.do logic:iterate id=text indexId=index name=myForm property=text !-- Note trickery here. Not using html:text -- Label:input type=text name='text[bean:write name=indexId/]'/br/ /logic:iterate html:submit/ /html:form body /html:html Gary Kephart| New Century Mortgage Web-Based Application Developer | http://www.ncen.com [EMAIL PROTECTED] | 340 Commerce 949-797-5660| Irvine, CA 92602-1318 -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 4:39 PM To: Struts Users Mailing List Subject: Re: Help please - indexed field in ActionForm Hi; Thank you - this is part of what I need. Is there any way to iterate through the lines if I don't know up front how many lines there will be? I tried the with the c JSTL and it doesn't work. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help please - indexed field in ActionForm
You could also try the following: logic:iterate id=text indexId=index name=myForm property=text label:html-el:text property=text[${indexId}] / /logic:iterate You could also make use of the nested:iterate and get rid of the name=myForm, but this a bit more advanced. Don't forget to put : %@ taglib uri=/tags/struts-html-el prefix=html-el % HTH, Erez -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 1:39 AM To: Struts Users Mailing List Subject: Re: Help please - indexed field in ActionForm Hi; Thank you - this is part of what I need. Is there any way to iterate through the lines if I don't know up front how many lines there will be? I tried the with the c JSTL and it doesn't work. thanks - dave - Original Message - From: Gary Kephart [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, August 07, 2003 4:55 PM Subject: RE: Help please - indexed field in ActionForm class MyActionForm { private static final MAX_ENTRIES = 50; private String[] text; public MyActionForm() { text = new String[MAX_ENTRIES]; } public String[] getText() {return text;} public void setText(int index, String newText) {text[index] = newText;} } my.jsp html:html body html:form action=MyAction.do Label 1:html:text property=text[0]/br/ Label 2:html:text property=text[1]/br/ html:submit/ /html:form body /html:html Gary Kephart| New Century Mortgage Web-Based Application Developer | http://www.ncen.com [EMAIL PROTECTED] | 340 Commerce 949-797-5660| Irvine, CA 92602-1318 -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 3:46 PM To: Struts-Users Subject: Help please - indexed field in ActionForm Hi; I've been fighting this all day with no luck. And it has to be a simple thing to do. I have a form where I have N lines in it. Each line needs to have some text displayed and an edit box. How do I set this up in the .jsp file and in the ActionForm? I've found a number of examples on the web but they all have incomplete code and my guesses for the rest of the code have not been right so far. thanks - 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: Help please - indexed field in ActionForm
class MyActionForm { private static final MAX_ENTRIES = 50; private String[] text; public MyActionForm() { text = new String[MAX_ENTRIES]; } public String[] getText() {return text;} public void setText(int index, String newText) {text[index] = newText;} } my.jsp html:html body html:form action=MyAction.do Label 1:html:text property=text[0]/br/ Label 2:html:text property=text[1]/br/ html:submit/ /html:form body /html:html Gary Kephart| New Century Mortgage Web-Based Application Developer | http://www.ncen.com [EMAIL PROTECTED] | 340 Commerce 949-797-5660| Irvine, CA 92602-1318 -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 3:46 PM To: Struts-Users Subject: Help please - indexed field in ActionForm Hi; I've been fighting this all day with no luck. And it has to be a simple thing to do. I have a form where I have N lines in it. Each line needs to have some text displayed and an edit box. How do I set this up in the .jsp file and in the ActionForm? I've found a number of examples on the web but they all have incomplete code and my guesses for the rest of the code have not been right so far. thanks - dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help please - indexed field in ActionForm
Hi; Thank you - this is part of what I need. Is there any way to iterate through the lines if I don't know up front how many lines there will be? I tried the with the c JSTL and it doesn't work. thanks - dave - Original Message - From: Gary Kephart [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, August 07, 2003 4:55 PM Subject: RE: Help please - indexed field in ActionForm class MyActionForm { private static final MAX_ENTRIES = 50; private String[] text; public MyActionForm() { text = new String[MAX_ENTRIES]; } public String[] getText() {return text;} public void setText(int index, String newText) {text[index] = newText;} } my.jsp html:html body html:form action=MyAction.do Label 1:html:text property=text[0]/br/ Label 2:html:text property=text[1]/br/ html:submit/ /html:form body /html:html Gary Kephart| New Century Mortgage Web-Based Application Developer | http://www.ncen.com [EMAIL PROTECTED] | 340 Commerce 949-797-5660| Irvine, CA 92602-1318 -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 3:46 PM To: Struts-Users Subject: Help please - indexed field in ActionForm Hi; I've been fighting this all day with no luck. And it has to be a simple thing to do. I have a form where I have N lines in it. Each line needs to have some text displayed and an edit box. How do I set this up in the .jsp file and in the ActionForm? I've found a number of examples on the web but they all have incomplete code and my guesses for the rest of the code have not been right so far. thanks - 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: Help please - indexed field in ActionForm
Hi Dave, There was a good thread about using indexed properties a little over a week ago (7/28-7/30). Find that thread and you should find all of the answers that you need in order to use and process indexed properties on your form. Even though the thread wanders a little, everything that you need is there. Nick Erez Efrati [EMAIL PROTECTED]To: 'Struts Users Mailing List' [EMAIL PROTECTED] et.il cc: Subject: RE: Help please - indexed field in ActionForm 08/07/2003 09:09 PM Please respond to Struts Users Mailing List You could also try the following: logic:iterate id=text indexId=index name=myForm property=text label:html-el:text property=text[${indexId}] / /logic:iterate You could also make use of the nested:iterate and get rid of the name=myForm, but this a bit more advanced. Don't forget to put : %@ taglib uri=/tags/struts-html-el prefix=html-el % HTH, Erez -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 1:39 AM To: Struts Users Mailing List Subject: Re: Help please - indexed field in ActionForm Hi; Thank you - this is part of what I need. Is there any way to iterate through the lines if I don't know up front how many lines there will be? I tried the with the c JSTL and it doesn't work. thanks - dave - Original Message - From: Gary Kephart [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, August 07, 2003 4:55 PM Subject: RE: Help please - indexed field in ActionForm class MyActionForm { private static final MAX_ENTRIES = 50; private String[] text; public MyActionForm() { text = new String[MAX_ENTRIES]; } public String[] getText() {return text;} public void setText(int index, String newText) {text[index] = newText;} } my.jsp html:html body html:form action=MyAction.do Label 1:html:text property=text[0]/br/ Label 2:html:text property=text[1]/br/ html:submit/ /html:form body /html:html Gary Kephart| New Century Mortgage Web-Based Application Developer | http://www.ncen.com [EMAIL PROTECTED] | 340 Commerce 949-797-5660| Irvine, CA 92602-1318 -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 3:46 PM To: Struts-Users Subject: Help please - indexed field in ActionForm Hi; I've been fighting this all day with no luck. And it has to be a simple thing to do. I have a form where I have N lines in it. Each line needs to have some text displayed and an edit box. How do I set this up in the .jsp file and in the ActionForm? I've found a number of examples on the web but they all have incomplete code and my guesses for the rest of the code have not been right so far. thanks - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help please...
struts 1.0 iplanet webserver 6 SP5 solaris 8 jdk 1.3.1 web-app uri=/ dir=/data/WEB/phonebook/webapps enable=true/ When I go to the url, eg. http://localhost/search.jsp and view the page source, it shoes the form action=//search.do instead of /search.do Is there a bug with iplanet 6 that causes the extra / to be added to /seach.do or am I doing something else wrong here? Thanks -- David Lew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:button.. help please
-Original Message- From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]] Can anyone tell me how I can prepend the context path to the following example: html-el:button property=userAction onclick=goLink('%= request.getContextPath() %/resultsAction.do?userAction=Modify GroupcompanyNumber=222')bean:message key='button.modify.assoc'//html-el:button First, you should use the html:rewrite (or html-el) tag to build the URL. That will automatically prepend the context path. You can use it within (I think) a c:set element to store the result into a page-scoped attribute, called url for example. Then, your tag would look like this: html-el:button property=userAction onclick=goLink(${url}) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help please in ApplicationResources
If I want to have a message in a JSP, I use this code: bean:message key=email.protocol bundle=APPLICATION_CONFIGURATION/ But I want to have all the messages resources in my JSP, How can I do that please? Thanks in advance
RE: Help please in ApplicationResources
Hi Yann, IMHO, from my understanding, the idea of having message resources bundle in a separate text file is so that we do not have to change any codes (JSP/Java) which means easier maintenance and more flexibility. So I would suggest using a text file for a resource bundle and put it anywhere below your WEB-INF/classes/dir1/dir2 as somefilename.properties (I would put all the resources in the same directory) and then you can access using bean:message key=somekeyname bundle=dir1.dir2.somefilename/ (note that the .properties extension is not needed). If you insist on using JSP then you should just use scriplet variables like % String emailProtocol = POP3 % and call it using %= emailProtocol % Do I get your question right? Hope it helps, Lucas -Original Message- From: Yann Verlynde [mailto:yverlynde;oxade.com] Sent: Wednesday, October 30, 2002 11:58 PM To: Struts Subject: Help please in ApplicationResources If I want to have a message in a JSP, I use this code: bean:message key=email.protocol bundle=APPLICATION_CONFIGURATION/ But I want to have all the messages resources in my JSP, How can I do that please? Thanks in advance -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Help please in ApplicationResources
Hi Lucas, Thanks for the response but you don't understand my question, I think it is due to my english...;-) I have already one application resources file named ApplicationResources.properties so I use already a Resource Bundle but I want to write a page that print all the content of this ResourceBundle. I know that to have a property I must use: bean:message key=email.protocol bundle=APPLICATION_CONFIGURATION/ So with that, I can print all the properties but I is very long and not flexible. It is not a very good solution because I put the name of the property 'email.protocol. So I would like a generic method or Tag to take back all the properties in an Array of the Resources Bundle in my JSP. Thanks in advance Yann - Original Message - From: Lucas [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 11:05 AM Subject: RE: Help please in ApplicationResources Hi Yann, IMHO, from my understanding, the idea of having message resources bundle in a separate text file is so that we do not have to change any codes (JSP/Java) which means easier maintenance and more flexibility. So I would suggest using a text file for a resource bundle and put it anywhere below your WEB-INF/classes/dir1/dir2 as somefilename.properties (I would put all the resources in the same directory) and then you can access using bean:message key=somekeyname bundle=dir1.dir2.somefilename/ (note that the .properties extension is not needed). If you insist on using JSP then you should just use scriplet variables like % String emailProtocol = POP3 % and call it using %= emailProtocol % Do I get your question right? Hope it helps, Lucas -Original Message- From: Yann Verlynde [mailto:yverlynde;oxade.com] Sent: Wednesday, October 30, 2002 11:58 PM To: Struts Subject: Help please in ApplicationResources If I want to have a message in a JSP, I use this code: bean:message key=email.protocol bundle=APPLICATION_CONFIGURATION/ But I want to have all the messages resources in my JSP, How can I do that please? Thanks in advance -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Help please in ApplicationResources
This would not be possible with the current API. You can do this with your own implementation (as I have done), but that is still just a hack. James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Yann Verlynde [mailto:yverlynde;oxade.com] Sent: Thursday, October 31, 2002 5:19 AM To: Struts Users Mailing List Subject: Re: Help please in ApplicationResources Hi Lucas, Thanks for the response but you don't understand my question, I think it is due to my english...;-) I have already one application resources file named ApplicationResources.properties so I use already a Resource Bundle but I want to write a page that print all the content of this ResourceBundle. I know that to have a property I must use: bean:message key=email.protocol bundle=APPLICATION_CONFIGURATION/ So with that, I can print all the properties but I is very long and not flexible. It is not a very good solution because I put the name of the property 'email.protocol. So I would like a generic method or Tag to take back all the properties in an Array of the Resources Bundle in my JSP. Thanks in advance Yann - Original Message - From: Lucas [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, October 31, 2002 11:05 AM Subject: RE: Help please in ApplicationResources Hi Yann, IMHO, from my understanding, the idea of having message resources bundle in a separate text file is so that we do not have to change any codes (JSP/Java) which means easier maintenance and more flexibility. So I would suggest using a text file for a resource bundle and put it anywhere below your WEB-INF/classes/dir1/dir2 as somefilename.properties (I would put all the resources in the same directory) and then you can access using bean:message key=somekeyname bundle=dir1.dir2.somefilename/ (note that the .properties extension is not needed). If you insist on using JSP then you should just use scriplet variables like % String emailProtocol = POP3 % and call it using %= emailProtocol % Do I get your question right? Hope it helps, Lucas -Original Message- From: Yann Verlynde [mailto:yverlynde;oxade.com] Sent: Wednesday, October 30, 2002 11:58 PM To: Struts Subject: Help please in ApplicationResources If I want to have a message in a JSP, I use this code: bean:message key=email.protocol bundle=APPLICATION_CONFIGURATION/ But I want to have all the messages resources in my JSP, How can I do that please? Thanks in advance -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: help please: Validator basic use
Try applying a simple validator like required to one of your form fields, if it does not work verify the following. 1. name used in the validation resource file matches the name in your action mapping 2. validate set to true in your action mapping 3. your form extends ValidatorActionForm, and if you have any custom validation in your form, you don't ignore the errors returned by super.validate. If the problem is only with date validator, are you entering this garbage after you enter a valid date? The date validator that comes with struts1.1 uses a short pattern (M/d/YY for en_US) if you do not explicitly pass a valid date. It does not do strict parsing by default unless you specify pattern using the variable datePatternStrict. If you want to implement strict date parsing with out having to specify this pattern, write your own pluggable validator and check for the parse position DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); df.setLenient(false); ParsePosition pos = new ParsePosition(0); Object obj = df.parseObject(value, pos); if (pos.getIndex() == 0) throw new ParseException(Unparseable value: \ + value + \ , pos.getErrorIndex()); if (pos.getIndex() value.length()) throw new ParseException(Unparseable value: \ + value + \ , pos.getIndex()); -Original Message- From: Clayson, Jim [mailto:Jim.Clayson;centrica.co.uk] Sent: Thursday, October 17, 2002 9:05 AM To: '[EMAIL PROTECTED]' Subject: help please: Validator basic use Hi I am attempting to use the date validation provided by the framework - I am using struts1.1b2. I think I must be missing something fairly fundamental but maybe someone will be able to confirm what that is. The problem is when I enter garbage into the form's date fields and submit them, I get no errors. How does one usually display the errors when using the validator framework. I have my validator-rules.xml and validation.xml config files in my application's web-inf dir. Their relevent contents are as follows: validator-rules.xml validator name=date classname=org.apache.struts.util.StrutsValidator method=validateDate methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=required msg=errors.date jsFunctionName=DateValidations javascript![CDATA[ function validateDate(form) { ... etc return true; }]] /javascript /validator and validation.xml: formset form name=ReportForm field property=dateFrom depends=date arg0 key=ReportForm.dateFrom/ /field field property=dateTo depends=date arg0 key=ReportForm.dateTo/ /field /form /formset I have my action's validate attribute set to true. Are the above setup correctly? Thanks Jim The information contained in or attached to this email is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege (or other rules or laws with similar effect in jurisdictions outside England and Wales). The views expressed in this email are not necessarily the views of Centrica plc, and the company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: help please: Validator basic use
Hi, I eventually got it to work. I had not seen the example struts-validator.war and when I did some comparisons, I found that I was misinterpreting the way in which the form validation was defined in validation.xml. Its working now - thanks for the input! Jim -Original Message- From: Padma Ginnaram [mailto:padma.ginnaram;s1.com] Sent: 17 October 2002 22:43 To: 'Struts Users Mailing List' Subject: RE: help please: Validator basic use Try applying a simple validator like required to one of your form fields, if it does not work verify the following. 1. name used in the validation resource file matches the name in your action mapping 2. validate set to true in your action mapping 3. your form extends ValidatorActionForm, and if you have any custom validation in your form, you don't ignore the errors returned by super.validate. If the problem is only with date validator, are you entering this garbage after you enter a valid date? The date validator that comes with struts1.1 uses a short pattern (M/d/YY for en_US) if you do not explicitly pass a valid date. It does not do strict parsing by default unless you specify pattern using the variable datePatternStrict. If you want to implement strict date parsing with out having to specify this pattern, write your own pluggable validator and check for the parse position DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); df.setLenient(false); ParsePosition pos = new ParsePosition(0); Object obj = df.parseObject(value, pos); if (pos.getIndex() == 0) throw new ParseException(Unparseable value: \ + value + \ , pos.getErrorIndex()); if (pos.getIndex() value.length()) throw new ParseException(Unparseable value: \ + value + \ , pos.getIndex()); -Original Message- From: Clayson, Jim [mailto:Jim.Clayson;centrica.co.uk] Sent: Thursday, October 17, 2002 9:05 AM To: '[EMAIL PROTECTED]' Subject: help please: Validator basic use Hi I am attempting to use the date validation provided by the framework - I am using struts1.1b2. I think I must be missing something fairly fundamental but maybe someone will be able to confirm what that is. The problem is when I enter garbage into the form's date fields and submit them, I get no errors. How does one usually display the errors when using the validator framework. I have my validator-rules.xml and validation.xml config files in my application's web-inf dir. Their relevent contents are as follows: validator-rules.xml validator name=date classname=org.apache.struts.util.StrutsValidator method=validateDate methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=required msg=errors.date jsFunctionName=DateValidations javascript![CDATA[ function validateDate(form) { ... etc return true; }]] /javascript /validator and validation.xml: formset form name=ReportForm field property=dateFrom depends=date arg0 key=ReportForm.dateFrom/ /field field property=dateTo depends=date arg0 key=ReportForm.dateTo/ /field /form /formset I have my action's validate attribute set to true. Are the above setup correctly? Thanks Jim The information contained in or attached to this email is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege (or other rules or laws with similar effect in jurisdictions outside England and Wales). The views expressed in this email are not necessarily the views of Centrica plc, and the company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail
help please: Validator basic use
Hi I am attempting to use the date validation provided by the framework - I am using struts1.1b2. I think I must be missing something fairly fundamental but maybe someone will be able to confirm what that is. The problem is when I enter garbage into the form's date fields and submit them, I get no errors. How does one usually display the errors when using the validator framework. I have my validator-rules.xml and validation.xml config files in my application's web-inf dir. Their relevent contents are as follows: validator-rules.xml validator name=date classname=org.apache.struts.util.StrutsValidator method=validateDate methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=required msg=errors.date jsFunctionName=DateValidations javascript![CDATA[ function validateDate(form) { ... etc return true; }]] /javascript /validator and validation.xml: formset form name=ReportForm field property=dateFrom depends=date arg0 key=ReportForm.dateFrom/ /field field property=dateTo depends=date arg0 key=ReportForm.dateTo/ /field /form /formset I have my action's validate attribute set to true. Are the above setup correctly? Thanks Jim The information contained in or attached to this email is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorised to and must not disclose, copy, distribute, or retain this message or any part of it. It may contain information which is confidential and/or covered by legal professional or other privilege (or other rules or laws with similar effect in jurisdictions outside England and Wales). The views expressed in this email are not necessarily the views of Centrica plc, and the company, its directors, officers or employees make no representation or accept any liability for its accuracy or completeness unless expressly stated to the contrary. -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: help please: Validator basic use
Is your form derived from ValidatorForm rather than ActionForm? - Original Message - From: Clayson, Jim [EMAIL PROTECTED] Hi I am attempting to use the date validation provided by the framework - I am using struts1.1b2. I think I must be missing something fairly fundamental but maybe someone will be able to confirm what that is. The problem is when I enter garbage into the form's date fields and submit them, I get no errors. How does one usually display the errors when using the validator framework. I have my validator-rules.xml and validation.xml config files in my application's web-inf dir. Their relevent contents are as follows: validator-rules.xml validator name=date classname=org.apache.struts.util.StrutsValidator method=validateDate methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=required msg=errors.date jsFunctionName=DateValidations javascript![CDATA[ function validateDate(form) { ... etc return true; }]] /javascript /validator and validation.xml: formset form name=ReportForm field property=dateFrom depends=date arg0 key=ReportForm.dateFrom/ /field field property=dateTo depends=date arg0 key=ReportForm.dateTo/ /field /form /formset I have my action's validate attribute set to true. Are the above setup correctly? Thanks Jim -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Help please, 503 Servlet Not Initialized
Hi, I know that it doesn't fit with this ml,this is the last time, but when I try to access a servlet that's not struts one the server replies: with 503 Servlet Not Initialized -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE : A very, very strang problem, urgent help please
Hi Cliff and Adolfo, Thanks very much for your rapide responses. I have just returned to this list after being very busy to debug and deliver the application, excuse me. The problem is due to that there is a accent in in the URL (more precisely, in a html:link element). The problem is when I click on the link, the URL is encoded and the link works (for both in Windows and Unix platform where webspere 4.03 is deployed). But when I submit a form in the second page (which is the page the link leads to and the URL of this page has not accent and in correct form), the error page appears(400, URL not right). This is strange. This problem is resolved by using another parameter without accent. This error appears just in the Unix platform. Thanks again. Peiqiang -Message d'origine- De : Cliff Rowley [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 16 août 2002 04:41 À : Struts Users Mailing List Objet : Re: A very, very strang problem, urgent help please On Fri, 2002-08-16 at 09:13, Adolfo Miguelez wrote: In UNIX, file names are case sensitive. In Windows, they are not. Have you checked this? A very good point. I should have thought of that, since all my development and deployment happens in a *NIX environment .. but I guess I just make everything lowercase as habit now. -- Regards --- Cliff Rowley| [EMAIL PROTECTED] Software Engineer | www.doctype.co.uk +44 (0) 1206 514263 | www.cliffrowley.com --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: A very, very strang problem, urgent help please
In UNIX, file names are case sensitive. In Windows, they are not. Have you checked this? From: Cliff Rowley [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: A very, very strang problem, urgent help please Date: 16 Aug 2002 02:50:44 +0100 On Fri, 2002-08-16 at 02:19, [EMAIL PROTECTED] wrote: Hello, Hi :) I have a very, very strange problem. I use Struts, with nested tags. And the application is deployed on Unix. The page contains a very complexe form. When I submit the form, the URL appears on the Internet Explorer address field like http://buick/lf/consulterRepartitionRubrique.do; ou (When I click on a link )http://buick/lf/secur/accueil.jsp;, but IE display an error message like 400 incorrect request, Impossible de trouver la page... . But when I use windows as Server platform(WebSphere), It works. You didn't specify which application server you are using under unix. Still WebSphere? Also, I dont quite understand the reference to the JSP page - are you saying the same thing happens when you request a JSP page as when you request a Struts (*.do) URL? Also ... in your IE advanced options, turn *off* the 'friendly HTTP error messages' - they royally suck and more often than not they disguise the real problem. The more strange is, when I submit the form, it gives a error described as above. But then I click on the Address field of the IE and return. It works (on Unix platform). This is very very strange. Has somebody had this problem ? Your helps are very appreciaed. Never seen it myself :\ Thanks very much. Peiqiang -- Regards --- Cliff Rowley| [EMAIL PROTECTED] Software Engineer | www.doctype.co.uk +44 (0) 1206 514263 | www.cliffrowley.com --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: A very, very strang problem, urgent help please
On Fri, 2002-08-16 at 09:13, Adolfo Miguelez wrote: In UNIX, file names are case sensitive. In Windows, they are not. Have you checked this? A very good point. I should have thought of that, since all my development and deployment happens in a *NIX environment .. but I guess I just make everything lowercase as habit now. -- Regards --- Cliff Rowley| [EMAIL PROTECTED] Software Engineer | www.doctype.co.uk +44 (0) 1206 514263 | www.cliffrowley.com --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
A very, very strang problem, urgent help please
Hello, I have a very, very strange problem. I use Struts, with nested tags. And the application is deployed on Unix. The page contains a very complexe form. When I submit the form, the URL appears on the Internet Explorer address field like http://buick/lf/consulterRepartitionRubrique.do; ou (When I click on a link )http://buick/lf/secur/accueil.jsp;, but IE display an error message like 400 incorrect request, Impossible de trouver la page... . But when I use windows as Server platform(WebSphere), It works. The more strange is, when I submit the form, it gives a error described as above. But then I click on the Address field of the IE and return. It works (on Unix platform). This is very very strange. Has somebody had this problem ? Your helps are very appreciaed. Thanks very much. Peiqiang
Re: A very, very strang problem, urgent help please
On Fri, 2002-08-16 at 02:19, [EMAIL PROTECTED] wrote: Hello, Hi :) I have a very, very strange problem. I use Struts, with nested tags. And the application is deployed on Unix. The page contains a very complexe form. When I submit the form, the URL appears on the Internet Explorer address field like http://buick/lf/consulterRepartitionRubrique.do; ou (When I click on a link )http://buick/lf/secur/accueil.jsp;, but IE display an error message like 400 incorrect request, Impossible de trouver la page... . But when I use windows as Server platform(WebSphere), It works. You didn't specify which application server you are using under unix. Still WebSphere? Also, I dont quite understand the reference to the JSP page - are you saying the same thing happens when you request a JSP page as when you request a Struts (*.do) URL? Also ... in your IE advanced options, turn *off* the 'friendly HTTP error messages' - they royally suck and more often than not they disguise the real problem. The more strange is, when I submit the form, it gives a error described as above. But then I click on the Address field of the IE and return. It works (on Unix platform). This is very very strange. Has somebody had this problem ? Your helps are very appreciaed. Never seen it myself :\ Thanks very much. Peiqiang -- Regards --- Cliff Rowley| [EMAIL PROTECTED] Software Engineer | www.doctype.co.uk +44 (0) 1206 514263 | www.cliffrowley.com --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help: Please do help me
for page validation, i use the filter-mechanism from the servlet 2.3 api. just write a filter which checks the parameters in your request, validates them against an internal table , and forwards the filter chain to 1) the page OR 2) an error page indicating that the user is not validated for the request if you attach your filter to the Struts controller , all requests can be filtered (ic. validated) before the requests even reach the controller. Regards, David ps : it's also very very easy to reuse your validation mechanism for other servlets!! -Original Message- From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] Sent: dinsdag 30 april 2002 19:40 To: [EMAIL PROTECTED] Subject: Re: Need Help: Please do help me Subject: Re: Need Help: Please do help me From: Vic C [EMAIL PROTECTED] === For user authentication, use container security not Struts. Struts example should not be based on login. Vic vivek shrivastava wrote: Hi, I know following questions have been asked or discussed so many times but I am still confuse. Please do help me. Once a users is logged in, I want to validate each page for a valid user. I understand that I can use CheckLogon tab in each .jsp page check for valid user. But I really don't think that it is good idea to mix flow and presentation. We have two other options. 1. We create a base class by extending struts's Action class and define a function to do validation and extend all application specific Action classes using that base class. 2. Or we extend ActionServlet class and define a function to do validation. I think 2nd option is much more flexible and it does not have redundancy of code like first option. I want to know which one is best in real world. If someone has implemented it using either of method, please provide me some sample code so that I can implement it. Please Please do help me. Thanks _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Need Help: Please do help me
Subject: Re: Need Help: Please do help me From: Vic C [EMAIL PROTECTED] === For user authentication, use container security not Struts. Struts example should not be based on login. Vic vivek shrivastava wrote: Hi, I know following questions have been asked or discussed so many times but I am still confuse. Please do help me. Once a users is logged in, I want to validate each page for a valid user. I understand that I can use CheckLogon tab in each .jsp page check for valid user. But I really don't think that it is good idea to mix flow and presentation. We have two other options. 1. We create a base class by extending struts's Action class and define a function to do validation and extend all application specific Action classes using that base class. 2. Or we extend ActionServlet class and define a function to do validation. I think 2nd option is much more flexible and it does not have redundancy of code like first option. I want to know which one is best in real world. If someone has implemented it using either of method, please provide me some sample code so that I can implement it. Please Please do help me. Thanks _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help: Please do help me
We use option 1. Our UserAction extends Action and checks for session value user_id. If a particular action needs to verify if the user had logged in (meaning the login action had setup user_id), that action should extend UserAction. I don't see redundancy of code here, do you? Leo -Original Message- From: vivek shrivastava [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 1:23 PM To: [EMAIL PROTECTED] Subject: Need Help: Please do help me Hi, I know following questions have been asked or discussed so many times but I am still confuse. Please do help me. Once a users is logged in, I want to validate each page for a valid user. I understand that I can use CheckLogon tab in each .jsp page check for valid user. But I really don't think that it is good idea to mix flow and presentation. We have two other options. 1. We create a base class by extending struts's Action class and define a function to do validation and extend all application specific Action classes using that base class. 2. Or we extend ActionServlet class and define a function to do validation. I think 2nd option is much more flexible and it does not have redundancy of code like first option. I want to know which one is best in real world. If someone has implemented it using either of method, please provide me some sample code so that I can implement it. Please Please do help me. Thanks _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help: Please do help me
For user authentication, use container security not Struts. Struts example should not be based on login. You might have a look at the Expresso Security (open source at www.jcorporate.com) which extends Struts, though Expresso's security framework came into being long before container-based security became a possibility. We are in the process of working to migrate the Expresso security framework to JAAS, in which case, we will be compatible, but it will not be included in the upcoming 4.1 release. Once developed we will probably keep the current database tables as the default implementation (although pluggable security matrices are in the works) since they've been so convenient and nice to work with. Sometimes container integration can be a hassle as you switch from container to container. Expresso might be helpful by staying container independent at this phase and slowly integrating in as container spec conformance comes about. We use a Controller which is a customized Action class. Our security is automatic... We currently have three security categories: Controllers [Actions]: Each controller's state is checked against the security matrix. If the user belongs to the appropriate role, access is granted. DBObjects: Our persistance layer has role-based security for add/update/delete, also defined in a security matrix. Cheers Sandra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Need Help: Please do help me
Hi Maciel, Could you please provide me some sample code? Thanks From: Leonardo Maciel [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Need Help: Please do help me Date: Tue, 30 Apr 2002 14:05:28 -0400 We use option 1. Our UserAction extends Action and checks for session value user_id. If a particular action needs to verify if the user had logged in (meaning the login action had setup user_id), that action should extend UserAction. I don't see redundancy of code here, do you? Leo -Original Message- From: vivek shrivastava [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 1:23 PM To: [EMAIL PROTECTED] Subject: Need Help: Please do help me Hi, I know following questions have been asked or discussed so many times but I am still confuse. Please do help me. Once a users is logged in, I want to validate each page for a valid user. I understand that I can use CheckLogon tab in each .jsp page check for valid user. But I really don't think that it is good idea to mix flow and presentation. We have two other options. 1. We create a base class by extending struts's Action class and define a function to do validation and extend all application specific Action classes using that base class. 2. Or we extend ActionServlet class and define a function to do validation. I think 2nd option is much more flexible and it does not have redundancy of code like first option. I want to know which one is best in real world. If someone has implemented it using either of method, please provide me some sample code so that I can implement it. Please Please do help me. Thanks _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
help please
Is it possible to turn off link inside a form based on value of a property. I am using the example which came with struts-1.0.1 and changed some of it to build a sample for our application, following is the code. Right now this code displays links on all the aNumber and aStatus. The aStatus can have two states true or false. Based on the value of aStatus I need to turn off the link on both the aNumber and aStatus fields. For examples if value of aStatus = true, then I need to activate the hyper link for the aNumber and the link will do specific action line view ( I have this action defined) else the link is not activated for aNumber but for aStatus and the action might be delete. logic:iterate id=subscription name=user property=subscriptions tr td align=left width=30% bean:write name=subscription property=aName filter=true/ /td td align=left width=25% app:linkSubscription page=/editSubscription.do?action=View bean:message key=registration.viewSubscription/ bean:write name=subscription property=aNumber filter=true/ /app:linkSubscription /td td align=left width=25% app:linkSubscription page=/editSubscription.do?action=View bean:message key=registration.viewSubscription/ uibean:write name=subscription property=aStatus filter=true//ui /app:linkSubscription /td /tr /logic:iterate Can this be done in anyway here, or else what would be the way to do it. Please help me out this is urgent. __ Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games http://sports.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
help,please
i know friends that this is totally offtrack and this is not the write place to ask this questions but i am really stuck up and have no one to ask to please could u help me out i am working on a file upload example , and am copying the code as it is from a book on servlets by dustin callaway here is the code and the html file to pass on the file to the page here is the html file html body h4 align=centerfont color=#80uFile Upload Servlet/u/font/h4 table border=0 width=84% cellspacing=0 cellpadding=0 tr td width=51% form enctype=multipart/form-data action=UploadServlet method=post pfont color=#80Press the b browse/b button to select the file to upload and then click on the bUpload Button/b /font p font color=#80 nbsp; input type=hidden name=directory value=temp/ input type=hidden name=successPage value=success.html input type=hidden name=OverWrite value=false input type=hidden name=OverWritePage value=overwrite.html /font/td td width=50% p align=centerfont color=#80 br input type=file name=filename value= maxlength=255 size=50 br br input type=submit value=Upload /font/p /td /tr /table /form import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class UploadServlet extends HttpServlet { static final int MAX_SIZE =102400; String rootPath,successMessage; public void init(ServletConfig config) throws ServletException { super.init(config); rootPath = config.getInitParameter(RootPath); if (rootPath == null) { rootPath=/; } successMessage = config.getInitParameter(SuccessMessage); if (successMessage == null) { successMessage = File Upload Complete ; } } // end of init() method public void doPost(HttpServletRequest request,HttpServletResponse response) { ServletOutputStream out = null; DataInputStream in = null; FileOutputStream fileOut = null; try { response.setContentType(text/plain); out=response.getOutputStream(); } catch(IOException e) { System.out.println(Error getting the output stream); System.out.println(Error description:+e); } try { String contentType = request.getContentType(); if (contentType != null contentType.indexOf(multipart/form-data) != -1) { in = new DataInputStream(request.getInputStream()); int formDataLength = request.getContentLength(); if (formDataLength MAX_SIZE) { out.println(Sorry the file is too large to uploaad ); out.flush(); return; } // end of if byte dataBytes[] = new byte[formDataLength]; int bytesRead=0; int totalBytesRead=0; while (totalBytesRead formDataLength) { bytesRead = in.read(dataBytes,totalBytesRead,formDataLength); totalBytesRead += bytesRead; } // end of while String file = new String(dataBytes); dataBytes = null; int lastIndex = contentType.lastIndexOf(=); String boundary =contentType.substring(lastIndex+1,contentType.length()); String directory=; if(file.indexOf(name =\Directory\) 0); { directory = file.substring(file.indexOf(name=\Directory\)); directory=directory.substring(directory.indexOf(\n)+1); directory = directory.substring(0,directory.indexOf(\n)-1); if (directory.indexOf(..)0) { out.println(Security Error: You cannot do this ); return; } }// end of if String successPage=; if(file.indexOf(name=\SuccessPage\)0) { successPage=file.substring(file.indexOf(name=\SuccessPage\)); successPage=successPage.substring(successPage.indexOf(\n)+1); successPage=successPage.substring(successPage.indexOf(\n)+1); successPage = successPage.substring(0,successPage.indexOf(\n)-1); } String overWrite; if(file.indexOf(name=\OverWrite\)0) { overWrite = file.substring(file.indexOf(name=\OverWrite\)); overWrite =
New message format help please.
Hi, I am trying to use the new HTMl:Messages in the struts nightly build. I am updating some of my code to use the new format. Two quick questions: 1: I am saving my messages in the action class via: ActionMessages messages=new ActionMessages(); messages.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage(response.title)); Is this correct? 2: How do I get these messages in my web page. I have tried: html:messages id=message name=%= com.popware.rd.Constants.MESSAGES % message=true bean:write name=message filter=false/BR /html:messages but this is obviously wrong. Any idea how to do this. Thanks for any info. Alex
New Message tag format help please!
Hi, I notice that the message tags written by David Winterfeldt have been rolled into the Struts project. I downloaded the latest version of Struts and I am retrofitting the message tags. I think I figured out that I need that following code in my action class to save a message: messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(rfqRFQCreationResponse.title,Hello)); But now I am wondering how to retrieve the message on a page. I tried: %@ taglib uri=/WEB-INF/struts-validator.tld prefix=validator % validator:messagesExist name=MyMessage ul validator:messages id=message name=MyMessage libean:write name=message//li /validator:messages /ulhr /validator:messagesExist but this is not finding the message in the request session. Could you give me a quick tip and tell me how to access the new version of the messages on the page? Thanks Alex = Regards Alex Colic, HBA, B. Ed PopWare Inc. Driving down the cost of conversions! E-Mail: [EMAIL PROTECTED] Tel: 1-905-777-8171 ext. 104 Fax: 1-905-777-0132 __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Re[2]: Digester Help PLEASE
Can you post (some of) the debug output you're getting from the Digester? That might help us see what's going on. -- Martin Cooper - Original Message - From: Sean [EMAIL PROTECTED] To: Struts Users [EMAIL PROTECTED] Sent: Friday, August 24, 2001 7:21 AM Subject: Re: Re[2]: Digester Help PLEASE I am using the 1.0 release, just again downloaded from the jakarta set fresh in case something else is wrong. Nada, a no go still ... Any other ideas? Sean P.S. URL used: http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1 .0/
Re: Re[2]: Digester Help PLEASE
Also, I forgot to mention - since you're using the Commons version of the digester, rather than the one built into Struts 1.0, you might want to look to the jakarta-commons mailing list for help, since that's where the active development is happening. -- Martin Cooper - Original Message - From: Sean [EMAIL PROTECTED] To: Struts Users [EMAIL PROTECTED] Sent: Friday, August 24, 2001 7:21 AM Subject: Re: Re[2]: Digester Help PLEASE I am using the 1.0 release, just again downloaded from the jakarta set fresh in case something else is wrong. Nada, a no go still ... Any other ideas? Sean P.S. URL used: http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1 .0/
Re: Re[2]: Digester Help PLEASE
There is no debug output, there in lies the problem. I am getting nothing, it is executing successfully but I get no objects created no nothing ... The patterns should work, the data file is valid etc ... any ideas? Sean - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, August 25, 2001 2:29 PM Subject: Re: Re[2]: Digester Help PLEASE Can you post (some of) the debug output you're getting from the Digester? That might help us see what's going on. -- Martin Cooper - Original Message - From: Sean [EMAIL PROTECTED] To: Struts Users [EMAIL PROTECTED] Sent: Friday, August 24, 2001 7:21 AM Subject: Re: Re[2]: Digester Help PLEASE I am using the 1.0 release, just again downloaded from the jakarta set fresh in case something else is wrong. Nada, a no go still ... Any other ideas? Sean P.S. URL used: http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1 .0/
Digester Help PLEASE
Ok, after spending over 2 hours trying to debug this can I get some eyes on this please? Does anyone see anything wrong with this method ran against the attached datafile: protected void initMappings(InputStream input) { Digester digester = new Digester(); digester.setDebug(1); digester.setValidating(false); digester.push(this); digester.addObjectCreate(factory-selector/factory, com.company.Factory); digester.addSetProperties(factory-selector/factory); digester.addSetNext(factory-selector/factory, addFactory, com.company.Factory); digester.addObjectCreate(*/patternset, com.company.PatternSet); digester.addSetProperties(*/patternset); digester.addSetNext(*/patternset, addPatternSet, com.parlano.web.struts.mapping.PatternSet); digester.addCallMethod(*/pattern, addPattern, 0); try { digester.parse(input); } catch (Exception e) { System.out.println(DAMN ERRORS); e.printStackTrace(); } } PLEASE, any help would be greatly appreciated ... I can't figure out why NONE of my objects are getting created nor are they getting populated. No methods are getting called ...I get no exceptions no nothing ... I put print statements around things and it is getting through all of this. I also tried breaking the XML in the datafile and it breaks and errors out so I know it is parsing the file. ANY help would be appreciated, Thanks ... Sean ?xml version=1.0 ? factory-selector factory name=ie patternset comparator=and patternMSIE/pattern patternWindows NT/pattern /patternset /factory factory name=default patternset comparator=and patternMozilla/pattern patternLinux/pattern /patternset /factory factory name=ns patternset comparator=or patternMozilla/5/pattern patternNetscape6//pattern patternMozilla/pattern /patternset /factory factory name=default patternset comparator=or patternMSPIE/pattern patternHandHTTP/pattern patternAvantGo/pattern patternDoCoMo/pattern patternOpera/pattern patternLynx/pattern patternJava/pattern patternNokia/pattern patternUP/pattern patternWapalizer/pattern pattern*/pattern /patternset /factory /factory-selector
Re: Digester Help PLEASE
Hello Sean, You can create only ONE instance of Digester in your application. If it can help you... Friday, August 24, 2001, 5:26:22 PM, you wrote: S Ok, after spending over 2 hours trying to debug this can I get some eyes on S this please? Does anyone see anything wrong with this method ran against S the attached datafile: S protected void initMappings(InputStream input) { S Digester digester = new Digester(); S digester.setDebug(1); S digester.setValidating(false); S digester.push(this); S digester.addObjectCreate(factory-selector/factory, S com.company.Factory); S digester.addSetProperties(factory-selector/factory); S digester.addSetNext(factory-selector/factory, addFactory, S com.company.Factory); S digester.addObjectCreate(*/patternset, com.company.PatternSet); S digester.addSetProperties(*/patternset); S digester.addSetNext(*/patternset, addPatternSet, S com.parlano.web.struts.mapping.PatternSet); S digester.addCallMethod(*/pattern, addPattern, 0); S try { S digester.parse(input); S } S catch (Exception e) { S System.out.println(DAMN ERRORS); S e.printStackTrace(); S } S } S PLEASE, any help would be greatly appreciated ... I can't figure out why S NONE of my objects are getting created nor are they getting populated. No S methods are getting called ...I get no exceptions no nothing ... I put print S statements around things and it is getting through all of this. I also S tried breaking the XML in the datafile and it breaks and errors out so I S know it is parsing the file. ANY help would be appreciated, Thanks ... S Sean -- Best regards, Olegmailto:[EMAIL PROTECTED]
Re: Digester Help PLEASE
Oleg, I am running this from a main() test program and only one instance it being created. Do you see anything wrong with the rules? XML file? Sean
Re[2]: Digester Help PLEASE
Hello Sean, What is wrong with your code - explane please. P.S. May be I am wrong but try to avoid such patterns as */patternset Friday, August 24, 2001, 5:37:58 PM, you wrote: S Oleg, S I am running this from a main() test program and only one instance it being S created. Do you see anything wrong with the rules? XML file? S Sean -- Best regards, Olegmailto:[EMAIL PROTECTED]
Re: Re[2]: Digester Help PLEASE
Sean, If it means anything to you, I had a working use of Digester (for months) that suddenly failed when I upgraded to a recent (sorry, don't recall which) post-1.0 nightly binary release. My app suddenly failed. As best I could determine, none of the rules were firing. I did not have the time to figure this out, so I reverted to 1.0. Worked again. (I had to make a couple of import changes going both ways because of the move to Commons, but no other changes were made to code.) Good luck. -r - Original Message - From: Sean [EMAIL PROTECTED] To: Struts Users [EMAIL PROTECTED] Sent: Friday, August 24, 2001 6:51 AM Subject: Re[2]: Digester Help PLEASE Oleg, The problem is that none of the rules are being fired at all, no objects are getting created, nothing at all. The patterns match what is in the file, the file is valid, I should see some Factory objects get created, some PatternSet objects get created, and a whole bunch of sets etc happen but nothing is happening at all ... no a single object is getting consucted. I have placed print statements in the constructors and nothing, nada ... That is what is wrong ... It's like the digester is parsing the file but for some weird reason it doesn't see any matches to my rules I added to the Digester. Any ideas? Sean
Re[3]: Digester Help PLEASE
Hello Sean, Friday, August 24, 2001, 5:51:33 PM, you wrote: S Oleg, S The problem is that none of the rules are being fired at all, no objects are S getting created, nothing at all. The patterns match what is in the file, S the file is valid, I should see some Factory objects get created, some S PatternSet objects get created, and a whole bunch of sets etc happen but S nothing is happening at all ... no a single object is getting consucted. I S have placed print statements in the constructors and nothing, nada ... That S is what is wrong ... It's like the digester is parsing the file but for some S weird reason it doesn't see any matches to my rules I added to the Digester. What version of Digester are you use? -- Best regards, Olegmailto:[EMAIL PROTECTED]
Re: Re[2]: Digester Help PLEASE
I am using the 1.0 release, just again downloaded from the jakarta set fresh in case something else is wrong. Nada, a no go still ... Any other ideas? Sean P.S. URL used: http://jakarta.apache.org/builds/jakarta-commons/release/commons-digester/v1 .0/
A bit of design help please?
Hi, I am wondering how the following can be done in Struts. You have a page with two frames, one being a navigation frame consisting of a series of links that populate the second frame. On start-up the second frame has a log in screen and the navigation frame just has a company image. On successful login you want the navigation pane to have a series of links to tasks that the user can do. They click on a task and the second frame fills with a form etc. When the user logs out or the session is killed the navigation frame links are removed. How can I control and keep the navigation frame synchronised with what is going on? Any help is appreciated. Alex
Re: A bit of design help please?
alex-- i think the best way to do this is not to have the frameset appear until after a successful login. obviously, you don't want the links to your functional areas to appear until after the user has been authenticated. so throw up a non-framed page which contains your login form. after authenticating the user, forward to your frameset, where you can dynamically build navigation links in the navigation frame based on permissions, etc, and where you can prepopulate the content pane with a default page until the user selects a link. targeting the content pane from the link is simple HTML (a href=/SomeAction.do target=contentlink text/a). your forward should then go to the content pane, where your output is displayed. when the session dies or the user logs out, simply forward him/her to the login page or some other non-framed page. hope this helps... Original Message Follows From: Alex Colic [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] Subject: A bit of design help please? Date: Thu, 16 Aug 2001 08:59:06 -0400 Hi, I am wondering how the following can be done in Struts. You have a page with two frames, one being a navigation frame consisting of a series of links that populate the second frame. On start-up the second frame has a log in screen and the navigation frame just has a company image. On successful login you want the navigation pane to have a series of links to tasks that the user can do. They click on a task and the second frame fills with a form etc. When the user logs out or the session is killed the navigation frame links are removed. How can I control and keep the navigation frame synchronised with what is going on? Any help is appreciated. Alex _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: A bit of design help please?
I have always found that frames are bad, that is why I recommend using templates. We have a default template (with the nav bar, header, footer) and then pass the content in as a parameter. Carl -Original Message- From: Alex Colic [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 8:59 AM To: Struts Subject: A bit of design help please? Hi, I am wondering how the following can be done in Struts. You have a page with two frames, one being a navigation frame consisting of a series of links that populate the second frame. On start-up the second frame has a log in screen and the navigation frame just has a company image. On successful login you want the navigation pane to have a series of links to tasks that the user can do. They click on a task and the second frame fills with a form etc. When the user logs out or the session is killed the navigation frame links are removed. How can I control and keep the navigation frame synchronised with what is going on? Any help is appreciated. Alex
RE: A bit of design help please?
may I ask exactly how you implement this? (Passing content in as a parameter). D you have a paramter called, say content_id, and dependent on this you forward to the relevant action? Or include output from a relevant jsp? Thanks in advance. -Original Message- From: George, Carl [mailto:[EMAIL PROTECTED]] Sent: 16 August 2001 15:11 To: '[EMAIL PROTECTED]' Subject: RE: A bit of design help please? I have always found that frames are bad, that is why I recommend using templates. We have a default template (with the nav bar, header, footer) and then pass the content in as a parameter. Carl -Original Message- From: Alex Colic [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 8:59 AM To: Struts Subject: A bit of design help please? Hi, I am wondering how the following can be done in Struts. You have a page with two frames, one being a navigation frame consisting of a series of links that populate the second frame. On start-up the second frame has a log in screen and the navigation frame just has a company image. On successful login you want the navigation pane to have a series of links to tasks that the user can do. They click on a task and the second frame fills with a form etc. When the user logs out or the session is killed the navigation frame links are removed. How can I control and keep the navigation frame synchronised with what is going on? Any help is appreciated. Alex =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **=
Re: A bit of design help please?
Hi, Thanks for the reply. Just a bit of elaboration. What I should do is have a simple login page. No problem. On successful login I send them to a framed page. So far so good. Question about this dynamic links. Could you elaborate on how to create them using struts? Alex -- Date: Thu, 16 Aug 2001 09:37:04 -0400 To: [EMAIL PROTECTED] From: Jon Crater [EMAIL PROTECTED] Subject: Re: A bit of design help please? Message-ID: [EMAIL PROTECTED] alex-- i think the best way to do this is not to have the frameset appear until after a successful login. obviously, you don't want the links to your functional areas to appear until after the user has been authenticated. so throw up a non-framed page which contains your login form. after authenticating the user, forward to your frameset, where you can dynamically build navigation links in the navigation frame based on permissions, etc, and where you can prepopulate the content pane with a default page until the user selects a link. targeting the content pane from the link is simple HTML (a href=/SomeAction.do target=contentlink text/a). your forward should then go to the content pane, where your output is displayed. when the session dies or the user logs out, simply forward him/her to the login page or some other non-framed page. hope this helps...
RE: A bit of design help please?
Here is the template file: %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri=/WEB-INF/tlds/struts.tld prefix=struts % % String msg = request.getParameter(page); % template:insert template='/NavTemplate.jsp' template:put name='title' content='Navigation' direct='true'/ template:put name='header' content='/NavBar.jsp' / template:put name='sidebar' content='/sidebar2.jsp' / template:put name='content' content='%= msg %' / template:put name='footer' content='/footer.html' / /table so the call would be http://server/Nav.jsp?page=theContentpage.jsp -Original Message- From: Mike Dewhirst [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 10:15 AM To: '[EMAIL PROTECTED]' Subject: RE: A bit of design help please? may I ask exactly how you implement this? (Passing content in as a parameter). D you have a paramter called, say content_id, and dependent on this you forward to the relevant action? Or include output from a relevant jsp? Thanks in advance. -Original Message- From: George, Carl [mailto:[EMAIL PROTECTED]] Sent: 16 August 2001 15:11 To: '[EMAIL PROTECTED]' Subject: RE: A bit of design help please? I have always found that frames are bad, that is why I recommend using templates. We have a default template (with the nav bar, header, footer) and then pass the content in as a parameter. Carl -Original Message- From: Alex Colic [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 8:59 AM To: Struts Subject: A bit of design help please? Hi, I am wondering how the following can be done in Struts. You have a page with two frames, one being a navigation frame consisting of a series of links that populate the second frame. On start-up the second frame has a log in screen and the navigation frame just has a company image. On successful login you want the navigation pane to have a series of links to tasks that the user can do. They click on a task and the second frame fills with a form etc. When the user logs out or the session is killed the navigation frame links are removed. How can I control and keep the navigation frame synchronised with what is going on? Any help is appreciated. Alex =** If you are not the intended recipient, employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination or copying of this communication and its attachments is strictly prohibited. If you have received this communication and its attachments in error, please return the original message and attachments to the sender using the reply facility on e-mail. Internet communications are not secure and therefore the UCLES Group does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of the UCLES Group unless otherwise specifically stated. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses although this does not guarantee that this email is virus free. **=
Re: A bit of design help please?
in your action class, create a collection of objects that the current user is allowed to access based upon his/her application permissions. i would envision the class of the collection member containing at least: String targetUrl; String linkText; and anything else that's relevant to your navigation menu. set that object as a session-scoped bean and iterate through it from your navigation jsp. alternatively, a better place for this collection is in a user profile object, which you could create on login to your application. put a reference to the collection inside your user profile object, set the user profile as a session scoped bean, then expose the collection to the jsp and iterate through it using the iterate tag. jon Original Message Follows From: Alex Colic [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] Subject: Re: A bit of design help please? Date: Thu, 16 Aug 2001 10:27:23 -0400 Hi, Thanks for the reply. Just a bit of elaboration. What I should do is have a simple login page. No problem. On successful login I send them to a framed page. So far so good. Question about this dynamic links. Could you elaborate on how to create them using struts? Alex -- Date: Thu, 16 Aug 2001 09:37:04 -0400 To: [EMAIL PROTECTED] From: Jon Crater [EMAIL PROTECTED] Subject: Re: A bit of design help please? Message-ID: [EMAIL PROTECTED] alex-- i think the best way to do this is not to have the frameset appear until after a successful login. obviously, you don't want the links to your functional areas to appear until after the user has been authenticated. so throw up a non-framed page which contains your login form. after authenticating the user, forward to your frameset, where you can dynamically build navigation links in the navigation frame based on permissions, etc, and where you can prepopulate the content pane with a default page until the user selects a link. targeting the content pane from the link is simple HTML (a href=/SomeAction.do target=contentlink text/a). your forward should then go to the content pane, where your output is displayed. when the session dies or the user logs out, simply forward him/her to the login page or some other non-framed page. hope this helps... _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Struts Bug? My Bug? Help!! Please!
I've got a multibox/iterate combination form. My webapp works when there is something to submit. When I check at least one value checked in my multiboxes, I get the expected result. When there is nothing checked in my multiboxes, my form object is the same as it was before I changed the checkboxes. For example, I'll have 4 checkboxes displayed, representing 4 strings, String1, String2, String3, String4. I will check String2, press submit, and I receive the correct form in my ActionClass. After updating the form object and returning to my multibox page, if I uncheck String2 and submit, the form I receive contains String2 as being checked. My form contains 3 String arrays, one of which contains links, one contains the string names, and the other contains the string names which are checked. I have done as much testing as I can, gone through my code, and cannot find a bug. Is this a bug (or perhaps it is a feature ;-) ) of Struts? If this isn't enough info, I can send code. What is going on? Thanks so much! Becky _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Struts Bug? My Bug? Help!! Please!
Here is a simplified overview of what you need to do. If you still would like code, I can still supply you with it, but I think this will be easier to understand. ActionForm: 2 fields with associated getter and setters: String[] CheckboxNames String[] CheckboxValues You must populate this form before you hit the JSP to display it (if you want to preset the values). So, figure out all the possible values, and then figure out what you want checked. So, for example... checkboxNames[0] = String1; checkboxNames[1] = String2; checkboxNames[2] = String3; checkboxNames[3] = String4; and checkboxValues[0] = String2; checkboxValues[1] = String4; Then say MyForm form = new MyForm(); form.setCheckboxNames(checkboxNames); form.setCheckboxValues(checkboxValues); And put the form in the session. When you get to your jsp, retreive the form from the session, and place it into the page context: pageContext.setAttribute(MyForm, myform , PageContext.PAGE_SCOPE); Then, where you want the multiple checkboxes on your jsp, do the following: html:form name=MyForm action=entry.do type=com.mypackagemname.MyForm TABLE border=1 logic:iterate name=MyForm property=CheckboxNames id=item1 TR TD align=center bean:write name=item1 / /TD TD align=center html:multibox property=CheckboxValues bean:write name=item1 / /html:multibox /TD /TR /logic:iterate /TABLE html:submit value=Save Changes/ html:reset/ /html:form THen when you press submit and go to your actionClass, you can compare CheckboxNames to CHeckboxValues to see what was checked. Did that explain it enough? Hope it helps, Becky Original Message Follows From: Prashanth_Thm [EMAIL PROTECTED] To: Becky Moyer [EMAIL PROTECTED] Subject: RE: Struts Bug? My Bug? Help!! Please! Date: Fri, 20 Jul 2001 16:23:53 -0400 Hi, can you send me the code? Actually i want to get the checked strings in my Action class which i am not able toyour code would be helpful to me. and let me try to help you also if possible. Prashanth. -Original Message- From:Becky Moyer [SMTP:[EMAIL PROTECTED]] Sent:Friday, July 20, 2001 1:20 PM To: [EMAIL PROTECTED] Subject: Struts Bug? My Bug? Help!! Please! I've got a multibox/iterate combination form. My webapp works when there is something to submit. When I check at least one value checked in my multiboxes, I get the expected result. When there is nothing checked in my multiboxes, my form object is the same as it was before I changed the checkboxes. For example, I'll have 4 checkboxes displayed, representing 4 strings, String1, String2, String3, String4. I will check String2, press submit, and I receive the correct form in my ActionClass. After updating the form object and returning to my multibox page, if I uncheck String2 and submit, the form I receive contains String2 as being checked. My form contains 3 String arrays, one of which contains links, one contains the string names, and the other contains the string names which are checked. I have done as much testing as I can, gone through my code, and cannot find a bug. Is this a bug (or perhaps it is a feature ;-) ) of Struts? If this isn't enough info, I can send code. What is going on? Thanks so much! Becky _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Struts Bug? My Bug? Help!! Please!
Hi Becky, Did you override the reset () method of ActionForm? If you didn't you need to set the Attribute of your ActionForm object that represents the multibox to null. Like: public void reset(ActionMapping mapping, HttpServletRequest request) { this.action = Create; this.autoConnect = false; this.yourMultiboxNames = null; } --Abraham -Original Message- From: Becky Moyer [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 1:20 PM To: [EMAIL PROTECTED] Subject: Struts Bug? My Bug? Help!! Please! I've got a multibox/iterate combination form. My webapp works when there is something to submit. When I check at least one value checked in my multiboxes, I get the expected result. When there is nothing checked in my multiboxes, my form object is the same as it was before I changed the checkboxes. For example, I'll have 4 checkboxes displayed, representing 4 strings, String1, String2, String3, String4. I will check String2, press submit, and I receive the correct form in my ActionClass. After updating the form object and returning to my multibox page, if I uncheck String2 and submit, the form I receive contains String2 as being checked. My form contains 3 String arrays, one of which contains links, one contains the string names, and the other contains the string names which are checked. I have done as much testing as I can, gone through my code, and cannot find a bug. Is this a bug (or perhaps it is a feature ;-) ) of Struts? If this isn't enough info, I can send code. What is going on? Thanks so much! Becky _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: Struts Bug? My Bug? Help!! Please!
Thank you! I forgot about that. Thanks for jogging my memory. I know I've read about that in the mailing list somewhere before, but I couldn't find it. I appreciate your quick response. Becky Original Message Follows From: Abraham Kang [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Struts Bug? My Bug? Help!! Please! Date: Fri, 20 Jul 2001 14:07:44 -0700 Hi Becky, Did you override the reset () method of ActionForm? If you didn't you need to set the Attribute of your ActionForm object that represents the multibox to null. Like: public void reset(ActionMapping mapping, HttpServletRequest request) { this.action = Create; this.autoConnect = false; this.yourMultiboxNames = null; } --Abraham -Original Message- From: Becky Moyer [mailto:[EMAIL PROTECTED]] Sent: Friday, July 20, 2001 1:20 PM To: [EMAIL PROTECTED] Subject: Struts Bug? My Bug? Help!! Please! I've got a multibox/iterate combination form. My webapp works when there is something to submit. When I check at least one value checked in my multiboxes, I get the expected result. When there is nothing checked in my multiboxes, my form object is the same as it was before I changed the checkboxes. For example, I'll have 4 checkboxes displayed, representing 4 strings, String1, String2, String3, String4. I will check String2, press submit, and I receive the correct form in my ActionClass. After updating the form object and returning to my multibox page, if I uncheck String2 and submit, the form I receive contains String2 as being checked. My form contains 3 String arrays, one of which contains links, one contains the string names, and the other contains the string names which are checked. I have done as much testing as I can, gone through my code, and cannot find a bug. Is this a bug (or perhaps it is a feature ;-) ) of Struts? If this isn't enough info, I can send code. What is going on? Thanks so much! Becky _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
pleaseeee help!!! please help guys....is it possible to update properties of an object in an iteration?
-Original Message- From: Dudley Butt@i-Commerce [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 2:47 PM To: [EMAIL PROTECTED] Subject: very important please help guysis it possible to update prope rties of an object in an iteration? pleeaaasssee help What i have is this... html:form action=/eFilerAdd center . . . tr th align=center bean:message key=eFiler.firstName/ /th th align=center bean:message key=eFiler.initials/ /th th align=center bean:message key=eFiler.lastName/ /th th align=center bean:message key=eFiler.idNumber/ /th th align=center bean:message key=eFiler.state/ /th th align=center nbsp; /th th align=center html:link page=/eFilerUpdateState.do?action=UpdateState bean:message key=eFilerList.activate.deactivate//html:link /th /tr logic:iterate id=eFilerList name=eFilerList scope=request property=efilers tr td align=center bean:write name=eFilerList property=firstName filter=true/ /td td align=center bean:write name=eFilerList property=initials filter=true/ /td td align=center bean:write name=eFilerList property=lastName filter=true/ /td td align=center bean:write name=eFilerList property=idNumber/ /td td align=center bean:write name=eFilerList property=state/ /td td align=center html:link page=/eFilerEdit.do?action=Edit bean:message key=eFilerList.edit//html:link /td td align=center html:checkbox name=eFilerList property=state/ /td /tr /logic:iterate /table I want ot update the state property using the checkbox html:checkbox name=eFilerList property=state/. does anyone have any suggestions? Pleeeaaaeee!!
Re: Help PLEASE!!!! How do you create struts template file usingframe instead of table
Hi Anh, Does your application is at your server root directory, or in a site directory (like struts-example) ? In this later case, you need to prefix getted url (template:get name='header'/) with your site url (%=request.getContextPath()%) like in the following : frame name="headerFrame" src="%=request.getContextPath()%template:get name='header'/" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize Do the same for each getted url. If this doesn't work, could you compare the url shown by your browser, and the url generated in the html file (browser-view-source ...) ? Does the file exist for the generated url ? Cedric "Hoang, Anh" wrote: Hi Mr. DuMoulin, Thank you for answering my question in both component and template. Template and Component are similar so I thought I try both. Any way, I had tried using component and template the way you show me, but I only see the frame display but nothing else but the following error: "Action canceled Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable." The reason I want to use Frame is that I find a javascript menu that works for both IE and Netscape which I want to use for our web application, the problem is that it works only for Frame. Attached is the code that I have in my template and my setup page. If you have time please take a look and tell me what did I do wrong. Thank you very much for your help. I do really appreciated that. anh below is the code in my template.jsp ** %@ taglib uri="/struts-template.tld" prefix="template" % %-- Frameset Layout component parameters : title, header, menu, body, footer --% html head titletemplate:get name="title"//title /head frameset rows="16%,*" cols="19%,*" frame name="logoFrame" src="JDPLogo.gif" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize frame name="headerFrame" src="template:get name='header'/" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize frame name="menuFrame" src="template:get name='menu'/" marginwidth="0" marginheight="5" scrolling="auto" border="0" frameborder="no" noresize frameset rows="84%,*" frame name="mainFrame" src="" marginwidth="5" marginheight="5" scrolling="auto" border="0" frameborder="no" noresize frame name="footerFrame" src="template:get name='menu'/" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize /frameset /frameset /html * And here is the code from my insert tag: %@ taglib uri="/struts-template" prefix="template" % %@ taglib uri="/app" prefix="app" % app:checkLogon / template:insert template="/jsp/mainFrameTemplate.jsp" flush="true" template:put name="title" content="JDP Home Site" direct="true"/ template:put name="header" content="/jsp/header.jsp" direct="true"/ template:put name="menu" content="/jsp/expandable.html" direct="true" template:put name="footer" content="/jsp/footer.jsp" direct="true"/ /template:insert *** -Original Message- From: Cedric Dumoulin [SMTP:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 3:10 AM To: [EMAIL PROTECTED] Subject: Re: Help PLEASE How do you create struts template file using frame instead of table Hello Anh, In the template page, you have to write something like : --- frameset rows="73, *, 73" frame src="%=request.getContextPath()%template:get name="header" /" name="header" frame src="%=request.getContextPath()%template:get name="body" /" name="body" frame src="%=request.getContextPath()%template:get name="footer" /" name="footer" /frameset -- The scriplet %=request.getContextPath()% is not mandatory, but it allows to put relative URL rather than absolute URL in the insert tag. Thus, your page are portable on different sites. Your insert tag looks like : -- template:inse
Help PLEASE!!!! How do you create struts template file using frame instead of table
Hello all, In the template tag example, the template file used the table and table row to indicate where in the layout to insert the content. Is there a way to build the template file using frame instead of table? How do you specify the src so that it will take template:get name="anything"/ to be the file to be displayed in the frame? In other world, how do you change the following code: %@ taglib uri="/struts-template.tld" prefix="template" % %-- Layout component parameters : title, header, menu, body, footer --% HEAD titletemplate:get name="title"//title /HEAD body table tr td valign="top"template:get name="header"//td /tr tr td width="25%" valign="top"template:get name='menu'//td td colspan="100%" table template:get name="main" / /table /td /tr tr td colspan="2" template:get name="footer" / /td /tr /table To this code: %@ taglib uri="/struts-template.tld" prefix="template" % %-- Frameset Layout component parameters : title, header, menu, body, footer --% html head titletemplate:get name="title"//title /head frameset rows="16%,*" cols="19%,*" frame name="logoFrame" src="Logo.gif" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize frame name="headerFrame" src="" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize frame name="menuFrame" src="" marginwidth="0" marginheight="5" scrolling="auto" border="0" frameborder="no" noresize frameset rows="84%,*" frame name="mainFrame" src="" marginwidth="5" marginheight="5" scrolling="auto" border="0" frameborder="no" noresize frame name="footerFrame" src="" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize /frameset /frameset /html I tried to put src="template:get name='header'/" but it didn't work. Is it possible of using frame with template or table and row are the only choices? Thank you very much for your help.
Re: Help PLEASE!!!! How do you create struts template file using frame instead of table
Hello Anh, In the template page, you have to write something like : --- frameset rows="73, *, 73" frame src="%=request.getContextPath()%template:get name="header" /" name="header" frame src="%=request.getContextPath()%template:get name="body" /" name="body" frame src="%=request.getContextPath()%template:get name="footer" /" name="footer" /frameset -- The scriplet %=request.getContextPath()% is not mandatory, but it allows to put relative URL rather than absolute URL in the insert tag. Thus, your page are portable on different sites. Your insert tag looks like : -- template:insert template="/basic/myFramesetLayout.jsp" template:put name="title" content="My first page" direct="true" / template:put name="header" content="/common/header.jsp" direct="true"/ template:put name="footer" content="/common/footer.jsp" direct="true"/ template:put name="body" content="/basic/helloBody.jsp" direct="true"/ /template:insert - Don't forget direct="true" ! This instruct to output the string as is, rather than trying to include a jsp page. Cedric "Hoang, Anh" wrote: Hello all, In the template tag example, the template file used the table and table row to indicate where in the layout to insert the content. Is there a way to build the template file using frame instead of table? How do you specify the src so that it will take template:get name="anything"/ to be the file to be displayed in the frame? In other world, how do you change the following code: %@ taglib uri="/struts-template.tld" prefix="template" % %-- Layout component parameters : title, header, menu, body, footer --% HEAD titletemplate:get name="title"//title /HEAD body table tr td valign="top"template:get name="header"//td /tr tr td width="25%" valign="top"template:get name='menu'//td td colspan="100%" table template:get name="main" / /table /td /tr tr td colspan="2" template:get name="footer" / /td /tr /table To this code: %@ taglib uri="/struts-template.tld" prefix="template" % %-- Frameset Layout component parameters : title, header, menu, body, footer --% html head titletemplate:get name="title"//title /head frameset rows="16%,*" cols="19%,*" frame name="logoFrame" src="Logo.gif" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize frame name="headerFrame" src="" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize frame name="menuFrame" src="" marginwidth="0" marginheight="5" scrolling="auto" border="0" frameborder="no" noresize frameset rows="84%,*" frame name="mainFrame" src="" marginwidth="5" marginheight="5" scrolling="auto" border="0" frameborder="no" noresize frame name="footerFrame" src="" marginwidth="5" marginheight="5" scrolling="no" border="0" frameborder="no" noresize /frameset /frameset /html I tried to put src="template:get name='header'/" but it didn't work. Is it possible of using frame with template or table and row are the only choices? Thank you very much for your help.
newbie: org.apache.struts.digester, HELP please
Hi ! i'm a mewbie with struts. In fact, i'm very interested in the org.apache.struts.digester package for XML parsing. There a some questions: - I have some XML file that are processed by XSLT for rendering, and i have also to build an other version of the front end with JSP pages. IS STRUTS THE RIGHT TOOL ? - if so, is there some example that use the org.apache.struts.digester package ? Thanks Joel ___ Do You Yahoo!? -- Pour dialoguer en direct avec vos amis, Yahoo! Messenger : http://fr.messenger.yahoo.com
Help Please: Resource not found
When trying to call a JSP I receive the following message from Tomcat: javax.servlet.ServletException: Cannot find bean under name org.apache.struts.taglib.html.BEAN at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) I checked the STRUTS distribution and did not find it. Has anyone encountered this before? Thanks.
Need some help please
Hi, I have the following code in the iterate tag: struts:enumerate id="product" name="dispProductsBean" property="products" tr td align="left" struts:htmlProperty name="product" property="productID"/ /td td align="left" struts:radio name="product" property="productID" value="productID" / /td td align="left" % String pID = "dispCategories.do?id=4"; % struts:link href="%= pID %" struts:htmlProperty name="product" property="name"/ /struts:link /td td align="left" struts:htmlProperty name="product" property="description"/ /td /tr /struts:enumerate How do I set the value of the radio button to the value of the struts:htmlProperty name="product" property="productID"/ Thanks Sharmila Pandith Software Engineer iXL Inc. phone: 212-500-5180 AIM: spandith Yahoo: spandith MSN: spandith This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended recipient, dissemination of this communication is prohibited. If you have received this communication in error, please erase all copies of the message and its attachments and notify us immediately.
Re: Need some help please
On 1/19/2001 at 12:52 PM [EMAIL PROTECTED] wrote: How do I set the value of the radio button to the value of the struts:htmlProperty name="product" property="productID"/ Using the current builds, you would do something like this (taken from the example application). Build a bean to hold the collection of radio button options. Store it in the request context. %-- In real life, these would be loaded from a database --% % java.util.ArrayList list = new java.util.ArrayList(); list.add(new org.apache.struts.example.LabelValueBean("IMAP Protocol", "imap")); list.add(new org.apache.struts.example.LabelValueBean("POP3 Protocol", "pop3")); pageContext.setAttribute("serverTypes", list); % Reference the bean in the options tag. html:select property="subscription.type" html:options collection="serverTypes" property="value" labelProperty="label"/ /html:select In your case, I think it might be html:select property="dispProductsBean" html:options collection="property" property="productID"/ /html:select -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 425-0252; Fax 716 223-2506. -- http://www.husted.com/about/struts/
RE: help, please!
1. In tomcat 3.2 template:put work properly, but with resin 1.2.1 body of this tag not processed. I also had problems with the recently updated template:put tag under Resin (and had instead been using your template:extput, Oleg) but the very latest Resin snapshot release (1-2-2001) seems to have fixed some bugs relating to tag body content; I'm now able to use the stock template:put tag with Resin. Andy Boyko [EMAIL PROTECTED]
RE: Re[2]: help, please!
I try to use 2001-01-05 version from CVS - put tag has strange behavior. Do you mean the CVS version of Resin, or of Struts? It's Resin that had the problem, circa 1.2.1... After upgrading Resin to 2001-01-03, and using the current CVS version of struts, I am able to use template:put in all three ways of supplying its content. Andy Boyko [EMAIL PROTECTED]