RE: Antwort: RE: VA 3.5.2
Thank but I was asking for a way to say it under WAS Gui (admin console). Because I am not sure to understand : WAS can't read the web.xml file, can it ? Instead I must register the servlet into the admin console. I have done with it. But now, how can I specify the automatic redirection ? Am I wrong ? -Original Message- From: Dan Miser [SMTP:[EMAIL PROTECTED]] Sent: mardi 15 mai 2001 22:37 To: [EMAIL PROTECTED] Subject: RE: Antwort: RE: VA 3.5.2 Take a look at the servlet-mapping in web.xml. servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping -- Dan Miser http://www.distribucon.com From: Noel Sebastien [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: Antwort: RE: VA 3.5.2 Date: Tue, 15 May 2001 18:17:22 +0200 Where do you specify that every URI (*.do) is redirected to the servlet ? _ Get your FREE download of MSN Explorer at http://explorer.msn.com - An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. - - Un courrier électronique n'engage pas son émetteur. Tout message susceptible de comporter un engagement doit être confirmé par un écrit dûment signé. An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. Ein elektronischer Brief bzw. eine elektronische Nachricht ist für den Absender nicht verbindlich. Jede Nachricht, welche eine Verpflichtung beinhaltet, muß schriftlich bestätigt und ordnungsgemäß unterzeichnet werden. -
RE: Caching Problem
Hi David You got the problem right well i have tried using only the last line of your code response.addDateHeader(Expires, 1); in my code it does not work maybe this will solve the problem. Hi Dinesh, Not sure if this is what you mean, but here goes: If you set the following headers into the JSPs response, the page will not be cached. Use the following scriptlet in the page to take care of this % response.addHeader(Pragma, NoCache); response.addHeader(Cache-Control, no-cache); response.addDateHeader(Expires, 1); % Take a look at http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg245850.pdf Section 6.5.6 for more information on this subject. Hope this helps. Rgds David -Original Message- From: Dinesh Chaturvedi [mailto:[EMAIL PROTECTED]] Sent: 15 May 2001 14:02 To: [EMAIL PROTECTED] Subject: Caching Problem Hello Every body I am facing a problem ,i want My JSP Page not to take content from chache can anybody help me. Thanks Regards Dinesh Chaturvedi Programmer Analyst Nihilent Technologies Pvt Ltd. Pune 091-20-6054452 Ext 349 The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, you must not read, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com ***
Re: java script struts + scriptlet
html:button property=btnInform onclick=return informInventoryLack('%= orderItemData.getId() %\')bean:message key=button.order//html:button Maybe could you try this (without the / at the end of the scriplet) : html:button property=btnInform onclick=return informInventoryLack('%=orderItemData.getId() %')bean:message key=button.order//html:button Let me know if it works Laurent
XBrowser Hide And Show Problem
Hello Everybody I am using a div tag in my html page and trying to hide and show a text field at run time this works fine while using IE but when i am using Netscape 4.x.it gives me problem accessing document.forms[0].divName i have found that in netscape div is not a part of from abject and used document.divName also but still it is creating a problemdo anybody of you have a suggestion.or can anybody tell me where to consult.. Thanks Regards Dinesh
RE: connection pool problem (with Beta release)
Debug through it and look what kind of rows are really selected from the db the first time. I have seen this behaviour many times but it was always a caching problem at the browser site. Because the selected data was right the first time. johan -Original Message- From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:11 AM To: '[EMAIL PROTECTED]' Subject: RE: connection pool problem (with Beta release) Okay another symptom - the problem persists even when i set the isolation to read_uncommitted. -Original Message- From: Gogineni, Pratima Sent: Tuesday, May 15, 2001 3:35 PM To: '[EMAIL PROTECTED]' Subject: connection pool problem (with Beta release) I have a very odd problem - I was hoping the symptoms sound familiar to someone on the list... I display a database table to the user in the jsp page the user can insert/delete or update into this table - this is sent to an action class that uses the struts connection pool and executes the appropriate sql statement After executing the sql statement I go back to jsp page that displays the data in the table. my problem is that I need to query the database twice before the new data is shown (for example if I add row#11). I see only 10 rows the first time I query the database after the insert statemetn is executed. The second time I query the database I get all 11 rows. I have autoCommit set to false. I call the commit() method on the connection after the insert statement is executed and I have the transaction isolation set to TRANSACTION_READ_COMMITTED. Another symptom is that I dont always see this problem - only in some runs, which leads me to suspect that this is a threading issue? Does anyone know what the problem could be / what I should check/lookout for? Thanks Pratima -Original Message- From: Roy Truelove [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 7:51 PM To: [EMAIL PROTECTED] Subject: Web design forum / listserv Hey guys, I'd like to know if anyone knows of a listserv / forum / newsgroup that deals solely with web application design philosophies, and not necessarily with their implementations. I read several lists (this one, Turbine, JSP, barracuda,) and most of the traffic is geared toward problems *using* the framework. A place where people could go and discuss things like MVCm2, push/pull etc. I believe would be very beneficial. If someone knows of a forum like this, please let me know. Thanks! -Roy
problem with attribute
Hi I'm a newbie to Struts so I'm sorry if this is a basic error but I can't figure out what I'm doing wrong. I want to pass an attribute to a tag library I wrote as follows: app:linkCreateProcess page=/createprocess.do? templateid=1006 This is the snippet from my app.tld: tag namelinkCreateProcess/name tagclasscom.myTest.LinkCreateProcessTag/tagclass attribute namename/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute namepage/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute attribute nametemplateid/name requiredfalse/required /attribute /tag But when I try to access the JSP page I get the following: Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:476) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) (etc) The createprocess code works with hard coded values for templateid so I'm fairly sure it's the way I'm using the attribute that's the problem Can anyone shed any light on this? Thanks Niall
National characters don't reach Action class correctly
Hi, I need help on this: Problem is, I can see national characters on jsp pages correctly, but when I post data to an Action, the string gets messed up. I couldn't find related info in the archive. Related lines on my jsp page: %@ page contentType=text/html; charset=ISO-8859-9 % html:html locale=true FORM METHOD=POST ACTION=UpdateWoplan.do INPUT TYPE=text NAME=fieldname size=5 value=bean:write name=wpl property=laborhrs/ /FORM (I had to use the FORM tag because I have indexed fieldnames) And my Action class looks like: public class UpdateWoplanAction extends Action { ... System.out.println(request.getParameter(fieldname); } I cannot get the correct string here. Instead I get s for national characters like ÐÞðþ. I couldn't figure out where the problem is - in Struts or in Tomcat. But I did a test without using Struts, and the correct string is recognized by a servlet then. Any help will be very much appreciated. Thanks, Turgay. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
FormTag-problem, bug or a feature?
I have a problem with the form-tag action-attribute when I use newer builds of struts. Is it a bug or a feature? maybe a buggy feature... Before, the action-attribute was not touched i.e. what one wrote in the .jsp-file was the same that came out after the taglibs rendering. Now the taglib tries to be clever, it is putting the web application name in front of what's in the action-attribute. An example might be more clear: Imagine a web-application with the name of web-application. We look into the form-tag of a .jsp-file e.g. dothethang.jsp: Earlier versions: html:form action=something.do name=someForm type=this.is.the.type.someForm was translated into: form name=someForm method=POST action=something.do Newer versions: html:form action=something.do name=someForm type=this.is.the.type.someForm is translated into: form name=someForm method=POST action=/web-application/something.do So why is this a problem? Well, this is a major problem if you have a proxy webserver with pathtrim of the url. e.g. if the original url is www.someplace.com/place1/web-application/dothethang.do the proxy might filter it so the servlet-container thinks the url is www.someplace.com/web-application/dothethang.do. If we look at the form-tag examples above the older version will post the form to www.someplace.com/place1/web-application/something.do while the latter will post the form to www.someplace.com/web-application/something.do ! Is there anyway this might change? This is quite a disaster if you use proxy webserver with pathtrim. Erik __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: struts-template and MVC
Hi Dan, Struts 'actions' do a forward at the end. This forbid to insert an action in a template, because you can't do a forward once you have start to write the request response. A solution to your problem is, using Components implementation, to replace tag template:get name='body' / with following : template:useAttribute name=body classname=java.lang.String/ bean:include id=bodyStr page=%=body% / bean:write name=bodyStr filter=false/ It may be interesting to be able to insert a page through an action, as you propose. This is not very hard to implement with Components. Need to look at this possible behavior more closely. Cedric P.S.: If you want to try immediately your solution with components, you can do following quick and dirty code change in component.ComponentActionServlet.jsp : In method processForward(...), at the end of the class, change call to rd.forward(request, response); in : try { // original behavior rd.forward(request, response); } catch( IllegalStateException ex ) { // Response already committed : do include rd.include( request, response); } After that, you will be able to 'insert' an action from a template (but there will be some problems if your 'action' forward to a definition name). Dan Miser wrote: I originally wrote a Struts app that acted much like the struts-example. I feel it's a good separation of business logic from presentation, and that it follows the principles of MVC pretty well. Now the GUI developers are looking to integrate all of my very ugly HTML pages into a common look and feel. I thought that the struts-template mechanism would be perfect. I can define my header, sidebar, footer and dynamic content using this library. However, I noticed that the struts-template mechanism seems to be based on JSP pages, as opposed to actions. For example, the InsertTag class' doEndTag method calls pageContext.include, so I can't simply specify: template:put name='content' content='/displayRoles.do?type=external'/ When I do that, I get an exception (which makes sense). I'd like the best of both worlds by providing the templating capability and still keeping my action-based web site. I was thinking of extending the template:put tag to accept something like this: template:put name='content' action='/displayRoles.do?type=external'/ That way, the action class will execute and eventually forward itself on to the success page defined in struts-config.xml. So, did I miss something here? Is my analysis of this situation right? Are people using struts-template in a capacity other than a layout/presentation manager? Would the Components framework by Cedric solve this? Finally, if I got it all right, is there any interest in seeing this type of extension? Thanks for your time. -- Dan Miser http://www.distribucon.com _ Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: struts-template and MVC
h, that's very strange. i'm using the following: template:insert template='/shared/chapterTemplate.jsp' template:put name='header' content='/shared/header.jsp' / template:put name='features' content='/eForum/forumListLoad.do?forward=topForums' / /template:insert and i don't have any problems - the include works fine (acts as bean:include) if the above doesn't work for you, try the following: template:insert template='/shared/chapterTemplate.jsp' template:put name='header' content='/shared/header.jsp' / template:put name='features' bean:include id='xout2' page='/eForum/forumListLoad.do?forward=topForums'/ %= xout2 % /template:put /template:insert i have tested this with Resin 1.2.5 and JRun Server 3.0 SP2a, Struts nightly build from 12.May.2001 danail -Original Message- From: Dan Miser [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 8:35 PM To: [EMAIL PROTECTED] Subject: struts-template and MVC I originally wrote a Struts app that acted much like the struts-example. I feel it's a good separation of business logic from presentation, and that it follows the principles of MVC pretty well. Now the GUI developers are looking to integrate all of my very ugly HTML pages into a common look and feel. I thought that the struts-template mechanism would be perfect. I can define my header, sidebar, footer and dynamic content using this library. However, I noticed that the struts-template mechanism seems to be based on JSP pages, as opposed to actions. For example, the InsertTag class' doEndTag method calls pageContext.include, so I can't simply specify: template:put name='content' content='/displayRoles.do?type=external'/ When I do that, I get an exception (which makes sense). I'd like the best of both worlds by providing the templating capability and still keeping my action-based web site. I was thinking of extending the template:put tag to accept something like this: template:put name='content' action='/displayRoles.do?type=external'/ That way, the action class will execute and eventually forward itself on to the success page defined in struts-config.xml. So, did I miss something here? Is my analysis of this situation right? Are people using struts-template in a capacity other than a layout/presentation manager? Would the Components framework by Cedric solve this? Finally, if I got it all right, is there any interest in seeing this type of extension? Thanks for your time. -- Dan Miser http://www.distribucon.com _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: Radio Button question
Amar, I was looking for a similar solution too. I was wondering how do i disable a radio button/ check box when the page to be displayed is just read only.. I can use the normal form elements to get the job done but is it possible using Struts??? Shane.. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Problem Combining Struts And Homegrown Taglibs
We're having a problem using custom JSP tags with Struts that we're hoping someone can help with. We have two JSP pages: one that uses a Struts taglib and another that uses both Struts taglibs and a home-grown taglib. When we enter erroneous data into the page that only uses the Struts taglib, the framework returns an HTML page that displays the original form and data, plus the appropriate error messages. This is the desired result. When we enter erroneous data into the page the uses both Struts and homegrown taglibs, the framework returns an HTML page that displays the original form elements WITHOUT THEIR DATA, plus the appropriate error messages. We'd like the behavior to be like the first case, where the data is sent back along with the form elements. Can anyone explain why using a homegrown taglib might have caused this? Is there something in the custom tag API that we've missed? Thanks - MOD
RE: Comparing two dynamic values
thank you - will give that a go. From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Comparing two dynamic values Date: Tue, 15 May 2001 12:12:57 -0400 Tony, You could make the href point to an action path, and that way you will go through the action before displaying page... Dave Tony Karas [EMAIL PROTECTED] on 05/15/2001 07:12:40 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Comparing two dynamic values Well I suppose that's a point - problem is that I am not doing a submit - just doing a click via a a href so my action bean will not get called - suppose i could do some kind of javascript but it's all a little messy. From: Eelco van Kuik [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: '[EMAIL PROTECTED]' [EMAIL PROTECTED] Subject: RE: Comparing two dynamic values Date: Mon, 14 May 2001 15:01:01 +0200 It sounds to me like you're putting controller code in de view code. Maybe it is better to try to take care of it in the ActionForm/Action beans. Regards, Eelco -Original Message- From: Tony Karas [mailto:[EMAIL PROTECTED]] Sent: maandag 14 mei 2001 14:29 To: [EMAIL PROTECTED] Subject: Comparing two dynamic values I'm trying to compare a parameter value passed in as part of the URL with a bean value. So I have something like this: logic:iterate id=element name=retailerForm property=retailers logic:match name=element property=id value= . . /logic:match /logic:iterate In the value field - it says in the documentation that this has to be a constant value - which is pretty useless to me. I've tried: value=%= request.getParameter( id ) % but I get an error. Should this be possible? Anyone know if there is a more Struts way of doing it? Cheers Tony _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
RE: Radio Button question
Hi Shane , you can doa small hack . Have a Radio Button / Checkbox image. In your iterate tag use the logic:equal tag to find out if it is read only. If read only flag is true, show the image else show the Radio Button. Hope this helps. cheers, Amar.. -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 9:30 AM To: [EMAIL PROTECTED] Subject: Re: Radio Button question Amar, I was looking for a similar solution too. I was wondering how do i disable a radio button/ check box when the page to be displayed is just read only.. I can use the normal form elements to get the job done but is it possible using Struts??? Shane.. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: XBrowser Hide And Show Problem
in netscape it is document.layers that contains all the div tags. And it it also helpful to realize that in netscape every layer itself is a DOM. You can probably find details in a not-out-of-date Javascript book. Good luck! -Original Message- From: Dinesh Chaturvedi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:43 AM To: [EMAIL PROTECTED] Subject: XBrowser Hide And Show Problem Hello Everybody I am using a div tag in my html page and trying to hide and show a text field at run time this works fine while using IE but when i am using Netscape 4.x.it gives me problem accessing document.forms[0].divName i have found that in netscape div is not a part of from abject and used document.divName also but still it is creating a problemdo anybody of you have a suggestion.or can anybody tell me where to consult.. Thanks Regards Dinesh
Re: Design Suggestion
This question has already been debated in struts-dev in Nov; 2000. Unfortunately, online archive is not available for this thread. I join a copy of Craig McClanahan response. Cedric Craig R. McClanahan wrote: Cedric Dumoulin wrote: I would like to know why Struts uses base classes rather than interfaces with default implementations. As example, I am interested to know why ActionForm is an abstract class rather than an Interface (as in previous Struts versions). Could you explain me the reasons ? From my perspective, there are a couple of reasons that ActionForm is turning into a class instead of an interface: * EXTENDABILITY. Adding a new method to an ActionForm interface (in some future version of Struts) will cause any application's form beans to become incompatible -- unless they happened to implement the convenience base class that was provided. With ActionForm as a class, the only beans that are incompatible are those who have a method name clash. * CORRECT USE. If ActionForm were an interface, you would be tempted to use existing data beans as an ActionForm. IMHO, ActionForm is part of the presentation layer (for reasons that have been discussed on the mailing lists previously) and the provided APIs should encourage using it that way. For my point of view, it seem that using base classes rather than interfaces close some doors in this case : With a base class, you have to extends the class, which forbid any others classe inheritances. But, an ActionForm is used to expose properties from, lets say, business logic objects (BO). So, you must implement your action form with a delegate of your BO. If later you modify your BO (customization for a new client), you need to modify your action form. This will not happen if your action form can extend the BO (or its data representation), and use a delegate for the ActionForm interface. So, why closing this possibility ? Do I miss something ? Consider that your business object has property setters that match the form fields (a very typical case). Do you have any internal validation in your setters to, for example, disallow a null or zero-length value for a required field? If you do, then this bean is *not* appropriate for use as an ActionForm - because the API contract for an ActionForm is that it faithfully represents the input that the user submitted (so that it can be reproduced), whether or not that input is semantically valid. There are additional problems with the fact that -- especially if you use EJBs as your business objects -- you are starting transactions (and potentially locking resources in the underlying database), when the user may never come back. Applications will scale better if you don't start initiating the database transactions until a semantically valid input has been accepted. Cedric Craig McClanahan
page flow control
Hi, In the site I'm developing, there are sections that have forms on consecutive pages, I want to guarantee that pages are navigated: page1 - page2 - pageN. At the same time allowing back and forward navigation to change values entered on previous pages. After the last submit, the only valid page in the sequence is then page1. I've had a look at the Struts Token functionality but I don't think it can support this functionality. Is it possible with Tokens or some other way? Thanks in advance Nathan
Problem
I have the exact same problem as one of the user that described it previously in the user list: org.apache.jasper.JasperException: Unable to open taglibrary /WEB-INF/struts-bean.tld : Parse Error in the tag library descriptor: Character conversion error: Unconvertible UTF-8 character beginning with 0xb4 (line number may be too low). I am running on Tomcat 3.2.1 standalone. In January, the user was running 3.1 and the advice was to get 3.2.1 or 4.0. It would be nice if you would let me know since I did not find any answer. Thanks! jml
Struts/Turbine
We are a team of software engineers working on the implementation of a collaborative tool as a web-based application. How Struts would be better as an implementation framework as opposed to Turbine to implement such features for our future product: extensibility like adding add-on components (e-mails, bbs) user authentification/access control customization of the UI internationalization What is the biggest advantage to use Struts and its biggest drawback. Also, what would be your recommendation as an IDE for Struts. Sincerely jml
Re: National characters don't reach Action class correctly
Turgay, If you use Tomcat 4.0 (servlet spec 2.3), you can just wirte: request.setCharacterEncoding(ISO-8895-9); System.out.println(request.getParameter(filename)); If you use Tomcat 3.2 (Servlet spec 2.2), String data = request.getParameter(filename); byte[] raw = data.getBytes(ISO-8859-1); System.out.println(new String(raw, ISO-8859-9)); hope this helps, Peiqiang Han Turgay Zengin wrote: Hi, I need help on this: Problem is, I can see national characters on jsp pages correctly, but when I post data to an Action, the string gets messed up. I couldn't find related info in the archive. Related lines on my jsp page: %@ page contentType=text/html; charset=ISO-8859-9 % html:html locale=true FORM METHOD=POST ACTION=UpdateWoplan.do INPUT TYPE=text NAME=fieldname size=5 value=bean:write name=wpl property=laborhrs/ /FORM (I had to use the FORM tag because I have indexed fieldnames) And my Action class looks like: public class UpdateWoplanAction extends Action { ... System.out.println(request.getParameter(fieldname); } I cannot get the correct string here. Instead I get s for national characters like ÐÞðþ. I couldn't figure out where the problem is - in Struts or in Tomcat. But I did a test without using Struts, and the correct string is recognized by a servlet then. Any help will be very much appreciated. Thanks, Turgay. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Iterate and Radio tags
Hi All, I am using a Radio Button in an Iterate Tag. I would like to give a unique id value to each and every radio button. The name of the button will be the same but the value will be different. So if a user clicks ona particular radio button, i will know which value is he looking for ? Is this possible using the struts html:radio tag ? or do i need to use a different tag ? cheers, Amar..
RE: page flow control
Write a flow controller which does this. Look at the pet-store example app for inspiration. cheers, Amar.. -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 10:09 AM To: struts-user Subject: page flow control Hi, In the site I'm developing, there are sections that have forms on consecutive pages, I want to guarantee that pages are navigated: page1 - page2 - pageN. At the same time allowing back and forward navigation to change values entered on previous pages. After the last submit, the only valid page in the sequence is then page1. I've had a look at the Struts Token functionality but I don't think it can support this functionality. Is it possible with Tokens or some other way? Thanks in advance Nathan
Re: page flow control
Do search for Wizard in mail-archive.com under struts-user. You'll find a few examples. - jeff - Original Message - From: Nathan Coast [EMAIL PROTECTED] To: struts-user [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 10:09 AM Subject: page flow control Hi, In the site I'm developing, there are sections that have forms on consecutive pages, I want to guarantee that pages are navigated: page1 - page2 - pageN. At the same time allowing back and forward navigation to change values entered on previous pages. After the last submit, the only valid page in the sequence is then page1. I've had a look at the Struts Token functionality but I don't think it can support this functionality. Is it possible with Tokens or some other way? Thanks in advance Nathan
Populating HTML text field value property with a Bean property.
Hi, I am a new Struts user and am not sure as to how to populate a struts HTML text field's value property with the property of a bean without manipulating it in ActionForm. For example i need to initialize the value with a bean's property. html:text property=emp_id size=10 value= maxlength=10/ Thanks in advance. Mohan Venkataraman.
Cannot get request dispatcher for path http://cnn.com ?
Hi, I have a wizard-style app that I've configured in my struts-config.xml as below. Not sure I like it yet, but I have my Action class send the user to the next JSP page each time the user hits the 'Next' button (design swiped from msg in this group). When they're finished, I wish to send them to a page outside the context of my app (e.g. http://cnn.com). The error msg I get is: 2001-05-16 11:02:38 - Ctx( /MyApp ): 500 R( /MyApp + /step1.do + null) Cannot get request dispatcher for path http://cnn.com/ 2001-05-16 11:02:38 - Ctx( /MyApp ): Handler null null I'm guessing there are many ways to do this, but I wanted to see how/why I might be using the 'forward-path' directive for something it might not be intended?? = struts-config.xml = ... action path=/step1 type=com.lmt.provadmin.Step1Action name=step1Form scope=request unknown=false validate=true forward name=default path=/step1.jsp/ forward name=step1 path=/step1.jsp/ forward name=step2 path=/step2.jsp/ forward name=step3 path=/step3.jsp/ forward name=step4 path=/step4.jsp/ forward name=step5 path=http://cnn.com// forward name=error path=/error.jsp/ /action ... = __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: page flow control
Some one has ever post a set a class than enable a sort of flow control. You can find it on the malling list archive, the subject is Re: Struts questions for evaluation - Struts framework enhancement. He uses the previous action path, as a identifier... I personnaly think that previous action is not enought, and that we must consider the previous action result... Laurent -Message d'origine- De : Nathan Coast [mailto:[EMAIL PROTECTED]] Envoyé : mercredi 16 mai 2001 16:09 À : struts-user Objet : page flow control Hi, In the site I'm developing, there are sections that have forms on consecutive pages, I want to guarantee that pages are navigated: page1 - page2 - pageN. At the same time allowing back and forward navigation to change values entered on previous pages. After the last submit, the only valid page in the sequence is then page1. I've had a look at the Struts Token functionality but I don't think it can support this functionality. Is it possible with Tokens or some other way? Thanks in advance Nathan = Ce message et toutes les pièces jointes sont propriété de VALTECH et susceptibles de contenir des informations confidentielles à l'intention exclusive de ses destinataires. Si vous avez reçu ce message par erreur ou si celui ci vous est parvenu incomplet ou altéré, merci d'en avertir l'expéditeur par retour.Toute utilisation, diffusion ou publication non expressément autorisée par nous par écrit est strictement interdite. -- This message and any attachments are Valtech property and may contain iconfidential information intended solely for the addressees. If your are not the intended recipient of this message or if you have received it uncomplete or altered, please notify the author by replying to his e-mail immediately. Any unauthorised use, diffusion or dissemination not expressly authorised by us in writing is strictly prohibited. = Copyright Valtech 2000
Re: page flow control
Lets work out a diagram that explains the flow, Tokens should be able to do this.. if there is both a SaveXXXAction and EditXXXAction for all JSP accessed, Action JSP Page EditPage1Set Token Page 1 SavePage1 CheckToken if valid Forward - go to EditPage2Action Redisplay -setToken, forward to Page1.jsp Save EditPage2SetToken Page2 SavePage1 CheckToken if valid Forward - go to EditPage3Action Back -Forward to EditPage1Action Redisplay -setToken, forward to Page2.jsp Save EditPage3ActionSetToken Page3 SavePage3Action CheckToken if valid Back -Forward to EditPage2Action Redisplay -setToken, forward to Page3.jsp Save If there are any holes in this they can be plugged, such as going between SavePage2Action - EditPage1Action; Based on the struts example usually the request parameter named 'action' can be Create, Edit, List, ListSubset, we also use a value of InProcess which means that this Wizard page has already been accessed before. -Rob Nathan Coast wrote: Hi, In the site I'm developing, there are sections that have forms on consecutive pages, I want to guarantee that pages are navigated: page1 - page2 - pageN. At the same time allowing back and forward navigation to change values entered on previous pages. After the last submit, the only valid page in the sequence is then page1. I've had a look at the Struts Token functionality but I don't think it can support this functionality. Is it possible with Tokens or some other way? Thanks in advance Nathan -- Robert Leland [EMAIL PROTECTED] 804 N. Kenmore Street +01-703-525-3580 Arlington VA 22201
NT authentication
Hi, I know WebLogic and JRun support integration with an NT Realm. I haven't used tomcat so I can't help you there much. I also tried looking on the Internet but could find anything specific. You might have better luck talking to a MS developer. --Abraham
Iterate some values per page ...
Hello, I want to iterate a collection only few rows per page. I have an offset parameter in my request that give the offset. !-- Definition of the offset parameter -- bean:parameter id=offset name=offset value=0/ !-- Iteration -- logic:iterate id=faq length=2 name=faqList offset=% new Integer(offset) % type=be.xyz.faq.form.FAQForm pbean:write name=faq property=question//p pbean:write name=faq property=answer//p /logic:iterate !-- Link to next page (don't works) -- html:link page=/listfaq.jsp?offset=%= Integer.parseInt(offset)+2 %Next/html:link Here is my questions : - Can I define my offset bean as a java.lang.Integer to avoid this code : offset=% new Integer(offset) % ? - How can I build my link to tell that the offset bean must be incremented of 2 and placed in request as offset parameter ? Thanks for your help. Laurent Cornelis
RE: Iterate and Radio tags
Amar I had a situation where I was using a 'for' loop instead of the iterate tag. So to assign a unique value, this what I did. html:radio property=radiobutton value=%= String.valueOf(i) % / where 'i' is the loop counter. Hope this helps. Jawwad -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 10:31 AM To: '[EMAIL PROTECTED]' Subject: Iterate and Radio tags Hi All, I am using a Radio Button in an Iterate Tag. I would like to give a unique id value to each and every radio button. The name of the button will be the same but the value will be different. So if a user clicks ona particular radio button, i will know which value is he looking for ? Is this possible using the struts html:radio tag ? or do i need to use a different tag ? cheers, Amar.. smime.p7s
RE: Cannot get request dispatcher for path http://cnn.com ?
Try changing step 5 to the following; forward name=step5 path=http://cnn.com/; redirect=true/ The javadoc for the ActionForward class says the path should be the Context-relative URI to which control should be forwarded, or an absolute or relative URI to which control should be redirected. Your path is absolute so I think you will need to use a redirect rather than a forward. -Original Message- From: Peter Smith [mailto:[EMAIL PROTECTED]] Sent: 16 May 2001 16:14 To: [EMAIL PROTECTED] Subject: Cannot get request dispatcher for path http://cnn.com ? Hi, I have a wizard-style app that I've configured in my struts-config.xml as below. Not sure I like it yet, but I have my Action class send the user to the next JSP page each time the user hits the 'Next' button (design swiped from msg in this group). When they're finished, I wish to send them to a page outside the context of my app (e.g. http://cnn.com). The error msg I get is: 2001-05-16 11:02:38 - Ctx( /MyApp ): 500 R( /MyApp + /step1.do + null) Cannot get request dispatcher for path http://cnn.com/ 2001-05-16 11:02:38 - Ctx( /MyApp ): Handler null null I'm guessing there are many ways to do this, but I wanted to see how/why I might be using the 'forward-path' directive for something it might not be intended?? = struts-config.xml = ... action path=/step1 type=com.lmt.provadmin.Step1Action name=step1Form scope=request unknown=false validate=true forward name=default path=/step1.jsp/ forward name=step1 path=/step1.jsp/ forward name=step2 path=/step2.jsp/ forward name=step3 path=/step3.jsp/ forward name=step4 path=/step4.jsp/ forward name=step5 path=http://cnn.com// forward name=error path=/error.jsp/ /action ... = __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: struts-template and MVC
HOW THE HELL DO I UNSUBSCRIBE FROM THIS LIST -Original Message- From: Mark Simms [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 6:50 PM To: [EMAIL PROTECTED] Subject: Re: struts-template and MVC Sounds greatgo for it Dan, but try to get more info on the component specification.little seems to be known about it. - Original Message - From: Dan Miser [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 8:34 PM Subject: struts-template and MVC I originally wrote a Struts app that acted much like the struts-example. I feel it's a good separation of business logic from presentation, and that it follows the principles of MVC pretty well. Now the GUI developers are looking to integrate all of my very ugly HTML pages into a common look and feel. I thought that the struts-template mechanism would be perfect. I can define my header, sidebar, footer and dynamic content using this library. However, I noticed that the struts-template mechanism seems to be based on JSP pages, as opposed to actions. For example, the InsertTag class' doEndTag method calls pageContext.include, so I can't simply specify: template:put name='content' content='/displayRoles.do?type=external'/ When I do that, I get an exception (which makes sense). I'd like the best of both worlds by providing the templating capability and still keeping my action-based web site. I was thinking of extending the template:put tag to accept something like this: template:put name='content' action='/displayRoles.do?type=external'/ That way, the action class will execute and eventually forward itself on to the success page defined in struts-config.xml. So, did I miss something here? Is my analysis of this situation right? Are people using struts-template in a capacity other than a layout/presentation manager? Would the Components framework by Cedric solve this? Finally, if I got it all right, is there any interest in seeing this type of extension? Thanks for your time. -- Dan Miser http://www.distribucon.com _ Get your FREE download of MSN Explorer at http://explorer.msn.com
ActionForm Instantiation
I am using instances of my ActionForm for showing a list prior to showing the detail. I do this because I don't want to duplicate the data structures. To better explain, I have an ActionForm called ProfileForm. I have a jsp that uses ProfileForm to display and edit in the struts fashion. To get to the edit jsp, I have a listing jsp. I used multiple instances of the ProfileForm class to show 25 profiles at time. This actually done in my ListProfileAction as such: for ( int i = 0 ; rs.next() ; i++ ) { profileEntry = new ProfileForm() ; profileEntry.setServlet(getServlet()) ; profileEntry.setProfileno(as.getInt(PROFILENO)) ; try { profileEntry.queryMaster(mapping, request) ; } catch ( Exception e ) { throw new ServletException((ProfilForm): + e.toString()) ; } profileEntry.setSeq(Integer.toString(i % 2)) ; profileEntry.setRecordStatus(QUERIED) ; profileList.add(profileEntry) ; } I get a NullPointerException on the try/catch block. It appears to be because the ProfileForm instance (which extends ActionForm) is not being initialized correctly. Am I missing anything that will make an ActionForm fully initialized? I know this might look strange, but besides object reuse, another implication here is to fully populate my forms before they're are shown in detail. If this just isn't possible, I'll probably just try going about this differently. But it'd be so cool to reuse my objects in this manner. Anthony It is by caffeine alone I set my mind in motion. It is by the Beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
RE: pager tag , iterate tag and displaying data as rows in a table
Never mind. figured it out myself and it works just fine cheers, Amar.. -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:30 PM To: '[EMAIL PROTECTED]' Subject: pager tag , iterate tag and displaying data as rows in a table Hi All, I am using a pager tag that i got from jsptags.com I am using it in conjunction with the struts logic:iterate tag to spit out a bunch of rows. The question i have is.. Is it possible to get the index of the current element in the iteration ? The reason for asking this is that i am using a unique index for every item in the row ( I am using a Radio Button for this). When i page back and forth i want to make sure that the unique id the client is getting (for every row) is the index to the current element in the Collection. If i am paging forward, i should get rows in ascending order, and if i am paging backward i should get rows in descending order. Can anybody help me out here. Thanks a lot. I am attaching some code (which is not working proplery) here which should give people some pointers pg:pager pg:param name=keywords/ logic:iterate id=groupsList name=statesBean property=states pg:item html:radio name=statesBean property=selectedIndex value=%= statesBean.getIndex() % / bean:write name=groupsList property=countryName / html:link page='%= /someAction.do?selectedIndex= + statesBean.getIndex() %' bean:write name=groupsList property=description / /html:link BR /pg:item /logic:iterate /pg:param /pg:pager cheers, Amar..
Can a Multibox be wired to use Vectors instead of String[]
I'd like my getters and setters on the form use Vectors instead of string arrays. Can this be accomplished? When I tried I got the following exception: Error: 500 Location: /csr/admin/seq_participant.doInternal Servlet Error:javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java, Compiled Code) at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:1910) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1521) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java:479)
RE: Radio Button question
Amar, The idea's good. But the radio button values have to be set. Like the dbase would hold the values for the radio button or the check box and i have display the disabled radio or checkbox depending on what value is coming from the dbase. html:checkbox property=checkmate disabled=true / We have the property in Struts, i'm not sure whether it works or not ?? Please throw some light.. --Shane __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Iterate and Radio tags
Hi Mani, Try this. It works for meIt is a hack i need to implement in my ActionForm also. logic:iterate id=groupsList name=statesBean property=states html:radio name=statesBean property=selectedIndex value=%= statesBean.getIndexedValue() % / /logic:iterate public class StatesBeanForm extends ActionForm { // this has the corresponding getter and setter private ArrayList states = null ; // a variable which has to store the value of the radio button selected by the user. This also has a getter and setter private String selectedIndex = null ; // setters and getters private ArrayList indexedValue = null ; } -Original Message- From: B Manikandan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 3:05 PM To: [EMAIL PROTECTED] Subject: Re: Iterate and Radio tags Importance: High Hi, I have posted the same question,but did not get any reply.I need to set the value of radio button to a property from my bean. And I need to do this in a iterate. Mani Nanduri, Amarnath wrote: Hi All, I am using a Radio Button in an Iterate Tag. I would like to give a unique id value to each and every radio button. The name of the button will be the same but the value will be different. So if a user clicks ona particular radio button, i will know which value is he looking for ? Is this possible using the struts html:radio tag ? or do i need to use a different tag ? cheers, Amar..
RE: Forwarding to a specific target frame
Hi, I believe that what you are asking for cannot be done by the server. This is because the server cannot push anything without the browser requesting it. It is the browser's decisions to output the data (html page, ...) in a particular frame (the server has no control over this). You usually use the target attribute in an a href= ../a tag to accomplish this. There is also a target property that can be found in the form object using client side javascript. example: html head script language=Javascript !-- function redirectToFrame(form) { // This will cause all feed back from the server to be sent to the frame // specified by the target property. form.target=mainFrame; // Specify the window or frame name form.submit(); } // -- /script /head body html:form html:submit ... onclick=redirectToFrame(this.form);/ /html:form /body /html I'm giving you this information from the top of my head so you may need to tweak this a little. Note: After the submit operation the target remains the same (that is mainFrame) so you must find a way to set it back to the original target after you have retrieved the data you submitted for. There may be other alternatives that I am not aware of. Pawel -Message d'origine- De : James Howe [mailto:[EMAIL PROTECTED]] Envoye : mercredi 16 mai 2001 13:19 A : [EMAIL PROTECTED] Objet : Forwarding to a specific target frame Is there a way to get a struts action to forward to a particular target frame? I have a page which contains two internal frames (iframes). One of the internal frames contains a form. When this form is submitted or cancelled, I want to display a different page in my main frame. What is currently happening, is that my forward ends up putting the forwarded page my iframe. I have a feeling that I'm somehow going to have to restructure my page, but that will be really inconvenient to do. If there is anyway to get a forward to go to a particular frame target, I would love to hear how to do it. Thanks.
Trouble setting properties of an ActionForm bean
I'm hoping this issue is me just not understanding the JavaBeans spec! When I make the getter method of my ActionForm property a non-String type, the 'set' method for that property is not called when a request is made. I traced this to BeanUtils.java which gets a 'null' returned by 'propertyDescriptorInstance'.getWriteMethod() for the offending method. The code for my ActionForm with the offending property is shown below. I changed the return type of getShowInstructions() to boolean instead of String. Thanks for any advice. --Peter-- - ... private String showInstructions_; public void setShowInstructions( String showInstructions ) { showInstructions_ = showInstructions; } public boolean getShowInstructions() { return ( Boolean.valueOf( showInstructions_ ) ).booleanValue(); } ... __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
OQL = SQL library???
i searched the web without much luck. i was wondering if anyone here has had experience using any kind of a programmatic SQL builder library/class. i would like to dynamically generate some of the multitude of SQL strings that i currently simply write in as strings in my code to pass on to JDBC or query beans which all use SQL. so something like : SQLQuery query = new SQLQuery(); query.setValue(employeeid, as id); query.setValue(name, as name); query.setValue(company, as company); query.setWhereEquals(company, acme); query.setOrderby(employeeid); query.toString() thanks for any info! jae
RE: pager tag , iterate tag and displaying data as rows in a table
so how did you do it? -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 3:58 PM To: '[EMAIL PROTECTED]' Subject: RE: pager tag , iterate tag and displaying data as rows in a table Never mind. figured it out myself and it works just fine cheers, Amar.. -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:30 PM To: '[EMAIL PROTECTED]' Subject: pager tag , iterate tag and displaying data as rows in a table Hi All, I am using a pager tag that i got from jsptags.com I am using it in conjunction with the struts logic:iterate tag to spit out a bunch of rows. The question i have is.. Is it possible to get the index of the current element in the iteration ? The reason for asking this is that i am using a unique index for every item in the row ( I am using a Radio Button for this). When i page back and forth i want to make sure that the unique id the client is getting (for every row) is the index to the current element in the Collection. If i am paging forward, i should get rows in ascending order, and if i am paging backward i should get rows in descending order. Can anybody help me out here. Thanks a lot. I am attaching some code (which is not working proplery) here which should give people some pointers pg:pager pg:param name=keywords/ logic:iterate id=groupsList name=statesBean property=states pg:item html:radio name=statesBean property=selectedIndex value=%= statesBean.getIndex() % / bean:write name=groupsList property=countryName / html:link page='%= /someAction.do?selectedIndex= + statesBean.getIndex() %' bean:write name=groupsList property=description / /html:link BR /pg:item /logic:iterate /pg:param /pg:pager cheers, Amar.. smime.p7s
RE: Radio Button question
Shane, It works for me. The value in the Radio Button is dynamic. I am at present setting an index for each Radio Button. When the user submits information back, i know what index it is based on the value selected in the Radio Button. I then lookup in the ArrayList on this index and get my correct object to deal with my logic.. In your case you are holding the values of the Radio Buttons inside the database. You might want to call a method with an index and the method will return the value based on the index you send in. A brief example would be.. % int i = 0 ; % logic:iterate id=groupsList name=statesBean property=states html:radio name=statesBean property=selectedIndex value=%= statesBean.getIndexedValue(i) % / % i++ ; % /logic:iterate where the property is the actual value you are trying to compare and value is got from the database... This is not pretty but it serves the purpose whether it is a Radio button or a Checkbox...Struts compares the property to the value. If both match then the checkbox is checked, else the checkbox will not be selected... Hope this helps. Took me a whole day to figure this out and get it working. cheers, Amar.. -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 4:08 PM To: [EMAIL PROTECTED] Subject: RE: Radio Button question Amar, The idea's good. But the radio button values have to be set. Like the dbase would hold the values for the radio button or the check box and i have display the disabled radio or checkbox depending on what value is coming from the dbase. html:checkbox property=checkmate disabled=true / We have the property in Struts, i'm not sure whether it works or not ?? Please throw some light.. --Shane __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Radio Button question
Also see an other posting i made in struts mailing list.. Iterate and Radio tags and follow the thread. It is self explanatory. cheers, Amar.. -Original Message- From: Shane Warne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 4:08 PM To: [EMAIL PROTECTED] Subject: RE: Radio Button question Amar, The idea's good. But the radio button values have to be set. Like the dbase would hold the values for the radio button or the check box and i have display the disabled radio or checkbox depending on what value is coming from the dbase. html:checkbox property=checkmate disabled=true / We have the property in Struts, i'm not sure whether it works or not ?? Please throw some light.. --Shane __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: Trouble setting properties of an ActionForm bean
As far as I know, the value passed into the setter method must match the value returned by the getter method. It will not work otherwise. Could you return 'true' or 'false' as a String? If you are setting a value of a field, it should work. - eric - Original Message - From: Peter Smith [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 1:54 PM Subject: Trouble setting properties of an ActionForm bean I'm hoping this issue is me just not understanding the JavaBeans spec! When I make the getter method of my ActionForm property a non-String type, the 'set' method for that property is not called when a request is made. I traced this to BeanUtils.java which gets a 'null' returned by 'propertyDescriptorInstance'.getWriteMethod() for the offending method. The code for my ActionForm with the offending property is shown below. I changed the return type of getShowInstructions() to boolean instead of String. Thanks for any advice. --Peter-- - ... private String showInstructions_; public void setShowInstructions( String showInstructions ) { showInstructions_ = showInstructions; } public boolean getShowInstructions() { return ( Boolean.valueOf( showInstructions_ ) ).booleanValue(); } ... __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: pager tag , iterate tag and displaying data as rows in a tabl e
Look at my other posting Iterate and Radio tags. You should find it in the mailing list . cheers, Amar.. -Original Message- From: Sheikh, Jawwad [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 5:27 PM To: '[EMAIL PROTECTED]' Subject: RE: pager tag , iterate tag and displaying data as rows in a tabl e so how did you do it? -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 3:58 PM To: '[EMAIL PROTECTED]' Subject: RE: pager tag , iterate tag and displaying data as rows in a table Never mind. figured it out myself and it works just fine cheers, Amar.. -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:30 PM To: '[EMAIL PROTECTED]' Subject: pager tag , iterate tag and displaying data as rows in a table Hi All, I am using a pager tag that i got from jsptags.com I am using it in conjunction with the struts logic:iterate tag to spit out a bunch of rows. The question i have is.. Is it possible to get the index of the current element in the iteration ? The reason for asking this is that i am using a unique index for every item in the row ( I am using a Radio Button for this). When i page back and forth i want to make sure that the unique id the client is getting (for every row) is the index to the current element in the Collection. If i am paging forward, i should get rows in ascending order, and if i am paging backward i should get rows in descending order. Can anybody help me out here. Thanks a lot. I am attaching some code (which is not working proplery) here which should give people some pointers pg:pager pg:param name=keywords/ logic:iterate id=groupsList name=statesBean property=states pg:item html:radio name=statesBean property=selectedIndex value=%= statesBean.getIndex() % / bean:write name=groupsList property=countryName / html:link page='%= /someAction.do?selectedIndex= + statesBean.getIndex() %' bean:write name=groupsList property=description / /html:link BR /pg:item /logic:iterate /pg:param /pg:pager cheers, Amar..
RE: pager tag , iterate tag and displaying data as rows in a tabl e
You might want to look at Radio Button question discussion thread also.. -Original Message- From: Sheikh, Jawwad [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 5:27 PM To: '[EMAIL PROTECTED]' Subject: RE: pager tag , iterate tag and displaying data as rows in a tabl e so how did you do it? -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 3:58 PM To: '[EMAIL PROTECTED]' Subject: RE: pager tag , iterate tag and displaying data as rows in a table Never mind. figured it out myself and it works just fine cheers, Amar.. -Original Message- From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 2:30 PM To: '[EMAIL PROTECTED]' Subject: pager tag , iterate tag and displaying data as rows in a table Hi All, I am using a pager tag that i got from jsptags.com I am using it in conjunction with the struts logic:iterate tag to spit out a bunch of rows. The question i have is.. Is it possible to get the index of the current element in the iteration ? The reason for asking this is that i am using a unique index for every item in the row ( I am using a Radio Button for this). When i page back and forth i want to make sure that the unique id the client is getting (for every row) is the index to the current element in the Collection. If i am paging forward, i should get rows in ascending order, and if i am paging backward i should get rows in descending order. Can anybody help me out here. Thanks a lot. I am attaching some code (which is not working proplery) here which should give people some pointers pg:pager pg:param name=keywords/ logic:iterate id=groupsList name=statesBean property=states pg:item html:radio name=statesBean property=selectedIndex value=%= statesBean.getIndex() % / bean:write name=groupsList property=countryName / html:link page='%= /someAction.do?selectedIndex= + statesBean.getIndex() %' bean:write name=groupsList property=description / /html:link BR /pg:item /logic:iterate /pg:param /pg:pager cheers, Amar..
Re: bean:cookie tag problem
The bean:cookie tag defines a bean of type javax.servlet.http.Cookie (or an array of them if the 'multiple' attribute is specified). You'll need to access the 'value' property, as you are doing in the scriptlet code. Also, you need to use different quote characters to avoid conflicts. Try this: bean:cookie id=phonecookie name=checkout_phone / input type=text name=phone value='bean:write name=phonecookie property=value/'/ -- Martin Cooper - Original Message - From: Allen Walker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 12:45 AM Subject: bean:cookie tag problem I have having problems with the relatively trival bean:cookie tag. Here is what I have: bean:cookie id=phonecookie name=checkout_phone / input type=text name=phone value=bean:write name=phonecookie/ / The value I get in the form is: javax.servlet.http.Cookie@72428d Very strange. I tested to see if my cookie was set properly: % Cookie cookies[] = request.getCookies(); String phonecookie = nothing; for (int i=0; i cookies.length; i++) { if (cookies[i].getName().equalsIgnoreCase(checkout_phone)) phonecookie = cookies[i].getValue(); } % input type=text name=phone value=%=phonecookie% / And I obtained the proper value. Thanks for any help. -allen-
Re: page flow control
Search the archives for implementing Wizard style interfaces. There have been several posts on how to accomplish it. - Original Message - From: Nathan Coast [EMAIL PROTECTED] To: struts-user [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 10:09 AM Subject: page flow control Hi, In the site I'm developing, there are sections that have forms on consecutive pages, I want to guarantee that pages are navigated: page1 - page2 - pageN. At the same time allowing back and forward navigation to change values entered on previous pages. After the last submit, the only valid page in the sequence is then page1. I've had a look at the Struts Token functionality but I don't think it can support this functionality. Is it possible with Tokens or some other way? Thanks in advance Nathan
»¶ÓµÇ½ºÃÉÌÎñÆóÒµÍø
Title: »¶ÓµÇ½ »¶ÓµÇ½¡°ºÃÉÌÎñ¡±ÆóÒµÍøÕ¾(www.good35.com) ×ð¾´µÄÅóÓÑ£º ÄúºÃ£¡ ¡°ºÃÉÌÎñ¡±ÆóÒµÍøÕ¾--ÖйúÆóÒµÉÌÎñÐÅÏ¢Íø¡£ÒÔ¡°ÎªÆóÒµ´´ÔìЧÒ桱Ϊ¾ÓªÀíÄ×ÅÁ¦ÓÚÆóÒµµÄÍøÉÏÐû´«¡¢ÓªÏúºÍ¹ÜÀíµÈ¹¤×÷µÄÈ«Ãæ·¢Õ¹¡£ËüÒÔ¸ü±ã½ÝµÄÐÅÏ¢¹µÍ¨£¬¸üµÍÁ®µÄ¼Û¸ñ£¬¸üÓÅÖʵķþÎñ£¬¸üÇ÷ÓÚ¸öÐÔ»¯µÄ¹ÜÀí£¬Á¦Õù³ÉΪÆóÒµÉÏÍøµÄÊ×ѡƽ̨¡£ ¡°ºÃÉÌÎñ¡±ÎªÆóÒµÌṩ¶àÖÖ¼¼Êõ·þÎñºÍÈí¡¢Ó²¼þÖ§³Ö£¬ÎªÆóÒµÌṩ¶àÖÖµÄÍøÕ¾Éè¼ÆÄ£°å£¬Ìṩ¶àÀàÃâ·ÑCGI³ÌÐò£¬¿ÉÉêÇëÃâ·Ñ¶þ¼¶ÓòÃû£¬ÀûÓÃ×ÔÖúÍøÕ¾Éú³Éϵͳ£¬Ê¹ÆóÒµ½¨Õ¾¸üÇáËÉ¡£¡°ºÃÉÌÎñ¡±ÒÀÍеçÐŹ«ÓÃÊý¾ÝͨÐÅƽ̨£¬ÎªÆóÒµ¿Í»§ÌṩÊý¾ÝÏß·¡¢ÍøÂç½ÓÈëºÍÍøÂçÓ¦ÓõȶàÖÖ·þÎñ¡£¡°ºÃÉÌÎñ¡±ÖصãÍ»³öÍøÉÏÓªÏú£¬Í¨¹ýÐÂƷչʾ¡¢¾«Æ·ÈÈÂô¡¢ÍøÉϳ¬ÊС¢ÍøÉÏרÂôµê¡¢¹©ÇóÐÅÏ¢·¢²¼ÒÔ¼°ÏîÄ¿ÕÐͶ±ê¡¢ÕÐÉÌÒý×Ê¡¢È˲ÅÊг¡µÈÀ¸Ä¿µÄÍƳö£¬Ê¹ÍøÂçÓªÏú¸ü¾«²Ê¡£ ¡°ºÃÉÌÎñ¡±µÄÒ»Çлù±¾¹¦Äܶ¼½«Ãâ·ÑΪÄú¿ª·Å£¬Ï£ÍûÄܽ衰ºÃÉÌÎñ¡±×¨ÒµÉÌÎñƽ̨£¬Îª¹ó¹«Ë¾µÄ·¢Õ¹ÖúÒ»±ÛÖ®Á¦¡£µ±È»£¬ÄúÒ²¿ÉÒÔÑ¡Óá°ºÃÉÌÎñ¡±µÄÇ¿´óÑÓÉì·þÎñ£¬¹¦ÄܸüÈ«£¬¼Û¸ñ¸üÓÅ¡£¡°ºÃÉÌÎñ¡±£¬ÎªÆóÒµ´´ÔìЧÒæ¡£ ÎÒÃdzÏÖ¿µØÑûÇë¹ó¹«Ë¾¼ÓÃË¡°ºÃÉÌÎñ¡±£¬ÇëµÇ½www.good35.com£¬ÉêÇëÄãµÄÕʺźͿռ䡣Ը¹ó¹«Ë¾ÔÚ¡°ºÃÉÌÎñ¡±µÄÐÖúÏ£¬Äܹ»ÔÚÍøÉÏÓªÏúÁìÓò´óÕ¹ºêͼ¡£ ºÃÉÌÎñ£¬ÆóÒµµÄºÃ°ïÊÖ£¡ ¡°ºÃÉÌÎñ¡±ÆóÒµÍøwww.good35.com ¡¡ ¡¡ ¡¡ ¡¡
»¶ÓµÇ½ºÃÉÌÎñÆóÒµÍø
Title: »¶ÓµÇ½ »¶ÓµÇ½¡°ºÃÉÌÎñ¡±ÆóÒµÍøÕ¾(www.good35.com) ×ð¾´µÄÅóÓÑ£º ÄúºÃ£¡ ¡°ºÃÉÌÎñ¡±ÆóÒµÍøÕ¾--ÖйúÆóÒµÉÌÎñÐÅÏ¢Íø¡£ÒÔ¡°ÎªÆóÒµ´´ÔìЧÒ桱Ϊ¾ÓªÀíÄ×ÅÁ¦ÓÚÆóÒµµÄÍøÉÏÐû´«¡¢ÓªÏúºÍ¹ÜÀíµÈ¹¤×÷µÄÈ«Ãæ·¢Õ¹¡£ËüÒÔ¸ü±ã½ÝµÄÐÅÏ¢¹µÍ¨£¬¸üµÍÁ®µÄ¼Û¸ñ£¬¸üÓÅÖʵķþÎñ£¬¸üÇ÷ÓÚ¸öÐÔ»¯µÄ¹ÜÀí£¬Á¦Õù³ÉΪÆóÒµÉÏÍøµÄÊ×ѡƽ̨¡£ ¡°ºÃÉÌÎñ¡±ÎªÆóÒµÌṩ¶àÖÖ¼¼Êõ·þÎñºÍÈí¡¢Ó²¼þÖ§³Ö£¬ÎªÆóÒµÌṩ¶àÖÖµÄÍøÕ¾Éè¼ÆÄ£°å£¬Ìṩ¶àÀàÃâ·ÑCGI³ÌÐò£¬¿ÉÉêÇëÃâ·Ñ¶þ¼¶ÓòÃû£¬ÀûÓÃ×ÔÖúÍøÕ¾Éú³Éϵͳ£¬Ê¹ÆóÒµ½¨Õ¾¸üÇáËÉ¡£¡°ºÃÉÌÎñ¡±ÒÀÍеçÐŹ«ÓÃÊý¾ÝͨÐÅƽ̨£¬ÎªÆóÒµ¿Í»§ÌṩÊý¾ÝÏß·¡¢ÍøÂç½ÓÈëºÍÍøÂçÓ¦ÓõȶàÖÖ·þÎñ¡£¡°ºÃÉÌÎñ¡±ÖصãÍ»³öÍøÉÏÓªÏú£¬Í¨¹ýÐÂƷչʾ¡¢¾«Æ·ÈÈÂô¡¢ÍøÉϳ¬ÊС¢ÍøÉÏרÂôµê¡¢¹©ÇóÐÅÏ¢·¢²¼ÒÔ¼°ÏîÄ¿ÕÐͶ±ê¡¢ÕÐÉÌÒý×Ê¡¢È˲ÅÊг¡µÈÀ¸Ä¿µÄÍƳö£¬Ê¹ÍøÂçÓªÏú¸ü¾«²Ê¡£ ¡°ºÃÉÌÎñ¡±µÄÒ»Çлù±¾¹¦Äܶ¼½«Ãâ·ÑΪÄú¿ª·Å£¬Ï£ÍûÄܽ衰ºÃÉÌÎñ¡±×¨ÒµÉÌÎñƽ̨£¬Îª¹ó¹«Ë¾µÄ·¢Õ¹ÖúÒ»±ÛÖ®Á¦¡£µ±È»£¬ÄúÒ²¿ÉÒÔÑ¡Óá°ºÃÉÌÎñ¡±µÄÇ¿´óÑÓÉì·þÎñ£¬¹¦ÄܸüÈ«£¬¼Û¸ñ¸üÓÅ¡£¡°ºÃÉÌÎñ¡±£¬ÎªÆóÒµ´´ÔìЧÒæ¡£ ÎÒÃdzÏÖ¿µØÑûÇë¹ó¹«Ë¾¼ÓÃË¡°ºÃÉÌÎñ¡±£¬ÇëµÇ½www.good35.com£¬ÉêÇëÄãµÄÕʺźͿռ䡣Ը¹ó¹«Ë¾ÔÚ¡°ºÃÉÌÎñ¡±µÄÐÖúÏ£¬Äܹ»ÔÚÍøÉÏÓªÏúÁìÓò´óÕ¹ºêͼ¡£ ºÃÉÌÎñ£¬ÆóÒµµÄºÃ°ïÊÖ£¡ ¡°ºÃÉÌÎñ¡±ÆóÒµÍøwww.good35.com ¡¡ ¡¡ ¡¡ ¡¡
Re: National characters don't reach Action class correctly
Hi! Yes, that really helps, thank you. I also found the same thing at a message in java-apache-users archive at http://www.geocrawler.com/archives/3/440/2000/2/0/3373820 The interesting thing is, this doesn't happen if the Struts html:form tag is used - then I get the correct characters. I am trying to figure out why, digging in code for org/apache/struts/taglib/html/FormTag.java Thanks again, Turgay Zengin. - Peiqiang Han wrote: Turgay, If you use Tomcat 4.0 (servlet spec 2.3), you can just wirte: request.setCharacterEncoding(ISO-8895-9); System.out.println(request.getParameter(filename)); If you use Tomcat 3.2 (Servlet spec 2.2), String data = request.getParameter(filename); byte[] raw = data.getBytes(ISO-8859-1); System.out.println(new String(raw, ISO-8859-9)); hope this helps, Peiqiang Han Turgay Zengin wrote: Hi, I need help on this: Problem is, I can see national characters on jsp pages correctly, but when I post data to an Action, the string gets messed up. I couldn't find related info in the archive. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.