Re[2]: no struts classes (jar files) found by application
Hello Michael, *** MK Hello Dirk, MK thanks for your answer. MK That means that I end up with tons of redundant struts packages on my MK production machines and many redundantdantdant class loading processes MK on server startup. Oh well, hard to digest ... MK BTW, do you know by any chance whether this applies to the velocity MK packages and to the commons libraries too? Bill in an earlier mail gives you the link to a document describing the problem in more detail. I don't know whether velocity can be put into the shared directory, but I doubt and wouldn't advise. MK It seems that struts also requires that all the libraries that it MK depends on are located in the WEB-INF/lib diretory as well. MK Is that also right? MK Greetings MK Michael Kastner MK Dirk Markert schrieb: Hello Michael, *** MK Hello, MK maybe someone can help. I've tried to deploy two struts applications to MK two tomcat test servers (one running tomcat 5.0 and one running tomcat MK 4.1) but I can't get it to work on neither of them. MK For development purposes I had all required jar files in the MK application's WEB-INF lib. Then I've removed them all and deployed my MK war files to the servers. MK I've put all the struts _war_ files from the jakarta-struts-1.1/webapps MK dir into my server's _webapps_ dir as described in the installation part MK of the struts documentation. MK After restarting the _servers_ all applications in my webapps folder MK were properly deployed but my own struts application (which is not MK located in the webapps dir) could neither find the struts classes nor MK any other classes required. MK Does anybody know why? MK How can I make Tomcat (4 and 5) find the struts jar files i.e. classes? MK The only way I can get my application running is to put all required MK jars into the application's WEB-INF/lib directory. Since this is not my MK only struts application I end up with multiple copies of theses jar MK files on the same server. MK It works that way, but that's not how it's supposed to work, or is there MK something I am missing? That's exactly the way it is supposed to work. Don't try anything else. MK Any help is appreciated. MK Greetings MK Michael Kastner MK - MK To unsubscribe, e-mail: [EMAIL PROTECTED] MK For additional commands, e-mail: [EMAIL PROTECTED] Regards, Dirk +--- Quality leads ---+ | Dirk Markert [EMAIL PROTECTED] | | Dr. Markert Softwaretechnik AG | | Joseph-von-Fraunhofer-Str. 20 | | 44227 Dortmund | +-- to success! -+ MK - MK To unsubscribe, e-mail: [EMAIL PROTECTED] MK For additional commands, e-mail: [EMAIL PROTECTED] Regards, Dirk +--- Quality leads ---+ | Dirk Markert [EMAIL PROTECTED] | | Dr. Markert Softwaretechnik AG | | Joseph-von-Fraunhofer-Str. 20 | | 44227 Dortmund | +-- to success! -+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Message Resource lookup curiosity..
Caroline Jen's question make me think about something. I'm wondering how other people deal with this particular issue- Say that you have some sort of i18n'd app, and on a JSP screen for doing CRUD, you have one or more select boxes. You use html:option tags that get the labels (and maybe even the values) out of the correct Message Resource properties file. This gets whatever you need saved into the database that way in any language you support. Great. No problem. But - later on some display screen: You have retrieved the value that had been previously of the select box. You want to display the corresponding label with a bean:message tag. It's in the properties file after all. So, how do you go about getting the key for the corresponding label to display? How do you go about divining the key to use to get it out of your MessageResource file? I mean, if you can't do that, why bother using the properties file for this in the first place? The solution would be more obvious if html:options or html:optionsCollection supported a key attribute (how it would be supposed to work is another good question!). I see the following ways to go about it. 1) A database lookup for value-MessageResources key, preferably into some collection in application scope at startup. 2) making the values themselves the MessageResources keys (Gag. Choke. Wheeze.) 3) Some sort of call to MessageResources or MessageBundle, or an extension to said classes. hand waving occurs Option 1 seems to be the most palatable if there's a way to do it without needing to change the code with every message resource addition. Maybe #3 resulting in #1. Anyone got an approach they like? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tiles sidebar,header,footer
Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited.
Re: tiles sidebar,header,footer
Hi Christopher, Thanks for immediate response If by this you mean the tiles for these areas do not change - My purpose is same. Please provide me guideline. -Jignesh On Wed, 23 Jun 2004 10:15 , [EMAIL PROTECTED] sent: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
There is an example of this in the struts example code. What you are asking to do is kind of the whole reason for using Tiles (or at least a fairly important one), so I can assume you really haven't looked at any of the user documentation/examples as of yet. I'd suggest a visit to http://jakarta.apache.org/struts/ and reading through the documentation. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:32 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:Re: tiles sidebar,header,footer Hi Christopher, Thanks for immediate response If by this you mean the tiles for these areas do not change - My purpose is same. Please provide me guideline. -Jignesh On Wed, 23 Jun 2004 10:15 , [EMAIL PROTECTED] sent: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited.
Re: Message Resource lookup curiosity..
This will depends on your design strategy. Say Message.properties is: form.gender.male=Male form.gender.female=Female and you are storing the key form.gender.male into the database. So, you need to write a simple class Commons.java that contains: public final static String getMsg(MessageResources msgRes, Locale locale, String key) { String msg = ; try { msg = msgRes.getMessage(locale, key); } catch (Exception e) { System.out.println(Error in getting message. + e.toString()); } return msg; } In your Action class: form.setGender(Commons.getMsg(this.getResources(request), this.getLocale(request), form.gender.male)); of course you need to retrieve the form.gender.male key from the database as a String attribute. So to display the value in your jsp page: bean:write name=myForm property=gender scope=request filter=true/ The property gender is a property in your detail and form object. - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 4:00 PM Subject: Message Resource lookup curiosity.. Caroline Jen's question make me think about something. I'm wondering how other people deal with this particular issue- Say that you have some sort of i18n'd app, and on a JSP screen for doing CRUD, you have one or more select boxes. You use html:option tags that get the labels (and maybe even the values) out of the correct Message Resource properties file. This gets whatever you need saved into the database that way in any language you support. Great. No problem. But - later on some display screen: You have retrieved the value that had been previously of the select box. You want to display the corresponding label with a bean:message tag. It's in the properties file after all. So, how do you go about getting the key for the corresponding label to display? How do you go about divining the key to use to get it out of your MessageResource file? I mean, if you can't do that, why bother using the properties file for this in the first place? The solution would be more obvious if html:options or html:optionsCollection supported a key attribute (how it would be supposed to work is another good question!). I see the following ways to go about it. 1) A database lookup for value-MessageResources key, preferably into some collection in application scope at startup. 2) making the values themselves the MessageResources keys (Gag. Choke. Wheeze.) 3) Some sort of call to MessageResources or MessageBundle, or an extension to said classes. hand waving occurs Option 1 seems to be the most palatable if there's a way to do it without needing to change the code with every message resource addition. Maybe #3 resulting in #1. Anyone got an approach they like? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
preventing user from validating twice
Hi, i think it must be a FAQ, but i did not found anything on this issue. When my user submits a form, the action executes an SQL Insert in the DBMS. What happened is that when user click twice, the second inserts fails with SQLException. What is strange, is that i cannot reproduce it in WSAD, but it happens on a full Websphere. Is there a way i can know that a user already submitted a form ? = Olivier Citeau Paris, France Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: preventing user from validating twice
You can use savetoken(request) method for generating a token (when loading the screen)and Cheque for the existence of token using istokenvalid(request) method for ensuring that you do not submit same data again. Code in action wld be like isTokenValid(request) { ... DB insert } Thanks, Satish -Original Message- From: Olivier Citeau [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 3:49 PM To: [EMAIL PROTECTED] Subject: preventing user from validating twice Hi, i think it must be a FAQ, but i did not found anything on this issue. When my user submits a form, the action executes an SQL Insert in the DBMS. What happened is that when user click twice, the second inserts fails with SQLException. What is strange, is that i cannot reproduce it in WSAD, but it happens on a full Websphere. Is there a way i can know that a user already submitted a form ? = Olivier Citeau Paris, France Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
Are you talking about frames? At 02:15 AM 6/23/2004, [EMAIL PROTECTED] wrote: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Apache and Tomcat integration
Hi! I'm having problems with Apache+Tomcat integration. I've configured Apache to listen on port 7001 and Tomcat on 8080. The struts-example application works fine, but whenever I call an Action in my own application , the URL is changed to port 8080 when that Action finishes (using return(mapping.findForward(myforward))). Every request that goes thru servlet changes URL port to 8080. I've compared my forward and action definitions in struts-config.xml with the struts-example ones, and they seem identical. I've also compared both web.xml files. Does anyone know where the problem can be? Sorry, I don't post any configuration files here because I have no idea of which file is causing that behaviour. I think the Apache-Tomcat connection is set up properly, because as I said, the example application is working. Thanks in advance. This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
No I am talking for tiles only. But rather then getting precise answer, I am getting reply to read tutorial. -Jignesh On Wed, 23 Jun 2004 04:59 , Michael McGrady [EMAIL PROTECTED] sent: Are you talking about frames? At 02:15 AM 6/23/2004, [EMAIL PROTECTED] wrote: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: preventing user from validating twice
Colin, Satish, Jacob, thank you very much for your help. Since i received an Undeliverable mail, i thought that my question did not reached the list, and i posted it twice. Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
With Tiles your pages are rendered on the server-side. So, here's your fish, YES, you can use a static html page as the header/footer, but NO, it won't be cached, it will be retrieved via requestDispatcher.include() with every call for that tile definition. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 8:14 AM Subject: Re: tiles sidebar,header,footer No I am talking for tiles only. But rather then getting precise answer, I am getting reply to read tutorial. -Jignesh On Wed, 23 Jun 2004 04:59 , Michael McGrady [EMAIL PROTECTED] sent: Are you talking about frames? At 02:15 AM 6/23/2004, [EMAIL PROTECTED] wrote: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Apache and Tomcat integration
Hi! I'm having problems with Apache+Tomcat integration. I've configured Apache to listen on port 7001 and Tomcat on 8080. The struts-example application works fine, but whenever I call an Action in my own application , the URL is changed to port 8080 when that Action finishes (using return(mapping.findForward(myforward))). Every request that goes thru servlet changes URL port to 8080. I've compared my forward and action definitions in struts-config.xml with the struts-example ones, and they seem identical. I've also compared both web.xml files. Does anyone know where the problem can be? Sorry, I don't post any configuration files here because I have no idea of which file is causing that behaviour. I think the Apache-Tomcat connection is set up properly, because as I said, the example application is working. Thanks in advance. This message was sent using IMP, the Internet Messaging Program. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:redirect not working
Folks, I am trying to implement a simple login gate to ensure a user is logged in. My code is below. When a user is logged in successfully a session attribute named userContext is present, and this has a property named user. There is a global forward called login LoginGate.jsp: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % %@ page import=com.expensys.expensyswt.resources.Constants % %@ page import=java.util.logging.Logger % %logger.info(userContext = + session.getAttribute(Constants.USER_CONTEXT));% !-- Redirect user to login page if no UserContext found -- logic:notPresent name=userContext property=user scope=session %logger.info(not present);% logic:redirect forward=login / /logic:notPresent Home.jsp [snip..] jsp:include flush=false page=common/LoginGate.jsp / html:html [snip..] I am puzzled. The redirect does not work. The log statements indicate that the code block is being called - i.e. not present is output. Any ideas what is wrong? TIA - Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
James, Thanks, that is what I would like to know. Christopher may also have clear idea on the basis of this answer. -Jignesh On Wed, 23 Jun 2004 08:22 , 'James Mitchell' [EMAIL PROTECTED] sent: With Tiles your pages are rendered on the server-side. So, here's your fish, YES, you can use a static html page as the header/footer, but NO, it won't be cached, it will be retrieved via requestDispatcher.include() with every call for that tile definition. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 8:14 AM Subject: Re: tiles sidebar,header,footer No I am talking for tiles only. But rather then getting precise answer, I am getting reply to read tutorial. -Jignesh On Wed, 23 Jun 2004 04:59 , Michael McGrady [EMAIL PROTECTED] sent: Are you talking about frames? At 02:15 AM 6/23/2004, [EMAIL PROTECTED] wrote: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] load testing
Hi all, I've to make some load tests on my app. Our customer wants the appli to handle 300 simultaneous users. To translate this requirement into request per second, how many time do you consider an 'active web user' to wait between 2 request ? Nico. Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tiles sidebar,header,footer
Jignesh Apologies if you think I'm fobbing you off, but the Struts example explains what you need to know. I fail to see the point of someone having to force feed you the information because you don't want read some documentation. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 13:14 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:Re: tiles sidebar,header,footer No I am talking for tiles only. But rather then getting precise answer, I am getting reply to read tutorial. -Jignesh On Wed, 23 Jun 2004 04:59 , Michael McGrady [EMAIL PROTECTED] sent: Are you talking about frames? At 02:15 AM 6/23/2004, [EMAIL PROTECTED] wrote: Jignesh What do you mean by static and called back? If by this you mean the tiles for these areas do not change, then yes, this is possible. The called back has me puzzling though. Cheers Christopher Marsh-Bourdon Pyplia Limited [EMAIL PROTECTED] 23/06/2004 10:10 Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:tiles sidebar,header,footer Hi All, We are using tiles. Is it possible to make header,footer static means all the time they will not be called back,when page is submmitted. Also sometimes sidebar also remains nonmovable only content gets changed. -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited.
RE: [OT] Issues while developing and deploying enterprise application
Navjot, although I don't have an answer for you, I posted (forwarded) your question to the [EMAIL PROTECTED] mailing list which may be a more appropriate list for this type of question. robert -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 12:55 AM To: Struts Users Mailing List Subject: [OT] Issues while developing and deploying enterprise application hi, I have N ejb jars packaged into a single EAR file. 1. ProductEJB.jar ( with entities Product, Category etc..) 2. OrderEJB.jar (with entities OrderItem, Orders etc..) Now, i have a unidirectional cmr based relation OrderItem-Product where each item refers to one of the products. But both entities are defined in separate ejb-jar.xml. According to EJB specs, the entities for which are involved in the relation using cmr-field MUST be in same DD (ejb-jar.xml), which means i can't have separate DDs. Q1. If i generate somehow a common DD for all modules and place them in 1 ejb module, rest of the modules will have empty META-INF directory. Will it be recognized as valid EJB module by the EJB container? Q2. In a large enterprise application, we have many related modules which need to be developed independently by diff teams. This restriction completely thwarts the possibility of independent module development as still the DDs are to be generated a single large monolithic file. Any suggestions how to develop in these scenarios. Navjot Singh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] load testing
This is application/context dependent. Ebay users may have a wait time of 2-20 seconds, where the low end results from scanning a page and dismissing it out of hand and the high end is the result of an auction with a REALLY long/detailed/funny description. Other web applications may have incredibly complex pages that result in a user parking on that page for 60-6000 seconds. What I suggest is that you convene a group of representative users (could be internal analysts and/or QA members) and record their use sessions. A little statstical analysis on the wait times should provide you with enough data to confidently randomize wait times. Dennis Nicolas De Loof [EMAIL PROTECTED] 06/23/2004 08:56 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To Struts Users Mailing List [EMAIL PROTECTED] cc Subject [OT] load testing Hi all, I've to make some load tests on my app. Our customer wants the appli to handle 300 simultaneous users. To translate this requirement into request per second, how many time do you consider an 'active web user' to wait between 2 request ? Nico. Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] load testing
I don't know the answer to your specific question, as I think it involves some industrial strength statistical math. But ... I'll tell you what we did. Our application needed to be load tested to ensure performance within certain times at up to 50 users. (We actually tested to 100 users, just for grins ... load testing is fun :-) We created a functional test using HttpUnit and JUnit to represent our primary usecase. Ours is a control system and this usecase was time critical, while the other usecases were deemed not time critical, so we just load tested with the one usecase. Then, using JUnitPerf, by the wonderful and talented Mike Clark (http://www.clarkware.com/), we drove the test at up to 100 simultaneous users, each running a number of the functional tests back to back (25 to 50 times per simulated user). This created a worse case load test (think slashdot effect :-). Personally, I liked this, as I wanted to know when the application would run out out of steam. Obviously this test is unrealistic, but it did give us plenty of confidence that we could handle anything that was expected to be thrown at us. So, in your situation, I would create functional tests that represented the most common and most time critical usecases for your system. Then open the flood gates and send a tidal wave of traffic against the system. I'm sure that realistically simulated usage is wonderful, but for the rest of us, just hammer the system until it begs for mercy and then you'll know what it can take. :-) Simon -Original Message- From: Nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 7:57 AM To: Struts Users Mailing List Subject: [OT] load testing Hi all, I've to make some load tests on my app. Our customer wants the appli to handle 300 simultaneous users. To translate this requirement into request per second, how many time do you consider an 'active web user' to wait between 2 request ? Nico. Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: no struts classes (jar files) found by application
Hello, I just wanted to thank all those, who replied to my question. Thanks for all the useful hints. I must have been blind. The link, mentioned by Bill, really explains it: http://jakarta.apache.org/struts/userGuide/configuration.html#config_add Thanks for your patience Michael Kastner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New Validating system instructions?
At 9:18 PM -0600 6/22/04, David Erickson wrote: Just wondering if there are any docs up on how the validator works in the new nightly builds of struts... trying to transition everything to using ActionMessages and storing the errors/messages under different keys within that object, just wondering how to do that using the validator.xml plugin. Thanks, David The way in which validator integrates with Struts has not changed. Validation errors are still errors and are still stored in request scope using the key org.apache.struts.Globals.ERROR_KEY (which has the literal value org.apache.struts.action.ERROR) This is the default location where the html:errors and html:messages tags both look for an ActionMessages object. More generally: the difference between the classes ActionErrors/ActionError/ActionMessages/ActionMessage has *absolutely nothing* to do with the difference in behavior in Action.saveErrors(...) and Action.saveMessages(...) The difference between the classes is zero -- all behavior in ActionErrors was pushed up into ActionMessages and all behavior in ActionError was pushed up into ActionMessage. This was done in the attempt to clearly signal that these classes can be used to pass any kind of messages from the controller to the view -- errors being only one kind of message. The difference between saveErrors(...) and saveMessages(...) is simply the attribute name under which the ActionMessages object is stored, providing two convenient default locations for storing controller messages for use by the view. If you look more closely at the html:errors and html:messages tags, you can actually use them to get an ActionMessages object from any arbitrary attribute name in any scope. While we're clarifying, the difference between html:errors and html:messages is purely in syntax and model -- both tags *default* to look for an ActionMessages object under Globals.ERROR_KEY despite the difference in names. I wasn't part of the history, but I'm assuming that around the same time that people were realizing that there's more than one kind of message to pass, they also realized that sometimes you want more flexibility in displaying them. html:messages provides more flexibility at the cost of more typing. I hope this helps to clarify things. I would strongly encourage people to have a look inside the Struts source code, as it's really quite clear when you look under the hood. You can see what happens in validation by examining the processValidate method in RequestProcessor: http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/action/RequestProcessor.java?view=markup You can see what happens with saveErrors and saveMessages by examining those methods in Action http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/action/Action.java?view=markup You can see what the tags do by looking at their respective source files: http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/taglib/html/MessagesTag.java?view=markup http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/struts/taglib/html/ErrorsTag.java?view=markup I'll put most of this text in the Struts Wiki at http://wiki.apache.org/struts/ActionErrorsAndActionMessages Anyone who wants to clarify is encouraged to document it there, and, of course, if you see a place in the core struts docs that could make this more clear, we welcome documentation contributions as much as code contributions. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place. - Carlos Santana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] load testing
Thanks for replies, We are using Loadrunner to create load. As dennis suggested, I'm going to analyze wating time for a 'real' user to get an avarage request/second/user. Nico. I don't know the answer to your specific question, as I think it involves some industrial strength statistical math. But ... I'll tell you what we did. Our application needed to be load tested to ensure performance within certain times at up to 50 users. (We actually tested to 100 users, just for grins ... load testing is fun :-) We created a functional test using HttpUnit and JUnit to represent our primary usecase. Ours is a control system and this usecase was time critical, while the other usecases were deemed not time critical, so we just load tested with the one usecase. Then, using JUnitPerf, by the wonderful and talented Mike Clark (http://www.clarkware.com/), we drove the test at up to 100 simultaneous users, each running a number of the functional tests back to back (25 to 50 times per simulated user). This created a worse case load test (think slashdot effect :-). Personally, I liked this, as I wanted to know when the application would run out out of steam. Obviously this test is unrealistic, but it did give us plenty of confidence that we could handle anything that was expected to be thrown at us. So, in your situation, I would create functional tests that represented the most common and most time critical usecases for your system. Then open the flood gates and send a tidal wave of traffic against the system. I'm sure that realistically simulated usage is wonderful, but for the rest of us, just hammer the system until it begs for mercy and then you'll know what it can take. :-) Simon -Original Message- From: Nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 7:57 AM To: Struts Users Mailing List Subject: [OT] load testing Hi all, I've to make some load tests on my app. Our customer wants the appli to handle 300 simultaneous users. To translate this requirement into request per second, how many time do you consider an 'active web user' to wait between 2 request ? Nico. Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Our name has changed. Please update your address book to the following format: [EMAIL PROTECTED]. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forwarding with different parameter
Hi this post refers to an article in Struts Wiki page : http://wiki.apache.org/struts/ForwardingWithDifferentParameter Mark Diggory raises an interesting issue on how to forward parameters from an Action class. I personally feel that his wrapper class is a very good abstraction to can solve problem *thinking to jar it ^___^'' * His question imposes an interesting design paradigm. It will be good if the community can share their thoughts on the design issue as well. Regards, Irfandhy Franciscus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Issues while developing and deploying enterprise application
thx a lot, robert. i thought nobody will reply to my trivial question. i will follow up on that list. navjot singh Robert Taylor wrote: Navjot, although I don't have an answer for you, I posted (forwarded) your question to the [EMAIL PROTECTED] mailing list which may be a more appropriate list for this type of question. robert -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 12:55 AM To: Struts Users Mailing List Subject: [OT] Issues while developing and deploying enterprise application hi, I have N ejb jars packaged into a single EAR file. 1. ProductEJB.jar ( with entities Product, Category etc..) 2. OrderEJB.jar (with entities OrderItem, Orders etc..) Now, i have a unidirectional cmr based relation OrderItem-Product where each item refers to one of the products. But both entities are defined in separate ejb-jar.xml. According to EJB specs, the entities for which are involved in the relation using cmr-field MUST be in same DD (ejb-jar.xml), which means i can't have separate DDs. Q1. If i generate somehow a common DD for all modules and place them in 1 ejb module, rest of the modules will have empty META-INF directory. Will it be recognized as valid EJB module by the EJB container? Q2. In a large enterprise application, we have many related modules which need to be developed independently by diff teams. This restriction completely thwarts the possibility of independent module development as still the DDs are to be generated a single large monolithic file. Any suggestions how to develop in these scenarios. Navjot Singh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use dynamically generated CSS style with Struts tags
I don't at present use any taglibs whatsoever in the app I'm doing this in, so I don't know if there is any added complexity involved there. But as far as what I AM doing goes, I'm not sure what will really be helpful, so let me get as detailed as I can and you can ignore the superfolous parts... First, the application I'm doing this in allows users to set their own color scheme, font scheme, and some other style elements (within a defined set of things they can possibly change). So, I have a UserScheme table with columns like BackgroundColor, FontSize, TextColor, etc. So, in each JSP I have the line: link rel=StyleSheet href=/app/styles.act type=text/css This is mapped to an Action called StylesAction. All it does is reads in all the columns from the above table for the current user. I then dump all those values into a HashMap (I simply key it off the column name in the table). Next, in the styles.jsp, I do things like this: % HashMap styleData = (HashMap)request.get(styleData); % .cssMainBody { background-color : %=(String)styleData.get(backgroundColor)%; color : %=(String)styleData.get(textColor)%; font-family : %=(String)styleData.get(fontFamily)%; font-size : %=(String)styleData.get(fontSize)%; font-weight : %=(String)styleData.get(fontWeight)%; } ...and so on. Then, I just use those style classes in my other JSP's like I would any other style tag (I always do className=xxx where xxx is the classname like cssMainBody above). That's all there is to it. Without knowing more about the taglibs your using I can't really say if this will work as-is or not, but it certainly works were taglibs are not involved. Hope that helps! Frank From: Voinea, Marina [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: How to use dynamically generated CSS style with Struts tags Date: Wed, 23 Jun 2004 10:06:32 -0400 Thank you very much for your answer, Frank,This is the second time you come to my help! I don't want to seem lazy, but could you please give an example from the code... (the style sheet jsp and an example of a tag , for ex: html:text or anything else which is using the info from the syle sheet : do you use JSTL or Struts tags are enough? ( (I am curious how you pass info from the jsp stylesheet to the style and styleCLass attibutes of the STruts html tag I am just starting this, so I am sure I'll benefit from your proven experience...(instead of fighting my mistakes for a couple of days) ALso, regarding performance: do you think there is a significant performance hit to generate the styles inline in the tags (there are some concerns here...), as opposed to using a style sheet file (generated/refreshed from time to time and maybe cashed in the browser...). The tags are dynamically generated anyway, so I'm thinking additional style at run time may not be that bad, what do you think? Did you do any comparisons/benchmarks? Thank you very much, Marina -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 1:53 PM To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags I had to do something almost identical... My solution was to make my CSS file a JSP, and when I referenced that stylesheet in all the other JSP's, I did: where styles.act is actually an ActionMapping. I then had my StylesAction class, just like any other Action, that got some info out of the database and passed it along to the JSP, then I just used all the normal JSP/taglib functionality to dynamically build the CSS content. Frank From: Bill Siggelkow [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags Date: Tue, 22 Jun 2004 13:28:47 -0400 Sounds like a custom JSP tag would work pretty well here ... Voinea, Marina wrote: Hi everybody, Can you please help with the following question: What are the possible ways (and best) to modify the style sheet at run time using Struts framework? Our application is using Struts tags which refer to a static style sheet elements as presented below: html-el:link styleClass=%=style% We need at run time to extract user settings from DB (fonts, colors) and generate a style sheet accordingly . We could generate the style sheet text file for the user and store it somewhere on the disk and then refer to it, but then we may have too many files (for all active users). There must be a more dynamic and elegant soultion... Can we use the Struts html:link and pass a String to the style attribute of the html:link of the tag ? (It would be good for this string to be extracted from a bean prepared by an action). Any example of XSL taglib and Struts tag integration ? This is a very important element for trully dynamic pages ... Any good experience that we can
delete a record
Hi, Can anyone please tell me: How to do a confirmation when delete a record in struts? Thank you, __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New Validating system instructions?
Joe, There have been some subtle changes especially within the Validator, for example the xml you no longer specify arg0-arg3, you specify an arg then give it a position attribute to change message key info for display. A couple things I've had to do that seem pretty tedious and could likely be a target of some good refactoring. I've done previous development where I stored all errors in an ActionErrors object under its default key in the session, however having to put html code into my properties file was not something I wanted to do on my new app. So what I do now is store everything in ActionMessages, and I store messags/errors under different property values within that object. So when I go to display errors my jsps look something like: logic-el:messagesPresent message=true property=GLOBAL_ERROR h4 class=RedErrors:/h4 ul style=margin-top: 0; margin-bottom: 0; html-el:messages id=error message=true property=GLOBAL_ERROR lic:out value=${error}/ /html-el:messages /ul /logic-el:messagesPresent or GLOBAL_MESSAGE for messages. However this was a significant challenge to accomplish. Since the commons-validator seems to store errors under random properties within the ActionErrors object I needed to put this into my validate method of ValidatorActionForm: ActionErrors validatorErrors = super.validate(mapping, request); ActionErrors errors = new ActionErrors(); if (validatorErrors != null) { for (Iterator i = validatorErrors.get(); i.hasNext();) { ActionMessage message = (ActionMessage)i.next(); errors.add(Globals.GLOBAL_ERROR, message); } } Note my use of Globals.GLOBAL_ERROR is my own set of Globals within the app. Is there somewhere I can specifically tell commons-validator what property to store errors it finds under? I couldnt find it but it may exist. Secondly I did have to overwrite the processValidate method of my request processor to store the results of the validate() method into session scope under the Messages key instead of Errors. Quite a bit of work just to get messages to show up it seems :) Thoughts/Comments? Oh and on a sort of related rant, within the xml commons validator why in the world can you not substitute in runtime values? IE if I am validating an email address I want to do something like: {0} is not a valid email address and within that {0} substitute in the value the user submitted, all within the xml. So something like arg value=emailAddress position=0 runTimeValue=true/ -David - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Struts Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 7:49 AM Subject: Re: New Validating system instructions? At 9:18 PM -0600 6/22/04, David Erickson wrote: Just wondering if there are any docs up on how the validator works in the new nightly builds of struts... trying to transition everything to using ActionMessages and storing the errors/messages under different keys within that object, just wondering how to do that using the validator.xml plugin. Thanks, David The way in which validator integrates with Struts has not changed. Validation errors are still errors and are still stored in request scope using the key org.apache.struts.Globals.ERROR_KEY (which has the literal value org.apache.struts.action.ERROR) This is the default location where the html:errors and html:messages tags both look for an ActionMessages object. More generally: the difference between the classes ActionErrors/ActionError/ActionMessages/ActionMessage has *absolutely nothing* to do with the difference in behavior in Action.saveErrors(...) and Action.saveMessages(...) The difference between the classes is zero -- all behavior in ActionErrors was pushed up into ActionMessages and all behavior in ActionError was pushed up into ActionMessage. This was done in the attempt to clearly signal that these classes can be used to pass any kind of messages from the controller to the view -- errors being only one kind of message. The difference between saveErrors(...) and saveMessages(...) is simply the attribute name under which the ActionMessages object is stored, providing two convenient default locations for storing controller messages for use by the view. If you look more closely at the html:errors and html:messages tags, you can actually use them to get an ActionMessages object from any arbitrary attribute name in any scope. While we're clarifying, the difference between html:errors and html:messages is purely in syntax and model -- both tags *default* to look for an ActionMessages object under Globals.ERROR_KEY despite the difference in names. I wasn't part of the history, but I'm assuming that around the same time that people were realizing that there's more than one kind of message to pass, they also realized that sometimes you want more flexibility in displaying them. html:messages provides more
RE: How to use dynamically generated CSS style with Struts tags
You could also use Xkins (http://xkins.sourceforge.net/) to generate something similar in your css: .cssMainBody { background-color : xkins:resource name=background-color/; color : xkins:resource name=color/; } Or: .cssMainBody { xkins:template name=cssMainBody/; } And let Xkins manage the styles in a skin fashion. Xkins 0.9.8 lets you to comose Skins so the functionality could be achieved. Cheers. Guillermo. -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Miércoles, 23 de Junio de 2004 12:19 p.m. To: [EMAIL PROTECTED] Subject: RE: How to use dynamically generated CSS style with Struts tags I don't at present use any taglibs whatsoever in the app I'm doing this in, so I don't know if there is any added complexity involved there. But as far as what I AM doing goes, I'm not sure what will really be helpful, so let me get as detailed as I can and you can ignore the superfolous parts... First, the application I'm doing this in allows users to set their own color scheme, font scheme, and some other style elements (within a defined set of things they can possibly change). So, I have a UserScheme table with columns like BackgroundColor, FontSize, TextColor, etc. So, in each JSP I have the line: link rel=StyleSheet href=/app/styles.act type=text/css This is mapped to an Action called StylesAction. All it does is reads in all the columns from the above table for the current user. I then dump all those values into a HashMap (I simply key it off the column name in the table). Next, in the styles.jsp, I do things like this: % HashMap styleData = (HashMap)request.get(styleData); % .cssMainBody { background-color : %=(String)styleData.get(backgroundColor)%; color : %=(String)styleData.get(textColor)%; font-family : %=(String)styleData.get(fontFamily)%; font-size : %=(String)styleData.get(fontSize)%; font-weight : %=(String)styleData.get(fontWeight)%; } ...and so on. Then, I just use those style classes in my other JSP's like I would any other style tag (I always do className=xxx where xxx is the classname like cssMainBody above). That's all there is to it. Without knowing more about the taglibs your using I can't really say if this will work as-is or not, but it certainly works were taglibs are not involved. Hope that helps! Frank From: Voinea, Marina [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: How to use dynamically generated CSS style with Struts tags Date: Wed, 23 Jun 2004 10:06:32 -0400 Thank you very much for your answer, Frank,This is the second time you come to my help! I don't want to seem lazy, but could you please give an example from the code... (the style sheet jsp and an example of a tag , for ex: html:text or anything else which is using the info from the syle sheet : do you use JSTL or Struts tags are enough? ( (I am curious how you pass info from the jsp stylesheet to the style and styleCLass attibutes of the STruts html tag I am just starting this, so I am sure I'll benefit from your proven experience...(instead of fighting my mistakes for a couple of days) ALso, regarding performance: do you think there is a significant performance hit to generate the styles inline in the tags (there are some concerns here...), as opposed to using a style sheet file (generated/refreshed from time to time and maybe cashed in the browser...). The tags are dynamically generated anyway, so I'm thinking additional style at run time may not be that bad, what do you think? Did you do any comparisons/benchmarks? Thank you very much, Marina -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 1:53 PM To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags I had to do something almost identical... My solution was to make my CSS file a JSP, and when I referenced that stylesheet in all the other JSP's, I did: where styles.act is actually an ActionMapping. I then had my StylesAction class, just like any other Action, that got some info out of the database and passed it along to the JSP, then I just used all the normal JSP/taglib functionality to dynamically build the CSS content. Frank From: Bill Siggelkow [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags Date: Tue, 22 Jun 2004 13:28:47 -0400 Sounds like a custom JSP tag would work pretty well here ... Voinea, Marina wrote: Hi everybody, Can you please help with the following question: What are the possible ways (and best) to modify the style sheet at run time using Struts framework? Our application is using Struts tags which refer to a static style sheet elements as presented below: html-el:link styleClass=%=style%
RE: delete a record
Julia: I think your question may not be too clear. First what do you mean by delete a record in struts? Strictly speaking, I believe Struts does not (should not) have code which properly belongs the business/database layer. So assuming that you want to show a confirmation page when your application successfully deletes a record in the database, all you have to do is forward the user to a success.jsp. Which is similar to what you always do in Struts. So what exactly is your problem? If you explain your problem more and/or show some code, maybe someone can help you out. Regards, Geeta -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:27 AM To: Struts Users Mailing List Subject: delete a record Hi, Can anyone please tell me: How to do a confirmation when delete a record in struts? Thank you, __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: delete a record
Thank you Geeta, What I want to do is when user click DELETE button, will show a pop-window with information Are you sure you want to delete the record?, and with YES and NO buttons. --- Geeta Ramani [EMAIL PROTECTED] wrote: Julia: I think your question may not be too clear. First what do you mean by delete a record in struts? Strictly speaking, I believe Struts does not (should not) have code which properly belongs the business/database layer. So assuming that you want to show a confirmation page when your application successfully deletes a record in the database, all you have to do is forward the user to a success.jsp. Which is similar to what you always do in Struts. So what exactly is your problem? If you explain your problem more and/or show some code, maybe someone can help you out. Regards, Geeta -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:27 AM To: Struts Users Mailing List Subject: delete a record Hi, Can anyone please tell me: How to do a confirmation when delete a record in struts? Thank you, __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: delete a record
http://www.google.com/search?q=javascript+confirm -- Voytek Jarnot Racing makes heroin addiction look like a vague longing for something salty. - Peter Egan -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 10:42 AM To: Struts Users Mailing List Subject: RE: delete a record Thank you Geeta, What I want to do is when user click DELETE button, will show a pop-window with information Are you sure you want to delete the record?, and with YES and NO buttons. --- Geeta Ramani [EMAIL PROTECTED] wrote: Julia: I think your question may not be too clear. First what do you mean by delete a record in struts? Strictly speaking, I believe Struts does not (should not) have code which properly belongs the business/database layer. So assuming that you want to show a confirmation page when your application successfully deletes a record in the database, all you have to do is forward the user to a success.jsp. Which is similar to what you always do in Struts. So what exactly is your problem? If you explain your problem more and/or show some code, maybe someone can help you out. Regards, Geeta -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:27 AM To: Struts Users Mailing List Subject: delete a record Hi, Can anyone please tell me: How to do a confirmation when delete a record in struts? Thank you, __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: delete a record
http://www.google.com/search?sourceid=navclientie=UTF-8oe=UTF-8q=_javascript_+confirm Dennis Julia Weaver [EMAIL PROTECTED] 06/23/2004 11:41 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To Struts Users Mailing List [EMAIL PROTECTED] cc Subject RE: delete a record Thank you Geeta, What I want to do is when user click DELETE button, will show a pop-window with information Are you sure you want to delete the record?, and with YES and NO buttons. --- Geeta Ramani [EMAIL PROTECTED] wrote: Julia: I think your question may not be too clear. First what do you mean by delete a record in struts? Strictly speaking, I believe Struts does not (should not) have code which properly belongs the business/database layer. So assuming that you want to show a confirmation page when your application successfully deletes a record in the database, all you have to do is forward the user to a success.jsp. Which is similar to what you always do in Struts. So what exactly is your problem? If you explain your problem more and/or show some code, maybe someone can help you out. Regards, Geeta -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:27 AM To: Struts Users Mailing List Subject: delete a record Hi, Can anyone please tell me: How to do a confirmation when delete a record in struts? Thank you, __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: delete a record
oh ok. Just use Javascript:confirm(..) Geeta -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:42 AM To: Struts Users Mailing List Subject: RE: delete a record Thank you Geeta, What I want to do is when user click DELETE button, will show a pop-window with information Are you sure you want to delete the record?, and with YES and NO buttons. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use dynamically generated CSS style with Struts tags
Thank you Frank, I understand how you use it, the strings you've generated can then be used inside the Struts tags (inline generation). by giving values to the style and styleClass attributes inside the tag)... Thanks again, Marina -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:19 AM To: [EMAIL PROTECTED] Subject: RE: How to use dynamically generated CSS style with Struts tags I don't at present use any taglibs whatsoever in the app I'm doing this in, so I don't know if there is any added complexity involved there. But as far as what I AM doing goes, I'm not sure what will really be helpful, so let me get as detailed as I can and you can ignore the superfolous parts... First, the application I'm doing this in allows users to set their own color scheme, font scheme, and some other style elements (within a defined set of things they can possibly change). So, I have a UserScheme table with columns like BackgroundColor, FontSize, TextColor, etc. So, in each JSP I have the line: link rel=StyleSheet href=/app/styles.act type=text/css This is mapped to an Action called StylesAction. All it does is reads in all the columns from the above table for the current user. I then dump all those values into a HashMap (I simply key it off the column name in the table). Next, in the styles.jsp, I do things like this: % HashMap styleData = (HashMap)request.get(styleData); % .cssMainBody { background-color : %=(String)styleData.get(backgroundColor)%; color : %=(String)styleData.get(textColor)%; font-family : %=(String)styleData.get(fontFamily)%; font-size : %=(String)styleData.get(fontSize)%; font-weight : %=(String)styleData.get(fontWeight)%; } ...and so on. Then, I just use those style classes in my other JSP's like I would any other style tag (I always do className=xxx where xxx is the classname like cssMainBody above). That's all there is to it. Without knowing more about the taglibs your using I can't really say if this will work as-is or not, but it certainly works were taglibs are not involved. Hope that helps! Frank From: Voinea, Marina [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: How to use dynamically generated CSS style with Struts tags Date: Wed, 23 Jun 2004 10:06:32 -0400 Thank you very much for your answer, Frank,This is the second time you come to my help! I don't want to seem lazy, but could you please give an example from the code... (the style sheet jsp and an example of a tag , for ex: html:text or anything else which is using the info from the syle sheet : do you use JSTL or Struts tags are enough? ( (I am curious how you pass info from the jsp stylesheet to the style and styleCLass attibutes of the STruts html tag I am just starting this, so I am sure I'll benefit from your proven experience...(instead of fighting my mistakes for a couple of days) ALso, regarding performance: do you think there is a significant performance hit to generate the styles inline in the tags (there are some concerns here...), as opposed to using a style sheet file (generated/refreshed from time to time and maybe cashed in the browser...). The tags are dynamically generated anyway, so I'm thinking additional style at run time may not be that bad, what do you think? Did you do any comparisons/benchmarks? Thank you very much, Marina -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 1:53 PM To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags I had to do something almost identical... My solution was to make my CSS file a JSP, and when I referenced that stylesheet in all the other JSP's, I did: where styles.act is actually an ActionMapping. I then had my StylesAction class, just like any other Action, that got some info out of the database and passed it along to the JSP, then I just used all the normal JSP/taglib functionality to dynamically build the CSS content. Frank From: Bill Siggelkow [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags Date: Tue, 22 Jun 2004 13:28:47 -0400 Sounds like a custom JSP tag would work pretty well here ... Voinea, Marina wrote: Hi everybody, Can you please help with the following question: What are the possible ways (and best) to modify the style sheet at run time using Struts framework? Our application is using Struts tags which refer to a static style sheet elements as presented below: html-el:link styleClass=%=style% We need at run time to extract user settings from DB (fonts, colors) and generate a style sheet accordingly . We could generate the style sheet text file for the user and store it somewhere on
RE: delete a record
Thanks for everyone' suggestion... __ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Logic:Iterate Problem
Hi, you can use the JSTL1.1 (or 1.0 as you want) in the following way: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % table c:forEach items=${requestScope.pageRecords} var=row trc:out value=${row.Id}//tr /c:forEach /table you can use pageScope, requestScope, sessionScope or applicationScope depending on the pageRecords is stored. -Messaggio originale- Da: Eddie Yan [mailto:[EMAIL PROTECTED] Inviato: mercoledì 23 giugno 2004 18.06 A: [EMAIL PROTECTED] Oggetto: Logic:Iterate Problem Hi guys, Say I have a JSP as follows: table tr % Iterator iter = pageRecords.iterator(); while(iter.hasNext()) { UserDetail detail = (UserDetail)iter.next(); % td %= detail.getId() % /td % } % /tr /table pageRecords is a Collection of UserDetail object. UserDetail is my data transfer object. I can manage to get the expected result of detail.getId() How can I represent the above code in logic:iterate tags ? The following code doesn't work. table tr logic:iterate id=myID collection=pageRecords property=UserDetail td bean:write name=myID property=id / /td /logic:iterate /tr /table I got JSP Exception: Cannot create iterator for this collection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Logic:Iterate Problem
Assuming you have a scoped Collection named pageRecords: Struts tags: logic:iterate id=myID name=pageRecords td bean:write name=myID property=id / /td /logic:iterate JSTL: c:forEach var=user items=${pageRecords} c:out value=${user.id}/ /c:forEach robert -Original Message- From: Eddie Yan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 12:06 PM To: [EMAIL PROTECTED] Subject: Logic:Iterate Problem Hi guys, Say I have a JSP as follows: table tr % Iterator iter = pageRecords.iterator(); while(iter.hasNext()) { UserDetail detail = (UserDetail)iter.next(); % td %= detail.getId() % /td % } % /tr /table pageRecords is a Collection of UserDetail object. UserDetail is my data transfer object. I can manage to get the expected result of detail.getId() How can I represent the above code in logic:iterate tags ? The following code doesn't work. table tr logic:iterate id=myID collection=pageRecords property=UserDetail td bean:write name=myID property=id / /td /logic:iterate /tr /table I got JSP Exception: Cannot create iterator for this collection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
R: Logic:Iterate Problem
Hi, you can use the JSTL1.1 (or 1.0 as you want) in the following way: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % table c:forEach items=${requestScope.pageRecords} var=row trc:out value=${row.Id}//tr /c:forEach /table you can use pageScope, requestScope, sessionScope or applicationScope depending on the pageRecords is stored. BR /Amleto -Messaggio originale- Da: Eddie Yan [mailto:[EMAIL PROTECTED] Inviato: mercoledì 23 giugno 2004 18.06 A: [EMAIL PROTECTED] Oggetto: Logic:Iterate Problem Hi guys, Say I have a JSP as follows: table tr % Iterator iter = pageRecords.iterator(); while(iter.hasNext()) { UserDetail detail = (UserDetail)iter.next(); % td %= detail.getId() % /td % } % /tr /table pageRecords is a Collection of UserDetail object. UserDetail is my data transfer object. I can manage to get the expected result of detail.getId() How can I represent the above code in logic:iterate tags ? The following code doesn't work. table tr logic:iterate id=myID collection=pageRecords property=UserDetail td bean:write name=myID property=id / /td /logic:iterate /tr /table I got JSP Exception: Cannot create iterator for this collection - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Treeview - Frameless Layout in struts
Folks, I am developing a J2EE based data oriented application using Struts. I want to develop a UI using Frameless Layout For Tree view, something like left side of the page will have a Tree View and depending on selected node right side of the page will be filled up with different forms for inputting/submitting/viewing the data in html. Can some one please point out me to some examples of Tree View Implementation used in JSP for left pane navigation ? I know Echo framework has this inbuilt functionality, But I want to develop this using struts. Any suggestions using JavaScript or ready to use tags are welcome. Thanks ! G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Treeview - Frameless Layout in struts
perhaps you might look at this http://www.guydavis.ca/projects/oss/tags/ cheers, -Original Message- From: Yadav, Ganesh [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 6:22 PM To: Charles Cordingley ; Christopher Marsh-Bourdon ; [EMAIL PROTECTED]; David Friedman ; [EMAIL PROTECTED]; Duncan Mills (E-mail); Fernando Loygorri ; Frank Zammetti ; Hookom, Jacob ; James Mitchell; Joe Hertz; Kathy Zhou ; Marco Mistroni; Mark Lowe ; McCormack, Chris ; [EMAIL PROTECTED]; mike; Navjot Singh; Niall Pemberton; Pilgrim, Peter ; Rajat Pandit, Gurgaon ; Ram Venkataswamy ; Rick Reumann ; Riyad Kalla ; Ron Grabowski ; Shailender Jain ; Shilpa Vaidya; Siri Narasimham ; Struts Users Mailing List; [EMAIL PROTECTED]; Tim Penhey; Wendy Smoak; Zhang, Larry Subject: Treeview - Frameless Layout in struts Folks, I am developing a J2EE based data oriented application using Struts. I want to develop a UI using Frameless Layout For Tree view, something like left side of the page will have a Tree View and depending on selected node right side of the page will be filled up with different forms for inputting/submitting/viewing the data in html. Can some one please point out me to some examples of Tree View Implementation used in JSP for left pane navigation ? I know Echo framework has this inbuilt functionality, But I want to develop this using struts. Any suggestions using JavaScript or ready to use tags are welcome. Thanks ! G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Treeview - Frameless Layout in struts
Why are you sending this to everyone? All you need to to is send it to the struts user list and we will all get it. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Yadav, Ganesh [EMAIL PROTECTED] To: Charles Cordingley [EMAIL PROTECTED]; Christopher Marsh-Bourdon [EMAIL PROTECTED]; [EMAIL PROTECTED]; David Friedman [EMAIL PROTECTED]; [EMAIL PROTECTED]; Duncan Mills (E-mail) [EMAIL PROTECTED]; Fernando Loygorri [EMAIL PROTECTED]; Frank Zammetti [EMAIL PROTECTED]; Hookom, Jacob [EMAIL PROTECTED]; James Mitchell [EMAIL PROTECTED]; Joe Hertz [EMAIL PROTECTED]; Kathy Zhou [EMAIL PROTECTED]; Marco Mistroni [EMAIL PROTECTED]; Mark Lowe [EMAIL PROTECTED]; McCormack, Chris [EMAIL PROTECTED]; [EMAIL PROTECTED]; mike [EMAIL PROTECTED]; Navjot Singh [EMAIL PROTECTED]; Niall Pemberton [EMAIL PROTECTED]; Pilgrim, Peter [EMAIL PROTECTED]; Rajat Pandit, Gurgaon [EMAIL PROTECTED]; Ram Venkataswamy [EMAIL PROTECTED]; Rick Reumann [EMAIL PROTECTED]; Riyad Kalla [EMAIL PROTECTED]; Ron Grabowski [EMAIL PROTECTED]; Shailender Jain [EMAIL PROTECTED]; Shilpa Vaidya [EMAIL PROTECTED]; Siri Narasimham [EMAIL PROTECTED]; Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED]; Tim Penhey [EMAIL PROTECTED]; Wendy Smoak [EMAIL PROTECTED]; Zhang, Larry [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 12:22 PM Subject: Treeview - Frameless Layout in struts Folks, I am developing a J2EE based data oriented application using Struts. I want to develop a UI using Frameless Layout For Tree view, something like left side of the page will have a Tree View and depending on selected node right side of the page will be filled up with different forms for inputting/submitting/viewing the data in html. Can some one please point out me to some examples of Tree View Implementation used in JSP for left pane navigation ? I know Echo framework has this inbuilt functionality, But I want to develop this using struts. Any suggestions using JavaScript or ready to use tags are welcome. Thanks ! G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use dynamically generated CSS style with Struts tags
For resources that make good candidates for caching, like images and CSS files, it's worth looking at using a servlet that overrides getLastModified. Obligatory JSTL plug: %@ page contentType=text/css % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % .cssMainBody { background-color : c:out value=${styleData.backgroundColor}/; color : c:out value=${styleData.textColor}/; font-family : c:out value=${styleData.fontFamily}/; font-size : c:out value=${styleData.fontSize}/; font-weight : c:out value=${styleData.fontWeight}/; } Even better with JSP2.0: %@ page contentType=text/css % .cssMainBody { background-color : ${styleData.backgroundColor}; color : ${styleData.textColor}; font-family : ${styleData.fontFamily}; font-size : ${styleData.fontSize}; font-weight : ${styleData.fontWeight}; } Quoting Frank Zammetti [EMAIL PROTECTED]: I don't at present use any taglibs whatsoever in the app I'm doing this in, so I don't know if there is any added complexity involved there. But as far as what I AM doing goes, I'm not sure what will really be helpful, so let me get as detailed as I can and you can ignore the superfolous parts... First, the application I'm doing this in allows users to set their own color scheme, font scheme, and some other style elements (within a defined set of things they can possibly change). So, I have a UserScheme table with columns like BackgroundColor, FontSize, TextColor, etc. So, in each JSP I have the line: link rel=StyleSheet href=/app/styles.act type=text/css This is mapped to an Action called StylesAction. All it does is reads in all the columns from the above table for the current user. I then dump all those values into a HashMap (I simply key it off the column name in the table). Next, in the styles.jsp, I do things like this: % HashMap styleData = (HashMap)request.get(styleData); % .cssMainBody { background-color : %=(String)styleData.get(backgroundColor)%; color : %=(String)styleData.get(textColor)%; font-family : %=(String)styleData.get(fontFamily)%; font-size : %=(String)styleData.get(fontSize)%; font-weight : %=(String)styleData.get(fontWeight)%; } ...and so on. Then, I just use those style classes in my other JSP's like I would any other style tag (I always do className=xxx where xxx is the classname like cssMainBody above). That's all there is to it. Without knowing more about the taglibs your using I can't really say if this will work as-is or not, but it certainly works were taglibs are not involved. Hope that helps! Frank From: Voinea, Marina [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: How to use dynamically generated CSS style with Struts tags Date: Wed, 23 Jun 2004 10:06:32 -0400 Thank you very much for your answer, Frank,This is the second time you come to my help! I don't want to seem lazy, but could you please give an example from the code... (the style sheet jsp and an example of a tag , for ex: html:text or anything else which is using the info from the syle sheet : do you use JSTL or Struts tags are enough? ( (I am curious how you pass info from the jsp stylesheet to the style and styleCLass attibutes of the STruts html tag I am just starting this, so I am sure I'll benefit from your proven experience...(instead of fighting my mistakes for a couple of days) ALso, regarding performance: do you think there is a significant performance hit to generate the styles inline in the tags (there are some concerns here...), as opposed to using a style sheet file (generated/refreshed from time to time and maybe cashed in the browser...). The tags are dynamically generated anyway, so I'm thinking additional style at run time may not be that bad, what do you think? Did you do any comparisons/benchmarks? Thank you very much, Marina -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 1:53 PM To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags I had to do something almost identical... My solution was to make my CSS file a JSP, and when I referenced that stylesheet in all the other JSP's, I did: where styles.act is actually an ActionMapping. I then had my StylesAction class, just like any other Action, that got some info out of the database and passed it along to the JSP, then I just used all the normal JSP/taglib functionality to dynamically build the CSS content. Frank From: Bill Siggelkow [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: How to use dynamically generated CSS style with Struts tags Date: Tue, 22 Jun 2004 13:28:47 -0400 Sounds like a custom JSP tag would work pretty well here ... Voinea, Marina wrote:
RE: Treeview - Frameless Layout in struts
There are quite a few tree controls there using diff. techs. Here are some of the controls I investigated during my project. Here is an article which explains how to build a simple tree control on your own. http://www.devx.com/webdev/Article/9843/0/page/2 Jpowered has some decent tree controls http://www.jpowered.com/ http://sourceforge.net/projects/jsptree/ http://sourceforge.net/projects/nanotree/ http://www.treemenu.net/treemenu/demos.asp There is no the tree control, it all depends on your requirements. HTH -Amar -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Siggelkow Sent: Wednesday, June 23, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: Re: Treeview - Frameless Layout in struts I think struts-menu (http://struts-menu.sourceforge.net) might suit your needs. Yadav, Ganesh wrote: Folks, I am developing a J2EE based data oriented application using Struts. I want to develop a UI using Frameless Layout For Tree view, something like left side of the page will have a Tree View and depending on selected node right side of the page will be filled up with different forms for inputting/submitting/viewing the data in html. Can some one please point out me to some examples of Tree View Implementation used in JSP for left pane navigation ? I know Echo framework has this inbuilt functionality, But I want to develop this using struts. Any suggestions using JavaScript or ready to use tags are welcome. Thanks ! G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: delete a record
This is not a struts issue. You have a few choices. JavaScript is a poor one, in my opinion. Use two response objects: one to give them the option and the second to give them the option the second time. Another way to do this is to archive the record instead of deleting it and only delete it upon confirmation. You can archive the record by creating a boolean archive value in the record. There are lots of solutions, of course. At 08:41 AM 6/23/2004, Julia Weaver wrote: Thank you Geeta, What I want to do is when user click DELETE button, will show a pop-window with information Are you sure you want to delete the record?, and with YES and NO buttons. --- Geeta Ramani [EMAIL PROTECTED] wrote: Julia: I think your question may not be too clear. First what do you mean by delete a record in struts? Strictly speaking, I believe Struts does not (should not) have code which properly belongs the business/database layer. So assuming that you want to show a confirmation page when your application successfully deletes a record in the database, all you have to do is forward the user to a success.jsp. Which is similar to what you always do in Struts. So what exactly is your problem? If you explain your problem more and/or show some code, maybe someone can help you out. Regards, Geeta -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 11:27 AM To: Struts Users Mailing List Subject: delete a record Hi, Can anyone please tell me: How to do a confirmation when delete a record in struts? Thank you, __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting html:hidden property using JSTL
Hi All, I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. Basically, i'd like to do something like this: html:hidden property=contentId value=c:out value=${contentId}// Which does not work. Should i be using EL syntax instead? And what would the correct syntax be? I did check that c:out value=${contentId}/ returns a valid value so my confusion is just passing it as a value to the html:hidden property. Any help is greatly appreciated. James __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
LabelValueBeans
Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris
Re: Setting html:hidden property using JSTL
I've also noticed you are doubling up on double quotes, try this: html:hidden property=contentId value=c:out value='${contentId}'// or html:hidden property=contentId value='c:out value=${contentId}/'/ Cheers Christopher Marsh-Bourdon Pyplia Limited klute [EMAIL PROTECTED] 23/06/2004 18:25 Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Setting html:hidden property using JSTL Hi All, I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. Basically, i'd like to do something like this: html:hidden property=contentId value=c:out value=${contentId}// Which does not work. Should i be using EL syntax instead? And what would the correct syntax be? I did check that c:out value=${contentId}/ returns a valid value so my confusion is just passing it as a value to the html:hidden property. Any help is greatly appreciated. James __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited.
Re: Setting html:hidden property using JSTL
James Do you include the HTML tag library within the jsp page? It needs to go at the top and look like this: %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % Cheers Christopher Marsh-Bourdon Pyplia Limited klute [EMAIL PROTECTED] 23/06/2004 18:25 Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Setting html:hidden property using JSTL Hi All, I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. Basically, i'd like to do something like this: html:hidden property=contentId value=c:out value=${contentId}// Which does not work. Should i be using EL syntax instead? And what would the correct syntax be? I did check that c:out value=${contentId}/ returns a valid value so my confusion is just passing it as a value to the html:hidden property. Any help is greatly appreciated. James __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this e-mail is confidential. It is intended solely for the addressee. If you are not the intended recipient please notify the sender immediately and delete this message. Any review, dissemination, distribution, copying or other use of this communication or the information in it is strictly prohibited.
R: Setting html:hidden property using JSTL
Hi, yes you can use the EL but depends on the Web Container you are using. If you have a Web container JSP2.0 (and 2.4 servlet) compliant (for example Tomcat5.0.x), you can use JSTL 1.1 (if you want to use them you have to set your application)and html Struts standard. In order to use, this version you have to do the following in the jsp page: %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html% html:hidden property=contentId value=${contentId}/ But if you have a WebContainer JSP1.2 compliant (e.g. Tomcat 4.x) you have to use the html-el version + JSTL1.0. They are in the contrib directory inside the struts directory. But in this case the procedure in order to use them is just to complicate. BR /Amleto -Messaggio originale- Da: klute [mailto:[EMAIL PROTECTED] Inviato: mercoledì 23 giugno 2004 19.25 A: Struts Users Mailing List Oggetto: Setting html:hidden property using JSTL Hi All, I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. Basically, i'd like to do something like this: html:hidden property=contentId value=c:out value=${contentId}// Which does not work. Should i be using EL syntax instead? And what would the correct syntax be? I did check that c:out value=${contentId}/ returns a valid value so my confusion is just passing it as a value to the html:hidden property. Any help is greatly appreciated. James __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LabelValueBeans
No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting html:hidden property using JSTL
klute wrote: Hi All, I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. Basically, i'd like to do something like this: html:hidden property=contentId value=c:out value=${contentId}// Which does not work. Should i be using EL syntax instead? And what would the correct syntax be? Use the html-el tag instead of the html tag. Then you can do: html-el:hidden property=contentId value=${contentId}/ Much cleaner. Although remember it might even be easier/cleaner to simply make sure contentId is in your ActionForm .. then you can just do... html:hidden property=contentId/ and it'll set the value for you. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LabelValueBeans
I saw an example somewhere using indexed properties like: labelvalue[index].label labelvalue[index].value If I can get at the data this way, there is no way to set it? Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:52 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts and PL/SQL
Hi all! I´ve been using Struts a lot with EJB and Hibernate with no problems. But I always wondered if it´s possible to use an architecture that uses STRUTS and goes directly to PL/SQL for the database layer. I know it is possible in many way, but I would like to know if there is any special product or package that integrates with PL ( the only one I found is http://portalstudio.oracle.com/servlet/page?_pageid=473_dad=ops_schema=OPSTUDIO ) ... any pointers? Thanks a lot Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LabelValueBeans
Last time I looked there were getters but no setters. What version are you running? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:57 PM Subject: RE: LabelValueBeans I saw an example somewhere using indexed properties like: labelvalue[index].label labelvalue[index].value If I can get at the data this way, there is no way to set it? Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:52 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LabelValueBeans
Hmm...sorry for the misinformation, seems it has had them for a whilenot sure what I was thinking (need more coffee) So, ignore me. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 2:04 PM Subject: Re: LabelValueBeans Last time I looked there were getters but no setters. What version are you running? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:57 PM Subject: RE: LabelValueBeans I saw an example somewhere using indexed properties like: labelvalue[index].label labelvalue[index].value If I can get at the data this way, there is no way to set it? Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:52 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LabelValueBeans
I think 1.2. When I look at the properties in my editor on this object, I do see: setLabel(java.lang.String) setValue(java.lang.String) So how would one create a form element in their JSP to populate an array of LabelValueBeans? I'm getting the following error: javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:816) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) And my form uses input type=hidden name=labelvalue[0].label value=3M input type=hidden name=labelvalue[0].value value=4337 Thanks Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 2:04 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans Last time I looked there were getters but no setters. What version are you running? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:57 PM Subject: RE: LabelValueBeans I saw an example somewhere using indexed properties like: labelvalue[index].label labelvalue[index].value If I can get at the data this way, there is no way to set it? Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:52 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting html:hidden property using JSTL
Thanks a lot to all who responded! So i tried using html-el using the syntax Rick suggested: html-el:hidden property=contentId value=${contentId}/ The resulting html contains: input type=hidden name=contentId value=${contentId} This are the tagligs i am importing on this page: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % What am i doing wrong? Thanks a lot, James --- Rick Reumann [EMAIL PROTECTED] wrote: klute wrote: Hi All, I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. Basically, i'd like to do something like this: html:hidden property=contentId value=c:out value=${contentId}// Which does not work. Should i be using EL syntax instead? And what would the correct syntax be? Use the html-el tag instead of the html tag. Then you can do: html-el:hidden property=contentId value=${contentId}/ Much cleaner. Although remember it might even be easier/cleaner to simply make sure contentId is in your ActionForm .. then you can just do... html:hidden property=contentId/ and it'll set the value for you. -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to read a large XML file in the ActionServlet
Hi I want to read a a large XML file for each request that comes to the ActionServlet. This is for a reporting application. What I did was I created seperate XML file where I have specified the action elements and its related subelements. So when I get the request I get the corresponding XML node from the XML file for that action and based on its subelements I enter a log into a database. So I have my customized ActionServlet. And I am instantiating myXmlClass in the process method. And I call a method called myXmlClassObject.getXMLLogMessage() for each request (for each Action class). What is the recommended way to do this. The problem that I am having is that the application freezes at the line instantiate myXmlClass in the process method of my servlet. Currently my code look like this //MyActionServlet.java init() { //perform initialization() super.init() } process() { //do stuff instantiate myXmlClass (which has a _saxparser.parse() method) myXmlClassObject.getXMLLogMessage()//some database calls underneath it for some logging //do stuff } Should I make a static object of myXmlClass in my actionServlet. Should I put myXmlClass into session, and check for each request whether this object exists in session, if not create it. Please help!! _ Make the most of your family vacation with tips from the MSN Family Travel Guide! http://dollar.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to read a large XML file in the ActionServlet
I don't care how good of an XML parser you are using, parsing virtually any XML file on a per-request basis is a Bad Idea (tm). You definitely want to find a way to (a) store the parsed information in memory, or (b) maybe read it from a database, which may or may not actually wind up being any better depending on numerous factors. I used to have to use a custom framework here at work before my glorious leaders finally decided to listen to us architects an use Struts. This framework used XML profile database, much like struts-config.xml. Early on, this thing was reading this file for EVERY request, just to determine which controller element to execute and where to forward to afterwards. Apps built on this thing were just barely OK on killer hardware. Well, the very first week I was using the thing, I rewrote the preprocessor that parsed this file and instead read it in once at app startup and then read the data in memory. True, there was no longer a way to do real-time profile changes without downing the app, but all of a sudden our apps were flying like nobody's business, and server load decreased for the same number of concurrent users by a HUGE factor. Needless to say, people were rather happy. I can't stress the point enough: parsing XML per-request is almost never a good idea. Making your myXmlClass class static (well, the result of the XML parsing static anyway) is one way to go, and might be the best way, performance-wise. Do the parsing from a Struts plug-in, store it in a HashMap or whatever you need it to be in that class as a static member, and your problem will probably go away. Frank From: manoj JC [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: How to read a large XML file in the ActionServlet Date: Wed, 23 Jun 2004 14:15:08 -0400 Hi I want to read a a large XML file for each request that comes to the ActionServlet. This is for a reporting application. What I did was I created seperate XML file where I have specified the action elements and its related subelements. So when I get the request I get the corresponding XML node from the XML file for that action and based on its subelements I enter a log into a database. So I have my customized ActionServlet. And I am instantiating myXmlClass in the process method. And I call a method called myXmlClassObject.getXMLLogMessage() for each request (for each Action class). What is the recommended way to do this. The problem that I am having is that the application freezes at the line instantiate myXmlClass in the process method of my servlet. Currently my code look like this //MyActionServlet.java init() { //perform initialization() super.init() } process() { //do stuff instantiate myXmlClass (which has a _saxparser.parse() method) myXmlClassObject.getXMLLogMessage()//some database calls underneath it for some logging //do stuff } Should I make a static object of myXmlClass in my actionServlet. Should I put myXmlClass into session, and check for each request whether this object exists in session, if not create it. Please help!! _ Make the most of your family vacation with tips from the MSN Family Travel Guide! http://dollar.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting html:hidden property using JSTL
klute wrote: input type=hidden name=contentId value=${contentId} This are the tagligs i am importing on this page: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % What am i doing wrong? Are you sure you added the struts-el jar to your webapp lib? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and PL/SQL
At 3:06 PM -0300 6/23/04, Lucas Gonzalez wrote: Hi all! I´ve been using Struts a lot with EJB and Hibernate with no problems. But I always wondered if it´s possible to use an architecture that uses STRUTS and goes directly to PL/SQL for the database layer. I know it is possible in many way, but I would like to know if there is any special product or package that integrates with PL ( the only one I found is http://portalstudio.oracle.com/servlet/page?_pageid=473_dad=ops_schema=OPSTUDIO ) ... any pointers? In common usage, your Struts development shouldn't need to know anything about your database layer; after that, you might get better answers from a PL/SQL user forum. I have certainly used Java to call PL/SQL stored procedures before, but not in a way that is specific to either Struts or PL/SQL; I simply used java.sql.CallableStatement. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place. - Carlos Santana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LabelValueBeans
Found my problem. I didn't have a getter method: public LabelValueBean getManufacturers(int index) { } Thanks Chris -Original Message- From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 2:05 PM To: 'Struts Users Mailing List' Subject: RE: LabelValueBeans I think 1.2. When I look at the properties in my editor on this object, I do see: setLabel(java.lang.String) setValue(java.lang.String) So how would one create a form element in their JSP to populate an array of LabelValueBeans? I'm getting the following error: javax.servlet.ServletException: BeanUtils.populate at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1098) at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j ava:816) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254) And my form uses input type=hidden name=labelvalue[0].label value=3M input type=hidden name=labelvalue[0].value value=4337 Thanks Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 2:04 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans Last time I looked there were getters but no setters. What version are you running? -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:57 PM Subject: RE: LabelValueBeans I saw an example somewhere using indexed properties like: labelvalue[index].label labelvalue[index].value If I can get at the data this way, there is no way to set it? Chris -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:52 PM To: Struts Users Mailing List Subject: Re: LabelValueBeans No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Message Resource lookup curiosity..
Yeah, this was one of the options I considered. I really hate hate hate the idea of storing form.gender.male in the database. I'm imagining all the SQL that would have to be executed on the production system if it ever changes. -Original Message- From: Eddie Yan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 6:10 AM To: Struts Users Mailing List Subject: Re: Message Resource lookup curiosity.. This will depends on your design strategy. Say Message.properties is: form.gender.male=Male form.gender.female=Female and you are storing the key form.gender.male into the database. So, you need to write a simple class Commons.java that contains: public final static String getMsg(MessageResources msgRes, Locale locale, String key) { String msg = ; try { msg = msgRes.getMessage(locale, key); } catch (Exception e) { System.out.println(Error in getting message. + e.toString()); } return msg; } In your Action class: form.setGender(Commons.getMsg(this.getResources(request), this.getLocale(request), form.gender.male)); of course you need to retrieve the form.gender.male key from the database as a String attribute. So to display the value in your jsp page: bean:write name=myForm property=gender scope=request filter=true/ The property gender is a property in your detail and form object. - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 4:00 PM Subject: Message Resource lookup curiosity.. Caroline Jen's question make me think about something. I'm wondering how other people deal with this particular issue- Say that you have some sort of i18n'd app, and on a JSP screen for doing CRUD, you have one or more select boxes. You use html:option tags that get the labels (and maybe even the values) out of the correct Message Resource properties file. This gets whatever you need saved into the database that way in any language you support. Great. No problem. But - later on some display screen: You have retrieved the value that had been previously of the select box. You want to display the corresponding label with a bean:message tag. It's in the properties file after all. So, how do you go about getting the key for the corresponding label to display? How do you go about divining the key to use to get it out of your MessageResource file? I mean, if you can't do that, why bother using the properties file for this in the first place? The solution would be more obvious if html:options or html:optionsCollection supported a key attribute (how it would be supposed to work is another good question!). I see the following ways to go about it. 1) A database lookup for value-MessageResources key, preferably into some collection in application scope at startup. 2) making the values themselves the MessageResources keys (Gag. Choke. Wheeze.) 3) Some sort of call to MessageResources or MessageBundle, or an extension to said classes. hand waving occurs Option 1 seems to be the most palatable if there's a way to do it without needing to change the code with every message resource addition. Maybe #3 resulting in #1. Anyone got an approach they like? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting html:hidden property using JSTL
Yes, the struts-el.jar is in WEB-INF/lib --- Rick Reumann [EMAIL PROTECTED] wrote: klute wrote: input type=hidden name=contentId value=${contentId} This are the tagligs i am importing on this page: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % What am i doing wrong? Are you sure you added the struts-el jar to your webapp lib? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts and PL/SQL
If your trying to avoid the overhead of EJB, then you may want to look into the Spring framework. I've been wanting to find a flexible architecture/framework which allows me to start with a non-EJB type of approach and easily scale to using an EJB container while minimizing the impact on the application. This article may provide some insight: http://www.theserverside.com/articles/printfriendly.tss?l=SpringFramework I would still advise wrapping your dataccess code in a business delegate or application service instead of binding your Struts Action to the business logic implementation. robert -Original Message- From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 2:07 PM To: Struts Users Mailing List Subject: Struts and PL/SQL Hi all! I´ve been using Struts a lot with EJB and Hibernate with no problems. But I always wondered if it´s possible to use an architecture that uses STRUTS and goes directly to PL/SQL for the database layer. I know it is possible in many way, but I would like to know if there is any special product or package that integrates with PL ( the only one I found is http://portalstudio.oracle.com/servlet/page?_pageid=473_dad=ops_schema=OPSTUDIO ) ... any pointers? Thanks a lot Lucas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to read a large XML file in the ActionServlet
Thank you very much for your suggestions, Frank. That was really helpful. From: Frank Zammetti [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: How to read a large XML file in the ActionServlet Date: Wed, 23 Jun 2004 14:30:27 -0400 I don't care how good of an XML parser you are using, parsing virtually any XML file on a per-request basis is a Bad Idea (tm). You definitely want to find a way to (a) store the parsed information in memory, or (b) maybe read it from a database, which may or may not actually wind up being any better depending on numerous factors. I used to have to use a custom framework here at work before my glorious leaders finally decided to listen to us architects an use Struts. This framework used XML profile database, much like struts-config.xml. Early on, this thing was reading this file for EVERY request, just to determine which controller element to execute and where to forward to afterwards. Apps built on this thing were just barely OK on killer hardware. Well, the very first week I was using the thing, I rewrote the preprocessor that parsed this file and instead read it in once at app startup and then read the data in memory. True, there was no longer a way to do real-time profile changes without downing the app, but all of a sudden our apps were flying like nobody's business, and server load decreased for the same number of concurrent users by a HUGE factor. Needless to say, people were rather happy. I can't stress the point enough: parsing XML per-request is almost never a good idea. Making your myXmlClass class static (well, the result of the XML parsing static anyway) is one way to go, and might be the best way, performance-wise. Do the parsing from a Struts plug-in, store it in a HashMap or whatever you need it to be in that class as a static member, and your problem will probably go away. Frank From: manoj JC [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: How to read a large XML file in the ActionServlet Date: Wed, 23 Jun 2004 14:15:08 -0400 Hi I want to read a a large XML file for each request that comes to the ActionServlet. This is for a reporting application. What I did was I created seperate XML file where I have specified the action elements and its related subelements. So when I get the request I get the corresponding XML node from the XML file for that action and based on its subelements I enter a log into a database. So I have my customized ActionServlet. And I am instantiating myXmlClass in the process method. And I call a method called myXmlClassObject.getXMLLogMessage() for each request (for each Action class). What is the recommended way to do this. The problem that I am having is that the application freezes at the line instantiate myXmlClass in the process method of my servlet. Currently my code look like this //MyActionServlet.java init() { //perform initialization() super.init() } process() { //do stuff instantiate myXmlClass (which has a _saxparser.parse() method) myXmlClassObject.getXMLLogMessage()//some database calls underneath it for some logging //do stuff } Should I make a static object of myXmlClass in my actionServlet. Should I put myXmlClass into session, and check for each request whether this object exists in session, if not create it. Please help!! _ Make the most of your family vacation with tips from the MSN Family Travel Guide! http://dollar.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and PL/SQL
Joe, calling PL/SQL stored procedures is certainly a way to do it, but as you said.. the db layer should abstracted as much as possible... I have some ideas of how to do it, but was looking around to see if somebody knew something about that... or had other ideas... Regards, Lucas - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 3:33 PM Subject: Re: Struts and PL/SQL At 3:06 PM -0300 6/23/04, Lucas Gonzalez wrote: Hi all! I´ve been using Struts a lot with EJB and Hibernate with no problems. But I always wondered if it´s possible to use an architecture that uses STRUTS and goes directly to PL/SQL for the database layer. I know it is possible in many way, but I would like to know if there is any special product or package that integrates with PL ( the only one I found is http://portalstudio.oracle.com/servlet/page?_pageid=473_dad=ops_schema=OP STUDIO ) ... any pointers? In common usage, your Struts development shouldn't need to know anything about your database layer; after that, you might get better answers from a PL/SQL user forum. I have certainly used Java to call PL/SQL stored procedures before, but not in a way that is specific to either Struts or PL/SQL; I simply used java.sql.CallableStatement. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place. - Carlos Santana - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting html:hidden property using JSTL
klute wrote: Yes, the struts-el.jar is in WEB-INF/lib --- Rick Reumann [EMAIL PROTECTED] wrote: klute wrote: input type=hidden name=contentId value=${contentId} This are the tagligs i am importing on this page: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % What am i doing wrong? Not sure. If you have - struts-el jar included - proper definition of the tld in web.xml - proper declaration for the tld on top of the page then using it as: html-el:hidden property=contentId value=${contentId}/ should be fine. The only thing I'm still concerned about and maybe somehow it's related is that contentId has to be a property of your ActionForm or else Struts would complain that it couldn't find the property 'contentId' Are you maybe creating the contentId var dynamically first in the JSP page and then trying to set as above? Usually you don't need to do like you are doing (setting the value) since that value can be set before you get to the page and thus just doing html:hidden property=contentId would be fine. What does c:out value=${contentId}/ produce on the page (or in source) when placed right before the html-el hidden tag? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting html:hidden property using JSTL
I believe the reason it's not populated in the action form is because its in the request as an attribute and not a parameter. snip-from-original-post I just started experimenting with jstl and i'd like to set a hidden field on MyActionForm using a value (contentId) available as an attribute on the request. /snip-from-original-post robert -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 3:23 PM To: Struts Users Mailing List Subject: Re: Setting html:hidden property using JSTL klute wrote: Yes, the struts-el.jar is in WEB-INF/lib --- Rick Reumann [EMAIL PROTECTED] wrote: klute wrote: input type=hidden name=contentId value=${contentId} This are the tagligs i am importing on this page: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % What am i doing wrong? Not sure. If you have - struts-el jar included - proper definition of the tld in web.xml - proper declaration for the tld on top of the page then using it as: html-el:hidden property=contentId value=${contentId}/ should be fine. The only thing I'm still concerned about and maybe somehow it's related is that contentId has to be a property of your ActionForm or else Struts would complain that it couldn't find the property 'contentId' Are you maybe creating the contentId var dynamically first in the JSP page and then trying to set as above? Usually you don't need to do like you are doing (setting the value) since that value can be set before you get to the page and thus just doing html:hidden property=contentId would be fine. What does c:out value=${contentId}/ produce on the page (or in source) when placed right before the html-el hidden tag? -- Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LabelValueBeans
You can rewrite or extend the class to suit yourself, of course. At 10:52 AM 6/23/2004, James Mitchell wrote: No, look at the source for the class and you'll see why. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: CRANFORD, CHRIS [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 1:31 PM Subject: LabelValueBeans Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Thanks! Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting index value of iteration
I have been pouring over all the posts and how-tos I can find on indexed properties and indexed values in general, and I am just not getting it. Here is what I am trying to do: I have a search page in a section of my main jsp. It returns results into a SELECT, and the chosen item in the SELECT populates it's corresponding property in the related Form. In another section of the page I display an iterated list of items in a collection. In each row that is rendered, I have a text input control, and a button next to it. When the user clicks on the button, the idea is to have the selected result from the search populate the text input control. I call a method in the related Action class to retrieve the selected search result, and then I need to put it into the correct detail item. THere is a property in the detail item corresponding to the text input control. So I would like to do somthing like collection[i].setDestIndex(srchForm.getSelText); but I am stuck on how to get the value of i, the index of the row wherein the button was clicked. I have tried setting up the iterate tag as: nested:iterate id=index property=costs . nested:text property=destIndex indexed=true / There is an index property in the Form, and in the item class that is a member of the collection being iterated over. I cannot seem to catch the index property anywhere, either as a property in struts or as request.getParameter(index). I am sure this is easy THanks for any ideas you can float my way, and please use small words to match my minimal intellect g T. McCobb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting index value of iteration
well, didn't know if this is what you're looking for, but recently i've discovered how to use indexed properties: first, the jsp (sorry for the spanish comments): %@ taglib prefix=logic uri=/WEB-INF/struts-logic.tld % %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % head titleExample of a Bean Based Purchase Order/title /head h1Example of a Bean Based Purchase Order/h1 html:form action=/generateBeanPO TABLE WIDTH=80% BORDER=1 TRTH align=leftPart Number/TH TH align=leftQuantity/TH TH align=leftPrice/TH/TR !-- watch out with the id, en the form bean there must be a method related to it -- logic:iterate id=linea name=purchaseOrderBeanForm property=lines TRTDhtml:text indexed=true name=linea property=partNumber//TD TDhtml:text indexed=true name=linea property=quantity//TD TDhtml:text indexed=true name=linea property=price//TD/TR /logic:iterate /table html:hidden property=accion value=capturado/ html:submit/ /html:form now in the ActionForm package org.hospital; import org.apache.struts.action.*; import java.util.ArrayList; public class PurchaseOrderBeanForm extends ActionForm { /** * Propiedad Lines. * Almacena todo el conjunto de lineas */ private ArrayList lines = null; /** * Devuelve el valor de la propiedad lines . * [EMAIL PROTECTED] El valor actual de Lines */ public ArrayList getLines() { return this.lines; } /** * Establece el nuevo valor para la propiedad lines . * [EMAIL PROTECTED] lines El nuevo valor para lines . */ public void setLines(ArrayList lines) { this.lines = lines; } /** * Returns an linea object from the lines ArrayList. * It is related to the linea property in the jsp * logic:iterate * [EMAIL PROTECTED] El valor actual de Linea */ public POLine getLinea(int index) { return (POLine)this.lines.get(index); } /** * Establece el nuevo valor para la propiedad linea. * [EMAIL PROTECTED] lines El nuevo valor para linea. */ public void setLinea(int index, POLine valor) { this.lines.add(index, valor); } /** * Propiedad Accion. */ private String accion = null; /** * Devuelve el valor de la propiedad accion . * [EMAIL PROTECTED] El valor actual de Accion */ public String getAccion() { return this.accion; } /** * Establece el nuevo valor para la propiedad accion . * [EMAIL PROTECTED] accion El nuevo valor para accion . */ public void setAccion(String accion) { this.accion = accion; } } the POLine object: package org.hospital; public class POLine { private String partNumber; private String quantity; private String price; private double total; public String getPartNumber() { return partNumber; } public void setPartNumber(String partNumber) { this.partNumber = partNumber; } public String getQuantity() { return quantity; } public void setQuantity(String quantity) { this.quantity = quantity; } public String getPrice() { return price; } public void setPrice(String price) { this.price = price; } public double getTotal() { return total; } public void setTotal(double total) { this.total = total; } } The Action: import org.apache.struts.action.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletException; import java.io.IOException; import java.util.ArrayList; public class GenerateBeanPO extends Action { String mapeo = inicializa; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PurchaseOrderBeanForm poForm = (PurchaseOrderBeanForm) form; ArrayList lines = new ArrayList(); System.out.println( Estoy en GenerateBeanPO **); //llenamos el ArrayList if(poForm.getAccion() == null) { for(int i = 0; i 10; i++) { POLine linea = new POLine(); linea.setPartNumber(String.valueOf(i)); lines.add(linea); } poForm.setLines(lines); mapeo = inicializa; } else { try { //recover ArrayList ArrayList lineas = poForm.getLines(); //and show it
Re: [OT] Jobs
Hello James, Please consider my qualifications for a Java position. My resume in Word format is attached. Thank you for your consideration. Sincerely, Will Wagers - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 8:29 PM Subject: Re: [OT] Jobs I am trying to find 10 descent struts developers to fill open positions. I tell ya, its nice to be needed instead of how it was a year ago where we were all under bidding each other. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Chappell, Simon P [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 5:13 PM Subject: RE: [OT] Jobs James, Is that desperate to fill a job vacancy or desperate to get one? Simon -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 3:14 PM To: Struts Users Mailing List Subject: [OT] Jobs Please forgive the off topic post, but I'm desperate. If you are in or near Atlanta GA, and looking for a Struts job. Please send me a direct email. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Jobs
Oops! Please disregard my previous post. It was sent in error and ignorance. It was intended for a private party. Sorry for the inconvenience. Will - Original Message - To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 5:07 PM Subject: Re: [OT] Jobs Hello James, Please consider my qualifications for a Java position. My resume in Word format is attached. Thank you for your consideration. Sincerely, Will Wagers - Original Message - From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 8:29 PM Subject: Re: [OT] Jobs I am trying to find 10 descent struts developers to fill open positions. I tell ya, its nice to be needed instead of how it was a year ago where we were all under bidding each other. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - Original Message - From: Chappell, Simon P [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 5:13 PM Subject: RE: [OT] Jobs James, Is that desperate to fill a job vacancy or desperate to get one? Simon -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 3:14 PM To: Struts Users Mailing List Subject: [OT] Jobs Please forgive the off topic post, but I'm desperate. If you are in or near Atlanta GA, and looking for a Struts job. Please send me a direct email. -- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tree view - Frameless Layout in struts
Thanks Amar,Matthias Bill Amar your finding were really very helpful to me. Looks like nanotree is a perfect feet for my requirements as I don't have any dynamic nodes and it is fast using JavaScript implementation. Last but not least Great Work Martin ([EMAIL PROTECTED]) The King Of NanoTree Thank You all Guys again G -Original Message- From: Jirole, Amar [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 12:02 PM To: 'Struts Users Mailing List' Subject: RE: Treeview - Frameless Layout in struts There are quite a few tree controls there using diff. techs. Here are some of the controls I investigated during my project. Here is an article which explains how to build a simple tree control on your own. http://www.devx.com/webdev/Article/9843/0/page/2 Jpowered has some decent tree controls http://www.jpowered.com/ http://sourceforge.net/projects/jsptree/ http://sourceforge.net/projects/nanotree/ http://www.treemenu.net/treemenu/demos.asp There is no the tree control, it all depends on your requirements. HTH -Amar -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Siggelkow Sent: Wednesday, June 23, 2004 12:57 PM To: [EMAIL PROTECTED] Subject: Re: Treeview - Frameless Layout in struts I think struts-menu (http://struts-menu.sourceforge.net) might suit your needs. Yadav, Ganesh wrote: Folks, I am developing a J2EE based data oriented application using Struts. I want to develop a UI using Frameless Layout For Tree view, something like left side of the page will have a Tree View and depending on selected node right side of the page will be filled up with different forms for inputting/submitting/viewing the data in html. Can some one please point out me to some examples of Tree View Implementation used in JSP for left pane navigation ? I know Echo framework has this inbuilt functionality, But I want to develop this using struts. Any suggestions using JavaScript or ready to use tags are welcome. Thanks ! G - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to pass parameters to forward in bean:include?
I would like to do a bean:include id = forward= ... / ... but looking at the Struts API, something I cannot do is pass the forward parameters. If it were an struts html link tag I could do: html:link forward= paramId= paramName= ... / ... thus calling the forward with parameters. Can I not do this with the forward used in my bean:include? How the heck can I pass parameters to a forward in a bean include then? Any help much appreciated. syg - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
Re: LabelValueBeans
At 1:31 PM -0400 6/23/04, CRANFORD, CHRIS wrote: Is there anyway to have a property in my ActionForm class be defined as follows: private LabelValueBean[] myItems; And be able to have struts automatically populate this collection when the form is submitted? If so, how do I go about storing those values in the form so they're seen and populated properly upon submission? Well, a LabelValueBean has two string properties -- how would you automatically populate even a single instance, let alone an array? Or are you suggesting that the form presents the user with a series of paired input fields, essentially label1, value1, label2, value2, etc? If so, you could essentially do it by exposing an indexed property, labelValueBeans and then arranging to have your request parameters be named as such: labelValueBeans[0].label labelValueBeans[0].value labelValueBeans[1].label labelValueBeans[1].value I would do this using c:forEach and the struts-el tags, roughly like this: c:forEach begin=0 end=5 varStatus=status Label: html:text property=labelValueBeans[${status.count}].label /br / Value: html:text property=labelValueBeans[${status.count}].value /br / /c:forEach If you aren't using the EL, there are other ways to do this, but frankly, I never learned how to do them and I think it's cleaner with the JSTL. Joe -- -- Joe Germuska Vice President, Software Development JGSullivan Interactive, Inc. [EMAIL PROTECTED] 312/943-1600 x2488 (v) 312/943-9675 (f) [EMAIL PROTECTED] 312/404-3783 (m) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator maxlength, minlength
In essence, maxlength and minlength are working backwords from what I would expect. I fully expect this to pebcak error, but I can't seem to find it. I'm getting : Address 1 can not be greater than 30 characters. Address 2 can not be greater than 30 characters. City can not be greater than 30 characters. When address 1 is 27 characters, address 2 is blank and city is 10. Clearly I've fat fingered something somewhere. Can anyone help me figure out why maxlength is acting like minlength? btw minlength also works backwards. Validation file looks like: ... constant constant-nameaddressLength/constant-name constant-value30/constant-value /constant constant constant-namecityLength/constant-name constant-value30/constant-value /constant ... field property=address1 depends=required, maxlength arg0 key=ChangeAddressForm.address1 / arg1 name=maxlength key=${var:addressLength} resource=false / var var-nameaddressLength/var-name var-value${addressLength}/var-value /var /field field property=address2 depends=maxlength arg0 key=ChangeAddressForm.address2 / arg1 name=maxlength key=${var:addressLength} resource=false / var var-nameaddressLength/var-name var-value${addressLength}/var-value /var /field field property=city depends=required,maxlength arg0 key=ChangeAddressForm.city / arg1 name=maxlength key=${var:cityLength} resource=false / var var-namecityLength/var-name var-value${cityLength}/var-value /var /field ... and the form: ... private String address1 = null; private String address2 = null; private String city = null; ... appropriate getters setters etc. James A Barrows - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to pass parameters to forward in bean:include?
Did you try using the 'page' attribute and just adding the values manually to the query string? Robert Bowen wrote: I would like to do a bean:include id = forward= ... / ... but looking at the Struts API, something I cannot do is pass the forward parameters. If it were an struts html link tag I could do: html:link forward= paramId= paramName= ... / ... thus calling the forward with parameters. Can I not do this with the forward used in my bean:include? How the heck can I pass parameters to a forward in a bean include then? Any help much appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and PL/SQL
You can/should do both: use PL SQL and make it light and make it seperate DAO. Look at the DAO implementation and sample PetStore on iBatis.com. .V Lucas Gonzalez wrote: Joe, calling PL/SQL stored procedures is certainly a way to do it, but as you said.. the db layer should abstracted as much as possible... I have some ideas of how to do it, but was looking around to see if somebody knew something about that... or had other ideas... Regards, Lucas - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 3:33 PM Subject: Re: Struts and PL/SQL At 3:06 PM -0300 6/23/04, Lucas Gonzalez wrote: Hi all! I´ve been using Struts a lot with EJB and Hibernate with no problems. But I always wondered if it´s possible to use an architecture that uses STRUTS and goes directly to PL/SQL for the database layer. I know it is possible in many way, but I would like to know if there is any special product or package that integrates with PL ( the only one I found is http://portalstudio.oracle.com/servlet/page?_pageid=473_dad=ops_schema=OP STUDIO ) ... any pointers? In common usage, your Struts development shouldn't need to know anything about your database layer; after that, you might get better answers from a PL/SQL user forum. I have certainly used Java to call PL/SQL stored procedures before, but not in a way that is specific to either Struts or PL/SQL; I simply used java.sql.CallableStatement. Joe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tools for JSP
Hi there, I was wonder if there is a tool for devloping of JSP pages or is there a way to quickly produce JSP pages? Thanks. James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tools for JSP
WSAD or JBuilder On Wed, 23 Jun 2004 22:52:20 -0400, leonnewsgroup [EMAIL PROTECTED] wrote: Hi there, I was wonder if there is a tool for devloping of JSP pages or is there a way to quickly produce JSP pages? Thanks. James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- @Copyleft 200X www.hutuworm.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts - How to recover collection element
I've loaded a collection of valid options and their descriptions as a ServletContext attribute, for use in an html:options tag. It works as intended in a generated html select tag. Once a user selects an option, the option value (rather than the description) is recorded in a form bean, and the form bean is forwarded to another form. So far so good. What I'd like to do in the next form is display the description of the selected option, using the option as a lookup key to the original collection. Is there an existing struts tag that will allow me to do this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts - How to recover collection element
There are a couple of ways of doing this. I think the best approach is to wrap your collection in a JavaBean that is stored in the session. Something like the following: public class OptionsHolder { Map options = new HashMap(); public OptionsHolder() { options.put(key1, new LabelValueBean(foo,key1)); options.put(key2, new LabelValueBean(foo,key1)); } public Collection getOptionsCollection() { return options.values(); } public Map getOptionsMap() { return options; } } You can then use the getOptionsCollection() method to render the options in the first form. Then in the page where you want to display the value for the key, you can use JSTL. Assuming the ServletContext attribute name were optionsHolder and the key was in the property 'key' on the form: c:out value=${optionsHolder.optionsMap[MyForm.key]}/ Another alternative is to create a mapped property in the OptionsHolder bean; then use Struts support for mapped properties in the bean:write tag. Finally, a third alternative would be to fetch the value in the action that processes the form. Extract the desired value then set it as a request attribute for display on the subsequent JSP. With this approach you might not need to use the OptionsHolder class and instead just iterate over the collection looking for a match. [EMAIL PROTECTED] wrote: I've loaded a collection of valid options and their descriptions as a ServletContext attribute, for use in an html:options tag. It works as intended in a generated html select tag. Once a user selects an option, the option value (rather than the description) is recorded in a form bean, and the form bean is forwarded to another form. So far so good. What I'd like to do in the next form is display the description of the selected option, using the option as a lookup key to the original collection. Is there an existing struts tag that will allow me to do this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to execute an initialization by using another servlet entry in web.xml
Can somebody provide some sample code to do this. Please look at this link http://nagoya.apache.org/wiki/apachewiki.cgi?StrutsInitialization. I want to use #3 approach mentioned in this link. My questions are : (A stupid question) Does this initialization class that I would specify in web.xml, should it be a servlet,ActionServlet, or most importantly could it be a just an ordinary java class. How do I access this servlet entry(this instance of class) from my main ActionServlet? Thank you _ MSN Toolbar provides one-click access to Hotmail from any Web page FREE download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
generators for struts
hi i am starting a new project which involves struts and i am completely new to it. The IDE i am familar with is Netbeans. What tool does fellow developers used for struts? I downloaded struts console but looks like it allow me to edit/manage struts configuration file in netbeans only. Is there any xdoclet like tool that make code generation easiler? If possible please provide plugin/tool for netbeans instead of eclipse. I can't find a plugin for running jboss in netbeans too. Any references? Thanks Sebastian Ho - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]