System.out.println

2004-08-05 Thread Shailender Jain
Hi, During the development of the project we used System.out.println to do the debugging. Now i want to put the application in production. But i want that some how this command should not populate the log files. (catalina.out). I am using jakarta-tomcat-5.0.16. Any pointer regarding this will be

How to show a 'please wait' page while performing action

2004-08-05 Thread Christian Riedel
Hi, I am trying to implement a page, that is shown during perfoming a file upload action. When the upload form is submitted I want a new page to be displayed showing a 'please wait' message. While this page is shown the actual file-upload should be performed and then, when the upload is finishe

RE: How to show a 'please wait' page while performing action

2004-08-05 Thread Jesse Alexander (KXT)
Hi, how about that: - on the main-form perform the submit with the file-upload and show the result-page when it is finished - To do the submit use a javascript function which performs the submit and opens a popup-window with a new request. - The "main"-action puts a flag into the user-s

RE: How to show a 'please wait' page while performing action

2004-08-05 Thread tiwari.rajeev
Hi Christian, Here I am giving you the approach we implemented to handle this scenario. We developed two separate presentations in two div of a html page before converting this page to JSP. One div (div1) of this just display "Please wait, Work in Progress" kind of message and second div (div2) c

Re: How to show a 'please wait' page while performing action

2004-08-05 Thread Shailender Jain
Hi, The most simple way to do this is by making use of JavaScript. You can put some message like 'EXECUTING' or some image in the same page with the DIV tag. This DIV tag should be in the hide mode by default. When the user says 'UPLOAD' then this DIV tag should be visible and the rest of the ta

Re: How to show a 'please wait' page while performing action

2004-08-05 Thread Christian Riedel
Hi Alexander, thanks for your answer ... - on the main-form perform the submit with the file-upload and show the result-page when it is finished - To do the submit use a javascript function which performs the submit and opens a popup-window with a new request. - The "main"-action puts a f

Re: How to show a 'please wait' page while performing action

2004-08-05 Thread Shailender Jain
Hi Tiwari, Did you tested this approach in Netscape. What was the result? I implemented the same thing and everything works fine in IE but not in Netscape? In netscape both the DIV starts coming. Shailender Jain [EMAIL PROTECTED] wrote: > Hi Christian, > Here I am giving you the approach we i

Re: System.out.println

2004-08-05 Thread Sean Radford
Shailender Jain wrote: Hi, During the development of the project we used System.out.println to do the debugging. Now i want to put the application in production. But i want that some how this command should not populate the log files. (catalina.out). I am using jakarta-tomcat-5.0.16. Any pointer re

Re: System.out.println

2004-08-05 Thread Matthew Ryan
Sinner. Implement Log4J, drop all the System.out.println's. http://logging.apache.org/log4j/docs/index.html On 5/8/04 4:18 PM, "Shailender Jain" <[EMAIL PROTECTED]> wrote: > Hi, > > During the development of the project we used System.out.println to do > the debugging. > > Now i want to put

RE: How to show a 'please wait' page while performing action

2004-08-05 Thread tiwari.rajeev
Yup buddy, We tested it in both the case and it worked pretty fine, But yup, the code to invoke div was a bit different in netscape*. If we need to keep support for multiple browser compatibility, get the browser name and version in start and code the page in DHTML fashion and on change of the f

Re: How to show a 'please wait' page while performing action

2004-08-05 Thread Shailender Jain
Hi, Thanks for the response. Can you send me the code snippet. It will be really helpful. Shailender Jain [EMAIL PROTECTED] wrote: > Yup buddy, > We tested it in both the case and it worked pretty fine, > > But yup, the code to invoke div was a bit different in netscape*. If we > need to keep

Encoding of ApplicationResources file

2004-08-05 Thread Václavík Radek
Hi, I am using resource files for internationalization of my web application. However, I am experiencing problems with character encoding. If I have some international characters (e.g. Czech) in the resource file, these do not display correctly in the generated page. I have the resource file enco

RE: System.out.println

