RE: Retrieving Parameters from ServletContext
Have you tried: bean:write name=numberOfArticles scope=application / -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Juan Alvarado [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 12:36 PM To: Struts Subject: Retrieving Parameters from ServletContext Does anyone know if there's an equivalent way of doing: %= getServletContext().getAttribute(numberOfArticles) % in a JSP with the struts tag libraries. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [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]
Check All checkboxes
Dear All In my jsp page, I have a checkbox named Select All that will automatically select all the checkboxes that are loaded dynamically according to the number of records I have in the database. And I'm trying to do this using javascript like the following: function CheckAll(){ var len; len=document.forms[0].deleted.length; if(len==null){ document.forms[0].deleted.checked = document.forms [0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.forms[0].deleted[i].checked = document.forms[0].chkall.checked; } } } However, I have got difficulty implementing it coz unlike the name attribute for normal html checkbox tag, the name attribute in the struts html tag refers to the name of the bean. Anyone out there knows how to overcome this problem? Thanks in advance. (=^_^=) See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: nested tags question
You should be able to do that. In-fact, that's one of the ways to re-use common page presentations. If you do your job write, then your main page is composed of a bunch of includes to render different parts of the result "tree". Be-careful, however, the last time I checked the nested tags only work well in a static include scenario. They don't work well with dynamic includes, which is what you might find you need to do, if you have a lot of conditionals (otherwise, it's very easy to exceed to the 64K method limit). -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Kousek, Theron [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:33 PM To: 'Struts Users Mailing List' Subject: nested tags question Hi folks: I have a few forms that contain the same type of "template"... I want to create a generic template that uses a form bean. This template needs to handle form beans that are at the root level or a form bean that may be nested. So in one screen, the template will be at the root and not need to be nested. In another screen, the same template will need to be nested. So basically, I can contain my nested statements like: nested:root name="clientForm" nested:nest property="billingForm" outside the scope of the template and in the file that needs to invoke the template... The actual template can contain the : td align="left" nested:text property="displayBillid" disabled="true" size="10" styleId="small"/ /td type tags... So here's my question: Even if a form bean is at the root and not nested at all, can I still declare it to be nested, only define it at the root? So billingForm for example could be: nested:root name="billingForm" even if it is at the topmost level? Is this normal or should I avoid it? If this is legal, then I will be able to literally plug and play these templates into other screens and will have one common layout repository. thanks, Theron -- 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: dynamic form using nested:file?
Your first statement, ...I have a form that can have N number of images... Does not warrant the use of nested tag library. Simply use the standard iterator, and indexed properties of the html:file tag, to properly output your file names as file[1], file[2], file[3]. -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Elijah Jacobs [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 8:49 AM To: Struts Users Mailing List Subject: dynamic form using nested:file? hi all, I have a form that can have N number of images. So in essence it's like the Monkey struts example by Arron Bates except where he has bananas, i have images. The problems is that I have to associate a FormFile for each image, since each image can be updated (hence an image upload is needed for that particular image).. for example if N=3 then a user can update image 2 to another image. A user can also add an image increasing N to 4 I am using the nested tags for struts 1.0 (nested_tags_10.jar). So I have this set up: start of code = FormBean.java pivate ArrayList slideImageList;(with associating set/get methods) .. contains a list of ImageItem ImageItem.java -- what is contained in the slideImageList private Image image; // and image object containing image_name, url, etc... private FormFile file;// the FormFile I want to associate to the image above. Idealy I would want this on my JSP page: nested:iterate property=slideImageList nested:nest property=image nested:write property=url/ /font /nested:nest nested:file property=file/ /td%!-- this is where i get in trouble --% /nested:iterate === end of code Since the nested tag does not have an associating html:file tag then I'm stuck. Does anyone know a way to get around this? thanks, - ej -- 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: nested tags question
The nested tags as of probably a month and a half ago, the nested tags penetrate dynamic includes. I tried to mail the few (but vocal :) people that were throwing things at me to get it done, you may have been the one that got away. Apologies. Putting up a tutorial on my site tonight to show the potential of true recursion and JSP's to make a tree structure. Trees have never been more fun. :) Arron. Alex Paransky wrote: You should be able to do that. In-fact, that's one of the ways to re-use common page presentations. If you do your job write, then your main page is composed of a bunch of includes to render different parts of the result "tree". Be-careful, however, the last time I checked the nested tags only work well in a static include scenario. They don't work well with dynamic includes, which is what you might find you need to do, if you have a lot of conditionals (otherwise, it's very easy to exceed to the 64K method limit). -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Kousek, Theron [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 2:33 PM To: 'Struts Users Mailing List' Subject: nested tags question Hi folks: I have a few forms that contain the same type of "template"... I want to create a generic template that uses a form bean. This template needs to handle form beans that are at the root level or a form bean that may be nested. So in one screen, the template will be at the root and not need to be nested. In another screen, the same template will need to be nested. So basically, I can contain my nested statements like: nested:root name="clientForm" nested:nest property="billingForm" outside the scope of the template and in the file that needs to invoke the template... The actual template can contain the : td align="left" nested:text property="displayBillid" disabled="true" size="10" styleId="small"/ /td type tags... So here's my question: Even if a form bean is at the root and not nested at all, can I still declare it to be nested, only define it at the root? So billingForm for example could be: nested:root name="billingForm" even if it is at the topmost level? Is this normal or should I avoid it? If this is legal, then I will be able to literally plug and play these templates into other screens and will have one common layout repository. thanks, Theron -- 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: How to take object from the Action to jsp
.jsp pages have access to the a reference named application from which you can gain access to objects stored in your servlet context. I believe you should use the following method to access context scoped objects within your jsp pages. You can extract the reference to your treemodel with the following. % Node root = (Node) application.getAttribute(treemodel); % %= new DirectoryModel(root) % Or your way %= new DirectoryModel((Node)application.getAttribute(treemodel)) % At 06:36 PM 4/3/2002, you wrote: Hello, My question might sound naive but I really eed your answer. I'm storing an object in ServletContext with the following code : servlet.getServletContext().setAttribute(treemodel,root); where root is an object of type Node(myclass). In my jsp I want to retrieve this object from the Servletontext so I do the following: %= new DirectoryModel((Node)servlet.getServletContext().getAttribute(treemodel) %. I'm wondering why I get the Exception: org.apache.jasper.compiler.ParseException: C:\jakarta\jakarta-tomcat-3.2.3\webapps\teach\main_menu.jsp(77,99) Attribute treemodel has no value at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519) at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:798) My problem is that I cannot handle this object as a javabean since I want to use the object as it is and not to get the values of its properties. I would really appreciated your help. Thank you, Konstantina -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tiles and submenu (Struts 1.1 beta 1)
You can write your own ComplexMenuItem as you suggest. Enable it by specifying its class name in the item tag : item value=Administration link=/administration/index.jsp subListName=submenu classtype=de.cas.bmon.beans.ComplexMenuItem Also, you need to allow the parser to parse you new attributes. There is two possibilities : * setting definition-parser-validate to false in web.xml * or modifythe tiles-config.dtd to add your new attributes, and put it under WEB-INF/classes/org/apache/struts/tiles/resources/tiles-config.dtd Hope this help, Cedric [EMAIL PROTECTED] wrote: Hi, I need a horizontal main menu and after clicking an item a submenu which shall be shown in additional under the main menu. The selected items in the main menu and later in the submenu (and maybe in a third level) shall be highlighted like the tabsLayout Example from struts-tiles.war. But in the tabsLayout Example the main menu items are links and the selected item are not marked/highlighted. Problem: The select-Parameter in the URL is relavated only to one level (selected=0, selected=1 etc) But I need a relevation to the main menu cause the selected tabitem shall also be highlighted in the main menu. How can I do this? Has somebody an example? I tried to write an own ComplexMenuItem and to nest the submenu into the relevated administration item. But I got this error after starting Tomcat: org.xml.sax.SAXParseException: Attribute subListName must be declared for element type item. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213) at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3697) That's clear because the item tag can't do this. Where in the tiles source the attributes from 'item' are defined? Maybe I can overwrite this to put an additional attribute 'subListName'? Or is this long winded and there is an easier way? My codes are beneath: My main menu has 3 items (Query, Profile, Administration) and the Administration has a submenu. (Menu and body are in the same section 'body') My start page start with tiles:insert definition=doc.main.page flush=true / Thanks Susanne Here my tiles-defs.xml: tiles-definitions !-- Doc index page description -- definition name=doc.masterPage path=/layouts/classicLayout.jsp put name=title value=Bmon / put name=header value=/common/header.jsp / put name=body value=doc.main.body / put name=footer value=/common/footer.jsp / /definition !-- Main menu page definition -- definition name=doc.main.page extends=doc.masterPage put name=title value=Bmon Welcome / /definition !-- Main menu body definition -- definition name=doc.main.body path=/layouts/tabsLayout.jsp put name=selectedIndex value=0 / put name=parameterName value=selected / putList name=tabList item value=Query link=/query.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / item value=Profile link=/user.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / item value=Administration link=/administration/index.jsp subListName=submenu classtype=de.cas.bmon.beans.ComplexMenuItem item value=Presettings link=/administration/presetting.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / item value=User Management link=/administration/users.jsp classtype=org.apache.struts.tiles.beans.SimpleMenuItem / /item /putList /definition /tiles-definitions --- !--- ComplexMenuItem.java --- public class ComplexMenuItem extends SimpleMenuItem { private List subMenuItems = new ArrayList(); private String subListName; public void addItem(Object item) { subMenuItems.add(item); } public List getSubMenuItems() { return subMenuItems; } public void setSubMenuItems(List subMenuItems) { this.subMenuItems = subMenuItems; } public String getSubListName() { return subListName; } public void setSubListName(String subListName) { this.subListName = subListName; } -- 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: tiles w/struts 1.0 forward - SOLVED...sort of
The problem is now resolved with Struts 1.0 and tilesForStruts1.0.jar. You should be able to use directly action ... forward=aDefinition / in Struts1.0 as well as in Struts1.1. Cedric [EMAIL PROTECTED] wrote: Hi, After searching the archives and receiving helpful suggestions from people on the list, it seem the only way to get tiles with struts forwards to work is to upgrade to Struts 1.1. I've made numerous attempts at getting it to work with Struts 1.0 with no luck. Using the tiles-blank-struts1-0.war provided with tiles, 1) I added the following action to the struts-config.xml file: action path=/doYouWork forward=site.index.page/ -The layout 'site.index.page' is already defined in the tiles-blank-struts1-0.war app. 2) Made sure the following lines were commented out: !-- controller processorClass=org.apache.struts.tiles.TilesRequestProcessor /controller message-resource parameter=org.apache.struts.example.tiles.dev1-1.ApplicationResources null=false /message-resource -- 3) Made sure I was using the ActionComponentServlet in my web.xml file: servlet-nameaction/servlet-name !-- Specify servlet class to use If you also plan to use Struts, use ActionComponentServlet If you don't need Struts, use TilesServlet -- servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class These three steps were the only suggestions I could find on the list. With this configuration I still received the following error when invoking this action: java.lang.IllegalArgumentException: Path site.index.page does not start with a / character With Struts 1.1, action forwards calling tile layouts works as advertised. The only difference between the two configurations is that the two entries in step 2 (ApplicationResources and TilesRequestProcessor) are left in the struts-config.xml. Please let me know if I've missed something with my Struts 1.0 configuration. Thanks, Eric -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 4:27 AM To: Struts Users Mailing List Subject: Re: tiles question Yes it is ;-) Have you specify to use the appropriate Tiles processor (if struts1.1) or tiles action servlet (struts1.0.x) ? In struts1.1, add following to your struts-config file : !-- Here we specified the tiles processor -- controller processorClass=org.apache.struts.tiles.TilesRequestProcessor /controller In struts 1.0, specify to use ComponentActionServlet in web.xml. Check documentation or examples. Other users have already got this problem, check struts archive for Weird problem with tiles and struts forward. Hope this help, Cedric [EMAIL PROTECTED] wrote: Hi, Is it possible to call a tiles layout definition from an action tag in my struts-config.xml file? Here's the tag in my struts-config.xml: actionpath=/resources forward=site.resources.page/ Here's the definition in my tiles-defs.xml: definition name=site.resources.page extends=site.mainLayout put name=body value=/tiles/resources.jsp / /definition When I try to invoke this action forward I get an exception: java.lang.IllegalArgumentException: Path site.services.page does not start with a / character The forward tag is expecting a value like '/resources.jsp', not a tiles layout. Is what I'm trying to do possible? Thanks, Eric. ** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ** -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF
RE: Check All checkboxes
This should have no effect as the name attribute in the struts html tag relates to the bean to be used the name is derived from the property tag; e.g. This tag; html:checkbox name=Clintons property=Bill value=Hilary / results in this HTML input type=checkbox name=Bill value=Hilary -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Monday, 15 April 2002 4:42 PM To: Struts Users Mailing List Subject: Check All checkboxes Dear All In my jsp page, I have a checkbox named Select All that will automatically select all the checkboxes that are loaded dynamically according to the number of records I have in the database. And I'm trying to do this using javascript like the following: function CheckAll(){ var len; len=document.forms[0].deleted.length; if(len==null){ document.forms[0].deleted.checked = document.forms [0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.forms[0].deleted[i].checked = document.forms[0].chkall.checked; } } } However, I have got difficulty implementing it coz unlike the name attribute for normal html checkbox tag, the name attribute in the struts html tag refers to the name of the bean. Anyone out there knows how to overcome this problem? Thanks in advance. (=^_^=) See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201 /splash.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: Struts vs EJB, thoughts?
for the last 4 months and don't mind it. I see it as a poor mans EJB. Poor man's EJB ? :-) No, EJB deals with very different problems. Also, seems like Struts is more useful for smaller companies and EJB is more suitable for large corporations. Is this pretty much a valid statement? We use STRUTS and EJBs. I think that the best approach is to use STRUTS and EJB together. Maris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
logic-tags related to beans not derived from ActionForm?
Subject: logic-tags related to beans not derived from ActionForm? From: Johannes Wolfgang Woger [EMAIL PROTECTED] === Hallo, I need logic:equal/present etc. etc in my application to make them more dynamic depending on the permissions of a user. The information for these tags should not appear in the ActionForm object. Is here a possibility to fuel these tags with data from an other class, not derived from ActionForm? Thank in advance Wolfgang -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem with html:link
Title: Message html:link page="/dotest1/test" html:img src="javascript:void(0);" linkName="assess" width=97 height=32 border="0"/html:link it is giving me the following error. Attribute value should be quoted, stack: org.apache.jasper.compiler.ParseException: an example of same type will do better. Thanks and Regards Muthukumar .S Mysore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: problem with html:link
width=97 height=32 border=0 /html:link -- Peter Pilgrim ++44 (0)207-545-9923 Swamped under electronic mails Message History From: Muthukumar Subramanian [EMAIL PROTECTED] on 15/04/2002 16:15 ZE5B Please respond to Struts Users Mailing List [EMAIL PROTECTED] To:[EMAIL PROTECTED] cc: Subject:problem with html:link html:link page=/dotest1/test onmouseover=assess.src='/myimages/images/ing_3_f2.gif' onmouseout=assess.src='myimages/images/ing_3.gif' html:img src=/myimages/images/aessing_3.gif linkName=assess width=97 height=32 border=0/html:link it is giving me the following error. Attribute value should be quoted, stack: org.apache.jasper.compiler.ParseException: an example of same type will do better. Thanks and Regards Muthukumar .S Mysore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problem with html:link
html:link page=/dotest1/test onmouseover=assess.src='/myimages/images/ing_3_f2.gif' onmouseout=assess.src='myimages/images/ing_3.gif' html:img src=/myimages/images/aessing_3.gif width=97 height=32 border=0//html:link You needed quotes on the sizes and linkName is not a valid attribute and the html:img tag needed an end slash. -Original Message- From: Muthukumar Subramanian [mailto:[EMAIL PROTECTED]] Sent: Monday, 15 April 2002 8:46 PM To: [EMAIL PROTECTED] Subject: problem with html:link html:link page=/dotest1/test onmouseover=assess.src='/myimages/images/ing_3_f2.gif' onmouseout=assess.src='myimages/images/ing_3.gif' html:img src=/myimages/images/aessing_3.gif linkName=assess width=97 height=32 border=0/html:link it is giving me the following error. Attribute value should be quoted, stack: org.apache.jasper.compiler.ParseException: an example of same type will do better. Thanks and Regards Muthukumar .S Mysore.
RE: Which Version of Struts to Use??
In the world of software, standard and stable are two very different things and if you don't know enough to articulate the difference between them, you had better find another line of work and not expect people who do know the difference to read your mind. Mark -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 14, 2002 12:26 AM To: [EMAIL PROTECTED] Subject: Fwd: Which Version of Struts to Use?? Some genius could not figure out what I meant by the standard release. Let me change that to stable release. What I am trying to find out is whether the new features being put into the beta will likely be stable by August-September. I would have thought that was obvious, but I guess not. If anyone has a reasonable guestimate, I would greatly appreciate that. Thanks, Micael Date: Sat, 13 Apr 2002 08:14:42 -0700 To: [EMAIL PROTECTED] From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Subject: Which Version of Struts to Use??? TWIMC: We are about to build a commercial site using struts. Should we start with beta rather than the standard release? The eta for the site is August-September. The reason I ask is that struts seems to be in the middle of some major functionality shifts. Thanks of any assistance. Micael -- 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: Soap and Struts
A sodium hydroxide-based cleaning agent; most social situations. Mark -Original Message- From: Yugandhar_Reddy [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 3:27 AM To: Struts Users Mailing List Subject: RE: Soap and Struts Hi, Cud u please tell me what a SOAP is and where is it helpful// Thanks in advance Yug -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: logic-tags related to beans not derived from ActionForm?
Yes, of course, it's possible. There is no requirement that class you work with must be derived from ActionForm. A class derived from ActionForm is a bean. Logic tags also can work with cookies, request headers etc. ( see doc. of logic tags ) I'd suggest you to create some JavaBean ( in session or request scope ) that contains info about user permissions and access it from JSP. Maris equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Attribute Name Description cookie The variable to be compared is the value of the cookie whose name is specified by this attribute. header The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner. nameThe variable to be compared is the JSP bean specified by this attribute, if property is not specified, or the value of the specified property of this bean, if property is specified. parameter The variable to be compared is the first, or only, value of the request parameter specified by this attribute. -Original Message- From: Struts Newsgroup (@Basebeans.com) [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 1:25 PM To: [EMAIL PROTECTED] Subject: logic-tags related to beans not derived from ActionForm? Subject: logic-tags related to beans not derived from ActionForm? From: Johannes Wolfgang Woger [EMAIL PROTECTED] === Hallo, I need logic:equal/present etc. etc in my application to make them more dynamic depending on the permissions of a user. The information for these tags should not appear in the ActionForm object. Is here a possibility to fuel these tags with data from an other class, not derived from ActionForm? Thank in advance Wolfgang -- 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: logic-tags related to beans not derived from ActionForm?
Thank you Maris, exactly what I needed. I suppose that is the way to overcome the restriction that an Action can have only one ActionForm. Wolfgang - Original Message - From: Maris Orbidans [EMAIL PROTECTED] Newsgroups: Struts Sent: Monday, April 15, 2002 1:29 PM Subject: RE: logic-tags related to beans not derived from ActionForm? Yes, of course, it's possible. There is no requirement that class you work with must be derived from ActionForm. A class derived from ActionForm is a bean. Logic tags also can work with cookies, request headers etc. ( see doc. of logic tags ) I'd suggest you to create some JavaBean ( in session or request scope ) that contains info about user permissions and access it from JSP. Maris equal - Evaluate the nested body content of this tag if the requested variable is equal to the specified value. Compares the variable specified by one of the selector attributes against the specified constant value. The nested body content of this tag is evaluated if the variable and value are equal. Attribute Name Description cookie The variable to be compared is the value of the cookie whose name is specified by this attribute. header The variable to be compared is the value of the header whose name is specified by this attribute. The name match is performed in a case insensitive manner. name The variable to be compared is the JSP bean specified by this attribute, if property is not specified, or the value of the specified property of this bean, if property is specified. parameter The variable to be compared is the first, or only, value of the request parameter specified by this attribute. -Original Message- From: Struts Newsgroup (@Basebeans.com) [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 1:25 PM To: [EMAIL PROTECTED] Subject: logic-tags related to beans not derived from ActionForm? Subject: logic-tags related to beans not derived from ActionForm? From: Johannes Wolfgang Woger [EMAIL PROTECTED] === Hallo, I need logic:equal/present etc. etc in my application to make them more dynamic depending on the permissions of a user. The information for these tags should not appear in the ActionForm object. Is here a possibility to fuel these tags with data from an other class, not derived from ActionForm? Thank in advance Wolfgang -- 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]
Passing JavaScript variable to a Java Scriptlet on a JSP page
Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\_jsp\_search\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
radio button help
Title: Message how to make a radio button checked by default in group of radio buttons? html:radio property="affiliation" value="C"/ Cbrhtml:radio property="affiliation" value="P"/ Pbrhtml:radio property="affiliation" value="U"/ Ubr how to make the first one checked? Thanks and Regards Muthukumar .S Mysore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Passing JavaScript variable to a Java Scriptlet on a JSP page
I don't know exactly why you want to do that ? Why don't you use % Hashtable states = new Hashtable(); states = Combo.getStates(country); % and then you use Country: %=country.toString()% You don't need to use this javascript stuff, cause the disadvantage is that you execute this document.write stuff on the client side. You first execute you java scriptlet, the transfer the date to the client and there the javascript code is executed. So it would be easier if you would only work with Java scriptlets or Tags here Oliver -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:32 PM To: Struts Users Mailing List Subject: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\_jsp\_sear ch\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- 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]
Add parameter to a setRedirect
Hi everybody, I wanna know if is it possible to use setRedirect and add parameter like in request.senRedirect(htpp?...) Thanks Regards -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Add parameter to a setRedirect
Nope -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:40 PM To: [EMAIL PROTECTED] Subject: Add parameter to a setRedirect Hi everybody, I wanna know if is it possible to use setRedirect and add parameter like in request.senRedirect(htpp?...) Thanks Regards -- 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: Passing JavaScript variable to a Java Scriptlet on a JSP page
If I understand what you're tryin to do, you want your Javascript code to write JSP scriptlet (?) Javascript is executed on the client, instead JSP code is executed on the server. So a scriptlet can dynamicaly generate javascript code, but the oposite has no sense. You cannot execute any JSP code AFTER the HTML page has been sent to the user HTML client. You can programaticaly set the javascript content of your page with JSP code So, if you want your state-select list to be dependent of the contry select you have to : - send a request to the server so that JSP code can generate the correct list in a new HTML page. OR - include a full-javascript support for this feature. (This javascript datas could be set by JSP code) I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Passing JavaScript variable to a Java Scriptlet on a JSP page
Why don't you try it like this, your Option list could be derived from a collection which is stored as an attribute of the page. Each time you select a value you can call a javascript funtion which filters this collection. Maybe your data is stored like that germany.bavaria.nuremberg englang.blabla.london so you can filter the data, then reload the the page(don't forget to set again your collection as attribute) -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:49 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi Oliver, I am forced to do that. Actually on my JSP I have three lookups: Country, State and City. If the user choses a particular country, then he should be able to see only the corresponding states in the states lookup. This is where the JavaScript comes in. Any other suggestions to implement this ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:10 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page I don't know exactly why you want to do that ? Why don't you use % Hashtable states = new Hashtable(); states = Combo.getStates(country); % and then you use Country: %=country.toString()% You don't need to use this javascript stuff, cause the disadvantage is that you execute this document.write stuff on the client side. You first execute you java scriptlet, the transfer the date to the client and there the javascript code is executed. So it would be easier if you would only work with Java scriptlets or Tags here Oliver -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:32 PM To: Struts Users Mailing List Subject: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\_jsp\_sear ch\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- 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]
Re: radio button help
I am having the same issue. The docs are no help. On 4/15/02 8:36 AM, Muthukumar Subramanian [EMAIL PROTECTED] wrote: how to make a radio button checked by default in group of radio buttons? html:radio property=affiliation value=C/ Cbr html:radio property=affiliation value=P/ Pbr html:radio property=affiliation value=U/ Ubr how to make the first one checked? Thanks and Regards Muthukumar .S Mysore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Passing JavaScript variable to a Java Scriptlet on a JSP page
Hi Oliver, The main issue here is that I don't want to reload the page. Is there some way this could be done without reloading the page ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:26 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Why don't you try it like this, your Option list could be derived from a collection which is stored as an attribute of the page. Each time you select a value you can call a javascript funtion which filters this collection. Maybe your data is stored like that germany.bavaria.nuremberg englang.blabla.london so you can filter the data, then reload the the page(don't forget to set again your collection as attribute) -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:49 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi Oliver, I am forced to do that. Actually on my JSP I have three lookups: Country, State and City. If the user choses a particular country, then he should be able to see only the corresponding states in the states lookup. This is where the JavaScript comes in. Any other suggestions to implement this ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:10 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page I don't know exactly why you want to do that ? Why don't you use % Hashtable states = new Hashtable(); states = Combo.getStates(country); % and then you use Country: %=country.toString()% You don't need to use this javascript stuff, cause the disadvantage is that you execute this document.write stuff on the client side. You first execute you java scriptlet, the transfer the date to the client and there the javascript code is executed. So it would be easier if you would only work with Java scriptlets or Tags here Oliver -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:32 PM To: Struts Users Mailing List Subject: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\_jsp\_sear ch\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Passing JavaScript variable to a Java Scriptlet on a JSP page
Nope not with JSP's. The problem is that the jsp is generated on the server side. So each time you want to change something dynamicly you have to reload the page, so the container can build up the correct static page. So for that problem i have no solution sorry. Oliver -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:04 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi Oliver, The main issue here is that I don't want to reload the page. Is there some way this could be done without reloading the page ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:26 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Why don't you try it like this, your Option list could be derived from a collection which is stored as an attribute of the page. Each time you select a value you can call a javascript funtion which filters this collection. Maybe your data is stored like that germany.bavaria.nuremberg englang.blabla.london so you can filter the data, then reload the the page(don't forget to set again your collection as attribute) -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:49 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi Oliver, I am forced to do that. Actually on my JSP I have three lookups: Country, State and City. If the user choses a particular country, then he should be able to see only the corresponding states in the states lookup. This is where the JavaScript comes in. Any other suggestions to implement this ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:10 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page I don't know exactly why you want to do that ? Why don't you use % Hashtable states = new Hashtable(); states = Combo.getStates(country); % and then you use Country: %=country.toString()% You don't need to use this javascript stuff, cause the disadvantage is that you execute this document.write stuff on the client side. You first execute you java scriptlet, the transfer the date to the client and there the javascript code is executed. So it would be easier if you would only work with Java scriptlets or Tags here Oliver -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:32 PM To: Struts Users Mailing List Subject: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\_jsp\_sear ch\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- 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] -- 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: Passing JavaScript variable to a Java Scriptlet on a JSP page
You will have to write JavaScript code to repopulate your State-select on onChange event of your country-select. Your could define javascript objects to encapsulate the datas (as a javascript tree), that could be initialized by JSP code from your HashTable. Hi Oliver, The main issue here is that I don't want to reload the page. Is there some way this could be done without reloading the page ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:26 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Why don't you try it like this, your Option list could be derived from a collection which is stored as an attribute of the page. Each time you select a value you can call a javascript funtion which filters this collection. Maybe your data is stored like that germany.bavaria.nuremberg englang.blabla.london so you can filter the data, then reload the the page(don't forget to set again your collection as attribute) -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:49 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi Oliver, I am forced to do that. Actually on my JSP I have three lookups: Country, State and City. If the user choses a particular country, then he should be able to see only the corresponding states in the states lookup. This is where the JavaScript comes in. Any other suggestions to implement this ? Thanks Sanjeev -Original Message- From: Oliver Reflé [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 6:10 PM To: Struts Users Mailing List Subject: RE: Passing JavaScript variable to a Java Scriptlet on a JSP page I don't know exactly why you want to do that ? Why don't you use % Hashtable states = new Hashtable(); states = Combo.getStates(country); % and then you use Country: %=country.toString()% You don't need to use this javascript stuff, cause the disadvantage is that you execute this document.write stuff on the client side. You first execute you java scriptlet, the transfer the date to the client and there the javascript code is executed. So it would be easier if you would only work with Java scriptlets or Tags here Oliver -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:32 PM To: Struts Users Mailing List Subject: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\_jsp\_sear ch\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- 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] -- 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: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5
I believe that for the $100 my company spent on the IDE I use, they have gotten their money's worth 10 times over. Tell me this, what happens after you add your famous println with your famous xemacs editor. You go shut down the app. server restart it and then you finally get to debug your problem. This is not the case when you are using a properly configured IDE. I guarantee you that in the time you added your strategized about where to put your GREAT 'println' statement with your 'xemacs' editor, I would have debugged the problem and moved on to something else using an IDE. Basically my point about 'println' is that they make the developer waste time on doint things that there are great tools for, and ultimately all that time you spend on 'println' is money you are costing your company. I believe however that for some developers they will never believe in this since they think that by using an IDE they would be taking a step down instead of a step up. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:25 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 Perhaps less of a waste of time than waiting on the debugger (the problem that started this thread) then stepping through lots of code. Much quicker, and more enlightening, to think about the problem (as someone else suggested) then insert a println in a strategic location. Also, using xemacs to add a println statement will likely consume a lot less of your companies money than that fancy IDE you want. - Original Message - From: Juan Alvarado (Struts List) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 6:02 PM Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println() is a great tool if you want to waste your time and your company's money. I would suggest investing in an IDE you feel comfortable with. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:58 PM To: 'Struts Users Mailing List' Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println(). ;-) Mark -Original Message- From: Annie Zhang [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:02 PM Which is the best debug tool for Struts+Torque projects? -- 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]
RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5
To begin with, I don't see the need for an IDE to debug JSPs. My main need of debugging comes on the business side of things. I guess there must be thousands if not hundreds of thousands of code weenies around the world doing their java development. I'm also sure these people are not developing quality code at all and that they are developing worthless applications because they are weenies. Of course a guy like yourself Mark who is such a code stud doesn't need any of the tools of the trade and I'm sure all of your development is done on some text editor and all of your debugging is done with your suggested system.println. Unfortunately, the rest of us are not as gifted as you and we have to rely on the tools for weenies as you like to call them. We weenies will go ahead and leave the tools for studs like you (system.out.println) alone so that god forbid we don't ever become such a java stud as yourself. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:58 AM To: 'Struts Users Mailing List' Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 Not to mention that debuggers don't work on JSPs that rely upon EJBs for their data. IDEs are for code weenies. Mark -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:25 AM Perhaps less of a waste of time than waiting on the debugger (the problem that started this thread) then stepping through lots of code. Much quicker, and more enlightening, to think about the problem (as someone else suggested) then insert a println in a strategic location. Also, using xemacs to add a println statement will likely consume a lot less of your companies money than that fancy IDE you want. - Original Message - From: Juan Alvarado (Struts List) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 6:02 PM Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println() is a great tool if you want to waste your time and your company's money. I would suggest investing in an IDE you feel comfortable with. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:58 PM To: 'Struts Users Mailing List' Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println(). ;-) Mark -Original Message- From: Annie Zhang [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:02 PM Which is the best debug tool for Struts+Torque projects? -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: logic-tags related to beans not derived from ActionForm?
Thanks, missing comercial support is often a argument against open source software , some decition maker think that way. They should have visited this wonderfull newsgroup Wolfgang - Original Message - From: Maris Orbidans [EMAIL PROTECTED] Newsgroups: Struts Sent: Monday, April 15, 2002 2:56 PM Subject: RE: logic-tags related to beans not derived from ActionForm? Thank you Maris, exactly what I needed. I suppose that is the way to overcome the restriction that an Action can have only one ActionForm. Yes. BTW You can add properties to you form bean, that don't correspond to HTML input fields. For example a field that determines that input fields are read only. // Action class... form.setReadOnly(false); // JSP logic:notEqual name=Lim1vkontrole property=readOnly value=false html:text property=datums readonly=true size=10 styleId=text maxlength=10/ /logic:notEqual logic:equal name=Lim1vkontrole property=readOnly value=false html:text property=datums size=10 styleId=text maxlength=10/ /logic:equal Maris -- 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: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5
Hey, lighten up everyone. I'm sure he was only having a laugh (although don't sue me if I'm misrepresenting your views, Mark!). System.out.println(Take chill pill now...); :-) __ Steve Earl -Original Message- From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 2:24 PM To: Struts Users Mailing List Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 To begin with, I don't see the need for an IDE to debug JSPs. My main need of debugging comes on the business side of things. I guess there must be thousands if not hundreds of thousands of code weenies around the world doing their java development. I'm also sure these people are not developing quality code at all and that they are developing worthless applications because they are weenies. Of course a guy like yourself Mark who is such a code stud doesn't need any of the tools of the trade and I'm sure all of your development is done on some text editor and all of your debugging is done with your suggested system.println. Unfortunately, the rest of us are not as gifted as you and we have to rely on the tools for weenies as you like to call them. We weenies will go ahead and leave the tools for studs like you (system.out.println) alone so that god forbid we don't ever become such a java stud as yourself. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:58 AM To: 'Struts Users Mailing List' Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 Not to mention that debuggers don't work on JSPs that rely upon EJBs for their data. IDEs are for code weenies. Mark -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:25 AM Perhaps less of a waste of time than waiting on the debugger (the problem that started this thread) then stepping through lots of code. Much quicker, and more enlightening, to think about the problem (as someone else suggested) then insert a println in a strategic location. Also, using xemacs to add a println statement will likely consume a lot less of your companies money than that fancy IDE you want. - Original Message - From: Juan Alvarado (Struts List) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 6:02 PM Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println() is a great tool if you want to waste your time and your company's money. I would suggest investing in an IDE you feel comfortable with. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:58 PM To: 'Struts Users Mailing List' Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println(). ;-) Mark -Original Message- From: Annie Zhang [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:02 PM Which is the best debug tool for Struts+Torque projects? -- 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] -- 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 vs Javascript validation
If you are doing Javascript validation client side, which has it's pros, I would still validate at the server. To easy to copy your html and submit the same form minus the Javascript validation. -Original Message- From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]] Sent: Monday, 15 April 2002 11:48 PM To: Struts Group (E-mail) Subject: Struts vs Javascript validation Hi, is there any thumb rule that says when to use Javascript validation and when to use Struts inbuilt validation? Thnx, GB -- 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: radio button help
Try declaring the value of the radio button you wanna checked by default using the following: String affiliation = C Note: This sets the first radio button with the value C to be selected by default. This also applies if you wanna set the value to U or P too. regards :) -- On Mon, 15 Apr 2002 23:52:55 Joe Latty wrote: In your ActionForm set the initial value of your affiliation variable to whichever value you want checked by default. e.g. getAffiliation() will return C; -Original Message- From: Cory Hubert [mailto:[EMAIL PROTECTED]] Sent: Monday, 15 April 2002 11:03 PM To: Struts Users Mailing List Subject: Re: radio button help I am having the same issue. The docs are no help. On 4/15/02 8:36 AM, Muthukumar Subramanian [EMAIL PROTECTED] wrote: how to make a radio button checked by default in group of radio buttons? html:radio property=affiliation value=C/ Cbr html:radio property=affiliation value=P/ Pbr html:radio property=affiliation value=U/ Ubr how to make the first one checked? Thanks and Regards Muthukumar .S Mysore. -- 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] See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Resource access fails after serialization
Hi, I encountered a resource access problem when I tried to make our application cluster-safe, i.e. I added serialization markers to all classes of which objects are stored in the session. To test out the proper serialization and de-serialization, I added some code to my mock test-cases that writes the required data to a file and imediatly restores it from that file again. For some purpose, I also have to serialize the current action. Now, after I have restored the serialized information from disk, the getResourceAsStream method of my action class throws a NPE. Apparently, the servlet information is not serialized and can thus not be restored. Is this a known issue and are there solutions for the problem? I. e. wow can I access resources after a serialization of the Action? I have already search the mailing list and the web, but I could not find anythink on the topic. Thanks in advance, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts vs Javascript validation
People can disable the javascript from there browser and they can bypass your validation. I think, it's a good idea to do it at the server. Even if you're using javascript, you still need to validate at the server level. -Original Message- From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:48 AM To: Struts Group (E-mail) Subject: Struts vs Javascript validation Hi, is there any thumb rule that says when to use Javascript validation and when to use Struts inbuilt validation? Thnx, GB -- 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-menu/dropdown
On Fri, 2002-04-12 at 13:30, [EMAIL PROTECTED] wrote: Yes, I have the sample working. It just doesn't provide any links underneath each menu item. Actually, when you select an item from the Yes, I should probably define more links in the example. dropdown menu, it pops up a new browser instead of navigating to another page on the same browser. So when I tried putting links in some of the items and changing the target to _self that's when I discovered the problem. Hmm... I believe the target for the link will default to _self if you do not specify one. The dropdown menu is extremely minimal. It does not work with many browsers other than IE and Mozilla (and maybe Netscape 6). If anything, it was mostly intended as an example. I plan to integrate a better expanding menu library when I get the time and after I find one. Perhaps someone can recommend a good one that is free? If you want to have the DropDown menu display expanded to some saved position, you should be able to generate the appropriate javascript to do so. I forget if it is the tables or divs that are being hidden. Anyway, all that is happening is that when you click on one of the menu controls, a style setting for display is set to true or false. I'm not looking at the example now so I may not be entirely accurate, but that's essentially how it works. You should be able to save some serverside attribute that holds the name of the element to keep expanded. Then you just generate the javscript that sets the display attribute of that element to true. Of course, you will have to worry about going through the menu recursively to find out what other sections of the menu may need to be expanded as well. But this should be feasible. Does this help? Scott Sayles I'll take a look at your example and see if that'll work for me. Thanks. Raffy Struts Newsgroup (@Basebeans.com) struts on 04/12/2002 10:25:01 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: Struts-menu/dropdown Subject: Re: Struts-menu/dropdown From: Vic Cekvenich [EMAIL PROTECTED] === You can download a working sample from BaseBeans.com/downloads. The site uses the Struts drop down menus. Can you get the sample drop down working that comes with the menu? Vic [EMAIL PROTECTED] wrote: TGIF Has anyone successfully used the DropDown in struts-menu? My problem with it is that the javascript generated by struts-menu does not preserve the state of the dropdown menu when I navigate to another page. For example 1. I have the menu File (expandable) View 2. I expand File to expose the subitems. File new open close View 3. I click on new and this invokes an action which navigates to a new screen. The problem: The menu resets to File View Instead of retaining it at File new open close View I appreciate any suggestions, Raffy ** Please Note: The information in this E-mail message, and any files transmitted with it, is confidential and may be legally privileged. It is intended only for the use of the individual(s) named above. If you are the intended recipient, be aware that your use of any confidential or personal information may be restricted by state and federal privacy laws. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender and delete the material from any computer. 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] ** Please Note: The information in this E-mail message, and any files transmitted with it, is confidential and may be legally privileged. It is intended only for the use of the individual(s) named above. If you are the intended recipient, be aware that your use of any confidential or personal information may be restricted by state and federal privacy laws. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender and delete the material from any computer. Thank you.
RE: Which Version of Struts to Use??
I think I understood exactly what he meant. But I've only been in this line of work for a little over thirty years so I too may have something to learn. An answer that addressed when it would be out of beta might have helped more than your answer. An additional sentence about your assumption that that is what he meant would have clarified it further. OTOH his response was not necessary or helpful either. These lists work best when we are all civil, helpful, and friendly. regards bp -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 7:08 AM To: 'Struts Users Mailing List' Subject: RE: Which Version of Struts to Use?? In the world of software, standard and stable are two very different things and if you don't know enough to articulate the difference between them, you had better find another line of work and not expect people who do know the difference to read your mind. Mark -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 14, 2002 12:26 AM To: [EMAIL PROTECTED] Subject: Fwd: Which Version of Struts to Use?? Some genius could not figure out what I meant by the standard release. Let me change that to stable release. What I am trying to find out is whether the new features being put into the beta will likely be stable by August-September. I would have thought that was obvious, but I guess not. If anyone has a reasonable guestimate, I would greatly appreciate that. Thanks, Micael Date: Sat, 13 Apr 2002 08:14:42 -0700 To: [EMAIL PROTECTED] From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Subject: Which Version of Struts to Use??? TWIMC: We are about to build a commercial site using struts. Should we start with beta rather than the standard release? The eta for the site is August-September. The reason I ask is that struts seems to be in the middle of some major functionality shifts. Thanks of any assistance. Micael -- 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: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5
Hi, There are people who are happy with println() and there are people happy with IDE debugger. It is matter of experience and personal preference. my $ .02 :-) Peter PS: Let's stop debugging wars. BTW not everybody can dedicate 256+ MB RAM to Java IDE with debugger... Original Message Follows From: Juan Alvarado \(Struts List\) [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 Date: Mon, 15 Apr 2002 09:10:39 -0400 I believe that for the $100 my company spent on the IDE I use, they have gotten their money's worth 10 times over. Tell me this, what happens after you add your famous println with your famous xemacs editor. You go shut down the app. server restart it and then you finally get to debug your problem. This is not the case when you are using a properly configured IDE. I guarantee you that in the time you added your strategized about where to put your GREAT 'println' statement with your 'xemacs' editor, I would have debugged the problem and moved on to something else using an IDE. Basically my point about 'println' is that they make the developer waste time on doint things that there are great tools for, and ultimately all that time you spend on 'println' is money you are costing your company. I believe however that for some developers they will never believe in this since they think that by using an IDE they would be taking a step down instead of a step up. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Dave Derry [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 9:25 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 Perhaps less of a waste of time than waiting on the debugger (the problem that started this thread) then stepping through lots of code. Much quicker, and more enlightening, to think about the problem (as someone else suggested) then insert a println in a strategic location. Also, using xemacs to add a println statement will likely consume a lot less of your companies money than that fancy IDE you want. - Original Message - From: Juan Alvarado (Struts List) [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, April 12, 2002 6:02 PM Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println() is a great tool if you want to waste your time and your company's money. I would suggest investing in an IDE you feel comfortable with. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:58 PM To: 'Struts Users Mailing List' Subject: RE: [Resend]Too Slow: Debug Struts + Torque project using JBuilder5 System.out.println(). ;-) Mark -Original Message- From: Annie Zhang [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 5:02 PM Which is the best debug tool for Struts+Torque projects? _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Which Version of Struts to Use??
I agree with you Bill. Some people in this list have no idea what friendliness is and they always have to find a way to make smart ass comments about just about every post that they don't like just to make themselves feel better and boost their egos or lack thereof. But please don't let that discourage you from coming back to the list. The majority of the people are very nice and they are willing to help. I have to say I've gotten a lot out of this list in the short time I've used struts. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [EMAIL PROTECTED] -Original Message- From: Bill Page [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 10:43 AM To: Struts Users Mailing List Subject: RE: Which Version of Struts to Use?? I think I understood exactly what he meant. But I've only been in this line of work for a little over thirty years so I too may have something to learn. An answer that addressed when it would be out of beta might have helped more than your answer. An additional sentence about your assumption that that is what he meant would have clarified it further. OTOH his response was not necessary or helpful either. These lists work best when we are all civil, helpful, and friendly. regards bp -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 7:08 AM To: 'Struts Users Mailing List' Subject: RE: Which Version of Struts to Use?? In the world of software, standard and stable are two very different things and if you don't know enough to articulate the difference between them, you had better find another line of work and not expect people who do know the difference to read your mind. Mark -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 14, 2002 12:26 AM To: [EMAIL PROTECTED] Subject: Fwd: Which Version of Struts to Use?? Some genius could not figure out what I meant by the standard release. Let me change that to stable release. What I am trying to find out is whether the new features being put into the beta will likely be stable by August-September. I would have thought that was obvious, but I guess not. If anyone has a reasonable guestimate, I would greatly appreciate that. Thanks, Micael Date: Sat, 13 Apr 2002 08:14:42 -0700 To: [EMAIL PROTECTED] From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Subject: Which Version of Struts to Use??? TWIMC: We are about to build a commercial site using struts. Should we start with beta rather than the standard release? The eta for the site is August-September. The reason I ask is that struts seems to be in the middle of some major functionality shifts. Thanks of any assistance. Micael -- 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]
url mappings and J2EE authentication
I am trying to get authentication working in a war file that is running on WebSphere 4.0.2 through a struts based ui. I have a login page that does form based auth and that works just fine. But when I link to a struts controlled url the app loses its user Principal. A call to request.getUserPrincipal().getName() returns the string UNAUTHENTICATED instead of the logged in user's name. I have tried url mappings like this: action - *.do and then the web resource contraint of /SysAdmin/*.do ( /SysAdmin is the directory where the protected servlets live) but that didn't work so I changed the url mapping to this action - /SysAdmin/ServletName.do and then made the constraint /SysAdmin/ServletName.do and that still did not work. How do I protect a struts action so that I can ensure that the user is logged in so that the Principal object is valid at runtime? Thanks, Jasen Halmes -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Creating beans dynamically from byte code in a byte[] withClassLoader.defineClass - how to do it right?
I have spent some time lately figuring out how I can generate beans on-the-fly with fields completely specified at run-time, since this would be an enourmeous help when working with JDBC and Struts in an informal matter (which is why I ask here :-) I have used Apache Jakarta BCEL to construct the byte-code I need for the bean (verified by dumping it to disk, and using java and 'javap -c' on the class file), and I would then like to get the SystemClassLoader and call defineClass on my byte array to get a Class, and then resolve it. Unfortunately I cannot do this, since the defineClass method is protected final, so I am a bit at a loss here. I just need some code which can instantiate my byte code into a Class, so I can get this working. I would prefer not to use physical files, but I have a JSP-environment so that might be an option. (Resin+Tomcat). Is there somebody who have a solution for this problem? I would appreciate all pointers. -- Thorbjørn Ravn Andersen Scandiatransplant, c/o Christian Mondrup 89 49 53 01 http://biobase.dk/~tra -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Solution to: Struts vs Javascript validation
I think that two validations are needed, because: -javascript validation avoids server validation efforts, badwidth and network time. -server validation avoids validation bypass by script kiddies and cross-site scripting specialists. bye! _ Pello Xabier Altadill Izura Ingeniero Informatico y ademas navarro --- Descubre el poder de la personalización en línea. Todos tus servicios favoritos en un solo lugar: http://www.terra.com/tumonitor/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: url mappings and J2EE authentication
I am using struts with J2EE authentication. I am using Orion server, however. Here are some of the things which I did. When you setup your J2EE authentication, you typically tell it what path to protect, so for example if you make /member/* a password protected resource make sure that all the actions which you want password protected to also have /member/.../xxx name for them. So when you call your action /member//xxx.do the J2EE authentication will also kick in. This has worked for me, but I am not familiar with WebSphere. -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Jasen P. Halmes [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:05 AM To: [EMAIL PROTECTED] Subject: url mappings and J2EE authentication I am trying to get authentication working in a war file that is running on WebSphere 4.0.2 through a struts based ui. I have a login page that does form based auth and that works just fine. But when I link to a struts controlled url the app loses its user Principal. A call to request.getUserPrincipal().getName() returns the string UNAUTHENTICATED instead of the logged in user's name. I have tried url mappings like this: action - *.do and then the web resource contraint of /SysAdmin/*.do ( /SysAdmin is the directory where the protected servlets live) but that didn't work so I changed the url mapping to this action - /SysAdmin/ServletName.do and then made the constraint /SysAdmin/ServletName.do and that still did not work. How do I protect a struts action so that I can ensure that the user is logged in so that the Principal object is valid at runtime? Thanks, Jasen Halmes -- 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: Problems with iPlanet web server 6.0 sp2 and struts 1.1 beta
I'm sure this is not the politically correct answer, but iPlanet is the preferred web server in my environment so here is what works for me. As for the LogFactory error... I'm not sure how you (Juan) are referencing the logging facilities. I'm using Log4J and it is working as expected. As for the ServletException with the logon.jsp and ActionForms... This is the big one for me. My workaround is to eliminate the use of struts-html and code directly with the normal HTML coding for FORMS. I have found that the struts-html html:errors/ works so I can utilize ActionErrors. I'm under the gun so I don't have time to do a lot of debugging to find out what the problem is, if it is a struts problem or a iPlanet problem. I don't like the fact that I can't use struts-html tags. There are a lot of neat features I would like to make use of. Later, ajTreece Juan Alvarado wrote: I have tried to deploy my application to IWS 6.0 sp2 and every time I restart the server instance, I get the following message: [10/Apr/2002:14:12:22] failure ( 2032): Internal error: Unexpected error condition thrown (unknown exception,no description), stack: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.struts.action.ActionServlet.init(ActionServlet.java:331) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at com.iplanet.server.http.servlet.WServletEntity.loadAndInitServlet(WServletEn tity.java:71) at com.iplanet.server.http.servlet.WebApplication.init(WebApplication.java:314) at com.iplanet.server.http.servlet.VirtualServer.init(VirtualServer.java:176) at com.iplanet.server.http.servlet.NSServletRunner.VSInit(NSServletRunner.java: 686) [10/Apr/2002:14:12:22] failure ( 2032): Internal Error: Failed to initialize web application environment (web-apps.xml) for virtual server (https-eudcontent) [10/Apr/2002:14:12:22] info ( 2032): Internal Error: Failed to initialize web application environment (web-apps.xml) for virtual server (https-eudcontent) [10/Apr/2002:14:12:22] failure ( 2032): 1 subystems could not be rolled back [10/Apr/2002:14:12:22] failure ( 2032): Failed to set configuration [10/Apr/2002:14:12:22] info ( 2032): Suspend Httpd Service Needless to say, my web app does not work. I HAVE tried adding the commons-logging.jar to the web server instance class path and the web server starts just fine. However I cannot load any of my forms: [10/Apr/2002:14:17:09] failure ( 2416): Internal error: servlet service function had thrown ServletException (uri=/struts-example/logon.jsp): javax.servlet.ServletException: Exception creating bean of class org.apache.struts.action.DynaActionForm: {1}, stack: javax.servlet.ServletException: Exception creating bean of class org.apache.struts.action.DynaActionForm: {1} at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:453)... There is a lot more to this message but it is too big to paste in this email. If anyone happens to know what's going on here, I'd appreciate if you can share any information with me. Unfortunately IWS is our platform and it would suck if I can't use this version of Struts with it. ** Juan Alvarado Internet Developer -- Manduca Management (786)552-0504 [EMAIL PROTECTED] AOL Instant Messenger: [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: Soap and Struts
You have a wonderful habit, Mark, of not answering peoples' questions that seem simplistic to you, but instead exercising your limpid wit. If your ego must be massaged with inanities shot toward people new to this-and-that, try doing it off line? Thanks. I personally do not like to be around smart-asses. Thanks again. At 07:17 AM 4/15/02 -0400, you wrote: A sodium hydroxide-based cleaning agent; most social situations. Mark -Original Message- From: Yugandhar_Reddy [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 3:27 AM To: Struts Users Mailing List Subject: RE: Soap and Struts Hi, Cud u please tell me what a SOAP is and where is it helpful// Thanks in advance Yug -- 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]
Trees JSP Recursion in Struts 1.1...
struts-evangelism The ability to draw trees in a flexible, efficient and ultimately expandible manner is really hard. But Struts, JSP's and the Nested Tags in Struts1.1beta can do it easily and in a very elegant fashion... (or with Struts1.0/1.0.1 with a nested tags distrib younger than a month) /struts-evangelism plug I just finished uploading a tutorial to my site to show you all how to do, in easy steps, everyone can do it. And it's fun! The end of the tutorial, you'll end up with a page which will display some of the file system of your JSP server! /plug Anyways, it's all there, some have been complaining that there is no control or tag to make trees... well, instead of having to rely on any one piece of code, the framework itself is capable of pulling it off in a very ellegant and most powerful fashion (you do your own markup, no putting up with what any one control does or doesn't do!). Just give it a try. Go to... http://www.keyboardmonkey.com/ ...and click on the [NeXt] section if you want a little ramp-up on the nested tags first, or just go straight to the Pilot Light section for the tutorials. You could go straight to the tutorials if you're quite familiar with Struts. They should get you through. If you don't have Struts1.1, just pick up the nested tags distrib from the downloads section. Enjoy. Arron. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Which Version of Struts to Use??
You have no idea how much I really need your sort of help, Mark. What is: a gorrant? At 07:08 AM 4/15/02 -0400, you wrote: In the world of software, standard and stable are two very different things and if you don't know enough to articulate the difference between them, you had better find another line of work and not expect people who do know the difference to read your mind. Mark -Original Message- From: Micael Padraig Og mac Grene [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 14, 2002 12:26 AM To: [EMAIL PROTECTED] Subject: Fwd: Which Version of Struts to Use?? Some genius could not figure out what I meant by the standard release. Let me change that to stable release. What I am trying to find out is whether the new features being put into the beta will likely be stable by August-September. I would have thought that was obvious, but I guess not. If anyone has a reasonable guestimate, I would greatly appreciate that. Thanks, Micael Date: Sat, 13 Apr 2002 08:14:42 -0700 To: [EMAIL PROTECTED] From: Micael Padraig Og mac Grene [EMAIL PROTECTED] Subject: Which Version of Struts to Use??? TWIMC: We are about to build a commercial site using struts. Should we start with beta rather than the standard release? The eta for the site is August-September. The reason I ask is that struts seems to be in the middle of some major functionality shifts. Thanks of any assistance. Micael -- 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]
Managing bean
Hi, I'm new to struts and have this question: I have a jsp that talks to a form bean. After successful validation, this formbean is passed to action.perform(). Now I am creating a bean (corresponding to a db row) in the action class using the data from the formbean. Now, where do I store this bean and how do I access it from the action class later? I guess only one instance of the action is created for all the sessions. So, I cannot store the bean as an instance variable of the action class. Thnx, GB -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Managing bean
- First the response: Have a look that from Jakarta documentation: http://jakarta.apache.org/struts/userGuide/building_controller.html#action_classes The controller servlet creates only one instance of your Action class, and uses it for all requests. Thus, you need to code your Action class so that it operates correctly in a multi-threaded environment, just as you must code a servlet's service() method safely. The most important principle that aids in thread-safe coding is to use only local variables, not instance variables, in your Action class. Local variables are created on a stack that is assigned (by your JVM) to each request thread, so there is no need to worry about sharing them. - And now the question: In other places, they suggest to use a resources cache with a threshold managed by session. However, I have doubts about right performance in clustered environment, since when swapping JVM, caches are lost. Anyone has further experience with this issue. We are using Websphere in clustered round robin environment. Adolfo From: Bhaskar Gopalan [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Group (E-mail) [EMAIL PROTECTED] Subject: Managing bean Date: Mon, 15 Apr 2002 14:36:45 -0400 Hi, I'm new to struts and have this question: I have a jsp that talks to a form bean. After successful validation, this formbean is passed to action.perform(). Now I am creating a bean (corresponding to a db row) in the action class using the data from the formbean. Now, where do I store this bean and how do I access it from the action class later? I guess only one instance of the action is created for all the sessions. So, I cannot store the bean as an instance variable of the action class. Thnx, GB -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Action without a form.
I'd like to have an action without an associated form. Any suggestions? Many thanks, boz
RE: Creating beans dynamically from byte code in a byte[] withClassLoader.defineClass - how to do it right?
This is exactly what DynaBeans were invented for. Using BCEL to generate classes on the fly is impressive, but wouldn't it be simpler to just use the DynaBeans, which I believe are in 1.1? Niall -Original Message- From: Thorbjørn Ravn Andersen (Scandiatransplant) [mailto:[EMAIL PROTECTED]] Sent: 15 April 2002 16:15 To: Struts Users Mailing List Subject: Creating beans dynamically from byte code in a byte[] withClassLoader.defineClass - how to do it right? I have spent some time lately figuring out how I can generate beans on-the-fly with fields completely specified at run-time, since this would be an enourmeous help when working with JDBC and Struts in an informal matter (which is why I ask here :-) I have used Apache Jakarta BCEL to construct the byte-code I need for the bean (verified by dumping it to disk, and using java and 'javap -c' on the class file), and I would then like to get the SystemClassLoader and call defineClass on my byte array to get a Class, and then resolve it. Unfortunately I cannot do this, since the defineClass method is protected final, so I am a bit at a loss here. I just need some code which can instantiate my byte code into a Class, so I can get this working. I would prefer not to use physical files, but I have a JSP-environment so that might be an option. (Resin+Tomcat). Is there somebody who have a solution for this problem? I would appreciate all pointers. -- Thorbjørn Ravn Andersen Scandiatransplant, c/o Christian Mondrup 89 49 53 01 http://biobase.dk/~tra -- 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: Action without a form.
Use an usual HTML form. Adolfo From: Jennings, Christofer J. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Action without a form. Date: Mon, 15 Apr 2002 12:05:17 -0700 I'd like to have an action without an associated form. Any suggestions? Many thanks, boz _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action without a form.
I don't use form here. action path=/jobopp/sortOpportunity type=SortJobOppAction scope=request forward name=success path=/jobopp/listSetup.do / /action -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:09 PM To: [EMAIL PROTECTED] Subject: Re: Action without a form. Use an usual HTML form. Adolfo From: Jennings, Christofer J. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: Action without a form. Date: Mon, 15 Apr 2002 12:05:17 -0700 I'd like to have an action without an associated form. Any suggestions? Many thanks, boz _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Action without a form.
I guess what you mean by this is that you don't want a form bean associated with your action mapping, but you still want to pass data either through another bean or in the request? Could you clarify? -Original Message- From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:05 PM To: 'Struts Users Mailing List' Subject: Action without a form. I'd like to have an action without an associated form. Any suggestions? Many thanks, boz -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: comparations with OR, AND, NOT... in CustomTags
JSTL (Standard Tag library - requires Servlet 2.3/JSP 1.2). or I developed custom tags to do this (if/else/elseif/and/or and switch/case/default) which Ted Husted put on his site at: http://husted.com/struts/resources/logic-niallp.htm Also I have a slightly improved version, see: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg28272.html Niall -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]] Sent: 15 April 2002 19:41 To: [EMAIL PROTECTED] Subject: comparations with OR, AND, NOT... in CustomTags Hi All, does anyone know how to make complex comparations in JSP by means of same Custom Tag? I mean, ANDs, ORs, NOT... or compound conditions. Thanks in advance, Adolfo. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: comparations with OR, AND, NOT... in CustomTags
Exactly what I was looking for, cheers, adolfo From: Niall Pemberton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: comparations with OR, AND, NOT... in CustomTags Date: Mon, 15 Apr 2002 20:13:56 +0100 JSTL (Standard Tag library - requires Servlet 2.3/JSP 1.2). or I developed custom tags to do this (if/else/elseif/and/or and switch/case/default) which Ted Husted put on his site at: http://husted.com/struts/resources/logic-niallp.htm Also I have a slightly improved version, see: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg28272.html Niall -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]] Sent: 15 April 2002 19:41 To: [EMAIL PROTECTED] Subject: comparations with OR, AND, NOT... in CustomTags Hi All, does anyone know how to make complex comparations in JSP by means of same Custom Tag? I mean, ANDs, ORs, NOT... or compound conditions. Thanks in advance, Adolfo. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Managing bean
Do you need to store more than one instance of your db-row bean per session? If not, then I would just store the bean in the session like so: request.getSession().setAttribute(MyActionClass.dbRowBeanClassName, dbRowBeanInstance) Of course, you're free to use whatever identifier you like, but I use the Action Class name followed by a '.' and then the class name of the bean I'm storing. The other option, if the form bean has session scope, is to create a field in your form bean for the dbRowBean and store it there instead. If you need to store more than one dbRowBean object per session, you'll have to come up with a naming scheme of some sort. :) cheers, Joe -Original Message- From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 11:37 AM To: Struts Group (E-mail) Subject: Managing bean Hi, I'm new to struts and have this question: I have a jsp that talks to a form bean. After successful validation, this formbean is passed to action.perform(). Now I am creating a bean (corresponding to a db row) in the action class using the data from the formbean. Now, where do I store this bean and how do I access it from the action class later? I guess only one instance of the action is created for all the sessions. So, I cannot store the bean as an instance variable of the action class. Thnx, GB -- 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]
html:link and mailto?
Newbie question here. If I have a bean called article, how do I form an html:link that is a mailto for the property: article.email ? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Passing JavaScript variable to a Java Scriptlet on a JSP page
http://javascript.internet.com/forms/auto-drop-down.html Have fun JM -Original Message- From: sanjeev_dutt [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 8:32 AM To: Struts Users Mailing List Subject: Passing JavaScript variable to a Java Scriptlet on a JSP page Hi, I have this piece of code on my JSP: Script language = javascript function fnGetStates() { country = document.searchAcctForm.cboAcctAddrCountry.value; alert(country); document.write('% Hashtable states = new Hashtable(); %'); document.write('% states = Combo.getStates(country);%'); document.write('% Enumeration state = states.keys(); %'); document.write('% while (state.hasMoreElements()) { %'); document.write('% String statecode = (String)state.nextElement(); %'); document.write('% String sts = (String)states.get(statecode); %'); document.write('html:option value=%= statecode %%= sts %/html:option'); document.write('% } %'); } /Script The problem is that alert is able to show the value of country. But within the document.write, It is not able to get the value of country. It throws the following error : ~:\citione\web\WEB-INF\_tmp_war_myserver_myserver_web\jsp_servlet\ _jsp\_search\__searchacct.java:801: cannot resolve symbol probably occurred due to an error in /jsp/search/searchacct.jsp line 197: document.write('% states = Combo.getStates(country);%'); Could some one help ? Thanks Sanjeev -- 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]
No action instance for path [/path] could be created
This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel)) user.load(isac-bo-1); else if (ao.equals(testLevel)) user.load(isac-ao-1); else if (pmbm.equals(testLevel)) user.load(isac-pm-1); else { System.err.println(Error in IsacTestStartAction: testLevel not recognized); return ( mapping.findForward(error) ); } } catch (LDAPException e) {
RE: No action instance for path [/path] could be created
take out the name= JM -Original Message- From: Jason B Menard [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:44 PM To: Struts Users Mailing List Subject: No action instance for path [/path] could be created This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel)) user.load(isac-bo-1); else if (ao.equals(testLevel)) user.load(isac-ao-1);
RE: No action instance for path [/path] could be created
oops...sorry, wrong action JM -Original Message- From: Jason B Menard [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:44 PM To: Struts Users Mailing List Subject: No action instance for path [/path] could be created This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel)) user.load(isac-bo-1); else if (ao.equals(testLevel))
(Corrected) No action instance for path [.path] could be created
This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, request.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel)) user.load(isac-bo-1); else if (ao.equals(testLevel)) user.load(isac-ao-1); else if (pmbm.equals(testLevel)) user.load(isac-pm-1); else { System.err.println(Error in IsacTestStartAction: testLevel not recognized); return ( mapping.findForward(error) ); } } catch (LDAPException e) {
RE: (Corrected) No action instance for path [.path] could be created
What are you using for servlet container? JM -Original Message- From: Jason B Menard [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:52 PM To: Struts Users Mailing List Subject: (Corrected) No action instance for path [.path] could be created This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, request.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel)) user.load(isac-bo-1); else if (ao.equals(testLevel))
Re: (Corrected) No action instance for path [.path] could be created
I'm using Tomcat-4.0.1. - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, April 15, 2002 4:44 PM Subject: RE: (Corrected) No action instance for path [.path] could be created What are you using for servlet container? JM -Original Message- From: Jason B Menard [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:52 PM To: Struts Users Mailing List Subject: (Corrected) No action instance for path [.path] could be created This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, request.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser
site hosting
Hi guys, A friend of mine and I are developing a new application using struts, but not for any company, just for ourselves. We are looking for some site hosting service, free ones. Does anybody here know about that ? Is there anyone here that has already done that ? Thanks a lot Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: site hosting
If you search the archives of this list, you'll find lots of potential places. Jay On Mon, 15 Apr 2002, Jefferson Rodrigues de Oliveira e Silva wrote: Hi guys, A friend of mine and I are developing a new application using struts, but not for any company, just for ourselves. We are looking for some site hosting service, free ones. Does anybody here know about that ? Is there anyone here that has already done that ? Thanks a lot Jefferson -- 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: Action without a form.
Yes, it is null. -Original Message- From: Jennings, Christofer J. [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:14 PM To: 'Struts Users Mailing List' Subject: RE: Action without a form. Does this result in null being passed for the ActionForm parameter of perform? ,boz -Original Message- From: Leonardo Maciel [mailto:[EMAIL PROTECTED]] I don't use form here. action path=/jobopp/sortOpportunity type=SortJobOppAction scope=request forward name=success path=/jobopp/listSetup.do / /action -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: site hosting
Here are all the hosts I've heard about, mostly from the newsgroups: GeoCities AO Industries good java support,Tomcat 3.2.1 Great customer service Avasta Similar to Loudcloud, but also services non-web based enterprise applications. CWIHosting $30/mo, 30 GB of bandwidth, and JSP/Servlet support provided by Resin. Globix hotjsp.com iMagine Internet Services Infinite Host irDesign Loudcloud very expensive MMA private JVM, Tomcat (JBoss optional), MySQL, PostgreSQL, and lots of other stuff for $50/month servlets.net Webappcabaret $13/month -Dan -Original Message- From: Jay sissom [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:42 PM To: Struts Users Mailing List Subject: Re: site hosting If you search the archives of this list, you'll find lots of potential places. Jay On Mon, 15 Apr 2002, Jefferson Rodrigues de Oliveira e Silva wrote: Hi guys, A friend of mine and I are developing a new application using struts, but not for any company, just for ourselves. We are looking for some site hosting service, free ones. Does anybody here know about that ? Is there anyone here that has already done that ? Thanks a lot Jefferson -- 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: site hosting
http://www.netregistry.com.au/hosting/hosting.html#themarketer http://www.estation.com.au/java.jsp These are just a couple of Aussie sites hosting JSP/Servlets, remembering that 53 cents US buys $1 Aussie. So it's close to a half price sale. -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 9:37 AM To: 'Struts Users Mailing List' Subject: RE: site hosting Here are all the hosts I've heard about, mostly from the newsgroups: GeoCities AO Industries good java support,Tomcat 3.2.1 Great customer service Avasta Similar to Loudcloud, but also services non-web based enterprise applications. CWIHosting $30/mo, 30 GB of bandwidth, and JSP/Servlet support provided by Resin. Globix hotjsp.com iMagine Internet Services Infinite Host irDesign Loudcloud very expensive MMA private JVM, Tomcat (JBoss optional), MySQL, PostgreSQL, and lots of other stuff for $50/month servlets.net Webappcabaret $13/month -Dan -Original Message- From: Jay sissom [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 3:42 PM To: Struts Users Mailing List Subject: Re: site hosting If you search the archives of this list, you'll find lots of potential places. Jay On Mon, 15 Apr 2002, Jefferson Rodrigues de Oliveira e Silva wrote: Hi guys, A friend of mine and I are developing a new application using struts, but not for any company, just for ourselves. We are looking for some site hosting service, free ones. Does anybody here know about that ? Is there anyone here that has already done that ? Thanks a lot Jefferson -- 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]
Resin JSPException with Template Taglib
Members Equity Email System I'm trying to get Struts 1.02 working with Resin 2.1.0. I have an app which works fine under Tomcat, but throws a JSPException under Resin. The stacktrace shows the error occurs in the doEndTag method. Is this a known problem? Are there any work arounds? Thanks Rob MEMBERS EQUITY PTY LTD ABN 56 070 887 679 This email and any attachments are confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this e-mail or any attachments. If you have received this email in error, please tell us immediately by return email and delete this e-mail and any attachments. This message should not be removed. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: No action instance for path [/path] could be created
Look at the processActionCreate() method in the RequestProcessor. This is where the problem surfaces. Here's a fragment: try { instance = (Action)RequestUtils.applicationInstance(className); instance.setServlet(this.servlet); actions.put(className, instance); } catch (Throwable t) { log.error(getInternal().getMessage(actionCreate, mapping.getPath()), t); The applicationInstance() method just does a newInstance(). Either the className variable is null, which means the className could not be retrieved from the mapping. This would be some type of mapping glitch. If the className is not null, then newInstance() failed for other reasons. Sprinkle a few println's around in here and the problem will become very evident. Chuck At 04:44 PM 4/15/2002 -0400, you wrote: This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: Add To Cart Action Test Add To Cart Action Direct Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel)) user.load(isac-bo-1); else if (ao.equals(testLevel)) user.load(isac-ao-1); else if (pmbm.equals(testLevel))
Re: full path name on file upload+MultipartIterator question
#1 is true, but I don't think it has much to do with security. Probably more like the path on the server may not be the same as the path on the client and the OS might be different, too. You can get around this silly limitation if necessary. Just add a hidden field to your HTML and add some JavaScript to copy from the file box to the hiddend field before you submit the form. Ed --- C D [EMAIL PROTECTED] wrote: Hey Guys, 1) Is it true that, for security reasons, the full path of a file that a client types in the html:file element during a file upload, is never available to the server? (I see only a getFileName() on FormFile) 2) I see a lot of emails floating around on the common MultipartIterator error (javax.servlet.ServletException: MultipartIterator: no multipart request data sent..) when one calls two back to back actions, where only the first action needs to deal with the multipart data. I couldnt make out if this issue/bug is resolved as I still see this error. Any light on this is appreciated.. Thanks in advace, CD __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Custom tag class/package naming conventions
Subject: Custom tag class/package naming conventions From: Bill Wohler [EMAIL PROTECTED] === Looking at struts.jar, it appears that the class and package naming conventions for custom tag libraries are as follows: Package containing business logic:com.business.logic Class containing business logic: com/business/logic/Foo.java Tag library for these classes:com.business.taglib.logic Tag wrapping class Foo: com/business/taglib/logic/FooTag.java One other thought I had was this: Package containing business logic:com.business.logic Class containing business logic: com/business/logic/Foo.java Tag library for these classes:com.business.logic.tags Tag wrapping class Foo: com/business/logic/tags/FooTag.java Pros? Cons? I was hoping to find existing conventions, but there doesn't appear to be any. I'd be curious to hear what other folks are doing, or if there are some conventions I missed. Also, do folks always append Tag to the name of the class with the tag implementation? Or do you drop it since it is already in a tags or taglib directory? -- Bill Wohler [EMAIL PROTECTED] http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian! If you're passed on the right, you're in the wrong lane. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
forwarding to another resource
Hi I have a common base class called EtrackAction that checks for a valid session. All action classes subclass this base class. What I want to do is - if a valid session does not exist (which may occur due to sesison timeout) I want to forward the request to another site which is actually a web site that authenticates users. The idea is to authenticate the user and help him continue his session from wherever he is in the web applicaton(he might have taken a break during a lengthy input process in a large screen). So in EtrackAction class I forward to cuisauthentication which maps to relogon.jsp.But the relogon.jsp gives an error. Here are the code snippets and and followed by the stack trace - EtracSessionController controller = (EtracSessionController)session.getAttribute(etracController); System.out.println(EtrackAction: got the controller +controller); //check if a valid user session exists by checking for the existence //of the controller if (controller==null) { //if the controller doesn not exist then a valid session //does not exist. So, store the incoming request, authenticate //the user and preceed futher if the authentication succeeds. System.out.println(SESSION HAS TIMED OUT !!!); return mapping.findForward(cuisauthentication); } //a valid session exists so proceed System.out.println(VALID SESSION EXISTS SO PROCEEDING ); return performAction(mapping,form,request,response); My forwarding section of the :- --- global-forwards !-- Example logon forward forward name=logonpath=/logon.jsp/ -- forward name=success path=/menu.jsp/ forward name=logonpath=/logon.jsp/ forward name=cuisauthentication path=/relogin.jsp/ /global-forwards --- The code for my relogon.jsp is %@ page import=javax.servlet.*,javax.servlet.http.* % /HTML % System.out.println(In the relogon.jsp trying to forward to authtest site..); ServletContext context = getServletContext(); RequestDispatcher dispatcher = context.getRequestDispatcher(http://authtest.internal.ca.com/;); dispatcher.forward(request,response); % /HTML --- Stack Trace is - - A Servlet Exception Has Occurred java.lang.IllegalArgumentException: Path http://authtest.ca.boeing.com/ does not start with a / character at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Application Context.java:570) at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(Appli cationContextFacade.java:174) at org.apache.jsp.relogon$jsp._jspService(relogon$jsp.java:63) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher. java:672) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:430) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:354) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1145) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
RE: struts security
Greetings, I am nearing the completion of the code and it should be on sourceforge in the next day or two. I will be following it up with documentation and examples over the next week. FYI - I am finishing up an overhaul on the code so that it fits into the container managed security and yet provides the neccessary flexibility that many of us need (i.e multiple login pages, prelogin capabilities, and maintained logins). I have accomplished this by creating a plugin of sorts. This plugin uses two mechanisms a Filter Class and a Servlet Class. I have named the Servlet Class Security Controller Servlet because it handles the validation against the conatiner managed security by receiving the form calls and preparing the container to validate. The filter works to identify protected urls which are specified in the security.xml file. Set up should be pretty easy: Within your web.xml you set up a bogus security-constraint that uses the Security Controller Servlet as it's error page and login page. Also, the SCS(Security Controller Servlet) is set as the 403 error page (forbidden error). You also set up the SecurityInit class to initialize upon app start in the web.xml. Also set up is a security.xml file that defines various Security Constraints that map to different login pages. So that if someone request www.mydomain.com/shopping/ it takes them to the shopping login page versus if someone request www.mydomain.com/admin/ it would take them to the admin login page. Another convienience is that you can login from any page you want to. You don't have to hit a secure url first. You can have a login/pass on your homepage or even an auto login that uses cookies. When you start your app up the security.xml file is read into an Application scope bean that provides the info for the URL Filter class to screen protected URLS. The nice thing about this is that all of the programmatic methods are available to do container based role checking. This is good because many api's like tiles and struts menu are looking to take advantage of these methods more and more. I have not tested this code on other containers. It uses RequestDispatcher and response.sendRedirect() classes and methods inconcert with a Filter. So, behavior may be different on various containers. I am testing it now on Tomcat 4.0.3. A Servlet 2.3 container is neccessary. Other dependencies are commons-digester from Jakarta. This security is not struts specific. But, is developed to fit into a struts app. Anyhow, I'm working hard to get this up and I hope it suits many peoples needs. I am sure there are many other features that we could add to it. I have been working in a vaccuum on this so when it is realeased things may need to change. I look forward to hearing back from you. Thanks, Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 4:49 PM To: [EMAIL PROTECTED] Subject: struts security Good evening Brandon, I read of your work on the archives and I would like to check out your solution. I've been looking for a clear cut security solution but have not found one yet. Please let me know when I can get a hold of your code and any examples you may have. Thanks much. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
(Urgent) Please help - validating checkboxes
Hi I've got a Select All checkbox in my jsp that dynamically checks all the checkboxes upon clicking on it. However I've got major problem trying to retrieve the value for my checkboxes. Not only do I get a Syntax error alert box, the checkboxes also doesn't get checked when I click on the Select All checkbox. Obviously, the javascript is not working and I have zero idea why. It appears as follows: /***MY JAVASCRIPT**/ SCRIPT language=javascript function CheckAll(){ var len; len=document.announcementForm [0].announcementID.length; if(len==null){ document.announcementForm[0].announcementID.checked = document.announcementForm[0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.announcementForm[0].announcementID [i].checked = true; } } }//end of function /SCRIPT /*MY CODES*/ html:form action=/deleteNews.do name=deleteNewsForm type=portlio.news.form.deleteNewsForm input type=checkBox name=chkall value=ON Select All logic:iterate id=news name=admin property=newss scope=session html:checkbox property=id value=%=((portlio.news.entity.News)news).getNewsId()%/ /html:form /**END/ PS:I've been working on it since yesterday but to no avail. Please help...thanks a lot :) regards See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
(Urgent) Please Help - Validating checkboxes
Hi I've got a Select All checkbox in my jsp that dynamically checks all the checkboxes upon clicking on it. However I've got major problem trying to retrieve the value for my checkboxes. Not only do I get a Syntax error alert box, the checkboxes also doesn't get checked when I click on the Select All checkbox. Obviously, the javascript is not working and I have zero idea why. It appears as follows: /***MY JAVASCRIPT**/ SCRIPT language=javascript function CheckAll(){ var len; len=document.announcementForm [0].announcementID.length; if(len==null){ document.announcementForm[0].announcementID.checked = document.announcementForm[0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.announcementForm[0].announcementID [i].checked = true; } } }//end of function /SCRIPT /*MY CODES*/ html:form action=/deleteNews.do name=deleteNewsForm type=portlio.news.form.deleteNewsForm input type=checkBox name=chkall value=ON Select All logic:iterate id=news name=admin property=newss scope=session html:checkbox property=id value=%=((portlio.news.entity.News)news).getNewsId()%/ /html:form /**END/ PS:I've been working on it since yesterday but to no avail. Please help...thanks a lot :) regards See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: (Urgent) Please help - validating checkboxes
This Javascript works in IE and NN 6.02 function CheckAll(form){ for (var i=0;iform.elements.length;i++){ var e = form.elements[i]; if ((e.name == 'announcementID') (e.type=='checkbox')) { e.checked = true; } } }//end of function -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 12:49 PM To: Struts Users Mailing List Subject: (Urgent) Please help - validating checkboxes Hi I've got a Select All checkbox in my jsp that dynamically checks all the checkboxes upon clicking on it. However I've got major problem trying to retrieve the value for my checkboxes. Not only do I get a Syntax error alert box, the checkboxes also doesn't get checked when I click on the Select All checkbox. Obviously, the javascript is not working and I have zero idea why. It appears as follows: /***MY JAVASCRIPT**/ SCRIPT language=javascript function CheckAll(){ var len; len=document.announcementForm [0].announcementID.length; if(len==null){ document.announcementForm[0].announcementID.checked = document.announcementForm[0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.announcementForm[0].announcementID [i].checked = true; } } }//end of function /SCRIPT /*MY CODES*/ html:form action=/deleteNews.do name=deleteNewsForm type=portlio.news.form.deleteNewsForm input type=checkBox name=chkall value=ON Select All logic:iterate id=news name=admin property=newss scope=session html:checkbox property=id value=%=((portlio.news.entity.News)news).getNewsId()%/ /html:form /**END/ PS:I've been working on it since yesterday but to no avail. Please help...thanks a lot :) regards See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201 /splash.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]
IBM WebSphere 3.5.4 and Struts 1.1b [Urgent]
Hi, I can successfully use Struts 1.02 with WAS 3.5.4, but when I try to upgrade to Struts 1.1b, the ActionServer cannot be initialized. I got the error message from the stderr : javax.xml.parsers.ParserConfigurationException: Namespace not supported by SAXParser I used to use jaxp.jar + parser.jar with Struts 1.02, what should I use now (with 1.1b ) Any suggestion is appreciated. Best Regards, Dennis Lee ** This message and any files transmitted with it are confidential and may be privileged and/or subject to the provisions of privacy legislation. They are intended solely for the use of the individual or entity to whom they are addressed. If the reader of this message is not the intended recipient, please notify the sender immediately and then delete this message. You are notified that reliance on, disclosure of, distribution or copying of this message is prohibited. Bank of Bermuda ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
(Urgent) Please help - validating checkboxes
Thanks Joe, it works great, but upon unchecking the checkbox, it doesn't uncheck the rest of the checkboxes. Do you have any solutions(anyone out there has any solution to offer too)? regards -- On Tue, 16 Apr 2002 13:32:16 Joe Latty wrote: This Javascript works in IE and NN 6.02 function CheckAll(form){ for (var i=0;iform.elements.length;i++){ var e = form.elements[i]; if ((e.name == 'announcementID') (e.type=='checkbox')) { e.checked = true; } } }//end of function -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 12:49 PM To: Struts Users Mailing List Subject: (Urgent) Please help - validating checkboxes Hi I've got a Select All checkbox in my jsp that dynamically checks all the checkboxes upon clicking on it. However I've got major problem trying to retrieve the value for my checkboxes. Not only do I get a Syntax error alert box, the checkboxes also doesn't get checked when I click on the Select All checkbox. Obviously, the javascript is not working and I have zero idea why. It appears as follows: /***MY JAVASCRIPT**/ SCRIPT language=javascript function CheckAll(){ var len; len=document.announcementForm [0].announcementID.length; if(len==null){ document.announcementForm[0].announcementID.checked = document.announcementForm[0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.announcementForm[0].announcementID [i].checked = true; } } }//end of function /SCRIPT /*MY CODES*/ html:form action=/deleteNews.do name=deleteNewsForm type=portlio.news.form.deleteNewsForm input type=checkBox name=chkall value=ON Select All logic:iterate id=news name=admin property=newss scope=session html:checkbox property=id value=%=((portlio.news.entity.News)news).getNewsId()%/ /html:form /**END/ PS:I've been working on it since yesterday but to no avail. Please help...thanks a lot :) regards See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201 /splash.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] See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201/splash.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: (Corrected) No action instance for path [.path] could be created
Your AddToCartAction class does not appear to be a public class. Have you tried making the class public? -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Jason B Menard [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 1:52 PM To: Struts Users Mailing List Subject: (Corrected) No action instance for path [.path] could be created This one is driving me crazy. I've already checked the archive but found nothing relevant. I get the following error whenever I run the following action: No action instance for path /addToCart could be created The other actions are found, just not this one. Here's the relevant parts of my struts-config.xml: struts-config !-- == Global Forward Definitions == -- global-forwards forward name=errorpath=/error.jsp/ forward name=welcome path=/do/welcome/ /global-forwards !-- == Action Mapping Definitions == -- action-mappings actionpath=/addToCart type=y21.isac.struts.action.AddToCartAction forward name=success path=/confirmAddToCart.jsp/ /action actionpath=/welcome type=y21.isac.struts.action.WelcomeAction name= scope=request input= forward name=success path=/welcome.jsp/ /action !-- Test Actions -- actionpath=/testStart type=y21.isac.struts.action.IsacTestStartAction forward name=success path=/do/welcome/ forward name=AddToCartAction path=/do/addToCart/ /action /action-mappings /struts-config I have tried /addToCart both with and without an ActionForm just to see if it made any difference, but it didn't. Wanting to make sure whether or not the ActionServlet was finding AddToCartAction, I added the following snippet to IsacTestStartAction (which is where I'm calling /addToCart from): try { Class.forName(y21.isac.struts.action.AddToCartAction, true, this.getClass().getClassLoader()); System.err.println(ISAC Test Message: AddToCartAction Found); } catch (Exception ex) { ex.printStackTrace(); System.err.println(ISAC Test Message: AddToCartAction NOT Found); } The AddToCartAction class is reported as found (removing the class file gave me the expected NOT Found). However if I change the Class.forName line to read: Class.forName(y21.isac.struts.action.AddToCartAction, true, request.getClass().getClassLoader()); I get a ClassNotFoundException and the NOT Found message. The class files are where they should be however. What I can't understand is how WelcomeAction and IsacTestStartAction can be found, but AddToCart isn't. I've stripped the code from AddToCartAction down to the point where all it does is return the ActionForward. Here are the calls to the action from my jsp: html:link page=/do/testStart?testLevel=ootest=AddToCartActionAdd To Cart Action Test/html:link html:link page=/do/addToCartAdd To Cart Action Direct/html:link Does anyone have any ideas? Here is the code for IsacTestStartAction and AddToCartAction for reference. Thanks in advance. Jason package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; class AddToCartAction extends org.apache.struts.action.Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return mapping.findForward(success); } } package y21.isac.struts.action; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import y21.isac.IsacUser; import netscape.ldap.LDAPException; public class IsacTestStartAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ActionErrors errors = new ActionErrors(); IsacUser user = new IsacUser(); String testLevel = request.getParameter(testLevel); try { if (tb.equals(testLevel)) user.load(isac-tb-1); else if (oo.equals(testLevel)) user.load(isac-oo-1); else if (bo.equals(testLevel))
RE: (Urgent) Please help - validating checkboxes
e.checked = !e.checked to toggle existing, or e.checked = selectAllCB.checked -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 3:34 PM To: Struts Users Mailing List Subject: (Urgent) Please help - validating checkboxes Thanks Joe, it works great, but upon unchecking the checkbox, it doesn't uncheck the rest of the checkboxes. Do you have any solutions(anyone out there has any solution to offer too)? regards -- On Tue, 16 Apr 2002 13:32:16 Joe Latty wrote: This Javascript works in IE and NN 6.02 function CheckAll(form){ for (var i=0;iform.elements.length;i++){ var e = form.elements[i]; if ((e.name == 'announcementID') (e.type=='checkbox')) { e.checked = true; } } }//end of function -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 12:49 PM To: Struts Users Mailing List Subject: (Urgent) Please help - validating checkboxes Hi I've got a Select All checkbox in my jsp that dynamically checks all the checkboxes upon clicking on it. However I've got major problem trying to retrieve the value for my checkboxes. Not only do I get a Syntax error alert box, the checkboxes also doesn't get checked when I click on the Select All checkbox. Obviously, the javascript is not working and I have zero idea why. It appears as follows: /***MY JAVASCRIPT**/ SCRIPT language=javascript function CheckAll(){ var len; len=document.announcementForm [0].announcementID.length; if(len==null){ document.announcementForm[0].announcementID.checked = document.announcementForm[0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.announcementForm[0].announcementID [i].checked = true; } } }//end of function /SCRIPT /*MY CODES*/ html:form action=/deleteNews.do name=deleteNewsForm type=portlio.news.form.deleteNewsForm input type=checkBox name=chkall value=ON Select All logic:iterate id=news name=admin property=newss scope=session html:checkbox property=id value=%=((portlio.news.entity.News)news).getNewsId()%/ /html:form /**END/ PS:I've been working on it since yesterday but to no avail. Please help...thanks a lot :) regards See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_02020 1 /splash.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] See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201 /splash.asp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: (Urgent) Please help - validating checkboxes
function CheckAll(form, cBox){ for (var i=0;iform.elements.length;i++){ var e = form.elements[i]; if ((e.name == 'announcementID') (e.type=='checkbox')) { e.checked = cBox.checked; } } }//end of function Here is your checkbox pSelect All: input type=checkbox name=clicker value=Y onClick=CheckAll(myForm, this) /p This will turn checking on and off... Hope this is what your after. -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 3:34 PM To: Struts Users Mailing List Subject: (Urgent) Please help - validating checkboxes Thanks Joe, it works great, but upon unchecking the checkbox, it doesn't uncheck the rest of the checkboxes. Do you have any solutions(anyone out there has any solution to offer too)? regards -- On Tue, 16 Apr 2002 13:32:16 Joe Latty wrote: This Javascript works in IE and NN 6.02 function CheckAll(form){ for (var i=0;iform.elements.length;i++){ var e = form.elements[i]; if ((e.name == 'announcementID') (e.type=='checkbox')) { e.checked = true; } } }//end of function -Original Message- From: days [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 16 April 2002 12:49 PM To: Struts Users Mailing List Subject: (Urgent) Please help - validating checkboxes Hi I've got a Select All checkbox in my jsp that dynamically checks all the checkboxes upon clicking on it. However I've got major problem trying to retrieve the value for my checkboxes. Not only do I get a Syntax error alert box, the checkboxes also doesn't get checked when I click on the Select All checkbox. Obviously, the javascript is not working and I have zero idea why. It appears as follows: /***MY JAVASCRIPT**/ SCRIPT language=javascript function CheckAll(){ var len; len=document.announcementForm [0].announcementID.length; if(len==null){ document.announcementForm[0].announcementID.checked = document.announcementForm[0].chkall.checked; } else{ for (var i=0;ilen;i++){ document.announcementForm[0].announcementID [i].checked = true; } } }//end of function /SCRIPT /*MY CODES*/ html:form action=/deleteNews.do name=deleteNewsForm type=portlio.news.form.deleteNewsForm input type=checkBox name=chkall value=ON Select All logic:iterate id=news name=admin property=newss scope=session html:checkbox property=id value=%=((portlio.news.entity.News)news).getNewsId()%/ /html:form /**END/ PS:I've been working on it since yesterday but to no avail. Please help...thanks a lot :) regards See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_02020 1 /splash.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] See Dave Matthews Band live or win a signed guitar http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_020201 /splash.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: comparations with OR, AND, NOT... in CustomTags
Adolfo, The problem with putting or implementing a tag that performs complex AND, ORs, NOT expressions, is that getting the data for those expressions to work on could be tricky. There are just so many places that the data can come from (page, request, session, application, beans, custom api calls), there are too many. The expression parser would turn into a language of it's own. Besides, when ever someone wants to do such complicated expressions in JSP, one has to wonder if it's business logic that's being coded in the JSP page. In most of my development work, the JSP pages simply present the data to the user. The kind of comparisons I do, are quite basic. Is the data there or not (is it null?), or is this value equals to another value. But that's about the extent of it. If you want more complicated conditions being evaluated, do that in your action. Then, have the action put the result in the request context, and forward to the JSP page for displaying. On your JSP page, you can easily check if a particular request attribute is set to TRUE or FALSE and make your decision. Good luck. -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 11:41 AM To: [EMAIL PROTECTED] Subject: comparations with OR, AND, NOT... in CustomTags Hi All, does anyone know how to make complex comparations in JSP by means of same Custom Tag? I mean, ANDs, ORs, NOT... or compound conditions. Thanks in advance, Adolfo. _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Managing bean
You have a number of options: 1. If you want to store the data for a while, then put it in to a session. While you should not probably put the entire ResultSet into the session, you might read a single row in a java bean, and store the bean in the session. 2. If it's a single row that you have read, and you just want to display it on the next page, put your bean (the one which represents the row) into the request (setAttribute), and forward to the page that will render (display) the data from the row. After the process completes, the data is lost. On the next request, you might have to re-find your row again. Your page, might want to layout the hidden field with the ID of the row you have read, so that you can continue your processing when the user does something next. -AP_ http://www.alexparansky.com Java/J2EE Architect/Consultant http://www.myprofiles.com/member/view.do?profileId=127 -Original Message- From: Bhaskar Gopalan [mailto:[EMAIL PROTECTED]] Sent: Monday, April 15, 2002 11:37 AM To: Struts Group (E-mail) Subject: Managing bean Hi, I'm new to struts and have this question: I have a jsp that talks to a form bean. After successful validation, this formbean is passed to action.perform(). Now I am creating a bean (corresponding to a db row) in the action class using the data from the formbean. Now, where do I store this bean and how do I access it from the action class later? I guess only one instance of the action is created for all the sessions. So, I cannot store the bean as an instance variable of the action class. Thnx, GB -- 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]