R: validator NullPointer- please help
hi, have you enclosed the jakarta regexp library? (it's required by validator only, so everything else works as usual) bye, d.rizzi -Messaggio originale- Da: Peter Onthrops [mailto:[EMAIL PROTECTED]] Inviato: venerdi 31 maggio 2002 18.47 A: [EMAIL PROTECTED] Oggetto: validator NullPointer- please help I am having problems installing the validator. I am getting a NullPointerException (see below) in the validate method of ...commons.validator.Validator. I followed the install instructions and just can't figure out what it causing the exception. --- java.lang.NullPointerException at org.apache.commons.validator.Validator.validate(Unknown Source) at org.apache.struts.validator.action.ValidatorForm.validate(Unknown Sou rce) at org.apache.struts.action.ActionServlet.processValidate(ActionServlet. java:2038) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:149 7) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:504) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Orion/1.5.4 (build 10585)]._deb._lnc(.:514) at com.evermind[Orion/1.5.4 (build 10585)]._deb._wmb(.:170) at com.evermind[Orion/1.5.4 (build 10585)]._co._wbb(.:581) at com.evermind[Orion/1.5.4 (build 10585)]._co._fs(.:189) at com.evermind[Orion/1.5.4 (build 10585)]._bt.run(.:62) - My configuration is as follows. 1) /WEB-INF/struts-config.xml form-bean name=myForm type=com.ponthrops.web.MyForm / (MyForm extends ValidatorForm) 2) /WEB-INF/validation.xml form-validation global /global formset form name=myForm field property=firstName indexedProperty=member indexedListProperty=members depends=required arg0 key=error.firstname.displayname/ /field /form /formset /form-validation 3) validator-rules.xml includes the validator required 4) /WEB-INF/lib includes commons-validator.jar, struts-validator.jar, and jakarta-regexp-1.2.jar 5) web.xml includes the example servet config given in the install directions My guess is I missed a configuration step, however I can't seem to figure out where. Any help is greatly appreciated. Thanks so much, Petra - Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Getting Struts 1.1 beta to work with WLS6.1 SP2: commons-logging's ClassNotFoundException
Subject: Getting Struts 1.1 beta to work with WLS6.1 SP2: commons-logging's ClassNotFoundException From: zaxy [EMAIL PROTECTED] === Hi, I did find this issue on www.mail-archive.com but no clear solution was submitted. Would like to know if this was resolved? and if so, how? From reading the two articles this was deemed to be a class loader problem and from the notes on Weblogic 6.1 service pack 2 it has been 'fixed'. I have installed the latest 6.1 release and am still having this problem. I went down the ghastly track of putting everything in the weblogic classpath and am now wiser. Simply putting the requisite files in the WEB-INF/lib folder still throws the exception: org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl Would appreciate any help. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Getting Struts 1.1 beta to work with WLS6.1 SP2: commons-logging's ClassNotFoundException
Does your project, includes log4j or other logger? -Original Message- From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:25 AM To: [EMAIL PROTECTED] Subject: Getting Struts 1.1 beta to work with WLS6.1 SP2: commons-logging's ClassNotFoundException Subject: Getting Struts 1.1 beta to work with WLS6.1 SP2: commons-logging's ClassNotFoundException From: zaxy [EMAIL PROTECTED] === Hi, I did find this issue on www.mail-archive.com but no clear solution was submitted. Would like to know if this was resolved? and if so, how? From reading the two articles this was deemed to be a class loader problem and from the notes on Weblogic 6.1 service pack 2 it has been 'fixed'. I have installed the latest 6.1 release and am still having this problem. I went down the ghastly track of putting everything in the weblogic classpath and am now wiser. Simply putting the requisite files in the WEB-INF/lib folder still throws the exception: org.apache.commons.logging.LogConfigurationException: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.LogFactoryImpl Would appreciate any help. Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Where to put the code for filling an ArrayList
Hi there I want a dropdown-box filled by a bean. I fill the Arrraylist inside the jsp as you can see, but I don't want to have this code in the jsp because the data later comes from a database. Where and how do I have to write this code (a...b) for the list be accessed by the show.jsp? In the showForm.java or showAction.java or in the Action.java of the page before the show.jsp? In my show.jsp: % //a java.util.ArrayList list = new java.util.ArrayList(); list.add(new LabelValueBean(Art1, a1)); list.add(new LabelValueBean(Art2, a2)); list.add(new LabelValueBean(Art3, a3)); session.setAttribute(my_list,list); // b % html:select property=value html:options collection=list property=value labelProperty=label/ /html:select _ Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden: http://messenger.msn.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Using hidden variable without form
Hi, I have a jsp file without a form and has got one image and target of this is one action class which requires 2 parameters, When i click on this button i do not want these parameternames and values to appear in querystring in browser address location, Can i avoid these showing in querystring?, like action path=/myfile type=myaction scope=request SOMETHING HERE that will have paramname and paramValues reached here without writing a FormBean with 2 properties. . /action or any other way to avoid to show these parameters. TIA rayaku -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Multipart request and special characters
Hello struts users, I have a weird problem with struts v1.0.2 We use a multipart html form for sending text and files. The enctype attribute is set to 'multipart/form-data'. When the euro curreny symbol or any other special character is entered into a text field we get this: javax.servlet.ServletException: MultipartIterator: invalid multipart request data, doesn't start with boundary at org.apache.struts.upload.MultipartIterator.parseRequest(MultipartIterator.java:346) at org.apache.struts.upload.MultipartIterator.(MultipartIterator.java:152) at org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:65) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735) ... What do we have to change to make this work? Greetings, Philippe. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
several jsps using 1 action class and avoiding several action statements in struts-config.xml
Hi, I have 4 jsp files using one action class and action class forwards to the page which called this action class.Becoz i would like user to go back to same page from which he visited. Can i avoid writing 4 action mappings and all 4 mappings have only same action class but forward value is different to each. First.jsp calls /first.do action path=/first type=MyCentral forward name=success path=/First.jsp / /action Second.jsp calls /second.do action path=/second type=MyCentral forward name=success path=/Second.jsp / /action Third.jsp calls /third.do action path=/third type=MyCentral forward name=success path=/Third.jsp / /action Fourth.jsp calls /fourth.do action path=/fourth type=MyCentral forward name=success path=/Fourth.jsp / /action In all above action mappings the action class is same but only path and success pages are different, Is there any technique to change these paths and forward paths dynamically. TIA Yaman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: several jsps using 1 action class and avoiding several action statements in struts-config.xml
If your wish is to have a different URI for each call, first.do, second.do... you have to declare an actions for each. If you have one call, general.do with one action type class and some forward in it. One action will do. Like this: action path=/general type=MyCentral forward name=first path=/First.jsp / forward name=second path=/Second.jsp / forward name=third path=/Third.jsp / /action -Original Message- From: Yaman Kumar [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 12:42 PM To: Struts Users Mailing List Subject: several jsps using 1 action class and avoiding several action statements in struts-config.xml Hi, I have 4 jsp files using one action class and action class forwards to the page which called this action class.Becoz i would like user to go back to same page from which he visited. Can i avoid writing 4 action mappings and all 4 mappings have only same action class but forward value is different to each. First.jsp calls /first.do action path=/first type=MyCentral forward name=success path=/First.jsp / /action Second.jsp calls /second.do action path=/second type=MyCentral forward name=success path=/Second.jsp / /action Third.jsp calls /third.do action path=/third type=MyCentral forward name=success path=/Third.jsp / /action Fourth.jsp calls /fourth.do action path=/fourth type=MyCentral forward name=success path=/Fourth.jsp / /action In all above action mappings the action class is same but only path and success pages are different, Is there any technique to change these paths and forward paths dynamically. TIA Yaman -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Design Advice - Relational Databases Java Objects
(1) Is it best for the data access layer to throw exceptions on error to be picked up by the business objects then struts actions, or would it be good to use a struts-type message object and use strings in the application resources file (I'm just worried my exceptions' text would not be multi-lingual) In the event of a real emergency, the data access layer should throw exceptions, which your business layer can catch. I find chaining exceptions to be very effective. http://www.javaworld.com/javaworld/jw-08-2001/jw-0803-exceptions.html You can add your own business explanationa at the top of the chain and show both the business explantion and the actual cause. The business explanation calms the mere mortals and the actual cause helps tech support with problem determination. The Struts message system builds on the standard Java ResourceBundle framework. So I would say that it is perfectly valid for your business objects to return tokens from the ApplicationResource file. This file can be used in any application and is not Struts-specific. (Especially if you are using the message tags from Struts 1.1b or 1.0 version of the Validator.) If you really want to hedge your bets, write your own business layer first. This layer takes the input each business operation requires and hands back a Collection, Object, or maybe just a status code. Internally, the business layer takes the input and connects to the data access layer (JDBC, Castor, Turbine, whatever). This can also let you chain the exceptions or do whatever other handling you need to make. Your business layer becomes bound to the data access layer but can be changed without touching the web tier. This also makes it easy to use multiple data access devices. You might need to use Castor for some things and Lucene for others. The business layer can provide a consistent interface to the application platform (Struts, Swing, whatever), and then choose whatever source it wants to use for data. This would also include manufacturing data for testing or debugging. Chapter 12 and 13 of Professional JSP Site Design from Wrox show using this approach for JDBC and then integrating Lucene for some of the searches. Struts is used by the example application here, as it is throughout most of the book. http://jakarta.apache.org/struts/resources.html#books (4th from the top) The Action's role is to bundle the input from the ActionForm bean into whatever input the business layer expects. The Action then either forward the result along or cope with any error condition. (2) How would I get the database connection info to the data access layer? Presuming I want to set it up in struts-config.xml or as in commons-dbcp, would I then pass it in from struts actions into the business object and then into the data access layer as a parameter on each call? As mentioned elsewhere, getting a database connection from the web tier is not a good practice. The Struts framework does try to encourage best practice but sometimes takes a dip in the pool of pragmatism. The Generic Connection pool is one example of this. The data access objects should take care of all the connection stuff and just pass back standard Java objects like JavaBeans and Collections. The web tier, and even business tier, does not need to know where the data comes from. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Adam Hardy wrote: Hi All, I saw this thread in the archives and I thought I'd pinch the title. I've spent this afternoon surfing the web looking at stuff on Sun, Jakarta and lots of smaller sites looking for a ready-made data access layer package but I take it there isn't an open-source one out there. Obviously I don't want to tie my data access layer to struts, so there are a few questions I've got. (1) Is it best for the data access layer to throw exceptions on error to be picked up by the business objects then struts actions, or would it be good to use a struts-type message object and use strings in the application resources file (I'm just worried my exceptions' text would not be multi-lingual) (2) How would I get the database connection info to the data access layer? Presuming I want to set it up in struts-config.xml or as in commons-dbcp, would I then pass it in from struts actions into the business object and then into the data access layer as a parameter on each call? I've seen quite a few patterns like www.martinfowler.com and code like in Sun's Pet Store, so I think I've got a fairly good idea of what I need. The data access layer I want has got to: - take as input and return as output Data Transport Objects - allow the business objects to control transactions - use a connection pool - possibly keep the SQL statements in an external XML file - have comprehensive error handling reporting -- To unsubscribe,
Problem with GenericDataSource
I am using Struts 1.0.2 and I have a problem with the GenericDataSource object: when I try to close the source, everything hangs. What am I doing wrong? try{ GenericDataSource dataSource = new GenericDataSource(); dataSource.setAutoCommit(false); dataSource.setDriverClass(oracle.jdbc.driver.OracleDriver); dataSource.setPassword(password); dataSource.setUrl(url); dataSource.setUser(user); . dataSource.open(); Connection conn = dataSource.getConnection(); . . conn.commit(); if (conn != null) { try { conn.close(); } catch (SQLException f) {} conn = null; } if (dataSource!= null){ dataSource.close(); // here everything hangs... dataSource = null; } }catch (Exception e){ e.printStackTrace(); } Any good ideas? After a while (not beeing able to close the source) I get the following exception: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-04031: unable to allocate 4128 bytes of shared memory (shared pool,DATABASE,sga heap,multiblock rea) is this due to the fact that the source did no get closed properly? And why is GenericDataSource deprecated in later versions? Lise M.B. Frengen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Validator in struts 1.1 by radhika
hi, I am using Validator of Struts 1.1 My jsp has 2 text boxes. Upon click of the submit button, validation.xml file which I have written must be parsed, so that it will carry out the validations which i have written. However, im getting the foll. error : - java.lang.NoSuchFieldError: SERVLET_CONTEXT_KEY at org.apache.struts.validator.action.ValidatorForm.initValidator(Unknown Source) at org.apache.struts.validator.action.ValidatorForm.validate(Unknown Source) at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:910) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:245) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Can anyone tell me as to where im going wrong ?? I think some problem related to setting classpath Help reqd. urgently _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: a newbie question on iterate
The answer, unfortunately, is all of the above. The iterate tag iterates through both maps and collections in any form and in any scope, and you display the contents of map and collection values with the bean:write tag. A typical map would be key-value pairs placed in memory as session.setAttribute() objects, whereas typical lists are placed in memory by the ActionServlet instantiating a JavaBean (as a Struts form bean) and making it's getters (accessors) and setters (mutators) available to JSPs and Action classes. For example, let's say you want to display a list of cities for a particular state when a user selects a state from a drop-down list in a JSP. First, how would you populate the states list? It would be pretty tedious to hard-code 50 states + D.C. + any territories (like Puerto Rico or Guam) into the JSP as HTML select options, not to mention bloating the source code. With Struts, however, this is a piece of cake: 1. User is forwarded to the states/cities page from some JSP through some Action Mapping that uses an Action class that in turn requests a List of states from a DAO (data access object - a helper class concerned only with querying the database). 2. The Action class takes the List and puts it into application scope (in this case, since the List can be reused by any other clients): ServletConfig.getServletContext().setAttribute( statesList, states); 3. The states/list JSP can then display this List of states as an HTML drop-down: html:select name=states logic:terate name=statesList property=states scope=application type=com.company.dao.state id=state html:option value=%= state.getName() % %= state.getName() % /html:option /logic:iterate /html:select 4. A JavaScript onchange() event handler can then call the Action class to request a list of cities from, say the city DAO (City.java), based on the selected state and populate a City drop-down select box in the same manner. This is about as simple as it gets, but note that using JSP scripting variables is generally frowned upon by the purists. But I hope you get the idea and then can move on to using the html:options tag. Note that the List could also have been stored as a TreeMap and you could set the option values with something like state.getAbbreviation(). The various attributes are explained in the Struts tag documentation. To use a JavaBean (Struts form bean - a special use of JavaBeans that use only booleans and Strings) with a JSP, you simply create a bean with mutators and accessors matching the names of the input objects in your HTML form contained in your JSP. For example, if you have a form taking user info: html:form action=/do/userInfo method=post html:text property=fname size=20 maxlength=20 / html:text property=lname size=20 maxlength=20 / html:text property=street size=20 maxlength=20 / html:text property=city size=20 maxlength=20 / html:text property=state size=20 maxlength=20 / /html:form html:submit value=Submit / You would create a form bean like: *** package and import statements *** public class UserInfo extends ActionForm implements Serializable { private String fname = ; private String lname = ; private String street = ; private String city = ; private String state = ; public void setFname( String fname) { this.fname = fname; } public String getFname() { return fname; } /* same pattern for other fields */ public void reset( ActionMapping map, HttpServletRequest req) { super.reset( map, req); fname = ; lname = ; password = ; //etc. } } Now, when the user hits Submit, the Action class associated with the path /do/userInfo will be called by ActionServlet but before the action's execute() method is called, UserInfo's setters will be called and its properties set, making them available for writing to the database and/or the JSP the action forwards to in struts-config (Note that if you want the bean's info available across a user's session, do not reset the properties in reset() and declare the bean in session scope in struts-config). Another JSP can now access UserInfo's properties with bean:write like: bean:write name=UserInfo property=fname / bean:write name=UserInfo property=lanem / etc. It's easy to get lost in these tags when you first start out, because they are very powerful and can do a lot of things - much of which is indocumented and if discovered by trial-and-error and reading this user list. The best thing you can do at this point, however, is thoroughly read the taglib documentation. Good luck! Mark -Original Message- From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 10:25 AM To: [EMAIL PROTECTED] Subject: a newbie question on iterate Subject: a newbie question on iterate From: Gary Tam [EMAIL PROTECTED] === Hi, I am trying to
RE: Need Help!!! Pls
Much better! It appears obvious that the bean you are attempting to create from rendering the XML through Digester is either not being created or is not being set in scope properly. Can you post that/those particular section(s) of code? Mark -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 4:42 AM To: Struts Users Mailing List Subject: Re: Need Help!!! Pls Hi Mark! Thanks for your suggestion to read the how to ask smart question!! Indeed, this is the first time i submit question to this user-group and don't really know to what extend i should elaborate on the problems. The things i try to do is: 1. I have a class that extends struts PlugIn, in this class i initialize the data source ( stored in JNDI filesystem context) and connection pooling (store in servlet context) , and use Digester to read an XML file to create javabean object and store the objects in servlet context. 2. Now in the JSP input page, i want some of the fields to be populated with information that was previously store in servlet context. It is an array of javabean. in the JSP page i use the logic:iterate tag to populate the page. To do this i created the ActionForm and action class The client will point to the action class, in the excute method it will set the action form with the array object take from servlet context then forward to the jsp page eveytime when it run, the below exception will be threw.. roughly this is the scenario and where i stuck... hear from you all...thx Step - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Friday, May 31, 2002 3:45 AM Subject: RE: Need Help!!! Pls Yes, there are a number of people here who can help. No, we cannot suggest a better way of doing what you are trying to do because you have not given us the slightest hint of how you are trying to accomplish your pre-visit form population. I suspect that you are relying on Struts to magically populate a JavaBean which in turn would populate the field(s) of an HTML form prior to a client accessing the form. Doesn't work that way. The Struts plugin (I assume you mean the action class) must be activated by a client request. If you want a form to be dynamically populated with data prior to a client reaching it, the client must first request something else (HTML, JSP or action class) that triggers the action class to populate the bean (by calling a DAO, VO, or other helper class that actually makes the database calls). You could redirect to the action if you wanted to hide your implementation by the use of HTML meta refresh to trigger the action (meta http-equiv='refresh' content='0; url=/do/myActionClass') or the % jsp:forward % tag, and the results would be displayed based on your forward path in struts-config. You should also read: http://www.tuxedo.org/~esr/faqs/smart-questions.html Cheers (it's Friday)! Mark -Original Message- From: Shinyang [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 2:31 AM To: [EMAIL PROTECTED] Subject: Need Help!!! Pls Hi, I am struts newbie! I develop an application to search a database. I have some problems that I fail to solve, before even connect to db. I do a search form. Before display the form, I need to populate some of the fields with java bean get from servlet context. The java bean in the servlet context was set through the struts plug-in. Now, I try to set the searchForm from searchAction, before display the search.jsp page, but every time failed. The following exception throws: Can anyone help!! Or recommend better approach to do this things. thx. javax.servlet.ServletException: No collection found at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex tImpl.java:463) at org.apache.jsp.searchRFQ$jsp._jspService(searchRFQ$jsp.java:553) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle t.java:202) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc her.java:683) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp atcher.java:431) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat cher.java:355) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:972) at org.apache.struts.action.RequestProcessor.processValidate(RequestProcess or.java:947) at
RE: Newbie Question To Experts
What you are asking for is, essentially, for someone to post a tutorial for you on this list. Your question is of a very basic and general nature and much too broad to be appropriate here. You need to go through the documentation more thoroughly and do a couple of tutorials - there are several available online (do a google search on struts). Once you have done this and have a specific question about a particular aspect of a design or implmentation issue, please post it. Mark -Original Message- From: Rajesh Thota [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 8:40 AM To: Struts Users Mailing List Subject: Newbie Question To Experts This may look silly but my lack of knowledge with struts is making me ask this question. Let us say I have a HTML form which retrieves a set of records from database depending upon the number of records the jsp will have to display HTML form field elements. How do i have to design my form bean. I am not sure how I can use automatic validation. I am not to keen on using automatic validation also, if there is a good solution for this problem. I want some sample code (jsp, action and action form class with struts-config.xml). Can someone help me on this ? thx. - RAJESH THOTA Indscape Softech Bangalore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
need some help ..
This may look silly but my lack of knowledge with struts is making me ask this question. Let us say I have a HTML form which retrieves a set of records from database depending upon the number of records the jsp will have to display HTML form field elements. How do i have to design my form bean. I am not sure how I can use automatic validation. I am not to keen on using automatic validation also, if there is a good solution for this problem. I want some sample code (jsp, action and action form class with struts-config.xml). Can someone help me on this ? thx. - RAJESH THOTA Indscape Softech Bangalore.
RE: Does anyone know Digest class library?
http://jakarta.apache.org/commons/digester/api/index.html -Original Message- From: Liang Chen [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 9:51 PM I can not find any infomation in Google. Thanks in advance. LC -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Advice: how strutty should I be??
Steve Jobs? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 11:22 PM What the heck! Ok. Who leaked our requirements document? -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 22:34 How about: public class WeirdBusinessObject implements IVague, IUncertain { ... } I feel that this reflects reality better and OO is all about accurately modelling the environment. :-) Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 9:21 AM You got it! (not that I would know or anything) -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 7:58 AM hmm. I know! I think all my interfaces should be extending IUnknown yes? -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 19:39 Hah! Open up any Visual Basic, Visual C++, or COM manual. Did you think you could hide behind the struts of your mother forever? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 7:27 AM Uh oh. Tell me your kidding mate! I haven't gone and reused a nomenclature already used by M$ have I??? arrgh! I must be being influenced by evil spirits. Quick wheres an excorcist! panicNot too late to refactor! - hmm maybe I wont be going home early. :-(/panic -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 19:18 Ah ha! Micro$oft background exposed! Burn him! Burn him! -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 1:24 AM I have a 'rendering pipeline' which is just a collection of 'IDocumentRenderer'...and IRenderingPipeline ... IDocumentManager ... IDocumentFinder ... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
bean:write
Is there a possibility to write some values from the session to the jsp, without having a bean for this value? Hanel Matthias Fachinformatiker (Anwendungsentwicklung) in Ausbildung Logistik World GmbH Fon:+49-841-9014-300 Marie-Curie-Strasse 6 Fax:+49-841-9014-302 D- 85055 Ingolstadt mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Advice: how strutty should I be??
Damn! I told em we couldnt trust him to keep mum, but did they listen? sigh/ -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 20:56 To: 'Struts Users Mailing List' Subject: RE: Advice: how strutty should I be?? Steve Jobs? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 11:22 PM What the heck! Ok. Who leaked our requirements document? -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 22:34 How about: public class WeirdBusinessObject implements IVague, IUncertain { ... } I feel that this reflects reality better and OO is all about accurately modelling the environment. :-) Simon - Simon P. Chappell [EMAIL PROTECTED] Java Programming Specialist www.landsend.com Lands' End, Inc. (608) 935-4526 -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 9:21 AM You got it! (not that I would know or anything) -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 7:58 AM hmm. I know! I think all my interfaces should be extending IUnknown yes? -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 19:39 Hah! Open up any Visual Basic, Visual C++, or COM manual. Did you think you could hide behind the struts of your mother forever? -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 7:27 AM Uh oh. Tell me your kidding mate! I haven't gone and reused a nomenclature already used by M$ have I??? arrgh! I must be being influenced by evil spirits. Quick wheres an excorcist! panicNot too late to refactor! - hmm maybe I wont be going home early. :-(/panic -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 19:18 Ah ha! Micro$oft background exposed! Burn him! Burn him! -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 1:24 AM I have a 'rendering pipeline' which is just a collection of 'IDocumentRenderer'...and IRenderingPipeline ... IDocumentManager ... IDocumentFinder ... -- 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: [ANN] Struts Wizard v1.0.2 for JBuilder - Now Eclipse
. I just don't get it. Given the same Eclipse version and installation procedure as John, I still don't get the Struts to show in my File-New-Other menu. Must be some glitch somewhere in my setup, but I can't see what. Will Rajesh Kalluri wrote: After you extract the plugin into plugins folder go to File-New-Other you will notice struts on top of Java. hope this helps. Regards Raj -Original Message- From: John Menke [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 6:59 AM To: Struts Users Mailing List Subject: RE: [ANN] Struts Wizard v1.0.2 for JBuilder - Now Eclipse Emmanuel, I'm using Eclipse 2.0 and I extracted the zip file into my plugins directory. It created a subfolder com.cross.wizard.struts. I still cannot figure out how to activate the wizard though... john -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [ANN] Struts Wizard v1.0.2 for JBuilder - Now Eclipse
Hi, Every week, a new Eclipse is released, it is called 2.0 Freeze/Test/Fix Master Schedule, this week it is F2 release. We are waiting for June 28, the official release date for Eclipse 2. ;) For the wizard (JBuilder/Eclipse), I will release soon a new version renamed Easy Struts with more, more and more ... features. You can test the latest build at http://sourceforge.net/projects/easystruts/, it is free and open source. For the moment, I'm working on Eclipse version. So be patient ;) -Emmanuel Will Jaynes [EMAIL PROTECTED] a écrit : . I just don't get it. Given the same Eclipse version and installation procedure as John, I still don't get the Struts to show in my File-New-Other menu. Must be some glitch somewhere in my setup, but I can't see what. Will Rajesh Kalluri wrote: After you extract the plugin into plugins folder go to File-New-Other you will notice struts on top of Java. hope this helps. Regards Raj -Original Message- From: John Menke [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 6:59 AM To: Struts Users Mailing List Subject: RE: [ANN] Struts Wizard v1.0.2 for JBuilder - Now Eclipse Emmanuel, I'm using Eclipse 2.0 and I extracted the zip file into my plugins directory. It created a subfolder com.cross.wizard.struts. I still cannot figure out how to activate the wizard though... john -- To unsubscribe, e-mail: For additional commands, e-mail: - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
Using formbean effectively.
Hi, I have an frist.java (action class) and that would keep so much info in several attributes and bound them to request object, and then in first.jsp page i would retrieve all of them and display in FristForm.java controls. I have got an idea to keep all the information in FirstForm bean itself in First.java rather than binding to request in action class and showing it in FirstForm in First.jsp. If any one of you feel this idea is good enough, then how could i put them in form bean ( which has got select,radio buttons) and pass this formbean to First.jsp page to display. Can any one suggest me how to do it and how an action mapping should be coded. TIA rayaku -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [Struts Tips] #2 - Template Method Dispatch Action?
Why are the Framework and Dispatch approaches mutually exclusive? It seems like you could do both -- have a base action with extension points (hot spots), and the main hotspot method (i.e. 'executeLogic') could optionally be a dispatch method. This would help with create/update/delete operations, where all the logic is the same except for which db operation to perform. Of course it's not the only way to do it -- the 'business bean' approach you mention, where the mapping specifies the business class, would also work nicely. But the framework + dispatch approach could cut down on the number of classes (business bean or action). The business bean and framework + approaches actually seem pretty similar to me. The only difference is whether the main extension point is a separate class, or a method of the action class. In either case the extension point is specified in the configuration file. Steve Molitor I believe the Dispatch and Template (or Framework) class approaches may be mutally exclusive. The idea of the Dispatch class is that you can vector to an arbitrary method. The idea of a Framework class, like SuperAction uses, is that a known entry method calls a number of hotspots (or extension points) that you can override. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 7:31 AM To: Struts Users Mailing List Subject: Re: [Struts Tips] #2 - Template Method Dispatch Action? Molitor, Stephen wrote: As is, the DispatchAction in Struts 1.02 cool, but does not provide direct support for eliminating or consolidating duplicate code from related tasks. It's just a different style. With DispatchAction, one can have one big action class to handle related tasks, as opposed to several little Action classes. However, related tasks often have some common logic that needs to be performed for all the tasks, and other logic that is specific to each task. It would be cool if there was a DispatchAction that provided hooks for the common logic. For something similar, see the SuperAction in the Scaffold package. http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/framework/ main/org/apache/scaffold/http/SuperAction.java I believe the Dispatch and Template (or Framework) class approaches may be mutally exclusive. The idea of the Dispatch class is that you can vector to an arbitrary method. The idea of a Framework class, like SuperAction uses, is that a known entry method calls a number of hotspots (or extension points) that you can override. You could share common utility methods among various Dispatch methods by passing all needed parameters through the signature, but how to merge this idea with a framework class approach isn't jumping out at me. The closest thing may to be use a relay action to forward the request to another Action based on a framework class. You then just override a business extension method on the framework Action (like SuperAction.ExecuteLogic). This doesn't reduce the number of Actions, but it does let you share as much code as possible Personally, I use very few Struts Actions in an application. Instead I tend to specify a business class as part of the action mapping, and then have the Action call that, using a base Action like the above. The business beans have a hotspot method with a known signature. The Action just instantiates the business bean (like the ActionServlet instantiates a form bean), calls the signature, and copes with the result. (Just like the ActionServlet calls an Action.) This trades Actions for business beans, but minimizes coupling to Struts and maximizes code reuse between platforms. The Advanced Struts skeleton for Adalon, uses the same approach. (No surprise, I wrote it =:) http://synthis.com/products/architectures/struts/ Synthis has released the skeleton code under the Apache License, and I'm integrating it back into the Scaffold package and updating the Artimus application to use the new clases. So, there will major updates to these next week. All the same ideas, but with some improvements to the implementation. Film at 11. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Molitor, Stephen wrote: As is, the DispatchAction in Struts 1.02 cool, but does not provide direct support for eliminating or consolidating duplicate code from related tasks. It's just a different style. With DispatchAction, one can have one big action class to handle related tasks, as opposed to several little Action classes. However, related tasks often have some common logic that needs to be performed for all the tasks, and other logic that is specific to each task. It would be cool if there was a DispatchAction that provided hooks for the common logic. One approach would be to use the Template Method pattern, perhaps something like this: public class
Re: How does the framework ensure any action to have self control ?
Subject: Re: How does the framework ensure any action to have self control 1 2 3 4 5 6 7 8 9 From: Sanjib Islam [EMAIL PROTECTED] === Mark, I am extremely sorry for the repost. It was just that I was posting for the first time in this group and I wasn't sure if my first post made it. My apologies for such unintentional act. I must acknowledge that I really appreciate all of your prompt response to my post. Thank you all very very much. Galbreath, Mark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Why are you reposting the same thing you posted yesterday, and which I and 2 other people answered? -Original Message- From: Islam, Sanjib [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 11:36 AM What I wanted to find out is whether the framework provides some way for an action to remain in control of what's currently being processed. For example, if an action is authenticating a user during a logon session by opening a db connection and for some reason, the connection hangs, would the framework be able to detect that? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How does the framework ensure any action to have self control ?
Hey, no big deal, dude. It's not like you are going to be tied to a post and fed X-Lax or anything! :-) My response was simply to make you aware that you were double-posting in the event that something was awry with your ISP or you were trying to post to a different list. Cheers (only 28 days until I get to go to London, Brussels, and Amsterdam!), Mark -Original Message- From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 10:25 AM Subject: Re: How does the framework ensure any action to have self control 1 2 3 4 5 6 7 8 9 From: Sanjib Islam [EMAIL PROTECTED] === Mark, I am extremely sorry for the repost. It was just that I was posting for the first time in this group and I wasn't sure if my first post made it. My apologies for such unintentional act. I must acknowledge that I really appreciate all of your prompt response to my post. Thank you all very very much. Galbreath, Mark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Why are you reposting the same thing you posted yesterday, and which I and 2 other people answered? -Original Message- From: Islam, Sanjib [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 11:36 AM What I wanted to find out is whether the framework provides some way for an action to remain in control of what's currently being processed. For example, if an action is authenticating a user during a logon session by opening a db connection and for some reason, the connection hangs, would the framework be able to detect that? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: bean:write
On Mon, Jun 03, 2002 at 02:58:45PM +0200, [EMAIL PROTECTED] wrote: Is there a possibility to write some values from the session to the jsp, without having a bean for this value? Yes, with standard JSP: %= session.getAttribute(mySessionAttr) % See http://java.sun.com/products/jsp/tags/11/syntaxref115.html#11258 for details on all the stuff you can do with standard JSP 1.1. To use the Struts custom tags (such as bean:write), I think you always need to define a bean before using the session attribute's value... but I've never tried it without. Maybe it works. :) -- Jonathan Fuerth - SQL Power Group Inc. (416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free) Unleash the Power of your Corporate Data - http://www.sqlpower.ca/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How i can execute the tag bean:write ../ inside the tag html:hidden
Hi I'm using strtus 1.0.2 and Jrun 3.1, and my jsp page look like this: html:hidden property=id value='bean:write name=usuario property=id/'/ and produces this output in the web browser: input type=hidden name=id value=lt;bean:write name=quot;usuarioquot; property=quot;idquot;/gt; the tag bean:write../ is not executed, is interpreted as a literal. How i can execute the tag bean:write ../ inside the tag html:hidden ../?? --- Ferran Parra [EMAIL PROTECTED] http://www.mubimedia.com MUBIMEDIA S.L. C/ Mallorca, 275, 1r 2a 08008 BCN Tel: 93 215 21 91 / Fax: 93 215 41 21 ---
RE: Where to put the code for filling an ArrayList
As a custom tag? I do this in one of my applications, when populating selects from a table in a database. %@ taglib uri=/WEB-INF/myTagLib.tld prefix=custom % custom:myTag name=list/ html:select property=aProperty html:options collection=list property=value labelProperty=label/ /html:select You need to create the java class (subclassing TagSupport) implementing the doStartTag() and optionally doEndTag() methods. Create the ArrayList object and put it somewhere convinient, for example as an attribute in the request object. You also need to define the new tag in a tld-file. Regards, /Anders -Ursprungligt meddelande- Från: hans albers [mailto:[EMAIL PROTECTED]] Skickat: den 3 juni 2002 08:56 Till: [EMAIL PROTECTED] Ämne: Where to put the code for filling an ArrayList Hi there I want a dropdown-box filled by a bean. I fill the Arrraylist inside the jsp as you can see, but I don't want to have this code in the jsp because the data later comes from a database. Where and how do I have to write this code (a...b) for the list be accessed by the show.jsp? In the showForm.java or showAction.java or in the Action.java of the page before the show.jsp? In my show.jsp: % //a java.util.ArrayList list = new java.util.ArrayList(); list.add(new LabelValueBean(Art1, a1)); list.add(new LabelValueBean(Art2, a2)); list.add(new LabelValueBean(Art3, a3)); session.setAttribute(my_list,list); // b % html:select property=value html:options collection=list property=value labelProperty=label/ /html:select _ Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden: http://messenger.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: How i can execute the tag bean:write ../ inside the tag html:hidden
html:hidden property=id value=bean:write name=\usuario\ property=\id\ / / -Original Message- From: Ferran Parra [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:28 AM html:hidden property=id value='bean:write name=usuario property=id/'/ produces this output in the web browser: input type=hidden name=id value=lt;bean:write name=quot;usuarioquot; property=quot;idquot;/gt; the tag bean:write../ is not executed, is interpreted as a literal. How i can execute the tag bean:write ../ inside the tag html:hidden ../?? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How i can execute the tag bean:write ../ inside the tag html:hidden
JSP tags use XML syntax and so they cannot be nested as attribute values this way. You can use scriptlet notation to define tags attributes at run time : html:hidden property=id value='%= myData % / So you just have to define a scripting variable to handle your datas bean:define id=myData name=usuario property=id/ html:hidden property=id value='%= myData % / I'm not sure, but you can try this too: html:hidden property=id bean:write name=usuario property=id/ /html:hidden Nico Hi I'm using strtus 1.0.2 and Jrun 3.1, and my jsp page look like this: html:hidden property=id value='bean:write name=usuario property=id/'/ and produces this output in the web browser: input type=hidden name=id value=lt;bean:write name=quot;usuarioquot; property=quot;idquot;/gt; the tag bean:write../ is not executed, is interpreted as a literal. How i can execute the tag bean:write ../ inside the tag html:hidden ../?? --- Ferran Parra [EMAIL PROTECTED] http://www.mubimedia.com MUBIMEDIA S.L. C/ Mallorca, 275, 1r 2a 08008 BCN Tel: 93 215 21 91 / Fax: 93 215 41 21 --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using formbean effectively.
Subject: Re: Using formbean effectively. From: Vic C [EMAIL PROTECTED] === If it is defined in action mappings then: MyFormBean fb = (MyFormBean) formbean; // passed from execute(); fb.populate(); return mapping.findforward(sucess); Yaman Kumar wrote: Hi, I have an frist.java (action class) and that would keep so much info in several attributes and bound them to request object, and then in first.jsp page i would retrieve all of them and display in FristForm.java controls. I have got an idea to keep all the information in FirstForm bean itself in First.java rather than binding to request in action class and showing it in FirstForm in First.jsp. If any one of you feel this idea is good enough, then how could i put them in form bean ( which has got select,radio buttons) and pass this formbean to First.jsp page to display. Can any one suggest me how to do it and how an action mapping should be coded. TIA rayaku -- 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: Newbie Question
Subject: Re: Newbie Question From: Vic C [EMAIL PROTECTED] === You have a property in your from bean called getRowCount() Rajesh Thota wrote: This may look silly but my lack of knowledge with struts is making me ask this question. Let us say I have a HTML form which retrieves a set of records from database depending upon the number of records the jsp will have to display HTML form field elements. How do i have to design my form bean. I am not sure how I can use automatic validation. I am not to keen on using automatic validation also, if there is a good solution for this problem. I want some sample code (jsp, action and action form class with struts-config.xml). Can someone help me on this ? thx. - RAJESH THOTA Indscape Softech Bangalore. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Nested iterate name
I am using the 1.1b1 nested tags and ran into something that seems inconsistent. When I specify a form like: html:form action=myform nested:iterate name=mybean property=mybeanproperty nested:text property=mybeanpropertyproperty ... I get an error that mybeanproperty, which is an ArrayList is not found in myform? If I create a getter in my form bean for mybean it works OK. I really don't want to do this unless there is a way to get the request associated with a form bean. The following sort of thing does work so I have to question whether I am using the nested tags properly: html:form action=myform html:select property=mybeanproperty html:options name=mybean property=mybeanproperty.mybeanpropertyproperty ... How do I tell the nested:iterate tag to use the bean I specified rather than the form bean? Thanks, David Morris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Websphere 4.02 Struts Deployment
Danny, Just wanted to say thanks, everything seems to be working once I replaced the Xalan/Xerces binaries. Thanks, Mike -Original Message- From: Danny Mui [SMTP:[EMAIL PROTECTED]] Sent: Saturday, June 01, 2002 2:07 AM To: Struts Users Mailing List Subject: Re: Websphere 4.02 Struts Deployment I have a pretty complicated struts 1.1b app running on Websphere 4.02 on Windows 2000 and have yet to see the error that you've received. The steps I had to take to deploy to websphere were: 1) http://marc.theaimsgroup.com/?l=struts-userm=102142014616118w=2 2) Set the JVM settings for the Default Server to that mentioned below for redirect issues I like using theaimsgroup.com for the color scheme :) That's pretty much all I had to go through to get my tomcat developed app to work on websphere. Worse case scenario, step through the code to find out what's going on. It's a really powerful source of information that I've taken advantage of a few times learn what the heck was going on. Sorry! - Original Message - From: Benson, Mike [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, May 29, 2002 6:44 PM Subject: RE: Websphere 4.02 Struts Deployment Hello, I'm working on deploying to Websphere 4.x on the Win 2000 platform, and I'm receiving the following error: Error 500: Cannot find ActionMappings or ActionFormBeans collection I've read a few emails about modifying the struts code to make this work and replacing parsers and all, but my dilemma is that I've got to deploy this to Websphere 4.x on OS/390 when I'm done with 2000. Is there a more simple solution or anyplace that describes the changes in a little more detail that you can point me in the right direction? Thanks in advance, Mike Benson -Original Message- From: Danny Mui [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 12:04 PM To: Struts Users Mailing List Subject: Re: Websphere 4.02 Struts Deployment To follow up, WebSphere 4.02 comes with the fix pack (they also have an E-FIX for putting out that fire) that makes it redirect compliant to servlet spec 2.3. To enable this mode, add : name com.ibm.websphere.sendredirect.compliance value 1 to the System Properties in the admin console under: Application Servers \[DefaultServer] \ JVM Settings I should have checked the Dev list :) thanks again - Original Message - From: Tero P Paananen [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002 7:50 PM Subject: RE: Websphere 4.02 Struts Deployment I'm having problems with struts forwards: logic:redirect forward=summary / (forwards to /do/summary/display) it actually redirects it to : /app/app/do/summary/display I think Websphere is being too helpful here with the redirects!! Any pointers? There's a patch to this bug. I'll dig it up for you tomorrow morning, if you'd kindly remind me by Email. -TPP - it's past my bed time -- 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]
commons ConvertUtils error?
I have a form with a Timestamp attribute. The value of the timestamp can be an empty. I am getting a ConversionException because a call is being made to ConvertUtils and then SqlTimestampConverter with the empty value - which throws the exception when the value is null or not in the proper format. Do I need to modify the code to prevent this or is there an error? It doesn't seem right that an exception would be thrown if the value is empty. Attributes in forms don't always need to have a value. Thanks in advance, Petra - Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup
Using redirect=true with tiles component
I have the following entry in my config action path=/login type=com.ffic.training.LoginAction name=logonForm scope=session input=/Login.jsp forward name=success path=welcome.page redirect=true/ /action My tiles definition xml is as follows definition name=welcome.page path=/TilesTemplate.jsp put name=menu content=/Menu.jsp/ put name=body content=/WelcomeContent.jsp/ /definition Without the redirect=true, everything works fine, but when I use it, I get the following error Error 404 An error has occured while processing request:http://localhost:8080/app/welcome.page Message: File not found: //welcome.page If I change the path to a regular jsp path (ie path=/Welcome.jsp) things work fine. Can anyone help me on this? Thanks in advance. ** 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]
Global-Forwards Question
Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
maybe someone knows. Desesperated
Has any of you, by chance, inserted an java.sql.Struct (which holds an OracleConnection) data into an Oracle DB by using a connection obtained from a WTE datasource (instance of OracleConnectionProxy)? Is it possible? TIA, Adolfo. _ 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: Global-Forwards Question
Have you tried: global-forwards forward name=thirdAction path=/thirdAction.do / /global-forwards or global-forwards forward name=thirdAction path=/do/thirdAction / /global-forwards -vincent. Jerry Jalenak wrote: Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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]
forward to a tile definition.........
Hi all, Does anyone know why ActionForward can't find my Tiles' definition? When I used:forward name=success path=my.tile.definition.page / it is giving me the HTTP 500 Internal server error. I guess it couldn't find my definition or doesn't have a clue what path is. But if I create a test.jsp, and have the definition inserted, the it works.. I have my action servlet set to use servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class I am using Struts1.1 with Weblogic 6.1sp2 Thanks, Danny -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Global-Forwards Question
Yeah, I have. Still doesn't seem to find the ActionServlet. Since the path parameter is for a relative path, I'm wondering if I need to further qualify the path to the servlet (however I don't get any errors from Tomcat...) Jerry -Original Message- From: Vincent Aumont [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 12:47 PM To: Struts Users Mailing List Subject: Re: Global-Forwards Question Have you tried: global-forwards forward name=thirdAction path=/thirdAction.do / /global-forwards or global-forwards forward name=thirdAction path=/do/thirdAction / /global-forwards -vincent. Jerry Jalenak wrote: Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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: forward to a tile definition.........
Do you have the following entry in your struts-config.xml? !-- Tiles -- controller processorClass=org.apache.struts.tiles.TilesRequestProcessor / Trieu, Danny [EMAIL PROTECTED] on 06/03/2002 10:45:10 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: forward to a tile definition. Hi all, Does anyone know why ActionForward can't find my Tiles' definition? When I used:forward name=success path=my.tile.definition.page / it is giving me the HTTP 500 Internal server error. I guess it couldn't find my definition or doesn't have a clue what path is. But if I create a test.jsp, and have the definition inserted, the it works.. I have my action servlet set to use servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-class I am using Struts1.1 with Weblogic 6.1sp2 Thanks, Danny -- 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. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: forward to a tile definition.........
damm I forgot thanks so much ... -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 10:54 AM To: Struts Users Mailing List Subject: Re: forward to a tile definition. Do you have the following entry in your struts-config.xml? !-- Tiles -- controller processorClass=org.apache.struts.tiles.TilesRequestProcessor / Trieu, Danny [EMAIL PROTECTED] on 06/03/2002 10:45:10 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: forward to a tile definition. Hi all, Does anyone know why ActionForward can't find my Tiles' definition? When I used:forward name=success path=my.tile.definition.page / it is giving me the HTTP 500 Internal server error. I guess it couldn't find my definition or doesn't have a clue what path is. But if I create a test.jsp, and have the definition inserted, the it works.. I have my action servlet set to use servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-cla ss I am using Struts1.1 with Weblogic 6.1sp2 Thanks, Danny -- 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. ** -- 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: Global-Forwards Question
Further clarification I do get a 'Page cannot be found' when I use the path='/thirdAction.do' format. Jerry -Original Message- From: Vincent Aumont [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 12:47 PM To: Struts Users Mailing List Subject: Re: Global-Forwards Question Have you tried: global-forwards forward name=thirdAction path=/thirdAction.do / /global-forwards or global-forwards forward name=thirdAction path=/do/thirdAction / /global-forwards -vincent. Jerry Jalenak wrote: Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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: forward to a tile definition.........
do you know where in the tiles distribution that Cedric talk about this? -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 10:54 AM To: Struts Users Mailing List Subject: Re: forward to a tile definition. Do you have the following entry in your struts-config.xml? !-- Tiles -- controller processorClass=org.apache.struts.tiles.TilesRequestProcessor / Trieu, Danny [EMAIL PROTECTED] on 06/03/2002 10:45:10 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] cc: Subject: forward to a tile definition. Hi all, Does anyone know why ActionForward can't find my Tiles' definition? When I used:forward name=success path=my.tile.definition.page / it is giving me the HTTP 500 Internal server error. I guess it couldn't find my definition or doesn't have a clue what path is. But if I create a test.jsp, and have the definition inserted, the it works.. I have my action servlet set to use servlet-nameaction/servlet-name servlet-classorg.apache.struts.tiles.ActionComponentServlet/servlet-cla ss I am using Struts1.1 with Weblogic 6.1sp2 Thanks, Danny -- 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. ** -- 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]
servlet context/Action class - performance question.
The requirement is to display a page with some categories just like the yahoo homepage. The link of each main category will have to show the subcategories of that category in a similar page. The level of this tree goes one more level inside. All this information is built ofcourse by retrieving from the database. First thought was to build the relevant section of the category/subcategory tree based on the request parameters. Since these pages are going to be the most viewed (and does not change based on the user), I thought it would be better for performance if the whole tree is created in a startup servlet and put in servlet context instead of creating a part of it in the Action class and setting it into the HttpServletRequest. This would mean that I wont have to hit the database for every user request. I will just have to get the relevant part of the category tree from the (big) object in servlet context based on a key lookup on the TreeMap. The pages load surely very fast, ~but~ I am wary of such a big object in memory and its effect on the performance once it goes into production. To give a rough idea about the size of this tree: 1 main category (TreeMap) has about 12 subcategories (TreeMaps again). Each of the subcategories has about 10 child categories. Each child category is a ArrayList of strings. So its a TreeMap of TreeMaps of ArrayLists. Did anybody face similar design choice and had to choose against a setting so much information in the servlet context? Any input is greatly appreciated! I apologize for the subject being a little off-topic. Thanks, -Shyam Gouri -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Global-Forwards Question
have you defined the servlet in web.xml At 10:46 AM 6/3/2002 -0700, you wrote: Have you tried: global-forwards forward name=thirdAction path=/thirdAction.do / /global-forwards or global-forwards forward name=thirdAction path=/do/thirdAction / /global-forwards -vincent. Jerry Jalenak wrote: Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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: Global-Forwards Question
Trying to run multiple ActionServlet instances in the same web application is going to cause you no end of grief, and is not a supported configuration. You should organize your app so that it uses a single instance of the controller. Craig McClanahan On Mon, 3 Jun 2002, Jerry Jalenak wrote: Date: Mon, 3 Jun 2002 12:26:38 -0500 From: Jerry Jalenak [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Global-Forwards Question Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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: Global-Forwards Question
No, I haven't. Now that I think about this, my first two ActionServlets are defined through the action ./ tags in struts-config. There is no place where I define thirdAction. Can I create a 'dummy' action../ definition that only defines the path, name, and scope for the action? Jerry -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 1:03 PM To: Struts Users Mailing List Subject: Re: Global-Forwards Question have you defined the servlet in web.xml At 10:46 AM 6/3/2002 -0700, you wrote: Have you tried: global-forwards forward name=thirdAction path=/thirdAction.do / /global-forwards or global-forwards forward name=thirdAction path=/do/thirdAction / /global-forwards -vincent. Jerry Jalenak wrote: Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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] This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: servlet context/Action class - performance question.
We store much more information that in our application context and dont have any performance issues. We store all our master data (static) on startup. The performance is enhanced. Again it depends on how much data you have and how much it is supposed to grow over time. That you should consider. At 01:01 PM 6/3/2002 -0500, you wrote: The requirement is to display a page with some categories just like the yahoo homepage. The link of each main category will have to show the subcategories of that category in a similar page. The level of this tree goes one more level inside. All this information is built ofcourse by retrieving from the database. First thought was to build the relevant section of the category/subcategory tree based on the request parameters. Since these pages are going to be the most viewed (and does not change based on the user), I thought it would be better for performance if the whole tree is created in a startup servlet and put in servlet context instead of creating a part of it in the Action class and setting it into the HttpServletRequest. This would mean that I wont have to hit the database for every user request. I will just have to get the relevant part of the category tree from the (big) object in servlet context based on a key lookup on the TreeMap. The pages load surely very fast, ~but~ I am wary of such a big object in memory and its effect on the performance once it goes into production. To give a rough idea about the size of this tree: 1 main category (TreeMap) has about 12 subcategories (TreeMaps again). Each of the subcategories has about 10 child categories. Each child category is a ArrayList of strings. So its a TreeMap of TreeMaps of ArrayLists. Did anybody face similar design choice and had to choose against a setting so much information in the servlet context? Any input is greatly appreciated! I apologize for the subject being a little off-topic. Thanks, -Shyam Gouri -- 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: Global-Forwards Question
Craig, Sorry for the confusion - this is a bad use of terminology on my part. I'm not using multiple ActionServlets (i.e. controllers) - rather multiple Actions as defined in struts-config by the action.. / tags. Jerry -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 1:08 PM To: Struts Users Mailing List Subject: Re: Global-Forwards Question Trying to run multiple ActionServlet instances in the same web application is going to cause you no end of grief, and is not a supported configuration. You should organize your app so that it uses a single instance of the controller. Craig McClanahan On Mon, 3 Jun 2002, Jerry Jalenak wrote: Date: Mon, 3 Jun 2002 12:26:38 -0500 From: Jerry Jalenak [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Global-Forwards Question Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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: Global-Forwards Question
Figured it out. I needed to define the Action via a action .. / tag in struts-config.xml. I only specified the path and type parameters. Thanks for everyones input! Jerry -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 1:08 PM To: Struts Users Mailing List Subject: Re: Global-Forwards Question Trying to run multiple ActionServlet instances in the same web application is going to cause you no end of grief, and is not a supported configuration. You should organize your app so that it uses a single instance of the controller. Craig McClanahan On Mon, 3 Jun 2002, Jerry Jalenak wrote: Date: Mon, 3 Jun 2002 12:26:38 -0500 From: Jerry Jalenak [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: Global-Forwards Question Hi All, Is it possible to use the mapping.findForward method to forward to another ActionServlet? I have two ActionServlets that both need to forward to a third, common ActionServlet. In my struts-config, I have the following line: global-forwards forward name=thirdAction path=/thirdAction / /global-forwards where 'thirdAction' is the common ActionServlet. In both of the other two ActionServlet, I have actionForward = mapping.findForward(thirdAction); return actionForward; It doesn't seem as though the forward is happening as I never get into the 'thirdAction'. Can this be done this way? Thanks! This transmission (and any information attached to it) may be confidential and is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient or the person responsible for delivering the transmission to the intended recipient, be advised that you have received this transmission in error and that any use, dissemination, forwarding, printing, or copying of this information is strictly prohibited. If you have received this transmission in error, please immediately notify LabOne at (800)388-4675. -- 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 Install Struts on WebSphere 4 ?
The following link has helped me greatly: http://marc.theaimsgroup.com/?l=struts-userm=102142014616118w=2 Mike -Original Message- From: eilison Lee [SMTP:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 7:23 AM To: [EMAIL PROTECTED] Subject: How to Install Struts on WebSphere 4 ? Dear friends: How to Install Struts on WebSphere 4 ? Is there anything special? Thank you! eilison _ 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Configurable UI Design
I'm pulling this over to the Struts list from servlet interest. Have you signed up for the struts-users list at apache yet? It's a pretty high-volume list, so make your choice wisely ;-) Either way, we should be able to finish this thread and anyone at struts-users please give comments/insults accordingly (since I'm not always 'the sharpest knife in the drawer' ;-) A lot of people familiar with Struts and MVC as a whole would ask you 'why' you would want to do this. It sounds a little crazy to me, but I think it can be done. I'm assuming that you are using some other means of 'remembering' your users (db, ldap, whatever). (if not then @see below) ** Inherent Problems: (if you are depending on cookies to 'remember' your users) - users prefs are not remembered if they 1. delete and/or disable cookie(s) (I mean this across sessions and not specifically within a session) 2. use a different computer (e.g. home pc vs. work pc) 3. use a different browser (IE, NS, Mozilla) ** Validation: I have no idea how you would handle your input validation, perhaps some kind of PageManager tag that wraps the jsp and knows how to handle the validation (or clue-in your action as to what to do) The Validator framework is.welljust AWESOME if you've ever used it. I highly recommend *not* deviating from it if possible. I have posted a few 'how-to's on wizards, so if I were given your requirements, I would probably follow a similar approach. My best guess is that this would need to be a highly customized solution, **DISCLAIMER - I may be biting off more than I can chew.but here goes... ** Reusing your jsp If you structure your jsp properly, you can break up a really long form into several pages (keep in mind the impact on validation) I think Ted Husted might have given some info on this already (can't remember, I know, I'm an idiot) For your questionI'm envisioning/dreaming of something like this. (perhaps this could/should be packaged as a component/add-on specific for jsp views of course) * A jsp page manager (wizard) that: - can manage the state of the pages/wizard, (e.g. remember the 'page ? of ?') [the verbage could even come from the bundle/config file] wizards.version1.page1of.= You are viewing page {1} of {2} wizards.version2.page1of.= Page {0} of {1}. wizards.version3.page1of.= {0} of {1} - let's you specify that the user be able to configure the page layout and fields/views at runtime. - can figure out that if the user pushes the last input(s) to a page beyond the last one, it adjusts the page ? of ? accordingly. Also handles the inverse of that situation. - enforce the required fields/process flow for the fullfillment of the form (now that's a tongue twister, or as they say in AU...'teng twistah';) ...sorry, I have kids and we have the wiggles over here (US) too...LOL - auto-magically handles the previous-next-finish for you. - let's you i18n everything in the bundle(s) similar to what the validator header/footer requ'd pseudo-code reality=Don't shoot me if this seems stupid!! html:form .. optls:jspManager config=true optls:page1of/ !-- beginning of dreaming-state-- if your form was 'flat', then it would be nice if you could use the DynaActionForm and be able to add a field to your application/wizard simply by adding it to the struts-config.xml and (optionally) the persistence layer (I have seen and worked with 'dynamic db fields', done through the magic of a well designed RDBMS) [for those of you who know me, i'm talking about the concept of catalog attributes] !-- end of dreaming-state -- !-- if you can't do the above, oh well... do this -- !-- specify your fields here -- optls:userConfigedFields html:text property=field1/ /optls:userConfigedFields optls:userConfigedFields html:text property=field2/ /optls:userConfigedFields optls:userConfigedFields html:text property=field3/ /optls:userConfigedFields optls:page1of/ optls:previous/optls:next/optls:finish/ /optls:jspManager /html:form .. /pseudo-code Best of luck!! James Mitchell Software Engineer/Struts Evangalist - Original Message - From: Suresh Addagalla [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, June 03, 2002 2:50 AM Subject: RE: Configurable UI Design Thanks. I am familiarizing with the 'tiles' part of Struts, meanwhile a quick question. It seems like tiles can help me change personalize the layout of a single page. I have one more specific requirement. Let us say that my HTML form is distributed across 2 or 3 separate HTML pages, which are navigated using back, next buttons. I would like the end user to be able to personalise by specifying which components of the form are available on which page. For example, the user may want to move a not-so-important field for him from page 1 to page 3.
Button pressed
Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
set the property on JSP file: html:submit property=edit value=Edit/ on action class: if (request.getParameter(edit) != null ) { // means edit was pressed } -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:27 PM To: Struts Subject: Button pressed Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos.
RE: Button pressed
You could use the DispatchAction class. See http://jguru.com/faq/view.jsp?EID=897290. Of course, this is doing more than what you have asked for -- however I suspect (going by the button names) that that's what you want. Sri -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:27 PM To: Struts Subject: Button pressed Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos.
Re: Button pressed
one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
Thanks guys, but...as a company policy, we are not suppose to use java script. -Carlos. -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM To: Struts Users Mailing List Subject: Re: Button pressed one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- 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: Button pressed
This can be placed in URL. e.g. EditFormAction.do?action=Edit EditFormAction.do?action=Continue Test the request parameter value. Christian -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:27 PM To: Struts Subject: Button pressed Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos.
Re: Button pressed
Dont know if this will work Try using IMG SRC=URL instead of regular button with the URL having a different query string for edit and continue. eg ...?action=edit At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
That's a joke, right? This reminds me of a client I consulted last year who insisted on interactive graphing with Active X rather than Java applets because of security concerns. And it's JavaScript, not java script. -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:42 PM Thanks guys, but...as a company policy, we are not suppose to use java script. -Carlos. -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
Assign a name to the button object, then in your action class iterate through all the form attributes, the pressed button will show up with it's corresponding name and a suffix of .X or .Y, it's a tedious way to do it especially if you have a large number of form elements, I prefer using JavaScript myself. -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:42 PM To: Struts Users Mailing List Subject: RE: Button pressed Thanks guys, but...as a company policy, we are not suppose to use java script. -Carlos. -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM To: Struts Users Mailing List Subject: Re: Button pressed one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- 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: Button pressed
Another kludgey way around not using JavaScript would be to put the buttons in different forms. -Original Message- From: Christian Velez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:49 PM To: 'Struts Users Mailing List' Subject: RE: Button pressed This can be placed in URL. e.g. EditFormAction.do?action=Edit EditFormAction.do?action=Continue Test the request parameter value. Christian -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:27 PM To: Struts Subject: Button pressed Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Configurable UI Design
If James thinks it's crazy, I'm not going to touch it(though the invitation for insults was tempting) ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:24 PM Either way, we should be able to finish this thread and anyone at struts-users please give comments/insults accordingly (since I'm not always 'the sharpest knife in the drawer' ;-) A lot of people familiar with Struts and MVC as a whole would ask you 'why' you would want to do this. It sounds a little crazy to me, but I think it can be done. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Servlets do NOT refresh after recompile
Hi, I am Norman. I am running Tomcat 4.0, Struts 1.02, JDK 1.3 When I recompile my servlets after making some changes to them, they do not refresh immediately. I have to stop and restart tomcat to do this. Can somebody throw some lights on what is missing in my configuration?. Thanks in advance Norman
Re: Servlets do NOT refresh after recompile
Ryan Norman wrote: I have to stop and restart tomcat to do this. Can somebody throw some lights on what is missing in my configuration?. You need to read tomcat's configuration to see how to configure the reloadable option in server.xml, or how to use the manager app to reload your individual app instead of the whole server. BTW, this is not a Struts issue. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlets do NOT refresh after recompile
Marcelo Vanzin wrote: You need to read tomcat's configuration to see how to configure the Tomcat's documentation, I mean. -- []'s Marcelo Vanzin Touch Tecnologia [EMAIL PROTECTED] Life is too short to drink cheap beer -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [MVC-Programmers] CachedRowSet - updates limited to single table
Subject: Re: [MVC-Programmers] CachedRowSet - updates limited to single table From: Vic Cekvenich [EMAIL PROTECTED] === A good use for Cached Row Set is as a disconnected collection of rows. I use it to store the data after I do a Select (instead of a collection) A nice feature of RowSet is getMetaData method, that explains the information about the data. I create an update, or an insert or a delete I do so manualy and not use the RowSet. I enumerate the meta data about each row, then I enumerate each column, and create for example a an Update SQL String / Prepared Statment. Look at WebPIM for my Design. It is a generic update. It can be easily extended to do multi table, or you can overide the DAO and hardcode the join update(). Above is a good design. An alternative design is this Create a Company update Form Create a User update Form. When selecting you can do a SQL join and use the JSTL or Display Tag. When updating on a single screen Well you can have multiple users on a page per company. So you would display company and users that iterate. Hence a company form bean that contains a user form beans (and each bean implements iterator). So alternative is a formBean iterator that contains other formBean iterators (thata each have a DAO that uses a disconnected row set for a collection). Very clean, IMO. Do not use crs.acceptChanges in either case. Done all the time, most Forms in most applications are master detail or many to many or several at the same time. HTH, V. Todd G. Nist wrote: Hello, We have a CachedRowSet which is created from a SQL statement which joins the User table to the Company table to display company information for the User. We allow the user of the system to select a record and drill in for updating. Since the CachedRowSet was created with a join, it keeps throwing an exception when we apply the this.crs.acceptChanges(connection); method. I did not see anything in the CachedRowSet documentation which states that it only supports a single table. So does a CachedRowSet only support updating a single table or am I missing something? Thanks is advance. Regards, Todd G. Nist Email: [EMAIL PROTECTED] Hello, We have a CachedRowSet which is created from a SQL statement which joins the User table to the Company table to display company information for the User. We allow the user of the system to select a record and drill in for updating. Since the CachedRowSet was created with a join, it keeps throwing an exception when we apply the this.crs.acceptChanges(connection); method. I did not see anything in the CachedRowSet documentation which states that it only supports a single table. So does a CachedRowSet only support updating a single table or am I missing something? Thanks is advance. Regards, Todd G. Nist Email: [EMAIL PROTECTED] ___ MVC-Programmers mailing list [EMAIL PROTECTED] http://www.basebeans.com:8081/mailman/listinfo/mvc-programmers -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: A common problem: Cannot find ActionMappings or ActionFormBeans?
Subject: Re: A common problem: Cannot find ActionMappings or ActionFormBeans? From: Jesper Lindholt Ottosen [EMAIL PROTECTED] === This is a multi-part message in MIME format. --68C26815A99A3A9AB79375FC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Unfortunately there's no specific parsing error... ---cut--- 2002-05-29 22:52:51 action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2002-05-29 22:52:52 StandardContext[/mySelfservice]: Servlet /mySelfservice threw load() exception javax.servlet.ServletException: Parsing error processing resource path /WEB-INF/struts-config.xml at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1337) --cut--- Pretty much the same error as Harinath has posted (Tue, 28 May 2002 18:17:05 +0530) I've attached a couple of log files and the web.xml in case anyone has a keen eye. I've gone blank. The application worked previously and another app' I have on the same tomcat server works fine... Yours Jesper Adam Hardy wrote: Hi Jesper, you could give the parsing error for the struts-config.xml - it looks alright but I don't know the dtd off by heart. Adam Struts Newsgroup (@Basebeans.com) wrote: Subject: A common problem: Cannot find ActionMappings or ActionFormBeans? From: Jesper Lindholt Ottosen [EMAIL PROTECTED] === This is a multi-part message in MIME format. --71050682FAF314ABBDC2DF31 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! I have been attacking the Cannot find ActionMappings or ActionFormBeans problem in a specific web app for quite some nights now. I have searched for answers on the 'net and in this newsgroup, and checked up on most of the advices. Apparently I'm not alone (and that's a comfort, after all :). Question 1: How come the struts-config.xml file is so vulnerable and what is done to make it more robust? To me it seems that there is a lot of suggestions on why the problem arises, but they are very different, with no general applicability. Is there perhaps a solution that verifies the file and setup properties (A Do this and it can't go wrong)? Back to my current problem: My Linux (7.2) crashed with two projects that worked - I managed to save the files and have been rebuilding the setup with Tomcat 4.0.2, Struts 1.0.2 and various XML parsers. Now one project works fine, the other project simply gives me the problem no matter what I try.. I tried removing these XML jar's from the $CLASSPATH but it didn't matter. My project needs a JDOM xml-parser so that and the struts.jar file is added to the project WEB-INF/lib. I tried building the app' up from scratch based on struts-blank, with no luck at all (!). Question 2: The struts-config.xml file I use (attached) generates a parsing error in the log and the dreaded JSP exception error page, when I start my application from a JSP page containing: ... html:form action=login.do focus=login ... /html:form ... Can anyone find the blind spot I've been missing? I'm pretty sure that the files and the system setup (including web.xml) is as before the crash, and the jsp-files etc are all in the right places. But let me know if you want any of them. Any help will be appreciated - thanks! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Jesper -- [EMAIL PROTECTED] - + 45 86 27 28 48 -- www.o2sn.dk/jesper - www.LindholtOttosen.dk --68C26815A99A3A9AB79375FC Content-Type: text/plain; charset=us-ascii; name=log.txt Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename=log.txt 2002-05-29 22:52:49 StandardHost[localhost]: Installing web application at context path /mySelfservice from URL jar:file:/usr/java/jakarta-tomcat-4.0.2/webapps/mySelfservice.war!/ 2002-05-29 22:52:49 WebappLoader[/mySelfservice]: Deploying class repositories to work directory /usr/java/jakarta-tomcat-4.0.2/work/localhost/mySelfservice 2002-05-29 22:52:49 WebappLoader[/mySelfservice]: Deploy JAR /WEB-INF/lib/jdom.jar to /usr/java/jakarta-tomcat-4.0.2/webapps/mySelfservice/WEB-INF/lib/jdom.jar 2002-05-29 22:52:49 WebappLoader[/mySelfservice]: Deploy JAR /WEB-INF/lib/struts.jar to /usr/java/jakarta-tomcat-4.0.2/webapps/mySelfservice/WEB-INF/lib/struts.jar 2002-05-29 22:52:49 StandardManager[/mySelfservice]: Seeding random number generator class java.security.SecureRandom 2002-05-29 22:52:49 StandardManager[/mySelfservice]: Seeding of random number generator has been completed 2002-05-29 22:52:51 ContextConfig[/mySelfservice]: Added certificates - request attribute Valve 2002-05-29 22:52:51 StandardWrapper[/mySelfservice:default]: Loading container servlet default 2002-05-29 22:52:51 default: init 2002-05-29 22:52:51 StandardWrapper[/mySelfservice:invoker]: Loading container servlet invoker
Pros and Cons of Struts
Subject: Pros and Cons of Struts From: Sanjib Islam [EMAIL PROTECTED] === I am presently evaluating struts as a presentation framework for our upcoming project. Could anyone please provide a list of some of the pros and cons that they might have experienced in their projects? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Design Advice - Relational Databases Java Objects
As mentioned elsewhere, getting a database connection from the web tier is not a good practice. The Struts framework does try to encourage best practice but sometimes takes a dip in the pool of pragmatism. The Generic Connection pool is one example of this. The data access objects should take care of all the connection stuff and just pass back standard Java objects like JavaBeans and Collections. The web tier, and even business tier, does not need to know where the data comes from. If the data access objects completely encapsulate the connection stuff, how does the business object wrap two calls to the data access layer in one transaction? Take for example the well-worn credit and debit financial transaction. Would you wrap that up into one data access object and say OK, we've got two operations rolled into one and we can't seperate them and re-use them, but that's necessary for a transaction? On the other hand, if the data access objects are handed the connection by the business object, or if the connection came from the struts connection pool, then the transaction could be handled easily I know. Am I chasing a Holy Grail here? Adam -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NullPointerException in Validator v1.0 GenericValidator.isDate
I am using the Validator pre Struts 1.1. I am getting a null pointer when validating a date via the GenericValidator.isDate(String, Locale). It looks like the formatter that is used to parse the string value is never intialized. The variable formatter is there but is never initialized via the getDateInstance. Bug, bad version, wrong usage, or some other bone head thing I might have done??? BTW, it works fine once I change the code to intialized the formatter variable. Randy Bielby GR Madison Wisconsin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Handling check for logged-inness using a tag?
What does the forward to a jsp that's in the WEB-INF look like? Adam James Mitchell wrote: Assuming that the location of the jsp were decided for you, I would think that you wouldn't want anyone hitting a 'struts-ified' jsp regardless of authentication. I think these are separate issues. I know with the QA at my last job, they would try just about anything to get a stack trace in the browser. I think they prided themselves on how many bugs they could log against us. Almost they acted as if they were paid bonus' for logged defects. Personally, I don't like the idea of adding unnecessary tags in my jsp, especially if it does functionality that could/should be in the action class. Ultimately, its up to you, that's what makes Struts so awesome. James Mitchell Software Engineer\Struts Evangelist -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 02, 2002 2:43 PM To: Struts Users Mailing List Subject: Handling check for logged-inness using a tag? If you aren't going to put your JSPs inside the WEB-INF layer, would it be a good idea to do the check for a user being logged in by a simple tag at the top of each JSP? This way at least if someone tries to type in a url to a jsp they would be redirected to log in? -- Rick 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: multiple frames
Hi Matthias, the frames issue is totally meaningless to struts - each frame acts as an individual page, therefore struts thinks of the requests as normal browser windows. If your index.html has a frameset tag in it, it can't have any other html - it supports the pages in the frames. Your submit button must be in one of the frames - unless you're doing iframes or something. If you want the other frame to be refreshed at the same time, you have to do it with javascript via the submit event of the first frame. Regards Adam [EMAIL PROTECTED] wrote: I want to work with multiple frames. I have a file index.html that contains two frames. When the submit button on this index.html page is pressed, both these frames should be refreshed; should display the newest data from the database. When I call the index.html how do I specify that the data is to be reloaded in both the frames? What's the best way to handle this problem??? Are there any available texts? Thanks Matthias Hanel Matthias Fachinformatiker (Anwendungsentwicklung) in Ausbildung Logistik World GmbHFon:+49-841-9014-300 Marie-Curie-Strasse 6 Fax:+49-841-9014-302 D- 85055 Ingolstadtmailto:[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: Pros and Cons of Struts
Well, I have worked with a number of pros in the course of my present Struts project, but I don't know if any are felons. -Original Message- From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 3:55 PM I am presently evaluating struts as a presentation framework for our upcoming project. Could anyone please provide a list of some of the pros and cons that they might have experienced in their projects? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Design Advice - Relational Databases Java Objects
As mentioned elsewhere, getting a database connection from the web tier is not a good practice. The Struts framework does try to encourage best practice but sometimes takes a dip in the pool of pragmatism. The Generic Connection pool is one example of this. The data access objects should take care of all the connection stuff and just pass back standard Java objects like JavaBeans and Collections. The web tier, and even business tier, does not need to know where the data comes from. If the data access objects completely encapsulate the connection stuff, how does the business object wrap two calls to the data access layer in one transaction? Take for example the well-worn credit and debit financial transaction. Would you wrap that up into one data access object and say OK, we've got two operations rolled into one and we can't seperate them and re-use them, but that's necessary for a transaction? On the other hand, if the data access objects are handed the connection by the business object, or if the connection came from the struts connection pool, then the transaction could be handled easily I know. Am I chasing a Holy Grail here? I believe it may be worthwhile to separate transactional considerations from data access object design. If you need to manage transactions across multiple database updates, then consolidating all your data access code into a single DAO is only one way to handle it. Once you get to the point of needing to manage transactions across multiple data access objects, it may be worthwile to use an EJB Server (JBoss is free after all if cost is the issue). Then you can just grab a UserTransaction to wrap whatever code you want in the web tier and use the ejb server for managing the transaction details. Then your DAO design doesn't have to be impacted (as much) by your to manage the transaction. The other issue is the granularity of the Data Access Object. These can be fairly coarse-grained and handle updates/transactions across multiple jdbc connections even in the web tier. For example, in your example you could have something like: /* * handle the debit/credit transaction */ UserAccountDAO ua = new UserAccountDAO(userID); try { ua.beginDAOManagedTx(); ua.processDebit(); ua.prcessCredit(); ua.commitDAOManagedTx(); } catch (DAOApplicationException e) { ua.rollbackDAOManagedTx(); } In this situation the DAO could somehow manually handle the transaction internally and just throw a DAOApplicationException if problems arise. I guess what I'm saying is there ain't no holy grail. All you have is trade-offs between cost, quality and schedule and you do your best. Different solutions may be better depending on the project and where you're at... As they say in Perl, TIMTOWTDI - there's more that one way to do it... Adam FWIW - Kevin --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender and erase this e-mail message immediately. --- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Configurable UI Design
I was hoping you wouldn't start a James Mitchell is rude and ignorant thread :-) James - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, June 03, 2002 3:03 PM Subject: RE: Configurable UI Design If James thinks it's crazy, I'm not going to touch it(though the invitation for insults was tempting) ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:24 PM Either way, we should be able to finish this thread and anyone at struts-users please give comments/insults accordingly (since I'm not always 'the sharpest knife in the drawer' ;-) A lot of people familiar with Struts and MVC as a whole would ask you 'why' you would want to do this. It sounds a little crazy to me, but I think it can be done. -- 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: Button pressed
I think (based on at least 3 similar threads) that the best approach is to have a field on your bean named 'action' and figure out later in the action class which was pushed (e.g. form.getAction()) If you have concerns about i18n, there is a work-around for that using the same technique. Search the archives for more James - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, June 03, 2002 2:59 PM Subject: RE: Button pressed Another kludgey way around not using JavaScript would be to put the buttons in different forms. -Original Message- From: Christian Velez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:49 PM To: 'Struts Users Mailing List' Subject: RE: Button pressed This can be placed in URL. e.g. EditFormAction.do?action=Edit EditFormAction.do?action=Continue Test the request parameter value. Christian -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:27 PM To: Struts Subject: Button pressed Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- 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: Configurable UI Design
Nah...you just suck. -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 5:16 PM I was hoping you wouldn't start a James Mitchell is rude and ignorant thread :-) James - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, June 03, 2002 3:03 PM Subject: RE: Configurable UI Design If James thinks it's crazy, I'm not going to touch it(though the invitation for insults was tempting) ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:24 PM Either way, we should be able to finish this thread and anyone at struts-users please give comments/insults accordingly (since I'm not always 'the sharpest knife in the drawer' ;-) A lot of people familiar with Struts and MVC as a whole would ask you 'why' you would want to do this. It sounds a little crazy to me, but I think it can be done. -- 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: Pros and Cons of Struts
referring to the four taglibs - bean, html, logic and template we make use of all. All work very nice. thats the pro. For cons, i think these taglib's can make the app slower since there are now more classes being instantiated/re-used compared to using straight scriptlets or html. At 12:55 PM 6/3/2002 -0700, you wrote: Subject: Pros and Cons of Struts From: Sanjib Islam [EMAIL PROTECTED] === I am presently evaluating struts as a presentation framework for our upcoming project. Could anyone please provide a list of some of the pros and cons that they might have experienced in their projects? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Need Advice on dynamic variable substitution
I have the following within a jsp page that uses a template. In this page I assign values to variables that are used within the template clause template: .. /template:... but it does not work For example the title page (title.jsp) does not set the window title with the value stored in %= windowTitle %. Help:? % String windowType = Jobs; String windowTitle = application.title; String windowSubTitle = application.subtitle; % template:insert template=/template.jsp template:put name=title content=title.jsp?Type=%= windowTitle %/ template:put name=header content=header.jsp?Type=%= windowType %/ template:put name=menu content=menu.jsp?Type=%= windowType %/ template:put name=sidebar content=application_sidebar.jsp?Type=%= windowType %SubTitle=%= windowSubTitle %/ template:put name=content content=application_content.jsp/ template:put name=footer content=footer.html/ /template:insert Sincerely, Paul Idusogie Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
'tis no joke, unfortunately. JavaScript is disallowed for any customer applications by company policy here as well (but okay for internal apps.). The argument is that JavaScript is not evenly supported amongst different browsers. Try the counter-argument that only certain features of JavaScript are not supported by certain browsers, that the use of those features can be avoided, and that those browers are in the extreme minority in terms of number of users, and see how far you can get in the black-and-white world of marketing. Just try it. I dare you. ;) peace, Joe Barefoot -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:56 AM To: 'Struts Users Mailing List' Subject: RE: Button pressed That's a joke, right? This reminds me of a client I consulted last year who insisted on interactive graphing with Active X rather than Java applets because of security concerns. And it's JavaScript, not java script. -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:42 PM Thanks guys, but...as a company policy, we are not suppose to use java script. -Carlos. -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- 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: Button pressed
No argument here...Marketing has no clue, but controls the money. -Original Message- From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 6:07 PM To: Struts Users Mailing List Subject: RE: Button pressed 'tis no joke, unfortunately. JavaScript is disallowed for any customer applications by company policy here as well (but okay for internal apps.). The argument is that JavaScript is not evenly supported amongst different browsers. Try the counter-argument that only certain features of JavaScript are not supported by certain browsers, that the use of those features can be avoided, and that those browers are in the extreme minority in terms of number of users, and see how far you can get in the black-and-white world of marketing. Just try it. I dare you. ;) peace, Joe Barefoot -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 11:56 AM To: 'Struts Users Mailing List' Subject: RE: Button pressed That's a joke, right? This reminds me of a client I consulted last year who insisted on interactive graphing with Active X rather than Java applets because of security concerns. And it's JavaScript, not java script. -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:42 PM Thanks guys, but...as a company policy, we are not suppose to use java script. -Carlos. -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- 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: Pros and Cons of Struts
I have an Excel file full of notes from the mailing lists on various frameworks and other web development products. I update it every day as I read about other peoples' experiences. You can download a fairly current version from here: http://www.jcorporate.com/econtent/Content.do?state=viewPagepageId=3. Click Application Frameworks Comparison. or let me know if you'd like an up-to-date copy. (I'm finally getting DSL installed (Woohoo!!!), so I will soon be able to do this the normal way). Here are some other docs that compare frameworks: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/wafer/www/feature- matrix2.html?rev=1.10 http://www.jcorporate.com/html/products/expresso/matrix_compare.html http://barracuda.enhydra.org/cvs_source/Barracuda/docs/barracuda_vs_struts.h tml -Dan -Original Message- From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 12:55 PM To: [EMAIL PROTECTED] Subject: Pros and Cons of Struts Subject: Pros and Cons of Struts From: Sanjib Islam [EMAIL PROTECTED] === I am presently evaluating struts as a presentation framework for our upcoming project. Could anyone please provide a list of some of the pros and cons that they might have experienced in their projects? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
nested tag issue
Hi, I am trying to use the nested tag. It's giving me a null pointer exception if I try access a method of the nested tags by itself. However, if I enclose it in a html:form... then it'll work. Any ideas? Thanks, This works, where filter.do maps to the form that holds myCollection: html:form action=/filter.do nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /html:form This doesn't: nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest Thanks in advance. Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ValidatorPlugin and Dynamic Action Forms?
Not trying to be a pest re-posting but maybe some gurus missed the post.. I'm curious if anyone knows how to get a DynaActionForm configured to uses struts validation? I searched the archives here but only found someone else with the same question which no one answered, so maybe it can't be done and I should stick to a normal Action Form if I want to use the struts Validation? Thanks lots -- Rick mailto:[EMAIL PROTECTED] If you define cowardice as running away at the first sign of danger, screaming and tripping and begging for mercy, then yes, Mr. Brave man, I guess I'm a coward. -Jack Handey -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Any link to get the details of Using Struts Framework with Jbuilder6
Any link explains Using Struts Framework with Jbuilder6 Regards Suri -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Any link to get the details of Using Struts Framework with Jbuild er6
@see http://jakarta.apache.org/struts/resources.html#tutorials -Emmanuel Metla, Suri [EMAIL PROTECTED] a écrit : Any link explains Using Struts Framework with Jbuilder6 Regards Suri -- To unsubscribe, e-mail: For additional commands, e-mail: - Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
RE: Configurable UI Design
Feel the Lurve! :-) -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 4:34 PM To: 'Struts Users Mailing List' Subject: RE: Configurable UI Design Nah...you just suck. -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 5:16 PM I was hoping you wouldn't start a James Mitchell is rude and ignorant thread :-) James - Original Message - From: Galbreath, Mark [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, June 03, 2002 3:03 PM Subject: RE: Configurable UI Design If James thinks it's crazy, I'm not going to touch it(though the invitation for insults was tempting) ;-) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:24 PM Either way, we should be able to finish this thread and anyone at struts-users please give comments/insults accordingly (since I'm not always 'the sharpest knife in the drawer' ;-) A lot of people familiar with Struts and MVC as a whole would ask you 'why' you would want to do this. It sounds a little crazy to me, but I think it can be done. -- 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: nested tag issue
Dean, This is like the blind leading the blind. I wonder why you don't want to declare a form but something like this should work: nested:root name=attributeNameOfBeanContainingYourCollection nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /nested:root David Morris [EMAIL PROTECTED] 06/03/02 04:07PM ...This works, where filter.do maps to the form that holds myCollection: html:form action=/filter.do nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest /html:form This doesn't: nested:nest property=myCollection nested:iterate property=myCollection nested:write property=myDate/ /nested:iterate /nested:nest Thanks in advance. Dean Chen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re[2]: ValidatorPlugin and Dynamic Action Forms?
On Monday, June 3, 2002, 7:21:03 PM, Mark wrote: GM Not ignoring you, Rick...I haven't used DynaActionForm (yet). he he no problem:) I didn't think you were... well unless it was Friday :) -- Rick mailto:[EMAIL PROTECTED] One thing kids like is to be tricked. For instance, I was going to take my little nephew to Disneyland, but instead I drove him to an old burned-out warehouse. 'Oh, no,' I said. 'Disneyland burned down.' He cried and cried, but I think that deep down, he thought it was a pretty good joke. I started to drive over to the real Disneyland, but it was getting pretty late. -Jack Handey -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ValidatorPlugin and Dynamic Action Forms?
Hello, Does struts have a taglib that will provide the functionality for a user to download from an output stream? Thanks for you assistance. -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 4:21 PM To: 'Struts Users Mailing List' Subject: RE: ValidatorPlugin and Dynamic Action Forms? Not ignoring you, Rick...I haven't used DynaActionForm (yet). Mark -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 6:35 PM Not trying to be a pest re-posting but maybe some gurus missed the post.. I'm curious if anyone knows how to get a DynaActionForm configured to uses struts validation? I searched the archives here but only found someone else with the same question which no one answered, so maybe it can't be done and I should stick to a normal Action Form if I want to use the struts Validation? Thanks lots -- Rick mailto:[EMAIL PROTECTED] If you define cowardice as running away at the first sign of danger, screaming and tripping and begging for mercy, then yes, Mr. Brave man, I guess I'm a coward. -Jack Handey -- 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]
validation behavior
Hi All: I just wanted to confirm some behavior I'm seeing with validation and hopefully get a recommendation or two. I'd like to have action perform pass either the form values from a post or the request parameters from a get to a facade. It seems like there's no way to validate the post but not validate the get. Is this true ? The body of the perform method would look like: if(form != null){ // some other code goes here collection = facade.locateSearchResults(form.getName()); }else{ //other code here collection = facade.locateSearchResults(request.getParameter(name)); } There's no reason to validate the request parameters from the get and there's no association with an html form. Even if I set validate to false, once I reference the form the validate method executes on the else condition. Any way to do this and avoid the unnecessary call to the form bean validate method ? Thanks, Richard -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Options Tag, Property Attribute and Accessor Consumption.
Comrades, Here is a Scenario. Let us say we have 2 kinds of value objects extending a base ValueObject. AVo and BVo extend BaseVo and BaseVo has a method getKey() Now I have a collection of AVo's and another collection of BVo's. I want to provide the descriptions of these VO's in a dropdown and capture the key during the process. Both the dropdowns exist in the same form. so the code would be something like. html:select property=key name = ldmGroup indexed=yes html:options collection=ldmGroups property=key labelProperty=formattedDescription/ /html:select So, that takes care of AVo collection in a dropdown. html:select property=key name = twGroup indexed=yes html:options collection=twGroups property=key labelProperty=formattedDescription/ /html:select This is what I have to do to capture BVo's keys. Now I also want to have a drop down of BVo collection but the key[] in formbean is already filled by AVo collection parameters. How can I use the dropdown and capture the BVo's keys? Thanks for your time. hemant
Re: Any link to get the details of Using Struts Framework with Jbuild er6
The Struts Console software plugs into JBuilder to make managing Struts config files very easy. http://www.jamesholmes.com/struts/ -james [EMAIL PROTECTED] --- Metla, Suri [EMAIL PROTECTED] wrote: Any link explains Using Struts Framework with Jbuilder6 Regards Suri -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Button pressed
Yes. Surely 'java script' is what goes in jsp scriptlets to be killed, uh.. executed on the server. And of course on the client, its only JavaScript if your using Nutscraper. IE calls it JScript, and the standards blessed name is ECMAScript. (Of course the variants arent identical between browsers and even browser versions but some of the basic stuff is pretty standard) -Original Message- From: Galbreath, Mark [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 02:56 To: 'Struts Users Mailing List' Subject: RE: Button pressed That's a joke, right? This reminds me of a client I consulted last year who insisted on interactive graphing with Active X rather than Java applets because of security concerns. And it's JavaScript, not java script. -Original Message- From: Carlos Fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:42 PM Thanks guys, but...as a company policy, we are not suppose to use java script. -Carlos. -Original Message- From: Bharat Nagwani [mailto:[EMAIL PROTECTED]] Sent: Monday, June 03, 2002 2:39 PM one more alternative create a hidden field and assign a value to it (edit or continue) using javascript and check that hidden field in request.getParameter... At 02:26 PM 6/3/2002 -0400, you wrote: Hi guys, I'd like to know if there is a way that I will know which button was pressed. I have two buttons in the JSP (Edit and Continue). In my action class I need to know which one of those was pressed. Thanks in advance. Carlos. -- 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: related to: Re: #2 - Use DispatchAction to organize related operations
Rick, Let me mention something. One potential problem with this approach is that by the time the action is called, may be too late. You really need to catch this earlier. I had implemented something along these lines awhile back and soon remembered that the ActionForm is populated and the validate() method is called, all of this before the Action's execute() method is invoked. The question is, do you want to check whether or not the user is logged in after this, or before it. Maybe this is app specific, I'm not sure. It's my opinion, and only an opinion, that you really should be catching this before the action is invoked, if nothing else, for security reasons. What I suggest is to look at the processPreprocess() method in the RequestProcessor and possibly override this to do your checks. It's called for every request and long before ActionForm's are populated and Action's are invoked. The default value is to return true, which allows request processing to continue. What I've done in the past is to override this, check the login, and possibly redirect the user to the login page. If the user's logged in, just return true to continue processing the request. Just some things to think about, Chuck At 09:31 PM 6/3/2002 -0400, you wrote: On Friday, May 31, 2002, 7:11:47 AM, Ted Husted wrote: TH The Struts Dispatch Action is designed to do exactly the same thing, but TH without messy branching logic. The base perform method will check a TH dispatch field for you, and invoke the indicated method. The only catch TH is that the dispatch methods must use the same signature as perform. TH This is a very modest requirement, since in practice you usually end up TH doing that anyway. Ted, I was discussing with James Mitchell about ways to manage a user being logged in and he suggested a way that I really liked where you have a base class perform method handle checking the login status and then call something like a doWork() method that will invoke the work in your subclass Actions (avoiding have to have all your actions handle the loggin check). The question I have is I'm now using a dispatch action class that handles most of the action work. Do I need to go in and modify the base DispatchAction class' perform method in order to get something similar to the above functionality? Or maybe there is an easier way to handle checking login status using a subclass of DispatchAction? Thanks -- Rick mailto:[EMAIL PROTECTED] Probably the earliest flyswatters were nothing more than some sort of striking surface attached to the end of a long stick. -Jack Handey -- 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: ValidatorPlugin and Dynamic Action Forms?
On Mon, 3 Jun 2002, Honman Lee wrote: Date: Mon, 3 Jun 2002 16:43:59 -0700 From: Honman Lee [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: ValidatorPlugin and Dynamic Action Forms? Hello, It's much friendlier to people who search the mailing list archives if you start a new message thread (with a new subject) when you're going to ask a different question. Does struts have a taglib that will provide the functionality for a user to download from an output stream? Thanks for you assistance. You don't really want a tag library for this purpose -- especially if your output is a binary format (which you can't render directly from a JSP). The usual approach is to set up an Action that calls response.setContentType() appropriately, then calls response.getOutputStream() and writes the binary output directly. Finally, you can return null from the Action to indicate (to the controller servlet) that the response has already been created, and that no forwarding is necessary. Alternatively, if your dynamic content is created by some other servlet, you can just set up a forward to that servlet and let it do the work. Or, if it's a static file, just make the context-relative path of that file your forward path, and the container should send the output for you. Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re[2]: related to: Re: #2 - Use DispatchAction to organize related operations
On Monday, June 3, 2002, 10:58:07 PM, Chuck Cavaness wrote: CC What I suggest is to look at the processPreprocess() method in the CC RequestProcessor and possibly override this to do your checks. It's called CC for every request and long before ActionForm's are populated and Action's CC are invoked. The default value is to return true, which allows request CC processing to continue. What I've done in the past is to override this, CC check the login, and possibly redirect the user to the login page. If the CC user's logged in, just return true to continue processing the request. Excellent idea. Thanks. You are right I wouldn't even want form validation to take place if they weren't logged in ( which would be allowed to happen if I only checked in the action ). I take it I'll have access to the session as well inside of RequestProcessor, because if I go this route I will also need to check for particular roles that will be stored in a UserBean put in the Session and possibly deny or grant access based on these roles. -- Rick mailto:[EMAIL PROTECTED] I wish I had a dollar for every time I spent a dollar, because then, Yahoo!, I'd have all my money back. -Jack Handey -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]