Avoiding applet use
Hi all, one day some1 of you said that using applets in webapps wasn't a good choice. I don't like applets too, but for example, can someone explain to me how to handle the rows of an invoice or an order? Infact rows can shrink and grow, and I should be able to pickup items from a list. It would be very nice and smart if I could make such a form only with struts-el but I can't figure out how! Is there someone that can show me an example to take inspiration? Thanks in advance kiuma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat problem
Hi, I'm using jboss+jetty v 3.0.6 with struts no problems at all. If I try to use jboss+tomcat elements in my pages (JSTL styled) elements are repeated in the same page every time I access it. Can you explain me why? regards, kiuma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: Refresh on MSIE, PLEASE HELP!! NOT SOLVED
Ok, I've partially solved the problem in a bizarre way: (remember that the problem was connected only with forms content) Previously I had a list in my jsp page containing: html-el:button property=edit onclick=window.open('../openActivCenter.do?id=${currentActivCenter.id}', '_self'); bean-el:message key=button.view.edit/ /html-el:button I replaced it with html-el:submit property=action onclick=setObjectValue( 'selectedAc', '${currentActivCenter.id}' ); bean-el:message key=button.view.edit/ /html-el:submit modified the relative action, and now it works. Can some1 explain me why? thx, kiuma Mark Galbreath ha scritto: Unfortunately, IE pretty much ignores Pragma header settings. The best you can do is go to Tools - Internet Options - Temporary Internet Files - Settings - Check for newer versions on every visit to page. Mark -Original Message- From: Karim Saloojee [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 8:34 AM I know that in IE you sometimes have to set the response headers in Java, e.g: % response.setHeader(Pragma, no-cache); response.setDateHeader(Expires, 0); response.setHeader(Cache-Control, no-cache); % Put that in skel.jsp. One last thing, make sure you have cleared out your IE cache before re-testing (Tools Internet Options Delete Files Delete All Offline Content Ok). -- 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]
Refresh on MSIE, PLEASE HELP!!
Hello, I'm having big troubles with MSIE because it doesn't refresh the content of my forms. I've put META HTTP-EQUIV=expires CONTENT=0 META HTTP-EQUIV=Pragma CONTENT=no-cache META HTTP-EQUIV=Cache-Control CONTENT=no-cache but it doesn't refresh my pages! How to do to refresh my pages? thanks, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Refresh on MSIE, PLEASE HELP!!
[EMAIL PROTECTED] ha scritto: We use the following code snippet to prevent the browsers from caching. meta http-equiv=pragma content=no cache meta http-equiv=cache-control content=no store meta http-equiv=expires content=0 Mike -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 11:30 AM To: Struts Users Mailing List Subject: Refresh on MSIE, PLEASE HELP!! Hello, I'm having big troubles with MSIE because it doesn't refresh the content of my forms. I've put META HTTP-EQUIV=expires CONTENT=0 META HTTP-EQUIV=Pragma CONTENT=no-cache META HTTP-EQUIV=Cache-Control CONTENT=no-cache but it doesn't refresh my pages! How to do to refresh my pages? thanks, kiuma -- To unsubscribe, e-mail: mailto:struts-user- [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] . Sadly this doesn't solve the problem! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Refresh on MSIE, PLEASE HELP!! NOT SOLVED
Hirschmann, Bernhard ha scritto: Sadly this doesn't solve the problem! Does your browser use a http proxy? Maybe this is the reason. Bernhard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] . No proxy set. The fact is that with Mozilla works but not with MSIE. I'm using tiles and I see this strange bheav. I'm using tiles so I have %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/struts-bean-el.tld prefix=bean-el % tiles:insert page=/skel.jsp flush=true tiles:put name='title' content='WebAppointments v1.0' direct='true'/ tiles:put name='topborder' content='/topborder.jsp'/ tiles:put name='menu' content='/secure/menu.jsp'/ tiles:put name='centerframe' content='/secure/activitycenteredit_center.jsp'/ /tiles:insert I write the server current time in '/secure/menu.jsp' and '/secure/activitycenteredit_center.jsp' which contains the form. but, while in men the time is update when i access the page, /secure/activitycenteredit_center.jsp continue to hold old values. in skel.jsp' header I've put meta http-equiv=pragma content=no cache meta http-equiv=cache-control content=no store meta http-equiv=expires content=0 The problem is only with MSIE!! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: AW: Refresh on MSIE, PLEASE HELP!! NOT SOLVED
[EMAIL PROTECTED] ha scritto: Kiuma, As per Microsoft Support site, you will need to place another set of meta tags after the closing /body tag. This has to do with the way the headers are evaluated and the caching algorithm utilized by IE. So your ending code would look something like this. HTML HEAD TITLE---/TITLE META HTTP-EQUIV=Pragma CONTENT=no-cache /HEAD BODY Text in the Browser Window /BODY HEAD META HTTP-EQUIV=Pragma CONTENT=no-cache /HEAD /HTML Keep in mind there is also an issue with the pragma tag in IE5 and you may need to set the following: META HTTP-EQUIV=Expires CONTENT=-1 There is a fairly good article at the below link wich explains it in more detail. http://www.htmlgoodies.com/beyond/nocache.html#ie5 HTH, Todd G. Nist From: kiuma [EMAIL PROTECTED] Date: 2003/01/15 Wed AM 08:00:12 EST To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: AW: Refresh on MSIE, PLEASE HELP!! NOT SOLVED Hirschmann, Bernhard ha scritto: Sadly this doesn't solve the problem! Does your browser use a http proxy? Maybe this is the reason. Bernhard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] . No proxy set. The fact is that with Mozilla works but not with MSIE. I'm using tiles and I see this strange bheav. I'm using tiles so I have %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/struts-bean-el.tld prefix=bean-el % tiles:insert page=/skel.jsp flush=true tiles:put name='title' content='WebAppointments v1.0' direct='true'/ tiles:put name='topborder' content='/topborder.jsp'/ tiles:put name='menu' content='/secure/menu.jsp'/ tiles:put name='centerframe' content='/secure/activitycenteredit_center.jsp'/ /tiles:insert I write the server current time in '/secure/menu.jsp' and '/secure/activitycenteredit_center.jsp' which contains the form. but, while in men the time is update when i access the page, /secure/activitycenteredit_center.jsp continue to hold old values. in skel.jsp' header I've put meta http-equiv=pragma content=no cache meta http-equiv=cache-control content=no store meta http-equiv=expires content=0 The problem is only with MSIE!! -- 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] . Cut paste but the result is the same! P.s. I'm using JBoss3.0.4 + Jetty + Struts_b3 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
run-as
Hello struts-guys, can anybody tell me how to use run-as tag in web.xml? I've tryed: servlet servlet-namestruts/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 init-param param-namedebug/param-name param-value3/param-value /init-param init-param param-namedetail/param-name param-value3/param-value /init-param init-param param-namevalidating/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup run-as role-nameAdmin/role-name /run-as /servlet but the role is always the same when I try to access my ejb (i.e. User role remains User, not Admin as I wish) thanks in advance, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using href's tp call an Action class.
It should be a href=/FormsAreUs/listMembers.doFoo/a as you probably have defined servlet-mapping servlet-namestruts/servlet-name url-pattern*.do/url-pattern /servlet-mapping in your web.xml kiuma. John Bateman ha scritto: Hi I'm trying to make a simple html link a href=Foo/a call an Action class I have setup. My struts-config looks like this action path=/listMembers type=com.itworks.formsareus.member.action.ListMembersAction scope=request name= validate=true input= And my URL is a href=/FormsAreUs/listMembersFoo/a the FormsAreUs is where my application is deployed. No, as I am new to this and may be misusing terminology, I will explain that if I use a html:form stuff and call any of my other Actions that are configured they ALL worked 100% no problem. But when I try and use this 'href' (I cannot nor do I want to user a html form as I need it to be a hyperlink) I get the following error: /FormsAreUs/listMembers was not found on this server. I believe it's actually trying to locate a file called listMembers and 'struts' isn't picking up as a URL MAP. In addition I have tried changing the URL the 'full' URl I.E. http://www.servername.com/FormsAreUs/listMembers; and even just /listMembers or ./listMembers and NONE of them work. Any help or reference docs would be helpful. Thanks. -- 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]
Please help no getter method nightmare
Hi all, I've a big problem in my project: I can't add any getter method in any new form since on every jsp form i get back message. javax.servlet.jsp.JspException: No getter method for property fooProp of bean org.apache.struts.taglib.html.BEAN I tryed with several foms (also the famous FooForm), but the result is always the same. I attach my struts-config.xml file. The thing I really can't understand is that all forms perfectly work except the one defined in /chooseAgenda action or those created from scratch and inserted (no matter the position). Please I really need help !! kiuma ?xml version=1.0 encoding=UTF-8? !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-bean name=userForm type=com.wingstech.webappointments.ChkForm / form-bean name=listedCustomerForm type=com.wingstech.webappointments.ListedCustomerForm / form-bean name=customerEditForm type=com.wingstech.webappointments.CustomerEditForm / form-bean name=listedUserForm type=com.wingstech.webappointments.ListedUserForm / form-bean name=userEditForm type=com.wingstech.webappointments.UserEditForm / form-bean name=listedCalendarForm type=com.wingstech.webappointments.ListedCalendarForm / form-bean name=calendarEditForm type=com.wingstech.webappointments.CalendarEditForm / form-bean name=wwDayEditForm type=com.wingstech.webappointments.WwDayEditForm / form-bean name=holydayEditForm type=com.wingstech.webappointments.HolydayEditForm / form-bean name=listedSpecialitiesForm type=com.wingstech.webappointments.ListedSpecialitiesForm / form-bean name=specialityEditForm type=com.wingstech.webappointments.SpecialityEditForm / form-bean name=activityEditForm type=com.wingstech.webappointments.ActivityEditForm / form-bean name=listedActivCentersForm type=com.wingstech.webappointments.ListedActivCentersForm / form-bean name=activCenterEditForm type=com.wingstech.webappointments.ActivCenterEditForm / form-bean name=specialityViewForm type=com.wingstech.webappointments.SpecialityViewForm / form-bean name=activityViewForm type=com.wingstech.webappointments.ActivityViewForm / form-bean name=activityCenterViewForm type=com.wingstech.webappointments.ActivityCenterViewForm / form-bean name=freeAgendaViewForm type=com.wingstech.webappointments.FreeAgendaViewForm / form-bean name=customerAppendBookForm type=com.wingstech.webappointments.CustomerAppendBookForm / form-bean name=bookViewForm type=com.wingstech.webappointments.BookViewForm / form-bean name=chooseAgendaForm type=com.wingstech.webappointments.ChooseAgendaForm / /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=index path=/index.jsp / forward name=SystemError path=/error.html / /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Customer -- action path=/openCustomerList type=org.apache.struts.actions.ForwardAction name=listedCustomerForm parameter=/secure/customerlist.jsp input=/index.jsp validate=false /action action name=listedCustomerForm input=/secure/customerlist.jsp path=/listedCustomer type=com.wingstech.webappointments.ListedCustomerAction parameter=action validate=false forward name=Success path=/secure/customerlist.jsp redirect=true / forward name=CustomerAppend path=/openCustomerEdit.do?id= redirect=true / /action action path=/openCustomerEdit name=customerEditForm input=/secure/customeredit.jsp type=com.wingstech.webappointments.OpenCustomerEditAction validate=false forward name=Success path=/secure/customeredit.jsp redirect=true / forward name=Failure path=/secure/customerlist.jsp redirect=true / /action action path=/customerPostChanges name=customerEditForm input=/secure/customeredit.jsp type=com.wingstech.webappointments.CustomerEditAction validate=true forward name=Success path=/listedCustomer.do?id= redirect=true / forward name=Failure path=/secure/customeredit.jsp redirect=true / /action !-- User -- action path=/openUserList type=org.apache.struts.actions.ForwardAction name=listedUserForm parameter=/secure/userlist.jsp input=/index.jsp validate=false /action action path=/listedUser name=listedUserForm input=/secure/userlist.jsp type=com.wingstech.webappointments.ListedUserAction parameter=action validate=false forward name=Success path=/secure/userlist.jsp redirect=true
Re: Please help no getter method nightmare
I partially solved this error writing html-el:form action=/main name=chooseAgendaForm type=com.wingstech.webappointments.ChooseAgendaForm but why does this work only with this deprecated solution??? Thanks in advance, kiuma kiuma ha scritto: Hi all, I've a big problem in my project: I can't add any getter method in any new form since on every jsp form i get back message. javax.servlet.jsp.JspException: No getter method for property fooProp of bean org.apache.struts.taglib.html.BEAN I tryed with several foms (also the famous FooForm), but the result is always the same. I attach my struts-config.xml file. The thing I really can't understand is that all forms perfectly work except the one defined in /chooseAgenda action or those created from scratch and inserted (no matter the position). Please I really need help !! kiuma ?xml version=1.0 encoding=UTF-8? !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-bean name=userForm type=com.wingstech.webappointments.ChkForm / form-bean name=listedCustomerForm type=com.wingstech.webappointments.ListedCustomerForm / form-bean name=customerEditForm type=com.wingstech.webappointments.CustomerEditForm / form-bean name=listedUserForm type=com.wingstech.webappointments.ListedUserForm / form-bean name=userEditForm type=com.wingstech.webappointments.UserEditForm / form-bean name=listedCalendarForm type=com.wingstech.webappointments.ListedCalendarForm / form-bean name=calendarEditForm type=com.wingstech.webappointments.CalendarEditForm / form-bean name=wwDayEditForm type=com.wingstech.webappointments.WwDayEditForm / form-bean name=holydayEditForm type=com.wingstech.webappointments.HolydayEditForm / form-bean name=listedSpecialitiesForm type=com.wingstech.webappointments.ListedSpecialitiesForm / form-bean name=specialityEditForm type=com.wingstech.webappointments.SpecialityEditForm / form-bean name=activityEditForm type=com.wingstech.webappointments.ActivityEditForm / form-bean name=listedActivCentersForm type=com.wingstech.webappointments.ListedActivCentersForm / form-bean name=activCenterEditForm type=com.wingstech.webappointments.ActivCenterEditForm / form-bean name=specialityViewForm type=com.wingstech.webappointments.SpecialityViewForm / form-bean name=activityViewForm type=com.wingstech.webappointments.ActivityViewForm / form-bean name=activityCenterViewForm type=com.wingstech.webappointments.ActivityCenterViewForm / form-bean name=freeAgendaViewForm type=com.wingstech.webappointments.FreeAgendaViewForm / form-bean name=customerAppendBookForm type=com.wingstech.webappointments.CustomerAppendBookForm / form-bean name=bookViewForm type=com.wingstech.webappointments.BookViewForm / form-bean name=chooseAgendaForm type=com.wingstech.webappointments.ChooseAgendaForm / /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=index path=/index.jsp / forward name=SystemError path=/error.html / /global-forwards !-- == Action Mapping Definitions == -- action-mappings !-- Customer -- action path=/openCustomerList type=org.apache.struts.actions.ForwardAction name=listedCustomerForm parameter=/secure/customerlist.jsp input=/index.jsp validate=false /action action name=listedCustomerForm input=/secure/customerlist.jsp path=/listedCustomer type=com.wingstech.webappointments.ListedCustomerAction parameter=action validate=false forward name=Success path=/secure/customerlist.jsp redirect=true / forward name=CustomerAppend path=/openCustomerEdit.do?id= redirect=true / /action action path=/openCustomerEdit name=customerEditForm input=/secure/customeredit.jsp type=com.wingstech.webappointments.OpenCustomerEditAction validate=false forward name=Success path=/secure/customeredit.jsp redirect=true / forward name=Failure path=/secure/customerlist.jsp redirect=true / /action action path=/customerPostChanges name=customerEditForm input=/secure/customeredit.jsp type=com.wingstech.webappointments.CustomerEditAction validate=true forward name=Success path=/listedCustomer.do?id= redirect=true / forward name=Failure path=/secure/customeredit.jsp redirect=true / /action !-- User -- action path=/openUserList type=org.apache.struts.actions.ForwardAction name=listedUserForm parameter=/secure/userlist.jsp input=/index.jsp validate=false /action
No getter method for property selectedAc of bean org.apache.struts.taglib.html.BEAN
Hello, and Happy New Year every time I try to access to chooseAgenda.do I've the folowing error back. WARNING: Exception for /webappointments/secure/chooseagenda.jsp javax.servlet.jsp.JspException: No getter method for property selectedAc of bean org.apache.struts.taglib.html.BEAN I try to attach involved files , coud you be so kind to explain to me whats happening? regards kiuma ?xml version=1.0 encoding=UTF-8? !DOCTYPE jboss-web PUBLIC -//JBoss//DTD Web Application 2.3//EN http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd; jboss-web security-domainjava:/jaas/appointmentsApp/security-domain ejb-ref ejb-ref-nameejb/webappointments/UserSession/ejb-ref-name jndi-nameejb/webappointments/UserSession/jndi-name /ejb-ref ejb-ref ejb-ref-nameejb/webappointments/CustomerSession/ejb-ref-name jndi-nameejb/webappointments/CustomerSession/jndi-name /ejb-ref ejb-ref ejb-ref-nameejb/webappointments/CalendarSession/ejb-ref-name jndi-nameejb/webappointments/CalendarSession/jndi-name /ejb-ref ejb-ref ejb-ref-nameejb/webappointments/ActivitySession/ejb-ref-name jndi-nameejb/webappointments/ActivitySession/jndi-name /ejb-ref ejb-ref ejb-ref-nameejb/webappointments/AgendaSession/ejb-ref-name jndi-nameejb/webappointments/AgendaSession/jndi-name /ejb-ref /jboss-web /* * ListedActivCentersForm.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import java.util.*; /** * * @author kiuma * * This class is the struts form interface * * */ public class ListedAgendaForm extends ActionForm { //private String activCentersChecked[]; private String selectedAc; private Collection activCentersFound; /** Creates a new instance of ListedSpecialitiesForm */ public ListedAgendaForm() { super(); activCentersFound = new Vector(); resetFields(); } /** * Restets all fields */ public void resetFields () { selectedAc=; //activCentersChecked = new String[0]; activCentersFound.clear(); } public String getSelectedAc() { return this.selectedAc; } /* public String[] getActivCentersChecked() { return this.activCentersChecked; } */ public Collection getActivCentersFound() { return this.activCentersFound; } public String getActivCentersFoundSize() { return this.activCentersFound.size() + ; } //Setters public void setSelectedAc(String selectedAc) { this.selectedAc = selectedAc; } /* public void setActivCentersChecked(String activCentersChecked[]) { this.activCentersChecked = activCentersChecked; } */ public void setActivCentersFound(Collection activCentersFound) { this.activCentersFound = activCentersFound; } public void reset( ActionMapping mapping, HttpServletRequest req) { resetFields(); } /** * Called by the framework to validate the calendar's data * @return On success returns an empty ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest req) { return null; } } %@ taglib uri=/WEB-INF/struts-template.tld prefix=template % %@ taglib uri=/WEB-INF/struts-bean-el.tld prefix=bean-el % template:insert template=/skel.jsp template:put name='title' content='WebAppointments v1.0' direct='true'/ template:put name='topborder' content='/topborder.jsp'/ template:put name='menu' content='/secure/menu.jsp'/ template:put name='centerframe' content='/secure/chooseagenda_center.jsp'/ /template:insert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
multibox problem - No getter method
hello, On some forms I have a no getter method error , and I can't see the reason. The problem doesn't exist if I use for ex. a html-el.text element. This is my form public class ActivityCenterForAgendaForm extends ActionForm { private String str; private String acChecked[]; private Collection activityCenters; /** Creates a new instance of CustomerEditForm */ public ActivityCenterForAgendaForm() { super(); activityCenters = new Vector(); resetFields(); } /** * Restets all fields */ public void resetFields () { str = ciao; acChecked = new String[0]; activityCenters.clear(); } public void reset(ActionMapping mapping, HttpServletRequest req) { resetFields(); } //Setters public void setStr(String str) { this.str = str; } public void setAcChecked(String acChecked[]) { this.acChecked = acChecked; } public void setActivityCenters(Collection activityCenters) { this.activityCenters = activityCenters; } //Getters public String getStr() { return this.str; } public String[] getAcChecked() { return acChecked; } public Collection getActivityCenters() { return this.activityCenters; } public int getActivityCentersSize() { return this.activityCenters.size(); } /** * Called by the framework to validate the customer's data * @return On success returns an empty ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest req) { ActionErrors result = new ActionErrors(); return result; } } When I access to the relative page I have the following error: WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp javax.servlet.jsp.JspException: No getter method available for property caChecked for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161) at precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) Please help kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multibox problem - No getter method
David Rothschadl ha scritto: Kiuma, It looks like you need to change your property caChecked to acChecked David R kiuma [EMAIL PROTECTED] wrote:hello, On some forms I have a no getter method error , and I can't see the reason. The problem doesn't exist if I use for ex. a html-el.text element. This is my form public class ActivityCenterForAgendaForm extends ActionForm { private String str; private String acChecked[]; private Collection activityCenters; /** Creates a new instance of CustomerEditForm */ public ActivityCenterForAgendaForm() { super(); activityCenters = new Vector(); resetFields(); } /** * Restets all fields */ public void resetFields () { str = ciao; acChecked = new String[0]; activityCenters.clear(); } public void reset(ActionMapping mapping, HttpServletRequest req) { resetFields(); } //Setters public void setStr(String str) { this.str = str; } public void setAcChecked(String acChecked[]) { this.acChecked = acChecked; } public void setActivityCenters(Collection activityCenters) { this.activityCenters = activityCenters; } //Getters public String getStr() { return this.str; } public String[] getAcChecked() { return acChecked; } public Collection getActivityCenters() { return this.activityCenters; } public int getActivityCentersSize() { return this.activityCenters.size(); } /** * Called by the framework to validate the customer's data * @return On success returns an empty ActionErrors */ public ActionErrors validate( ActionMapping mapping, HttpServletRequest req) { ActionErrors result = new ActionErrors(); return result; } } When I access to the relative page I have the following error: WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp javax.servlet.jsp.JspException: No getter method available for property caChecked for bean under name org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161) at precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) Please help kiuma -- To unsubscribe, e-mail: For additional commands, e-mail: Remember: Peace, Love Understanding Always David R Sorry I've done it yet but nothing happens (write rewrite makes some misspell error ;-P) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [OT] HAPPY HOLIDAYS, EVERYONE
Happy holidays also from me! kiuma Justin Ashworth ha scritto: Amen, Craig. Have a Merry Christmas everyone! Justin -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, December 23, 2002 10:41 PM To: Struts Users Mailing List Subject: RE: [OT] HAPPY HOLIDAYS, EVERYONE On Mon, 23 Dec 2002, James Mitchell wrote: +1 trying-to-stay-politically-correct ...and a very Merry Christmas to you (if you believe in that sort of thing). /trying-to-stay-politically-correct not-giving-a-rip-about-political-correctness Let us all spend some time this joyous season reflecting on the magnitude of a God that would bother to create the likes of us, and His willingness to sacrifice a Son to maintain a relationship with all the idiots and dirtbags we have to deal with every day (including ourselves :-). Without Christ, there's nothing particularly interesting about Christmas, except for a determined marketing campaign by all the stores to imply how inadequate we are if we don't spend lots of money giving each other gifts. Oh, and a guilt trip to care about the needs of others for a couple of weeks every year, instead of all the time ... If all you care about during this season is excuses to party, New Year's Eve will suffice for that :-). /not-giving-a-rip-about-political-correctness James Mitchell Craig McClanahan (unashamedly wishing everyone a Merry Christmas!) -- To unsubscribe, e-mail: mailto:struts-user- [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]
Struts-el strange behav.
hello, I'm having the following problem (Furtunately I've found the solution). if i use html-el:hidden property='selectedCode'/ The container reply with an error WARNING: Exception for /webappointments/secure/specialitylistview.jsp javax.servlet.jsp.JspException: No getter method for property selectedCode of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161) at precompiled.secure.specialitylistview._jspService(specialitylistview.java:164) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366) If I use this form html-el:hidden property='selectedCode' value=''/ No error is shown and I can access the page. Do you have any comment? What's that? === Here it is a pice of my ActionForm (nothing special) public class ListedSpecialityViewForm extends ActionForm { private String specialitiesChecked[]; private Collection specialitiesFound; private String selectedCode; private String selectedDescription; /** Creates a new instance of ListedSpecialitiesForm */ public ListedSpecialityViewForm() { super(); specialitiesFound = new Vector(); resetFields(); } /** * Restets all fields */ public void resetFields () { selectedCode = ; selectedDescription = ; specialitiesChecked = new String[0]; specialitiesFound.clear(); } //Getters public String getSelectedCode() { return this.selectedCode; } public String getSelectedDescription() { return this.selectedDescription; } . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts-el strange behav.
Thank you guys, As usual we problems are so strange, one has to see in the xml file. Now I think xml is a very good innovation, but sometimes it is the hell ;-P thx, kiuma Beeson, Ashley wrote: No you don't because they are form elements then the form to which they are associated is inferred by the action path. An element will attempt to populate itself with the get method of the form. Make sure that you either declare the variable and give it a starting value (even if it just blank - anything but null) or have your getter return a non-null default value if the variable is currently null. -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: 26 November 2002 16:52 To: Struts Users Mailing List Subject: RE: Struts-el strange behav. You need to provide the name of your form bean in the name attribute. -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] hello, I'm having the following problem (Furtunately I've found the solution). if i use html-el:hidden property='selectedCode'/ The container reply with an error WARNING: Exception for /webappointments/secure/specialitylistview.jsp javax.servlet.jsp.JspException: No getter method for property selectedCode of bean org.apache.struts.taglib.html.BEAN -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- 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: javax.servlet.ServletException: Missing message for key index.title
I suppose you haven't defined the index.title value in your MessageResources.porperties. ravi shankar wrote: Hi friends, I've got the following error, which i got while opening a jsp file. javax.servlet.ServletException: Missing message for key index.title at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:461) at jsp._0002fjsp_0002fBookView_0002ejspBookView_jsp_3._jspService(_0002fjsp_0002fBookView_0002ejspBookView_jsp_3.java:150) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) ... pls help me solving the problem, i've checked the classpaths and files, which seems to be in place. ravi -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: URL encoding
Your prblem intered me too, especially because java code inside the page makes the code and indentation messy: So I've found this link http://www.basebeans.com/standard-examples/import/index.html There is the solution you are looking for, and other funny tricks. regards, kiuma P.S. : remember to use struts-el !! I'm using them and I'm Very happy with! Alex McLintock wrote: I am trying to insert a struts value into a parameter in a URL. However I need to URL encode the value because else characters like will confuse Netscape. Is there a proper way of doing this in Struts? I am currently doing something like this %@ page import=java.net.URLEncoder % a href=listDocument.do?action=Listtitle=%=URLEncoder.encode((( MetadataValueForm )title).getValue()) % bean:write name=title property=value/ /a But I am not happy about itI want as little java in the jsp template as possible. Alex Mc Openweb Analysts Ltd, London. Software For Complex Websites http://www.OWAL.co.uk/ Open Source Software Companies please register here http://www.OWAL.co.uk/oss_support/ -- 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: java.sql.Date formatting problem
thank u, You helped me to find my stupid problem. it was that i had defined tag lib as % taglib uri=/WEB-INF/fmt.tld prefix=f % and not as fmt. regards flare wrote: Hi all I've the following problem: if I try to use fmt:formatDate value=${currentCalendar.validityEnd} type=date/ nothing is displayed. validityEnd is of type java.sql.Date (and not null) what shoud I do to format it ? thx, kiuma perhaps you forgot % taglib prefix=fmt uri=http://java.sun.com/jstl/fmt; % I usually use fmt:formatDate pattern=dd/MM/yy value=${scopedVar.data}/ to format java.sql.Date and works like a charm regards -- 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
Something that doesn't work at the state of the art in Struts
Maybe I'm wrong, but if I have a submit button labeled da Mynbsp;submit it isnt mapped in LookupDispatchAction, so I have to label my submit button as My submit. Is it a bug, or a known issue? regards -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
java.sql.Date formatting problem
Hi all I've the following problem: if I try to use fmt:formatDate value=${currentCalendar.validityEnd} type=date/ nothing is displayed. validityEnd is of type java.sql.Date (and not null) what shoud I do to format it ? thx, kiuma -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: [ANNOUNCE] Struts In Action now in print
Congratulations!!! You have been my first approach to struts, I'll shurely buy your book!! (maybe in e-form) -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Conditional colour cell with logic:iterate
Go to www.w3c.org and search 4 css (to get more info) 4 your sample here create a file ( say common.css ) and write .warning { background-color: #FF8000; } .error { background-color: #FF; } .normal { background-color: #FF; } in your html/jsp header section insert link rel=stylesheet href=/path_to_css/common.css TYPE=text/css/ the you can refer these styles with class tag attribute (ex.: td class='normal') ciao, kiuma ps.: stop to insert java conde in your jsp pages. Make a small effort and try to use only tags Heligon Sandra wrote: Thanks a lot for your example, but is it possible to not mix Java code with Struts/HTML tags ? -Original Message- From: Sri Sankaran [mailto:Sri.Sankaran;sas.com] Sent: 23 October 2002 18:32 To: Struts Users Mailing List Subject: RE: Conditional colour cell with logic:iterate Oops... The .normal class must be terminated with a brace: style .warning { background-color: #FF8000; } .error { background-color: #FF; } .normal { background-color: #FF; /* or whatever your normal background color may be */ } --- This was missing /style -Original Message- From: Sri Sankaran Sent: Wednesday, October 23, 2002 12:30 PM To: Struts Users Mailing List Subject: RE: Conditional colour cell with logic:iterate style .warning { background-color: #FF8000; } .error { background-color: #FF; } .normal { background-color: #FF; /* or whatever your normal background color may be */ /style table logic:iterate id=anItem name=aBean property=list tr td!-- Id --/td td!-- Name --/td % String cellClass = null; String status = anItem.getStatus(); if(WARNING.equals(status) { cellClass = warning; } else if(ERROR.equals(status) { cellClass = error; } else { cellClass = normal; } % td class=%=cellClass% !-- Display status -- /td /table HTH Sri -Original Message- From: Heligon Sandra [mailto:sandra.heligon;nextream.fr] Sent: Wednesday, October 23, 2002 11:58 AM To: '[EMAIL PROTECTED]' Subject: Conditional colour cell with logic:iterate I will wish to know how to modify the colour of a cell according to the value of a bean's property. I have the following list Id Name Status I use logic:iterate tag to construct the list. The status property can take the following values: OK WARNING (orange), ERROR (red) I would like to make the background colour of the column status - green for status ok - orange for status warning - red for status error How can I do that ? thanks, Sandra -- 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 -- 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: PDF generation with Struts
A lot: Docbook 4 example on sf.net there are many projects One that is commercial, but a good product is elixir report Bruno Collet wrote: Hi all, Is there an easy way to generate PDF documents using Struts? Bruno __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ -- 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: about images and db
Thanks a lot! Antoni Reus wrote: A Diumenge 20 Octubre 2002 15:34, kiuma va escriure: thx , for your reply but I meant if was possible something like html ... hello!img src=''/ .. /html using only custom tags Then, the are 2 different requests, the one that returns the html and the one that returns the image (you can't include the image data in the html) In the html you could have: html ... hello! html:img page=/showImage.do paramId ... paramName / ... /html And showImage.do would be the Action that we talked about before. Antoni Reus wrote: Hi, A Diumenge 20 Octubre 2002 11:47, kiuma va escriure: What could you suggest to me to display images stored in a database. When I get them in a bean what could I do to show them on a web d. page? You can: 1. In a Action: response.setContentType( the type of the image ); OutputStream out = response.getOutputStream(); ... write the data (byte array?) to out return null; 2. Or you could save the bean representing the image (content type, and data) in the request and forward to a servlet, and write the data to the response in the servlet. -- 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
about images and db
What could you suggest to me to display images stored in a database. When I get them in a bean what could I do to show them on a web d. page? -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: about images and db
thx , for your reply but I meant if was possible something like html ... hello!img src=''/ .. /html using only custom tags Antoni Reus wrote: Hi, A Diumenge 20 Octubre 2002 11:47, kiuma va escriure: What could you suggest to me to display images stored in a database. When I get them in a bean what could I do to show them on a web d. page? You can: 1. In a Action: response.setContentType( the type of the image ); OutputStream out = response.getOutputStream(); ... write the data (byte array?) to out return null; 2. Or you could save the bean representing the image (content type, and data) in the request and forward to a servlet, and write the data to the response in the servlet. -- 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: about images and db
Of course I din't know if it was related with struts Now I know that struts doesn't have any kind of facilitation for this task. (I mean jsp tags), and I know how to put dyna imgs in my pages. Anyway I prefer mailarchive, I think it was better old dejanews Tero P Paananen wrote: What could you suggest to me to display images stored in a database. When I get them in a bean what could I do to show them on a web d. page? How is this related to Struts? Did you Google for answers before posting? -TPP -- 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
multibox, checkbox
Hello agaaain, My checkboxes both multi and normal don't suppo all empty values. I.e. I can transmit a checked empty value, but I can't all empty values: I REALLY don't know what to do ... leease! --useredit_center.jsp-- %taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %taglib uri=/WEB-INF/struts-html.tld prefix=html % %taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %taglib uri=/WEB-INF/c.tld prefix=c % c:set var='jspPrincipalId' value='${sessionScope.userEditForm.principalId}'/ c:set var=jspAllGroups value=${sessionScope.userEditForm.allGroups}/ html:form action=/userPostChanges table class='edit' cellpadding=0 cellspacing='0' tbody tr c:if test=${jspPrincipalId != null} tdbean:message key=label.login//td td c:out value=${jspPrincipalId}/ html:hidden property=principalId/ /td /c:if c:if test=${jspPrincipalId == null} tdbean:message key=label.login//td td width='100%' html:text property=principalId size=50 maxlength=255/ /td /c:if /tr tr tdbean:message key=label.passwd1//td td width='100%' html:password property=passwd1 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.passwd2//td td width='100%' html:password property=passwd2 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.surname//td td width='100%' html:text property=name1 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.name//td td width='100%' html:text property=name2 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.cf//td td width='100%' html:text property=cf size=50 maxlength=16/ /td /tr tr tdbean:message key=label.piva//td td width='100%' html:text property=piva size=50 maxlength=13/ /td /tr tr tdbean:message key=label.address//td td width='100%' html:text property=address size=50 maxlength=255/ /td /tr tr tdbean:message key=label.zip//td td width='100%' html:text property=zip size=50 maxlength=10/ /td /tr tr tdbean:message key=label.city//td td width='100%' html:text property=city size=50 maxlength=255/ /td /tr tr tdbean:message key=label.state//td td width='100%' html:text property=state size=50 maxlength=255/ /td /tr tr tdbean:message key=label.country//td td width='100%' html:text property=country size=50 maxlength=255/ /td /tr tr tdbean:message key=label.phone//td td width='100%' html:text property=tel size=50 maxlength=255/ /td /tr tr tdbean:message key=label.mailaddress//td td width='100%' html:text property=mail size=50 maxlength=255/ /td /tr tr tdbean:message key=label.website//td td width='100%' html:text property=web size=50 maxlength=255/
Re: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!
Ok suppose to have a Form with a checkbox named isOn and a submit button name Save a NOT checked value will produce: http://localhost:8080/webappointments/openChk.do?action=Save a checked value will produce: http://localhost:8080/webappointments/openChk.do?isOn=onaction=Save The problem is that if I have a checked value that I want to turn off I'll send http://localhost:8080/webappointments/openChk.do?action=Save the form function public void setIsOn( boolean isOn ) { this.isOn = isOn; } is not called and the value will not be changed. Where am I wrong ?? kiuma wrote: Hello agaaain, My checkboxes both multi and normal don't suppo all empty values. I.e. I can transmit a checked empty value, but I can't all empty values: I REALLY don't know what to do ... leease! --useredit_center.jsp-- %taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %taglib uri=/WEB-INF/struts-html.tld prefix=html % %taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %taglib uri=/WEB-INF/c.tld prefix=c % c:set var='jspPrincipalId' value='${sessionScope.userEditForm.principalId}'/ c:set var=jspAllGroups value=${sessionScope.userEditForm.allGroups}/ html:form action=/userPostChanges table class='edit' cellpadding=0 cellspacing='0' tbody tr c:if test=${jspPrincipalId != null} tdbean:message key=label.login//td td c:out value=${jspPrincipalId}/ html:hidden property=principalId/ /td /c:if c:if test=${jspPrincipalId == null} tdbean:message key=label.login//td td width='100%' html:text property=principalId size=50 maxlength=255/ /td /c:if /tr tr tdbean:message key=label.passwd1//td td width='100%' html:password property=passwd1 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.passwd2//td td width='100%' html:password property=passwd2 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.surname//td td width='100%' html:text property=name1 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.name//td td width='100%' html:text property=name2 size=50 maxlength=255/ /td /tr tr tdbean:message key=label.cf//td td width='100%' html:text property=cf size=50 maxlength=16/ /td /tr tr tdbean:message key=label.piva//td td width='100%' html:text property=piva size=50 maxlength=13/ /td /tr tr tdbean:message key=label.address//td td width='100%' html:text property=address size=50 maxlength=255/ /td /tr tr tdbean:message key=label.zip//td td width='100%' html:text property=zip size=50 maxlength=10/ /td /tr tr tdbean:message key=label.city//td td width='100%' html:text property=city size=50 maxlength=255/ /td /tr tr tdbean:message key=label.state//td td width='100%' html:text property=state size=50 maxlength=255/ /td /tr tr tdbean:message key=label.country//td td width='100%' html:text property=country size=50 maxlength=255/ /td /tr tr tdbean:message key=label.phone//td td width='100
Re: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!
Thanks a lot , you have been very clarifying. I've found a tip placing code in validate method : public ActionErrors validate( ActionMapping mapping, HttpServletRequest req) { String str = req.getParameter( isOn ); if (str == null) isOn = false; return null; } But it's a very dirty technique of course. Wendy Smoak wrote: I'm coming into this discussion late, so ignore me if I'm out in left field, but it sounds like you're unhappy that when *no* checkboxes are checked, *no* methods get called. When you submit the form, only successful form elements are sent in the request, so if *no* checkboxes are checked, *nothing* related to those checkboxes will be present in the request. Isn't this what the reset method is all about? The reset method will be called before Struts automagically populates all of your ActionForm fields. I can't tell what your Collection is from this post, but try clearing out *all* of the values in the Collection that handles your checkboxes in the reset() method of the Form. Then, if you uncheck all of the boxes and submit, you should see that none of them are checked when the form is redisplayed (or you use the data). Hope that helps, -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
multibox problem
hello I can't change checkboxes values can u help me please in ActionForm I have : public void setPrincipalPermissions( String principalPermissions ) { this.principalPermissions.add( principalPermissions ); } public Collection getPrincipalPermissions() { return principalPermissions; } In jsp I have html-el:multibox property=principalPermissions value=${permission}/ c:out value='${permission}'/ But I cant change values to Form . -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: multibox problem
And so how can I use a collection ? I used this but os u pointed doesn't work ! c:set var=principalPermissions value=${sessionScope.userEditForm.principalPermissions}/ c:set var=allGroups value=${sessionScope.userEditForm.allGroups}/ c:if test=${allGroups != null} c:forEach items=${allGroups} var=permission tr td align='left' html-el:multibox property=principalPermissions value=${permission}/c:out value='${permission}'/ /td /tr /c:forEach /c:if Karr, David wrote: The property associated with a multibox is not a collection. It's just a scalar. Look at the struts-exercise-taglib for simple examples of this. -Original Message- From: kiuma [mailto:kiuma;usa.net] Sent: Thursday, October 17, 2002 10:29 AM To: Struts Users Mailing List Subject: multibox problem hello I can't change checkboxes values can u help me please in ActionForm I have : public void setPrincipalPermissions( String principalPermissions ) { this.principalPermissions.add( principalPermissions ); } public Collection getPrincipalPermissions() { return principalPermissions; } In jsp I have html-el:multibox property=principalPermissions value=${permission}/ c:out value='${permission}'/ But I cant change values to Form . -- 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
again multibox PLEASE HELP!!
sorry all ,but I can't get out. The problem is that form doesnt take unchecked values: I have to take from my database a list of possible user roles. Then I have to check the ones that belong to that user. My solution, as pointed before doesn't work, please help! And now I'm complitely lost. If i use this form: public void setPrincipalPermissions( String principalPermissions ) { this.principalPermissions = principalPermissions; cPrincipalPermissions.add(principalPermissions); } public void setAllGroups( String allGroups ) { this.allGroups = allGroups; cAllGroups.add(allGroups); } public Collection getPrincipalPermissions() { return cPrincipalPermissions; } public Collection getAllGroups() { return cAllGroups; } I can read checked values, but I cant set them. if i use public void setPrincipalPermissions( String principalPermissions ) { this.principalPermissions = principalPermissions; cPrincipalPermissions.add(principalPermissions); } public void setAllGroups( String allGroups ) { this.allGroups = allGroups; cAllGroups.add(allGroups); } public String getPrincipalPermissions() { return principalPermissions; } public String getAllGroups() { return allGroups; } I can set values, but I can't get them. My jsp page is something like. c:if test=${allGroups != null} c:forEach items=${allGroups} var=permission tr td align='left' html-el:multibox property=principalPermissions value=${permission}/c:out value='${permission}'/ /td /tr /c:forEach /c:if Help me please -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Damn where is bug in my code????
Thx a lot for delucidation, which kind of debugger should I use , how could I use it, any docs? David M. Karr wrote: kiuma == kiuma [EMAIL PROTECTED] writes: kiuma Ok, I've understood that if I have the tag kiuma html-el:checkbox property=principalPermissions value=Foo kiuma and then I have a Collection getPrincipalPermissions() and kiuma setPrincipalPermissions(String value) kiuma and if I put the value Foo in the collection this should be checked. kiuma But I have some doubt about it. It's important to know how the three select button types (checkbox, multibox, and radio) work with respect to when the checked attribute gets set, and the values of the specified bean property and the value attribute value: Checkbox: property = true, yes, or on Multibox: property = any of the collection values Radio:property = value So, if you have a checkbox, the property value has to be a scalar, and having the value true, yes, or on. If you want it to be checked if the value is equal to any of the entries of a collection/array, then you need to use the multibox tag. If this isn't clear from the documentation, it is often helpful to run your application in a debugger, and set breakpoints in the Struts source code. You'll learn a lot. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Damn where is bug in my code????
Sorry I mean, as I'm a really newbie to enterprise-programming, I'm starting with a complex work ;-P Infact I'm using XDcolet to generate files, Jboss + jetty(or Tomcat) as containers, and struts as MVC framework. Then in my jsp I don't want any sort of java code, only tags. This is my really first time in this kind of apps, and thanks to u all, I'm making really big progresses. This work is particularry hard even because in my office I'm alone. Because all these different technologies, even if I'm using netBeans, it's not possible for me to use all its rad features. So can you suggest some debugging techniques to me? David Graham wrote: Every major IDE has a debugger in it. Some free ones are Eclipse and NetBeans. Of the two, I've only used eclipse and it works well. You can also debug jsps. David From: kiuma [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Damn where is bug in my code Date: Wed, 16 Oct 2002 16:51:35 +0200 Thx a lot for delucidation, which kind of debugger should I use , how could I use it, any docs? David M. Karr wrote: kiuma == kiuma [EMAIL PROTECTED] writes: kiuma Ok, I've understood that if I have the tag kiuma html-el:checkbox property=principalPermissions value=Foo kiuma and then I have a Collection getPrincipalPermissions() and kiuma setPrincipalPermissions(String value) kiuma and if I put the value Foo in the collection this should be checked. kiuma But I have some doubt about it. It's important to know how the three select button types (checkbox, multibox, and radio) work with respect to when the checked attribute gets set, and the values of the specified bean property and the value attribute value: Checkbox: property = true, yes, or on Multibox: property = any of the collection values Radio:property = value So, if you have a checkbox, the property value has to be a scalar, and having the value true, yes, or on. If you want it to be checked if the value is equal to any of the entries of a collection/array, then you need to use the multibox tag. If this isn't clear from the documentation, it is often helpful to run your application in a debugger, and set breakpoints in the Struts source code. You'll learn a lot. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Choose an Internet access plan right for you -- try MSN! http://resourcecenter.msn.com/access/plans/default.asp -- 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: Am I the only one using java.util.Date?
Since I'm connected to jboss I use java.sql.Date. Then I pass values in millis and use a GregorianCalendar to manage dates. Rick Reumann wrote: My business layer bean has a field as java.util.Date (example: birthDate). My form bean uses the String for this date (in this example.. String birthDate). The problem is I can't seem to use BeanUtils to copy the properties since it appears BeanUtils will only convert a java.sql.Date by default (get java.lang.IllegalArgumentException: argument type mismatch when using java.util.Date) . I tried dealing with registering a custom Coverter I wrote and registering it with ConvertUtils and below is a copy of the message I posted concerning this problem. I'm posting this question, though, because I'm curious how others have dealt with this situation? Maybe using the BeanUtils or PropertyUtils is not that common of a practice or most use a java.sql.Date as opposed to java.util.Date? Having dates in form fields is common so I'm curious how others transfer their form field dates to their business model (as java.util.Date?). Thanks for any info. Below was Converter question I posted last night, in case anyone is interested: I'm still having a bit of trouble trying to use BeanUtils to copy java.util.Date properties. It appears that it will work fine by default with java.sql.Date but isn't set up by default for java.util.Date (which I'm using for Dates in my business bean). I build a class implements Converter interface and used the ConvertUtils to register java.util.Date with this Converter. It works great converting the String form properties to Dates as expected. The question I have is how do I build a converter (or modify the existing one) that will convert the Date properties to String properties when I want to go the other way with the copyProperties (populate my DynaForm from a business bean)? I tried modifying the covert method of the Converter I created so that if the arg was a String property it would covert and return a Date but the problem is this Converter never got used when going the other direction (Date to String). Any ideas what I'm doing wrong or what I can do to solve this problem? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Damn where is bug in my code????
Please tell me if there is an error in this code kiuma wrote: Hi, now I've the following problem: in my jsp page I have c:set var='allGroups' value='${sessionScope.userEditForm.allGroups}'/ ... c:forEach items=${allGroups} var=permission tr td align='left' html-el:checkbox property=principalPermissions value=${permission} c:out value='${permission}'/ /html-el:checkbox /td /tr /c:forEach in the OpenEditAction I write: try { Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) { } and It correcty fills the list. Then I try to fill check values: Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() ).iterator(); while (iUserRoleData.hasNext()) { RoleData rData; rData = (RoleData)iUserRoleData.next(); System.out.println( Group: + rData.getRoleGroup() ); if ( rData.getRoleGroup().equals(Roles) ) { uForm.setPrincipalPermissions( rData.getRoleName() ); System.out.println( Name: + rData.getRoleName() ); } } This list is filled, but check boxes are not checked. Why?? Please help me. /* * OpenUserEditAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.*; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; import javax.ejb.CreateException; import javax.naming.NamingException; /** * * @author kiuma */ public class OpenUserEditAction extends Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { UserEditForm uForm = ((UserEditForm)form); uForm.resetFields(); UserData uData; UserSessionHome lHome; String principalId = ; HttpSession hSession = req.getSession(true); if (req.getParameter(principalId) != null) principalId = req.getParameter(principalId); try { lHome = (UserSessionHome) HttpSessionEJBHomeFactory.getHome( UserSession, UserSessionHome.class); } catch (Exception e) { return mapping.findForward( IStrutsConstants.FAILURE ); } UserSession cSession = lHome.create(); Collection cAllRoles = new Vector(); try { Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) { } if (principalId.equals()) { return mapping.findForward( IStrutsConstants.SUCCESS ); } try { uData = cSession.getUserByPrincipalId( principalId ); uForm.setPrincipalId( uData.getPrincipalId() ); uForm.setPasswd1( uData.getPassword() ); uForm.setPasswd2( uForm.getPasswd1() ); uForm.setName1( uData.getName1() ); uForm.setName2( uData.getName2() ); uForm.setCf( uData.getCf() ); uForm.setPiva( uData.getPiva() ); uForm.setAddress( uData.getAddress() ); uForm.setZip( uData.getZip() ); uForm.setCity( uData.getCity() ); uForm.setState( uData.getState() ); uForm.setCountry( uData.getCountry() ); uForm.setTel( uData.getTel() ); uForm.setWeb( uData.getWeb() ); uForm.setMail( uData.getMail() ); Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() ).iterator(); while (iUserRoleData.hasNext()) { RoleData rData; rData = (RoleData)iUserRoleData.next
Re: Damn where is bug in my code????
Ok, I've understood that if I have the tag html-el:checkbox property=principalPermissions value=Foo and then I have a Collection getPrincipalPermissions() and setPrincipalPermissions(String value) and if I put the value Foo in the collection this should be checked. But I have some doubt about it. micael wrote: I don't want to join the chorus, but isn't the first question Why should the boxes be checked?? What in this code makes you think those boxes will be checked? Maybe we should start there? At 12:41 PM 10/16/2002 +0800, you wrote: I cant be bothered reading the code, but my guess is Yes. btw: Do we get a prize if we guess correctly? -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 16, 2002 02:07 To: Struts Users Mailing List Subject: Re: Damn where is bug in my code Please tell me if there is an error in this code kiuma wrote: Hi, now I've the following problem: in my jsp page I have c:set var='allGroups' value='${sessionScope.userEditForm.allGroups}'/ ... c:forEach items=${allGroups} var=permission tr td align='left' html-el:checkbox property=principalPermissions value=${permission} c:out value='${permission}'/ /html-el:checkbox /td /tr /c:forEach in the OpenEditAction I write: try { Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) { } and It correcty fills the list. Then I try to fill check values: Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() ).iterator(); while (iUserRoleData.hasNext()) { RoleData rData; rData = (RoleData)iUserRoleData.next(); System.out.println( Group: + rData.getRoleGroup() ); if ( rData.getRoleGroup().equals(Roles) ) { uForm.setPrincipalPermissions( rData.getRoleName() ); System.out.println( Name: + rData.getRoleName() ); } } This list is filled, but check boxes are not checked. Why?? Please help me. /* * OpenUserEditAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.*; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; import javax.ejb.CreateException; import javax.naming.NamingException; /** * * @author kiuma */ public class OpenUserEditAction extends Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception UserEditForm uForm = ((UserEditForm)form); uForm.resetFields(); UserData uData; UserSessionHome lHome; String principalId = ; HttpSession hSession = req.getSession(true); if (req.getParameter(principalId) != null) principalId = req.getParameter(principalId); try { lHome = (UserSessionHome) HttpSessionEJBHomeFactory.getHome( UserSession, UserSessionHome.class); } catch (Exception e) { return mapping.findForward( IStrutsConstants.FAILURE ); } UserSession cSession = lHome.create(); Collection cAllRoles = new Vector(); try Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) } if (principalId.equals()) return mapping.findForward( IStrutsConstants.SUCCESS ); } try { uData = cSession.getUserByPrincipalId( principalId ); uForm.setPrincipalId( uData.getPrincipalId() ); uForm.setPasswd1( uData.getPassword() ); uForm.setPasswd2( uForm.getPasswd1() ); uForm.setName1( uData.getName1
Re: Damn where is bug in my code????
maybe I've missed name property ;-) kiuma wrote: Ok, I've understood that if I have the tag html-el:checkbox property=principalPermissions value=Foo and then I have a Collection getPrincipalPermissions() and setPrincipalPermissions(String value) and if I put the value Foo in the collection this should be checked. But I have some doubt about it. micael wrote: I don't want to join the chorus, but isn't the first question Why should the boxes be checked?? What in this code makes you think those boxes will be checked? Maybe we should start there? At 12:41 PM 10/16/2002 +0800, you wrote: I cant be bothered reading the code, but my guess is Yes. btw: Do we get a prize if we guess correctly? -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 16, 2002 02:07 To: Struts Users Mailing List Subject: Re: Damn where is bug in my code Please tell me if there is an error in this code kiuma wrote: Hi, now I've the following problem: in my jsp page I have c:set var='allGroups' value='${sessionScope.userEditForm.allGroups}'/ ... c:forEach items=${allGroups} var=permission tr td align='left' html-el:checkbox property=principalPermissions value=${permission} c:out value='${permission}'/ /html-el:checkbox /td /tr /c:forEach in the OpenEditAction I write: try { Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) { } and It correcty fills the list. Then I try to fill check values: Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() ).iterator(); while (iUserRoleData.hasNext()) { RoleData rData; rData = (RoleData)iUserRoleData.next(); System.out.println( Group: + rData.getRoleGroup() ); if ( rData.getRoleGroup().equals(Roles) ) { uForm.setPrincipalPermissions( rData.getRoleName() ); System.out.println( Name: + rData.getRoleName() ); } } This list is filled, but check boxes are not checked. Why?? Please help me. /* * OpenUserEditAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.*; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; import javax.ejb.CreateException; import javax.naming.NamingException; /** * * @author kiuma */ public class OpenUserEditAction extends Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception UserEditForm uForm = ((UserEditForm)form); uForm.resetFields(); UserData uData; UserSessionHome lHome; String principalId = ; HttpSession hSession = req.getSession(true); if (req.getParameter(principalId) != null) principalId = req.getParameter(principalId); try { lHome = (UserSessionHome) HttpSessionEJBHomeFactory.getHome( UserSession, UserSessionHome.class); } catch (Exception e) { return mapping.findForward( IStrutsConstants.FAILURE ); } UserSession cSession = lHome.create(); Collection cAllRoles = new Vector(); try Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) } if (principalId.equals()) return mapping.findForward( IStrutsConstants.SUCCESS ); } try { uData = cSession.getUserByPrincipalId( principalId ); uForm.setPrincipalId( uData.getPrincipalId() ); uForm.setPasswd1( uData.getPassword() ); uForm.setPasswd2( uForm.getPasswd1
Help with form variables
Hi all, I'm trying to do the following thing: c:if test=${principalId != null} tdbean-el:message key=label.login//td td c:out value=${principalId}/ html-el:hidden property=principalId/ /td /c:if c:if test=${principalId == null} tdbean-el:message key=label.login//td td width='100%' html-el:text property=principalId size=35 maxlength=255/ /td /c:if the problem is that I want to take control over principalId form var, but mine seems not to be the right solution. How can I make ? Thx, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Messages...
hello, I'm using jboss3.2b with struts. When I access peages I get the following log messages. What are they? 12:19:02,165 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.actions.LocalStrings', returnNull=true 12:19:07,023 INFO [PropertyMessageResources] Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnNull=true -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Damn where is bug in my code????
Hi, now I've the following problem: in my jsp page I have c:set var='allGroups' value='${sessionScope.userEditForm.allGroups}'/ ... c:forEach items=${allGroups} var=permission tr td align='left' html-el:checkbox property=principalPermissions value=${permission} c:out value='${permission}'/ /html-el:checkbox /td /tr /c:forEach in the OpenEditAction I write: try { Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) { } and It correcty fills the list. Then I try to fill check values: Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() ).iterator(); while (iUserRoleData.hasNext()) { RoleData rData; rData = (RoleData)iUserRoleData.next(); System.out.println( Group: + rData.getRoleGroup() ); if ( rData.getRoleGroup().equals(Roles) ) { uForm.setPrincipalPermissions( rData.getRoleName() ); System.out.println( Name: + rData.getRoleName() ); } } This list is filled, but check boxes are not checked. Why?? Please help me. /* * OpenUserEditAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.*; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; import javax.ejb.CreateException; import javax.naming.NamingException; /** * * @author kiuma */ public class OpenUserEditAction extends Action { public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { UserEditForm uForm = ((UserEditForm)form); uForm.resetFields(); UserData uData; UserSessionHome lHome; String principalId = ; HttpSession hSession = req.getSession(true); if (req.getParameter(principalId) != null) principalId = req.getParameter(principalId); try { lHome = (UserSessionHome) HttpSessionEJBHomeFactory.getHome( UserSession, UserSessionHome.class); } catch (Exception e) { return mapping.findForward( IStrutsConstants.FAILURE ); } UserSession cSession = lHome.create(); Collection cAllRoles = new Vector(); try { Collection cAllRolesData = cSession.getAllGroups(); Iterator iter = cAllRolesData.iterator(); UserGroupsData gData; while (iter.hasNext()) { gData = (UserGroupsData)iter.next(); uForm.setAllGroups( gData.getDescription() ); } } catch (Exception e) { } if (principalId.equals()) { return mapping.findForward( IStrutsConstants.SUCCESS ); } try { uData = cSession.getUserByPrincipalId( principalId ); uForm.setPrincipalId( uData.getPrincipalId() ); uForm.setPasswd1( uData.getPassword() ); uForm.setPasswd2( uForm.getPasswd1() ); uForm.setName1( uData.getName1() ); uForm.setName2( uData.getName2() ); uForm.setCf( uData.getCf() ); uForm.setPiva( uData.getPiva() ); uForm.setAddress( uData.getAddress() ); uForm.setZip( uData.getZip() ); uForm.setCity( uData.getCity() ); uForm.setState( uData.getState() ); uForm.setCountry( uData.getCountry() ); uForm.setTel( uData.getTel() ); uForm.setWeb( uData.getWeb() ); uForm.setMail( uData.getMail() ); Iterator iUserRoleData = cSession.getUserRoles( uData.getPrincipalId() ).iterator(); while (iUserRoleData.hasNext()) { RoleData rData; rData = (RoleData)iUserRoleData.next(); System.out.println( Group: + rData.getRoleGroup() ); if ( rData.getRoleGroup().equals(Roles
help with link rel=....
hello, Can s1 tell me how to convert the following tag link rel=stylesheet href=/webapointments/css/common.css TYPE=text/css/ in something like html:link rel=stylesheet page=/css/common.css TYPE=text/css/?? I know that this is not the correct form ;-)! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
help, I'm desperate!!!!
http://192.168.100.3:8080/webappointments/main.do generates: html head base href=http://192.168.100.3:8080/webappointments/secure/userlist.jsp; titleLista utenti/title/headlink rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ script language='JavaScript' src='../scripts/formscripts.txt'/script /head body class='centerframe' form name=listedUserForm method=POST action=/webappointments/listedUser.do table cellpadding=0 tbody tr td bCerca per cognome:/bnbsp; input type=submit name=action value=Cerca input type=text name=userToFind size=35 value=a /td /tr /tbody /table table class='list' cellpadding=10 cellspacing='0' tbody The problem is that I'm not able to view it with ather browsers than Mozilla 1.0 plz help -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help, I'm desperate!!!!
This is the page and it is perfectly blank under IE html head base href=http://192.168.100.3:8080/webappointments/secure/userlist.jsp; titleLista utenti/title/head link rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ SCRIPT language='JavaScript' src='../scripts/formscripts.txt' /head BODY class='centerframe' form name=listedUserForm method=POST action=/webappointments/listedUser.do table cellpadding=0 tbody tr td bCerca per cognome:/bnbsp; input type=submit name=action value=Cerca input type=text name=userToFind size=35 value= /td /tr /tbody /table table class='list' cellpadding=10 cellspacing='0' tbody tr class='odd' td class='odd' valign='top' align='center' br/ /td /tr /tbody /table p input type=submit name=action value=Aggiungi /p /form /body kiuma wrote: http://192.168.100.3:8080/webappointments/main.do generates: html head base href=http://192.168.100.3:8080/webappointments/secure/userlist.jsp; titleLista utenti/title/headlink rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ script language='JavaScript' src='../scripts/formscripts.txt'/script /head body class='centerframe' form name=listedUserForm method=POST action=/webappointments/listedUser.do table cellpadding=0 tbody tr td bCerca per cognome:/bnbsp; input type=submit name=action value=Cerca input type=text name=userToFind size=35 value=a /td /tr /tbody /table table class='list' cellpadding=10 cellspacing='0' tbody The problem is that I'm not able to view it with ather browsers than Mozilla 1.0 plz help -- 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: help, I'm desperate!!!!
plus a /html at the end. Sorry (broken cut paste) P.s. I'm using JBoss3.2b kiuma wrote: This is the page and it is perfectly blank under IE html head base href=http://192.168.100.3:8080/webappointments/secure/userlist.jsp; titleLista utenti/title/head link rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ SCRIPT language='JavaScript' src='../scripts/formscripts.txt' /head BODY class='centerframe' form name=listedUserForm method=POST action=/webappointments/listedUser.do table cellpadding=0 tbody tr td bCerca per cognome:/bnbsp; input type=submit name=action value=Cerca input type=text name=userToFind size=35 value= /td /tr /tbody /table table class='list' cellpadding=10 cellspacing='0' tbody tr class='odd' td class='odd' valign='top' align='center' br/ /td /tr /tbody /table p input type=submit name=action value=Aggiungi /p /form /body kiuma wrote: http://192.168.100.3:8080/webappointments/main.do generates: html head base href=http://192.168.100.3:8080/webappointments/secure/userlist.jsp; titleLista utenti/title/headlink rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ script language='JavaScript' src='../scripts/formscripts.txt'/script /head body class='centerframe' form name=listedUserForm method=POST action=/webappointments/listedUser.do table cellpadding=0 tbody tr td bCerca per cognome:/bnbsp; input type=submit name=action value=Cerca input type=text name=userToFind size=35 value=a /td /tr /tbody /table table class='list' cellpadding=10 cellspacing='0' tbody The problem is that I'm not able to view it with ather browsers than Mozilla 1.0 plz help -- 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]
javascript help
The previous problem was on script tag. head html-el:base/ titlebean-el:message key=title.userfinder//title link rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ SCRIPT language='JavaScript' src='../scripts/formscripts.txt' /head this is formscrpts.txt function selectAllChk( fromName, chkBoxName ) { var chkboxes = document.getElementsByTagName( 'input' ); for (i=0; i chkboxes.length; i++) { if (( chkboxes.item(i).getAttribute('type') == 'checkbox' ) ( chkboxes.item(i).getAttribute('name') == chkBoxName ) ) { chkboxes.item(i).checked =! chkboxes.item(i).checked; } } } What's wrong with it? Why inserting tag SCRIPT language='JavaScript' src='../scripts/formscripts.txt' doesn't make my app start? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: javascript help
nope sigh!! The problem is that the script works under mozilla!! Please help!! James Mitchell wrote: Are you trying to call selectAllChk when the page loads? James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 11:43 AM To: Struts Users Mailing List Subject: javascript help The previous problem was on script tag. head html-el:base/ titlebean-el:message key=title.userfinder//title link rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ SCRIPT language='JavaScript' src='../scripts/formscripts.txt' /head this is formscrpts.txt function selectAllChk( fromName, chkBoxName ) { var chkboxes = document.getElementsByTagName( 'input' ); for (i=0; i chkboxes.length; i++) { if (( chkboxes.item(i).getAttribute('type') == 'checkbox' ) ( chkboxes.item(i).getAttribute('name') == chkBoxName ) ) { chkboxes.item(i).checked =! chkboxes.item(i).checked; } } } What's wrong with it? Why inserting tag SCRIPT language='JavaScript' src='../scripts/formscripts.txt' doesn't make my app start? -- 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: help, I'm desperate!!!!
Thx a lot but I don't understand why if I write SCRIPT language='JavaScript' src='../scripts/formscripts.txt'/ it's not the same than SCRIPT language='JavaScript' src='../scripts/formscripts.txt'/SCRIPT Jeremy Lott wrote: Ray, Your problem is that you're starting your script tag but you are never ending it. If you add a /script after your beginning script tag you'll find it to be fixed. It is interpreting all of your html as javascript and not displaying it. I've testing this on IE 5.5 and that's what seems to make the difference. Jeremy -Original Message- From: Ray D'Antuono [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 10:05 AM To: Struts Users Mailing List Subject: Re: help, I'm desperate check that your stylesheet and javascript file links are correct. --- kiuma [EMAIL PROTECTED] wrote: link rel=stylesheet href=../css/common.css TYPE=text/css/ link rel=stylesheet href=../css/anagr.css TYPE=text/css/ SCRIPT language='JavaScript' src='../scripts/formscripts.txt' __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. -- 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: [ANNOUNCE] struts-layout 1.0b1
Seems very nice, but are the only possible layouts? Jean-Noel Ribette wrote: Hello everybody I'm pleased to announce that struts-layout 1.0 beta 1 - an open source tag library for struts that allows to speed up interface creation - is available for download. struts-layout includes the following features: - UI components tags: form, input fields, javascript date pick-up calendar, sortable list, pager, tabbed panel, treeview and a few more. - Layout tags: grid, row and column. - skin support: a struts-layout application can load different css file, allowing dynamic change of colors, fonts and images. - CRUD support: struts-layout input field can be displayed read-write or read-only in function of what you're doing (creating, editing or viewing data) A new tutorial explains how to build a simple struts-layout page. All the components can be seen live on a demonstration news server. Changes since previous version includes several bug fixes, enhancements and new tags. For more information, visit http://struts.application-servers.com, and http://struts.application-servers.com/DemoServeurDeNews/allNews.do?reqCode=showAllNews for the demonstration. Best regards, Jean-Noel Ribette --__/ \__--- improve Jean-Noël Ribette --/-\-- Software engineer -- 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]
Submit form
Hi all, I was wondering how to submit to a form using an image instead of a abutton. Do you have the answer ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Submit form
And could you please give it to me LOL :-D !!! Andrew Hill wrote: Yes. -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 22:02 To: Struts Users Mailing List Subject: Submit form Hi all, I was wondering how to submit to a form using an image instead of a abutton. Do you have the answer ? -- 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: Submit form
Thx a lot, It was exactly what I meant! Andrew Hill wrote: Actually if you use an html:image tag (or plain html along the lines of input type=image ...) when clicked the form will be submitted without need of JavaScript. If you need to do extra stuff in javascript first you can intercept this in the onclick event. Miguels suggestion to use an image in a link is also quite practical (Im doing this in several places in my current project and it works well) if you dont mind using JavaScript. -Original Message- From: Miguel Angel Mulero Martinez [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 22:27 To: Struts Users Mailing List Subject: RE: Submit form Put the image in a link, and use the onclik javascript function to do a real submit of the form. -Mensaje original- De: kiuma [mailto:[EMAIL PROTECTED]] Enviado el: miercoles, 09 de octubre de 2002 16:02 Para: Struts Users Mailing List Asunto: Submit form Hi all, I was wondering how to submit to a form using an image instead of a abutton. Do you have the answer ? -- 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] . -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Help with forwarding needed
Hi all, I have the following problem in struts-config.xml I defined: action path=/main parameter=/secure/webappointments.jsp type=org.apache.struts.actions.ForwardAction / in index.jsp I wrote: html-el:html head html-el:base/ titlebean:message key=title.index//title/head link rel=stylesheet href=./css/links.css TYPE=text/css/ /head body p html-el:link forward=main bean-el:message key=link.userlist/ /html-el:link /p /body /html-el:html but the result is HTTP ERROR: 500 Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named main RequestURI=/webappointments/ Please help me!!! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[STRUTS] Detecting multiple users with the same login
Hi, how can I detect multiple logged users in my system at the same time but from differen ip? I'm using jboss 3 and struts 1.2 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [STRUTS] Detecting multiple users with the same login
So, if i've understood, I have to create a login runnable servlet(load-oon-startup1/load-oon-startup) with a synchronized HashMap and check it every few times? Galbreath, Mark wrote: Store their login names and IPs in a context-scope hashtable upon login and remove them when their session expires. I'm not sure if Tomcat/JBoss has some kind of tracking mechanism that provides concurrent session info, but the documentation should tell you this. Mark -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 8:18 AM how can I detect multiple logged users in my system at the same time but from differen ip? -- 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: How to manage application properties?
You should prefer to use struts-config.xml to get applets props. Take a look to the samples bundled with struts and also use struts console to configure struts, at least at the beginning! C F wrote: Hello, This is a very newbie question I'm sure, so this might not be the appropriate forum. Maybe it belongs in the Tomcat forum? Not sure. Pretty basic objective I just want to be able to put application settings (things like path names, integer values, etc) in a *.properties file and access those properties from within my tomcat/struts(1.1) application. I see quite a bit of talk about ApplicationResources.properties, but it seems like people are only using that to store and retrieve messages. I'd rather not mix my messages with my settings. How do you do it? I'm aware of the java.util.properties class but I don't really know how to efficiently use it within the application servlet context (I don't want to reload it with every request). and I wouldn't know when to load it into application scope. anyway, you see that I don't have a clue. I can think of plenty of ways to do it, but I would like know the most common/accepted method(s). So any tips would be much appreciated :) Thanks! - Do you Yahoo!? New DSL Internet Access from SBC Yahoo! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: A question about struts ?
Wellcome! Zahid Rahman wrote: Hi, I was informed that the expert group can be found at Struts, as I am interested in building applications which support business critical processes. Is this the struts group ? I have no question on the implementations because the documents I have seen so far are very nicely structured. Best Regards, Zahid -- 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: This guy from the bank raised a question ?
WHAT ARROGANCE! Zahid Rahman wrote: Eddie Bush wrote that the designer of the architecture, Craig R. McClannahan is present on this line. I was on the websphere line and Don Carlos, from DB.COM was talking about it. So I mentioned it. I have also read at the www.jspinsider.com that many people have asked this question. What do you do about the back button on the browser ? The answer being nothing. Let the real experts answer if they so wish and don't if they do not wish to. That is their perogative. You are the one who wrote for some bizarre reason we don't owe you nothing. FYI - Mr. Ioin Woods wrote to me I think you had a question and the expert group can be found at struts. That is exactly the same thing eddie Bush wrote. ... the expert group can be found at Struts ... I don't believe in such coincidences but if Eddie Bush wishes to elaborate it would be nice on how he came up with that quote ... the expert group can be found at Struts ... The other message which says Welcome was nice aswell. It is spelt with two lls rather than one L. His/her first language isn't English.That much I have been able to deduce. I am doing some work at the moment and I don't appreciate such answers from you or any answers from you. Anyway I don't like your tone so do not answer my postings. There are two kinds of people in this world. If you have problems relating than let me put it this way. In a cowboy film you would be wearing the black hat whilst Eddie Bush and [EMAIL PROTECTED] would be wearing the white hat. I also know something of your culture and your breeding ... Here is a quote from your culture ... We red necks always say if you want to kill_ a few chickens boy !!! then get into the hen house Just to end this posting - Luba Powell admitted to me that it was one her buddies who called his account Mohammed. She then went on to say he did not imply he was a Muslim. This all came from her mind.That means she planned the whole thing. I am waiting for her giving me a public apology. I even showed how to apologise on the websphere line. I hope that woman never again set foot in another muslim country again. It has already been written that Luba Powell of Jini doesn't stay in employment on her merit but her deviousness to impersonate. Somebody was actually fed up of incompetence of Luba Powell's kind and said. The answer to your hmmm. is Jini but you go and do the training using jsps/servlets and NOT jini. The puzzle has been conclusively solved. Luba Powell likes to be the one to go to Muslims countries and screw the Muslims. Which can be done very easily because Muslims are the trusting and helpful sort. This Indian I came across also went on to say - Luba Powell how dare you call the Indian programmers inferior. I know enough American Crappy Coders. Actually I also know of an occasion when this guy from the UK went to Texas as an advisor. He came back with the news that they were hard coding the back end. This is, so as to hide the fact from the managers that they have been unable to amalgatamate the complex logic. I don't know if you know this but in a large and complex project alot of co-ordination is required amongst friendly people, but not that friendly as the ones found in Texas. - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, September 22, 2002 9:24 PM Subject: RE: This guy from the bank raised a question ? My reaction, too. (a) What is the relation between the subject line and your question? (b) Do a little research before asking questions; this subject has been discussed ad nauseum here. http://www.mail-archive.com/struts-user%40jakarta.apache.org/ Mark -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 22, 2002 3:59 PM Huh? Zahid Rahman wrote: Have you made any contingency planning in the design of the architecture, with regard to the user pressing the back button on the browser, Or is that left up to me to implement some how, perhaps using branching statements. -- 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]
[STRUTS] Please help with LookupDispatchAction
Hello I' tryed with implementing public ActionForward unspecified(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception But the response is always HTTP ERROR: 500 Request[/listedCustomer] does not contain handler parameter named action RequestURI=/webappointments/listedCustomer.do How can I handle a LookupDispatchAction without specifying the parameter? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Scope of form beans
1) save the array list in the http session. 2) don't call jsp, but call the action related to it. 3) Pick your data from ArrayList 4) Cast the variable form in execute method ( or equvalent ) to the related form 5) Fill that form with the data jet picked. You'll display the data. Howard Miller wrote: Hi, I'm a bit confused... so I hope this makes some sense. I wish to display a form for the user to edit. BUT the form isn't empty it needs to come from a bean that is sitting in an ArrayList. Is there some way to do this directly? My answer (that doesn't work) is to create a standalone bean (of the same type) in the action form that forwards to the page. I've tried this a number of different ways but my form does not see the bean bean not found etc. I am creating the bean in request scope - is this correct? Without ranting on any more, what are the rules for doing this, assuming its a good idea at all. Howard -- 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: [STRUTS] Please help with LookupDispatchAction
I love open source!!! After having downloaded struts src., here is the obvious solution: override execute method LOL!!! public ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception { String parameter = mapping.getParameter(); if ( (parameter == null) || (request.getParameter(parameter) != null) ) return super.execute(mapping, form, request, response); else return my_default_method(mapping, form, request, response); } kiuma wrote: Hello I' tryed with implementing public ActionForward unspecified(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception But the response is always HTTP ERROR: 500 Request[/listedCustomer] does not contain handler parameter named action RequestURI=/webappointments/listedCustomer.do How can I handle a LookupDispatchAction without specifying the parameter? -- 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]
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]
[Fwd: Re: [jetty-support] JBoss 3.2.0b and Jetty authentication]
Please, does someone have the reply to this problem ? ---BeginMessage--- Infact I'm using Struts! I have a security-constraint like this, but it doesn't seems to work. security-constraint web-resource-collection web-resource-nameSecure Web Appointments/web-resource-name descriptionSecure areas of the application/description url-pattern/secure/*/url-pattern url-pattern/*.do/url-pattern url-pattern/*.do?*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameAdmin/role-name /auth-constraint user-data-constraint descriptionWeb Application/description transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint Greg Wilkins wrote: Is this exception coming from a servlet that is protected by a security constraint? The servlet spec is unclear about authentication when no security constraint is specified. Tomcat uses cached authentication from other constrained requests, we see this as bad because because that authentication may have been revoked or not intended to apply to the unconstrained URL. Thus jetty will only have a non-null principal behind a security constraint. NB. I'm only guessing this is your problem - it could be something else but I'd need to see your web.xml, your URL and debug output to really tell. Note that this really should be raised on jboss-user lists, as it is not jetty specific code. Jetty supports abstract authentication realms which JBoss implement. But do post here if you have no joy there or if you think it is really jetty specific. Also I suggest that you use their 3.2.0b release as most effort is going there rather than the older 3.0.x releases. cheers ---End Message--- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: LookupDispatchAction
I hope this can help u, bye, kiuma /* * CustomerCustomerAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.actions.*; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; /** * * @author kiuma * * * * */ //LookupDispatch public class ListedCustomerAction extends LookupDispatchAction { //public class ListedCustomerAction extends Action { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.find, find); map.put(button.delete.selected, delete); map.put(button.append, append); return map; } public ActionForward delete( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { Collection customersToDelete = ((ListedCustomerForm)form).getListCustomerChecked(); try { Context lContext = new InitialContext(); CustomerSessionHome lHome = (CustomerSessionHome) lContext.lookup( java:comp/env/ejb/webappointments/CustomerSession ); CustomerSession cSession = lHome.create(); cSession.deleteCustomerByIDs( customersToDelete ); HttpSession hSession = req.getSession(true); Collection collSave = ((Collection)hSession.getAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST)); Iterator iter = collSave.iterator(); int i; int currArrayPos = 0; while (iter.hasNext()) { CustomerData cData = ((CustomerData)iter.next()); if ( customersToDelete.contains( cData.getId() + ) ) { iter.remove(); } } hSession.setAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST, collSave); return mapping.findForward( IStrutsConstants.SUCCESS ); } catch (Exception e) { return mapping.findForward( IStrutsConstants.SUCCESS ); } } public ActionForward find( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { String keyfinder = ((ListedCustomerForm)form).getCustomerToFind(); if ( !keyfinder.equals() ) { CustomerData uData; Collection cCustomers; Iterator iter; try { Context lContext = new InitialContext(); CustomerSessionHome lHome = (CustomerSessionHome) lContext.lookup( java:comp/env/ejb/webappointments/CustomerSession ); CustomerSession cSession = lHome.create(); cCustomers = cSession.getAllWithName( keyfinder ); HttpSession hSession = req.getSession(true); hSession.removeAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST); if (cCustomers.size() 0) hSession.setAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST, cCustomers); } catch (Exception e) { System.out.println( e.getMessage() ); return mapping.findForward( IStrutsConstants.FAILURE ); } } return mapping.findForward( IStrutsConstants.SUCCESS ); } public ActionForward append( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { return mapping.findForward( IStrutsConstants.CUSTOMER_APPEND ); } } Darren Hill wrote: Hey everyone .. happy Friday. Does anyone have a working example the uses LookupDispatchAction. I think I understand ... just wanna see some working example code. D. -- 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: [Fwd: Re: [jetty-support] JBoss 3.2.0b and Jetty authentication]
Nothing, thank you , already solved :-D Galbreath, Mark wrote: Where did you lose it? Perhaps we can help you find it. -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 7:42 AM Please, does someone have the reply to this problem ? -- 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: [kiuma ] LookupDispatchAction ...
Do u use jboss + struts + postgres , under linux. If so I could share my code with you. I'm planning to do this. Part deploy undere lgpl (or similar) as a case study, Part as a commercial app (not yet implemented. Would you like to use jboss I can help you to start if you are not familiar with. Darren Hill wrote: By the way ... If that is your actual code .. I have a few suggestions. 1) Create a plug-in that, on initilization, stores the JNDI context into either the Applciation or Session object. - rather the create it every time. 2) Make use of the EJBHomeFactory pattern when gaining access to the EJB Home interfaces. - reduces calls and produces less redundant code. 3) Make use of a Session facade to hide all EJB activity. - Centralizes a service layer that can be interchanged ( in case you want to use your app with some other the EJB ) Any help you need with that ... I here for ya. D. Do you have an example struts-config.xml and jsp for that code below for me? -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: September 20, 2002 8:40 AM To: Struts Users Mailing List Subject: Re: LookupDispatchAction I hope this can help u, bye, kiuma /* * CustomerCustomerAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.actions.*; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; /** * * @author kiuma * * * * */ //LookupDispatch public class ListedCustomerAction extends LookupDispatchAction { //public class ListedCustomerAction extends Action { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.find, find); map.put(button.delete.selected, delete); map.put(button.append, append); return map; } public ActionForward delete( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { Collection customersToDelete = ((ListedCustomerForm)form).getListCustomerChecked(); try { Context lContext = new InitialContext(); CustomerSessionHome lHome = (CustomerSessionHome) lContext.lookup( java:comp/env/ejb/webappointments/CustomerSession ); CustomerSession cSession = lHome.create(); cSession.deleteCustomerByIDs( customersToDelete ); HttpSession hSession = req.getSession(true); Collection collSave = ((Collection)hSession.getAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST)); Iterator iter = collSave.iterator(); int i; int currArrayPos = 0; while (iter.hasNext()) { CustomerData cData = ((CustomerData)iter.next()); if ( customersToDelete.contains( cData.getId() + ) ) { iter.remove(); } } hSession.setAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST, collSave); return mapping.findForward( IStrutsConstants.SUCCESS ); } catch (Exception e) { return mapping.findForward( IStrutsConstants.SUCCESS ); } } public ActionForward find( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { String keyfinder = ((ListedCustomerForm)form).getCustomerToFind(); if ( !keyfinder.equals() ) { CustomerData uData; Collection cCustomers; Iterator iter; try { Context lContext = new InitialContext(); CustomerSessionHome lHome = (CustomerSessionHome) lContext.lookup( java:comp/env/ejb/webappointments/CustomerSession ); CustomerSession cSession = lHome.create(); cCustomers = cSession.getAllWithName( keyfinder ); HttpSession hSession = req.getSession(true); hSession.removeAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST); if (cCustomers.size() 0) hSession.setAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST, cCustomers
[Darren ] LookupDispatchAction ...
Ok, actually I, trynig to reset some form fields, but things don't work till, now. When I'm ready I'll post the config.xml. I also suggest to download the struts-console and looking at samples web apps. Darren Hill wrote: I'm trying to code with low coupling to anything .. but here's what I'm using. JBoss 3.0.2 w/Strits 1.1 with MS SQL 2000 as a back-end. The code I'm asking for would having nothing to do with this. Just a snippet from the sturts-config.xml and the jsp that utilizes LookupDispatchAction. -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: September 20, 2002 9:45 AM To: Struts Users Mailing List Subject: Re: [kiuma ] LookupDispatchAction ... Do u use jboss + struts + postgres , under linux. If so I could share my code with you. I'm planning to do this. Part deploy undere lgpl (or similar) as a case study, Part as a commercial app (not yet implemented. Would you like to use jboss I can help you to start if you are not familiar with. Darren Hill wrote: By the way ... If that is your actual code .. I have a few suggestions. 1) Create a plug-in that, on initilization, stores the JNDI context into either the Applciation or Session object. - rather the create it every time. 2) Make use of the EJBHomeFactory pattern when gaining access to the EJB Home interfaces. - reduces calls and produces less redundant code. 3) Make use of a Session facade to hide all EJB activity. - Centralizes a service layer that can be interchanged ( in case you want to use your app with some other the EJB ) Any help you need with that ... I here for ya. D. Do you have an example struts-config.xml and jsp for that code below for me? -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: September 20, 2002 8:40 AM To: Struts Users Mailing List Subject: Re: LookupDispatchAction I hope this can help u, bye, kiuma /* * CustomerCustomerAction.java * * Created on 9 settembre 2002, 14.16 */ package com.wingstech.webappointments; import org.apache.struts.actions.*; import org.apache.struts.action.*; import org.apache.struts.util.MessageResources; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.wingstech.webappointments.utils.*; import com.wingstech.webappointments.interfaces.*; import javax.naming.*; import java.util.*; import org.w3c.dom.*; /** * * @author kiuma * * * * */ //LookupDispatch public class ListedCustomerAction extends LookupDispatchAction { //public class ListedCustomerAction extends Action { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.find, find); map.put(button.delete.selected, delete); map.put(button.append, append); return map; } public ActionForward delete( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { Collection customersToDelete = ((ListedCustomerForm)form).getListCustomerChecked(); try { Context lContext = new InitialContext(); CustomerSessionHome lHome = (CustomerSessionHome) lContext.lookup( java:comp/env/ejb/webappointments/CustomerSession ); CustomerSession cSession = lHome.create(); cSession.deleteCustomerByIDs( customersToDelete ); HttpSession hSession = req.getSession(true); Collection collSave = ((Collection)hSession.getAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST)) ; Iterator iter = collSave.iterator(); int i; int currArrayPos = 0; while (iter.hasNext()) { CustomerData cData = ((CustomerData)iter.next()); if ( customersToDelete.contains( cData.getId() + ) ) { iter.remove(); } } hSession.setAttribute(IStrutsConstants.SESSION_CUSTOMER_LIST, collSave); return mapping.findForward( IStrutsConstants.SUCCESS ); } catch (Exception e) { return mapping.findForward( IStrutsConstants.SUCCESS ); } } public ActionForward find( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { String keyfinder = ((ListedCustomerForm)form).getCustomerToFind(); if ( !keyfinder.equals() ) { CustomerData uData; Collection cCustomers; Iterator iter; try { Context
no action parameter defined
Hello I have a jsp page connected to a LookupDispatchAction. when I press enter into a text box the server reports: HTTP ERROR: 500 Request[/listedCustomer] does not contain handler parameter named action What's the solution ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [STRUTS] struts-el success case history
I attached a sample page, but ml doesn't accept attachments. Do some1 want the sample page and the compiled libs ? Anand Sharma wrote: Where can I get more info on struts-el? Thx Anand --- Anand Sharma Global AS-IT Support team Cisco Systems 408.525.7080 When in doubt, follow your heart -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 8:11 AM To: Struts Users Mailing List Subject: Re: [STRUTS] struts-el success case history Nice! Congratulations kuma! kiuma wrote: Hello wow stuts-el roks!!! My web page is now clean and smart. Thax to Eddie for suggesion and to McClanahan Karr for coding struts-el. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[STRUTS] Cleasing form fields fields
Hello, how can I have a clean form field the second time I visit it? It seems it keeps data into session. How can I clean those fields, without cleaning other informations? Thanks, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [STRUTS] Cleasing form fields fields
Thank u very much! Andrew Hill wrote: The scope into which struts places the ActionForm instance is defined by you in the struts config file in the action definition. For example in the follwing action definition thingy the scope attribute states to use the request context. If you specify session, then the session context will be used. action path=/login type=com.unist.plot.to.conquer.the.World name=evilActionForm scope=request input=/secretPlans.jsp forward name=success path=/global/hegemony.do/ forward name=failure path=/new/world/order.do/ /action To have your fields reset to default values when a request is made, you may override the reset() method in ActionForm and set the default field values there. (If you are using any checkboxes you will want to do this anyway to set them to false). The signature of the reset() method is: public final void reset(ActionMapping mapping, HttpServletRequest request); This is called by struts before it populates the ActionForm from a request. -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 21:44 To: Struts Users Mailing List Subject: [STRUTS] Cleasing form fields fields Hello, how can I have a clean form field the second time I visit it? It seems it keeps data into session. How can I clean those fields, without cleaning other informations? Thanks, kiuma -- 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: [STRUTS] Cleasing form fields fields (NOT WORKING)
Hello I need scope=session, so I had coded this method into the form public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) { resetFields(); } but vhe I call from an execute method: return mapping.findForward( /secure/customeredit.jsp ); my fields remain full of old data. Does anyone know a solution? Andrew Hill wrote: The scope into which struts places the ActionForm instance is defined by you in the struts config file in the action definition. For example in the follwing action definition thingy the scope attribute states to use the request context. If you specify session, then the session context will be used. action path=/login type=com.unist.plot.to.conquer.the.World name=evilActionForm scope=request input=/secretPlans.jsp forward name=success path=/global/hegemony.do/ forward name=failure path=/new/world/order.do/ /action To have your fields reset to default values when a request is made, you may override the reset() method in ActionForm and set the default field values there. (If you are using any checkboxes you will want to do this anyway to set them to false). The signature of the reset() method is: public final void reset(ActionMapping mapping, HttpServletRequest request); This is called by struts before it populates the ActionForm from a request. -Original Message- From: kiuma [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 21:44 To: Struts Users Mailing List Subject: [STRUTS] Cleasing form fields fields Hello, how can I have a clean form field the second time I visit it? It seems it keeps data into session. How can I clean those fields, without cleaning other informations? Thanks, kiuma -- 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]
[STRUTS] struts-el success case history
Hello wow stuts-el roks!!! My web page is now clean and smart. Thax to Eddie for suggesion and to McClanahan Karr for coding struts-el. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: IP Address
It's not a porno method :-D try getRemoteAddress() For porno methods try in http://www.playboy.com LOL :-D :-D :-D Cohan, Sean wrote: Is that the correct method? I get a 'can;t resolve symbol' compiler error. Thanks. -Original Message- From: Emmanuel Boudrant To: Struts Users Mailing List Sent: 9/18/02 6:09 AM Subject: Re: IP Address try this: request.getRemoteXxx(); -emmanuel --- Cohan, Sean [EMAIL PROTECTED] a écrit : How do I get the referrer's IP address in my action class? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.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: IP Address
This is very samrt (the hacker's one ;-P ) Yan, Charlene wrote: Here is the correct one: request.getHeader(referer); Charlene -Original Message- From: Emmanuel Boudrant [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 9:33 AM To: Struts Users Mailing List Subject: RE: IP Address I put getRemoteXxx() because you can retrice IP or Hostname. request.getRemoteAddr() IP request.getRemoteHost() Hostname BTW: Check the HttpServletRequest name in the perform(...) method parameters. getRemoteAddr() must be invoked on your HttpServletRequest object passed in parameter. -emmanuel --- Cohan, Sean [EMAIL PROTECTED] a écrit : Is that the correct method? I get a 'can;t resolve symbol' compiler error. Thanks. -Original Message- From: Emmanuel Boudrant To: Struts Users Mailing List Sent: 9/18/02 6:09 AM Subject: Re: IP Address try this: request.getRemoteXxx(); -emmanuel --- Cohan, Sean [EMAIL PROTECTED] a écrit : How do I get the referrer's IP address in my action class? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.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] ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.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]
[STRUTS] findForward problem
Hello I have the following problem my config.xml is form-beans form-bean name=listedUserForm type=com.wingstech.webappointments.ListedUserForm / form-bean name=userEditForm type=com.wingstech.webappointments.UserEditForm / /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=index path=/index.jsp / forward name=SystemError path=/error.html / /global-forwards !-- == Action Mapping Definitions == -- action-mappings action name=listedUserForm input=/secure/userlist.jsp path=/listedUser type=com.wingstech.webappointments.ListedUserAction parameter=action validate=true forward name=Success path=/secure/userlist.jsp redirect=true / /action action name=userEditForm input=/secure/useredit.jsp path=/userEdit type=com.wingstech.webappointments.UserEditAction validate=true forward name=Success path=/secure/userlist.jsp redirect=true / forward name=UserList path=/secure/userlist.jsp redirect=true / forward name=Failure path=/index.jsp redirect=true / forward name=UserAppend path=/secure/useredit.jsp redirect=true / /action action name=userEditForm input=/secure/useredit.jsp path=/openUserEdit type=com.wingstech.webappointments.OpenUserEditAction validate=false forward name=Success path=/secure/useredit.jsp redirect=true / forward name=Failure path=/secure/userlist.jsp redirect=true / /action /action-mappings my execute Action is public ActionForward append( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { System.out.println(Going to append); return mapping.findForward( IStrutsConstants.USER_APPEND ); } But th problem is that my app doesn't proceed: (http://localhost:8080/webappointments/listedUser.do) Why? thanks, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [STRUTS] tag for...
After a good time configuring and searching packages I have the libs, but not the docs. I'll test it later. Ps.: is it a good policy the use of so many external libs ? Eddie Bush wrote: Oh - one note: Once you unpack the archive -- either before or after you configure the build.properties (you'll need to do that too), you'll need to make a directory before you build the library. It is: archive-dir/conf/share For some odd reason that share directory didn't get created. I didn't bother looking at the build file. I just made the directory and tried to build again -- and it worked! Brijesh NK wrote: Hi, Could you please send link for downloading David M. Karr Struts-EL taglib Thanks brijesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[STRUTS] Form error handling
Hello, mine is a newbie question: When validate fails i put some code like this: newError = new ActionError(myform.error, ) errors.add( ActionErrors.GLOBAL_ERROR, newError ); in my properties file I put the key relative to myform.error. in struts-config.xml action name=listedUserForm input=/secure/userlist.jsp path=/listedUser type=com.wingstech.webappointments.ListedUserAction parameter=action validate=true forward name=Success path=/secure/userlist.jsp redirect=true / /action When validate() returns error, struts should dirve me to input page. How can I parse errors in my jsp page, then? thanks, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[STRUTS] ..about struts-el
Hello, I've compiledstruts-el libs, but couldn't be able to generate docs. Could some1 be so kind to post them to me ? I particulary would like to know how to do such a thing (the following code is not correct!) html:text property=state size=35 maxlength=255 logic:present name=user.selected scope=session bean:write name=user.selected property=state/ /logic:present /html:text thanks a lot, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[STRUTS] help with relative path!
First I'd like to thanks all people who helped me for previos posts and links. I'm currently trying to implement a jboss application with struts. The problem I had before was relative to path. Infact when I called /userlist I should call /web-client/userlist Now if I use the standard tag form all works well FORM action='/my-application/listedUser.do' method=POST but if I try to use html:form tag or if I directly try to access for the first time: http://localhost:8080/web-client/listedUser.do or html:form action=/listedUser I have this message from server Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:410) if I use FORM action='/my-application/listedUser.do' method=POST no errors given when submit and I can also access http://localhost:8080/web-client/listedUser.do directly. What's the problem? Thanks, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [STRUTS] help with relative path!
THANKS A LOT !!! Miguel Angel Mulero Martinez wrote: You must define the action in the struts-config.xml, in this definition you put the ActionForm that is needed with this Action. Is all ok in this file? -Mensaje original- De: kiuma [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 13 de septiembre de 2002 8:52 Para: Struts Users Mailing List Asunto: [STRUTS] help with relative path! First I'd like to thanks all people who helped me for previos posts and links. I'm currently trying to implement a jboss application with struts. The problem I had before was relative to path. Infact when I called /userlist I should call /web-client/userlist Now if I use the standard tag form all works well FORM action='/my-application/listedUser.do' method=POST but if I try to use html:form tag or if I directly try to access for the first time: http://localhost:8080/web-client/listedUser.do or html:form action=/listedUser I have this message from server Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:410) if I use FORM action='/my-application/listedUser.do' method=POST no errors given when submit and I can also access http://localhost:8080/web-client/listedUser.do directly. What's the problem? Thanks, kiuma -- 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]
[STRUTS] question about forms and dynamically created components
Hello,I have another question: I need do creante a variable number of check boxes in a jsp page. Is there a way to map them into a FormAction (for example an array) without directly using HttpServletRequest? Thanks, kiuma -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [STRUTS] Please !
Thx, but since I'm complitely new to struts I don't know what to do: *Here is my action class* public class ListedUserAction extends LookupDispatchAction { protected String keyfinder = ; protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.find, find); map.put(button.delete.selected, delete); map.put(button.append, append); return map; } public ActionForward delete( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { //keyfinder = ((ListedUserForm)form).getUserToFind(); return mapping.findForward( IStrutsConstants.SUCCESS ); ///secure/userlist.jsp?userToFind= + keyfinder } public ActionForward find( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { //keyfinder = ((ListedUserForm)form).getUserToFind(); return mapping.findForward( IStrutsConstants.SUCCESS ); ///secure/userlist.jsp?userToFind= + keyfinder } public ActionForward append( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res ) throws Exception { //keyfinder = ((ListedUserForm)form).getUserToFind(); return mapping.findForward( IStrutsConstants.SUCCESS ); ///secure/userlist.jsp?userToFind= + keyfinder } } *my jsp page:* %@page language=java contentType=text/html;charset=UTF-8 session=true isThreadSafe=true isErrorPage=false import=javax.naming.*, com.wingstech.webappointments.interfaces.*, java.util.* % % taglib uri=/WEB-INF/struts-html.tld prefix=html % % taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html head html:base/ titlebean:message key=title.userfinder//title/head /head BODY html:form action=/userlist table cellpadding=0 cellspacing=0 border=0 tbody tr td bbean:message key=label.find.surname/:/bnbsp; html:submit property=submit bean:message key=button.find/ /html:submit html:text property=userToFind size=35/ /td /tr /tbody /TABLE html:submit property=submit bean:message key=button.delete.selected/ /html:submit html:submit property=submit bean:message key=button.append/ /html:submit /html:form %-- jsp:useBean id=beanInstanceName scope=session class=package.class / --% %-- jsp:getProperty name=beanInstanceName property=propertyName / --% /body /html:html *and my action config tag:* action path=/userlist type=com.wingstech.webappointments.ListedUserAction parameter=submit scope=request validate=false forward name=Success path=/secure/userlist.jsp redirect=false / /action * I really can't see the error, can you help me please?*
Re: [STRUTS] Please !
Maris Orbidans wrote: Try to comment this line. html:text property=userToFind size=35/ I think it's only plase which can cause NPE. Pls let us know if it works. Maris *Now my jsp page is:* %@page language=java contentType=text/html;charset=UTF-8 import=javax.naming.*, com.wingstech.webappointments.interfaces.*, java.util.* % % taglib uri=/WEB-INF/struts-html.tld prefix=html % % taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html head html:base/ titlebean:message key=title.userfinder//title/head /head BODY html:form action=/userlist table cellpadding=0 cellspacing=0 border=0 tbody tr td bbean:message key=label.find.surname/:/bnbsp; html:submit property=submit bean:message key=button.find/ /html:submit %-- html:text property=userToFind size=35/ --% /td /tr /tbody /TABLE html:submit property=submit bean:message key=button.delete.selected/ /html:submit html:submit property=submit bean:message key=button.append/ /html:submit /html:form /body /html:html *and error log is :* javax.servlet.ServletException: Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:406) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) I thik it does something with context but I don't know what.
Re: [STRUTS] Please !
kiuma wrote: Maris Orbidans wrote: Try to comment this line. html:text property=userToFind size=35/ I think it's only plase which can cause NPE. Pls let us know if it works. Maris *Now my jsp page is:* %@page language=java contentType=text/html;charset=UTF-8 import=javax.naming.*, com.wingstech.webappointments.interfaces.*, java.util.* % % taglib uri=/WEB-INF/struts-html.tld prefix=html % % taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html head html:base/ titlebean:message key=title.userfinder//title/head /head BODY html:form action=/userlist table cellpadding=0 cellspacing=0 border=0 tbody tr td bbean:message key=label.find.surname/:/bnbsp; html:submit property=submit bean:message key=button.find/ /html:submit %-- html:text property=userToFind size=35/ --% /td /tr /tbody /TABLE html:submit property=submit bean:message key=button.delete.selected/ /html:submit html:submit property=submit bean:message key=button.append/ /html:submit /html:form /body /html:html *and error log is :* javax.servlet.ServletException: Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:406) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) I thik it does something with context but I don't know what. kiuma wrote: Maris Orbidans wrote: Try to comment this line. html:text property=userToFind size=35/ I think it's only plase which can cause NPE. Pls let us know if it works. Maris *Now my jsp page is:* %@page language=java contentType=text/html;charset=UTF-8 import=javax.naming.*, com.wingstech.webappointments.interfaces.*, java.util.* % % taglib uri=/WEB-INF/struts-html.tld prefix=html % % taglib uri=/WEB-INF/struts-bean.tld prefix=bean % html:html head html:base/ titlebean:message key=title.userfinder//title/head /head BODY html:form action=/userlist table cellpadding=0 cellspacing=0 border=0 tbody tr td bbean:message key=label.find.surname/:/bnbsp; html:submit property=submit bean:message key=button.find/ /html:submit %-- html:text property=userToFind size=35/ --% /td /tr /tbody /TABLE html:submit property=submit bean:message key=button.delete.selected/ /html:submit html:submit property=submit bean:message key=button.append/ /html:submit /html:form /body /html:html *and error log is :* javax.servlet.ServletException: Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:406) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) I thik it does something with context but I don't know what. *Here is line 406 of the generated java file:* } catch (Throwable t) { if (out != null out.getBufferSize() != 0) out.clearBuffer(); _*if (pageContext != null) pageContext.handlePageException(t);*_ } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); }
[Fwd: Re: [STRUTS] Please !]
---BeginMessage--- Here is the root cause javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:897) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.Stan dardWrapperValve.invoke(StandardWrapperValve.java:243) line 144 is of userlist$jsp.java is // begin [file="/secure/userlist.jsp";from=(19,0);to=(19,30)] /* html:form */ org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = new org.apache.struts.taglib.html.FormTag(); _jspx_th_html_form_0.setPageContext(pageContext); _jspx_th_html_form_0.setParent(_jspx_th_html_html_0); _jspx_th_html_form_0.setAction("/userlist"); try { int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag(); if (_jspx_eval_html_form_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED) throw new JspTagException("Since tag handler class org.apache.struts.taglib.html.FormTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG"); if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { // end // HTML // begin [file="/secure/userlist.jsp";from=(19,30);to=(24,15)] out.write("\ntable cellpadding=\"0\" cellspacing=\"0\" border=\"0\"\ntbody\n tr\n td\n b"); kiuma wrote: kiuma wrote: Maris Orbidans wrote: Try to comment this line. html:text property="userToFind" size="35"/ I think it's only plase which can cause NPE. Pls let us know if it works. Maris *Now my jsp page is:* %@page language="java" contentType="text/html;charset=UTF-8" import="javax.naming.*, com.wingstech.webappointments.interfaces.*, java.util.*" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % html:html head html:base/ titlebean:message key="title.userfinder"//title/head /head BODY html:form action="/userlist" table cellpadding="0" cellspacing="0" border="0" tbody tr td bbean:message key="label.find.surname"/:/bnbsp; html:submit property="submit" bean:message key="button.find"/ /html:submit %-- html:text property="userToFind" size="35"/ --% /td /tr /tbody /TABLE html:submit property="submit" bean:message key="button.delete.selected"/ /html:submit html:submit property="submit" bean:message key="button.append"/ /html:submit /html:form /body /html:html *and error log is :* javax.servlet.ServletException: Cannot retrieve definition for form bean null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:406) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) I thik it does something with context but I don't know what. kiuma wrote: Maris Orbidans wrote: Try to comment this line. html:text property="userToFind" size="35"/ I think it's only plase which can cause NPE. Pls let us know if it works. Maris *Now my jsp page is:* %@page language="java" contentType="text/html;charset=UTF-8" import="javax.naming.*, com.wingstech.webappointments.interfaces.*, java.util.*" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html&q
Re: [STRUTS] Please !
*Here is the root cause* javax.servlet.jsp.JspException: Cannot retrieve definition for form bean null at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:897) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:543) at org.apache.jsp.userlist$jsp._jspService(userlist$jsp.java:144) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.Stan dardWrapperValve.invoke(StandardWrapperValve.java:243) *line 144 is of userlist$jsp.java is* // begin [file=/secure/userlist.jsp;from=(19,0);to=(19,30)] /* html:form */ org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = new org.apache.struts.taglib.html.FormTag(); _jspx_th_html_form_0.setPageContext(pageContext); _jspx_th_html_form_0.setParent(_jspx_th_html_html_0); _jspx_th_html_form_0.setAction(/userlist); try { /*int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();*/ if (_jspx_eval_html_form_0 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED) throw new JspTagException(Since tag handler class org.apache.struts.taglib.html.FormTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG); if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { // end // HTML // begin [file=/secure/userlist.jsp;from=(19,30);to=(24,15)] out.write(\ntable cellpadding=\0\ cellspacing=\0\ border=\0\\ntbody\ntr\n td\nb); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]