2004-08-05 Thread tiwari.rajeev
Shailander, Few clarifications on this regard: If you using MVC approach, and all you class components going through same servlet or common point. Provide a method in this controller servlet which will be called in init method and will set the out.write target to different filename. Then onward

RE: System.out.println

2004-08-05 Thread Aditya Athalye
U shld use a flag say debug. so the code will look like boolean debug = true; if(debug) System.out.println(" "); In production make the flag as false. Hope this helps Thanks Aditya -Original Message- From: Shailender Jain [mailto:[EMAIL PROTECTED]

RE: How to show a 'please wait' page while performing action

2004-08-05 Thread tiwari.rajeev
Sorry fr'd, Code snippet I would need to write again as I have left the organization so do not have access to that code base. Hope you understand this practical situation/ - regards Raj (+91-11-31261821) -Original Message- From: Shailender Jain [mailto:[EMAIL PROTECTED] Sent: Thursday,

Re: System.out.println

2004-08-05 Thread Xavier Noria
On Aug 5, 2004, at 10:58, Aditya Athalye wrote: U shld use a flag say debug. so the code will look like boolean debug = true; if(debug) System.out.println(" "); In production make the flag as false. Just out of curiosity. I see that pattern often, and find that "if" for every single debug mes

Re: Wildcard action mapping use of **

2004-08-05 Thread Duncan Mills
Yup. And while we're on the subject if anyone has an idea as to how the hell we (and other vendors doing Struts Diagramming tools) are supposed to represent Wildcard Actions on a Page flow diagram I'd love to hear :-) Regards Duncan Mills Ruth, Brice wrote: Bill Siggelkow wrote: If you are un

RE: System.out.println

2004-08-05 Thread Aditya Athalye
I agree with u that those many if statements will clutter code. But a method call everytime is also expensive in terms of performance. So it is really a trade off between performance and readability. Regds Aditya -Original Message- From: Xavier Noria [mailto:[EMAIL PRO

Re: System.out.println

2004-08-05 Thread Xavier Noria
On Aug 5, 2004, at 11:22, Aditya Athalye wrote: I agree with u that those many if statements will clutter code. But a method call everytime is also expensive in terms of performance. So it is really a trade off between performance and Is the difference in performance really significative in a web

RE: System.out.println

2004-08-05 Thread Jesse Alexander (KXT)
I think the actual compilers will optimize the method call resulting in an overhead which is not anymore measurable. I imagine they will inline the debug-method with the if and just call out for the actual println... Alexander -Original Message- From: Xavier Noria [mailto:[EMAIL PROTECTE

RE: System.out.println

2004-08-05 Thread aditya
Yes u r right Most compilers will inline these method calls. So it means the same thing again.I don't think we would be gaining anywhere with method calls. -Original Message- From: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 3:56 PM To: 'Struts Users Ma

Re: System.out.println

2004-08-05 Thread Shinobu Kawai
Hi Xavier, > > I agree with u that those many if statements will clutter code. But a > > method call everytime is also expensive in terms of performance. So it > > is really a trade off between performance and > > Is the difference in performance really significative in a web > application? >

RE: System.out.println

2004-08-05 Thread Jesse Alexander (KXT)
Sure makes a difference in readability! if (debug) { System.out.println(..); } versus debug(..); I think that can definitely render more readable a java-class. Or don't you so? hth Alexander -Original Message- From: aditya [mailto:[EMAIL PROTECTED] Sent: Thursday, Augus

Re: Encoding of ApplicationResources file

2004-08-05 Thread Jason Lea
Hi, You need to use native2ascii (program comes with java sdk and is also an ant method) to convert the UTF-8 (or other formats) into the java property file format which use \u I normally refer people here also for some other tips: http://www.anassina.com/struts/i18n/i18n.html But it does

RE: System.out.println

2004-08-05 Thread aditya
Well yes I agree. The debug method should be then made final. So that the compiler will inline it. -Original Message- From: Jesse Alexander (KXT) [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 4:14 PM To: 'Struts Users Mailing List' Subject: RE: System.out.println Sure makes a

Re: Encoding of ApplicationResources file

2004-08-05 Thread Jason Lea
Here is a link that might be useful: http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n.html Václavík Radek wrote: Hi, I am using resource files for internationalization of my web application. However, I am experiencing problems with character encoding. If I have some international chara

Validation ignored

2004-08-05 Thread Anders R. Sveen
I've got a formbean and a action that is working, but I can't apply validation. (config below) Through my debugger I can see that the validate() method is called, which in turn calls super.validate(). The getCountryid() method on the form is NEVER acessed upon submit. --- struts-config.xml ---

Re: Validation ignored

2004-08-05 Thread Anders R. Sveen
Sorry guys. I figured it out. It helps extending ValidatorForm. Doh. ;) Anders, Quoting "Anders R. Sveen" <[EMAIL PROTECTED]>: > I've got a formbean and a action that is working, but I can't apply > validation. > (config below) Through my debugger I can see that the validate() method is > called

Internationalization & Localization

2004-08-05 Thread Viral_Thakkar
I have a requirement as below. I need to store Date (CreatedDate) in database and show this date as per user location on screen while updating that record. Do struts have any support for such kind of requirements? Regards, Viral

Re: Internationalization & Localization

2004-08-05 Thread Michael McGrady
I just store the date as a long and do what is necessary to display the date. At 04:41 AM 8/5/2004, you wrote: I have a requirement as below. I need to store Date (CreatedDate) in database and show this date as per user location on screen while updating that record. Do struts have any support for s

OT: IE loosing session / cookies

2004-08-05 Thread Rosenberg, Leon
Hi, A bit off-topic, but maybe you have had this too... We have an application running with struts on tomcat 5 in an application running with xslt on tomcat 3 in a frame. The problem is, that explorer doesn't send the jsession cookie to the embedded application (we tcpdumped this). The

Access DataSource

2004-08-05 Thread Bussie, Andre D
How can I access a DataSource configured in a struts-config.xml other than from an ActionClass I want to create a interface that can access the datasource configured in the struts-config.xml? Any suggestions, resources, example

Having Action forward to another applications action

2004-08-05 Thread DuBois, Joseph
Heylo all, Problem: I have two related applications, one which handles authentication (chlogin) and a second application which handles managing a menu (chmenu). When the user logs out of the menu application I would like to forward them to the logout of the authentication app. In my menu appli

title attrib equivalent using bean:write or c:out

2004-08-05 Thread Tom McCobb
I would like to display a mouseover title on a data item displayed in the page with bean:write or c:out tags. There is no "title" attribute for either of these tags. What is the best way to do this, preferable without javascript? T. McCobb --

[OT] DOM Document as JMS message object's container

2004-08-05 Thread Pingili, Madhupal
This is way Off Topic. I have an object that implements Serializable in order to be sent to JMS Queue destination. This object contains org.w3c.dom.Document as private member and creates a new DOM document in it's constructor. It also has other methods to access document.createElement(...), creat

Struts 1.2 Validation error

2004-08-05 Thread Seaman, Sloan
I've just upgraded to Struts 1.2.1 and I'm getting an error when I have the tag: This worked fine under 1.1 but now I get: java.lang.NullPointerException at org.apache.struts.validator.Resources.getMessage(Resources.java:173) at org.apache.struts.taglib.html.JavascriptValidatorTag

Re: System.out.println

2004-08-05 Thread Xavier Noria
On Aug 5, 2004, at 12:32, Shinobu Kawai wrote: Without a benchmark, I would say that in a typical response there are *lots* of method calls from the ones in your code passing through Struts/Hibernate/etc. down to the Java library. Some of them non-trivial as the ones regarding persistence. If the c

RE: title attrib equivalent using bean:write or c:out

2004-08-05 Thread Slattery, Tim - BLS
> I would like to display a mouseover title on a data item > displayed in the page with bean:write or c:out tags. There > is no "title" attribute for either of these tags. What is > the best way to do this, preferable without javascript? Try this: Works in Firefox and IE. -- Tim Slatt

Re: title attrib equivalent using bean:write or c:out

2004-08-05 Thread Emmanouil Batsis
Slattery, Tim - BLS wrote: I would like to display a mouseover title on a data item displayed in the page with bean:write or c:out tags. There is no "title" attribute for either of these tags. What is the best way to do this, preferable without javascript? Try this: Works in Firefox a

Re: Please .dont

2004-08-05 Thread e-denton Java Programmer
Thanks, Kishore, but that will give me the form name. I want the Action path sans ".do". - Original Message - From: "Kishore Senji" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "e-denton Java Programmer" <[EMAIL PROTECTED]> Sent: Wednesday, August 04, 2004 10:0

RE: Encoding of ApplicationResources file

2004-08-05 Thread Václavík Radek
Thanks for the tip Jason, it works! At first it did not, but then I have found the proper parameter for the native2ascii executable and it works fine: I have the ApplicationResources_cs_native.properties in UTF-8 (including all the accented international characters) and then convert it using: na

Re: System.out.println

2004-08-05 Thread Shinobu Kawai
Hi Xavier, > They are giving an exemple where the use of the explicit test is > useful: when you need to do some expensive work _only_ to produce a > result to be logged. With the use of the test you can avoid executing > that expensive code that is not needed if logging is off. And /that/

Re: Internationalization & Localization

2004-08-05 Thread Kishore Senji
You can set the locale="true" on the controller configuration, to let the ActionServlet create a Locale object corresponding to the request and store in the session. In your jsp you can use to display the localized date in the way shown below this will show the date corresponding to the bean "d

Re: System.out.println

2004-08-05 Thread Woodchuck
how can we toggle the debug flag during runtime? is it possible? or does it require restarting the application? --- Shinobu Kawai <[EMAIL PROTECTED]> wrote: > > if (debug) { > > System.out.println(veryComplicatedObject.veryExpensiveToString()); > } // Of course, I use commons-logging inst

RE: title attrib equivalent using bean:write or c:out

2004-08-05 Thread Tom McCobb
Thanks, works like a charm. -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent: Thursday, August 05, 2004 11:04 AM To: 'Struts Users Mailing List' Subject: RE: title attrib equivalent using bean:write or c:out > I would like to display a mouseover title on a data

Re: Wildcard action mapping use of **

2004-08-05 Thread Don Brown
Heh, I always wondered how you folks would handle those. :) To answer the first question, I think "**" would be useful if you were wanting to support say a really descriptive ReST-style URL (like "/xml/us/product/category/item") and wanted to leave the parsing of the URL to the Action class. So

Re: System.out.println

2004-08-05 Thread Shinobu Kawai
Hi Woodchuck, > how can we toggle the debug flag during runtime? is it possible? or > does it require restarting the application? Depends on how you implement it, I guess. I use commons-logging, which completely depends on the underlying logging framework; log4j by default. With log4j, you can

Re: System.out.println

2004-08-05 Thread Woodchuck
hi Shinobu, thanks for your reply. sorry, but i meant arbitrarily (at any time), rather than hard-coding logic in the code to toggle the debug flag at certain known situations. what i thought was, if possible, it would be nice if we could somehow get the debug flag to read (poll) from some con

RE: System.out.println

2004-08-05 Thread Jim Barrows
> -Original Message- > From: Woodchuck [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 05, 2004 9:54 AM > To: Struts Users Mailing List > Subject: Re: System.out.println > > > hi Shinobu, > > thanks for your reply. sorry, but i meant arbitrarily (at any time), > rather than hard-co

Re: Having Action forward to another applications action

2004-08-05 Thread Kishore Senji
If your forward path starts with a /, RequestProcessor's processForwardConfig() treat's it relative to the current contextpath and so you would end up hitting an url in the same application. If your forward path doesn't start with a /, response.sendRedirect() which is used by processForwardConfig()

context path problem - urgent

2004-08-05 Thread Yu, Joel, Contractor
hi, I server called "apps", all application deployed under apps will have /apps in it's uri. for example to access application named "foo": http://somehost.com/apps/foo my problem is when I say in my jsp (with set up in my struts-config.xml), it goes to http://somhost.com/foo/test.action, it d

Help me with iterate tag

2004-08-05 Thread Milson Fredy Cardona Echeverri
Hi friends I have the following problem... desire to show the result of a SQL in a JSP page, the result to give in a COLLECTION, but when I call my JSP get the following error: org.apache.jasper.JasperException: No collection found at org.apache.jasper.servlet.JspServletWrapper.service(JspServl

Re: System.out.println

2004-08-05 Thread Xavier Noria
On Aug 5, 2004, at 18:54, Woodchuck wrote: what i thought was, if possible, it would be nice if we could somehow get the debug flag to read (poll) from some configuration file or something, so that we can change this configuration file to enable/disable logging (or even level of logging) in the app

Re: Help me with iterate tag

2004-08-05 Thread Kishore Senji
No Collection found exception comes when the collection returned from the property on the bean is null. My guess would be in your Action, you might not be setting the collection properly to the form. I see this statement in your Action, ListadoFormatosForm listadoFormatosForm = null; How are you

Cannot set nested bean properties on ActionForms

2004-08-05 Thread Ricardo Gladwell
Hi All, Struts looses property values when specifying nested bean properties in an action form. For example, the following fragment is an example of attempting to set a value in a view JSP: When Struts attempts to set the webdav.url nested bean property for, example, a DynaActionForm the value

Re: [OT] DOM Document as JMS message object's container

2004-08-05 Thread Erik Weber
Perhaps the XML document could be stored elsewhere, and the object you embed in your JMS message could be of a simpler type which just contains a URI for the XML document. Then, the object that receives the JMS message could be a "reconstruction" wrapper, basically, that can use the URI to reco

Finding an ActionMapping

2004-08-05 Thread Erik Weber
In Action.execute, is there a way to obtain a reference to an alternative action mapping (not the one that is passed as an argument to the method) using the "parameter" attribute of that alternative mapping? In other words, if there exists an action mapping with the "parameter" attribute set to

Re: System.out.println

2004-08-05 Thread Jason Lea
Log4j has configureAndWatch which looks for changes to the configuration file. As for commons-logging it doesn't have it yet: http://www.mail-archive.com/[EMAIL PROTECTED]/msg10152.html So the other suggestion of having an action to reload or change the level is probably your best bet right now

very dynamic forms

2004-08-05 Thread Dean A. Hoover
Suppose I want to construct a form based on a query to a database. What would come out of the query would be label, form position, variable name, etc, etc. What would be the recommended way of building this under struts/tiles? I've been working with struts/tiles for a while now and this is the firs

Re: very dynamic forms

2004-08-05 Thread Michael McGrady
I cannot quite tell what your "problem" or "question" is, Dean Hoover. I don't see, further, what "struts/tiles" has to do with building a dynamic form. You have a form in a file and that form may be constructed dynamically. This is irrelevant to the tiles aspect of struts. What are you rea

Re: Finding an ActionMapping

2004-08-05 Thread Kishore Senji
protected ActionMapping getActionMapping(ActionMapping mapping, String parameter){ if(mapping == null){ return null; } ModuleConfig mc = mapping.getModuleConfig(); ActionConfig acs[] = mc.findActionConfigs(); ActionConfig ac = null; for(int i=0; i wrote: > In Action.execute, is ther

Re: very dynamic forms

2004-08-05 Thread Dean A. Hoover
Sorry, I thought I stated it plainly. Forget about tiles. I think what I need is Map Backed Action Forms, but am not sure where to look for an example. DynaActionForms look like classes that are just built dynamically according to struts config. I want to build one on-the-fly according to "configur

Re: very dynamic forms

2004-08-05 Thread Kishore Senji
See section 4.3.2 in http://struts.apache.org/userGuide/building_controller.html Thanks, Kishore Senji. On Thu, 05 Aug 2004 20:17:17 -0400, Dean A. Hoover <[EMAIL PROTECTED]> wrote: > Sorry, I thought I stated it plainly. Forget about tiles. > I think what I need is Map Backed Action Forms, but

Re: very dynamic forms

2004-08-05 Thread Niall Pemberton
How about Lazy DynaBeans: http://www.niallp.pwp.blueyonder.co.uk/#lazydynabean Niall - Original Message - From: "Dean A. Hoover" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, August 06, 2004 1:17 AM Subject: Re: very dynamic forms > Sorry, I

Re: very dynamic forms

2004-08-05 Thread Dean A. Hoover
Thanks, that looks very cool. Have you used it before? Niall Pemberton wrote: How about Lazy DynaBeans: http://www.niallp.pwp.blueyonder.co.uk/#lazydynabean Niall - Original Message - From: "Dean A. Hoover" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Fri

Re: very dynamic forms

2004-08-05 Thread Dean A. Hoover
oops, you wrote it! my bad Niall Pemberton wrote: How about Lazy DynaBeans: http://www.niallp.pwp.blueyonder.co.uk/#lazydynabean Niall - Original Message - From: "Dean A. Hoover" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, August 06, 2004 1:17 AM

Re: OT: IE loosing session / cookies

2004-08-05 Thread Shailender Jain
There is a problem for I.E 5.5 SP1 on Windows XP Provide the complete environment details "Rosenberg, Leon" wrote: > Hi, > > > > A bit off-topic, but maybe you have had this too... > > > > We have an application running with struts on tomcat 5 in an application > running with xslt on tomcat 3 in

Re: Finding an ActionMapping

2004-08-05 Thread erikweber
Kishore, I appreciate it! Erik -Original Message- From: Kishore Senji <[EMAIL PROTECTED]> Sent: Aug 5, 2004 8:14 PM To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: Finding an ActionMapping protected ActionMapping getActionMapping(ActionMapping mapping, String parameter){

Re: very dynamic forms

2004-08-05 Thread Michael McGrady
What is your question? At 05:17 PM 8/5/2004, you wrote: Sorry, I thought I stated it plainly. Forget about tiles. I think what I need is Map Backed Action Forms, but am not sure where to look for an example. DynaActionForms look like classes that are just built dynamically according to struts confi

RE: very dynamic forms

2004-08-05 Thread Matthew Van Horn
His question is: How can one build an ActionForm without specifying any properties in either a java class or the struts configuration file? > -Original Message- > From: Michael McGrady [mailto:[EMAIL PROTECTED] > Sent: Friday, August 06, 2004 1:29 PM > To: Struts Users Mailing List > S

Re: very dynamic forms

2004-08-05 Thread Peng Tuck Kwok
I think I'm uncertain about the question you asked as well, do you wish to have no ActionForm and only create one when a request comes in , based on some configuration in a db ? It sounds like what you actually want to do is change the configuration location from a file to the db . Is that correct

Excel File Conversion

2004-08-05 Thread Viral_Thakkar
Hi All, Data is available on the jsp page. I need to convert this to excel file on click of a button. Is there any way in struts to do this? Regards, Viral

RE: Excel File Conversion

2004-08-05 Thread Sanoj, Antony (IE10)
Use Jakarta POI. regards Sanoj Antony > -Original Message- > From: Viral_Thakkar [mailto:[EMAIL PROTECTED] > Sent: Friday, August 06, 2004 10:08 AM > To: Struts Users Mailing List > Subject: Excel File Conversion > > > Hi All, > > Data is available on the jsp page. I need to con

RE: Excel File Conversion

2004-08-05 Thread David Friedman
Are you talking about showing data in your JSP in an HTML table? Check out the export to Excel functions of displaytag: www.displaytag.org. For a specific example, the direct link is: http://www.displaytag.org/example-export.jsp Regards, David P.S. If you use tiles, read the work-around (header

Re: very dynamic forms

2004-08-05 Thread Navjot Singh
then why do you need from? Anyway, if you still wish to live within struts scope, map based forms will help you. regards Navjot Singh Dew on red rose girl dancing sweat droplets on her face (Unknown) Peng Tuck Kwok wrote: I think I'm uncertain about the question you asked as well, do you wish