RE: Newbie looking for resources to learn
As you've seen from other replies google can be a very useful resource - as can: http://marc.theaimsgroup.com/?l=struts-user Try some searches for various topics - I'd recommend the following one, particularly for a tutorial: http://marc.theaimsgroup.com/?l=struts-userm=106120528909583 Also, the struts website (which I presume you've seen as you've got as far as this list) also has links to lots of resources: http://jakarta.apache.org/struts/ (hint: try the learning link) Hue. -Original Message- From: Isaac [mailto:[EMAIL PROTECTED] Sent: 15 September 2003 15:46 To: [EMAIL PROTECTED] Subject: Newbie looking for resources to learn Hi, Where can I find resources(tutorials, ides, articles etc..) to learn? Thanks. Isaac --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Retrieving the ModuleConfig object
I use: mapping.getModuleConfig(); ... but understand this only returns the ModuleConfig info for the current module. Hue. -Original Message- From: Marco Tedone [mailto:[EMAIL PROTECTED] Sent: 13 September 2003 10:28 To: Struts-user-list Subject: Retrieving the ModuleConfig object Hi, is it possible to retrieve a ModuleConfig object (with the module configuration information) directly from within an Action without any backwork? Marco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session Sharing Feasibility
Hi Mitesh, It will depend on several factors - if all you wish is for the cookie to also be sent to struts then this will automatically be done by the browser if the DOMAIN and PATH properties of the cookie are compatible - i.e. will allow the cookie to be passed to the struts application, e.g. if I browse to java.sun.com then I will likely get a cookie with DOMAIN=.sun.com and PATH=/ - so this cookie will be passed to all pages at *.sun.com/. You can possibly get around this (if your struts app is on a different server) by manually generating a new cookie in you CGI/Perl app that has the correct DOMAIN for your struts app - never tried this but it might work and will need to be checked on all browsers that will access the apps! The difficulty may come from the fact that the CGI/Perl cookie may just contain a unique reference to allow the session to be restored in the CGI/Perl application, e.g. like JSESSIONID but almost certainly called something different - and would certainly make no sense to pass this to a struts app. You could clearly get around this by, again manually generating a cookie from the CGI/Perl app that has, say the user id encoded in it. A good source of reference for this may be the Remember Me code at the struts sf site (in the resume project, from memory: http://www.sf.net/projects/struts NB: You will need to be extremely careful as clearly it would be easy to spoof a cookie to the struts app with a user id and if no validation is done on password or anything else then this would be all that would be necessary to bypass the security! My preferred option would be to expose a service from the CGI/Perl app that allowed verification of whether a user has a valid session and has securely logged-on to that app. A simple page that returned a success/fail would be sufficient - this can be queried easily from a struts action and could give you single sign-on type capability. You could possibly extend this to expose some other information from the session but again, this may be a means to leak sensitive information from the application so a lot of care must be taken here! You could go as far as securing the channel between the two servers with SSL and also having a means of the struts server safely identifying itself, passing a client cert from the struts app would clearly be a nice option but may be overly complex for your needs. If both apps are on the same server then only accepting requests from localhost/127.0.0.1 in this verification page may be sufficient for your needs? Alternatively, you may want to investigate other offerings for single sign-on capability but the difficulty may be finding a method that is compatible with both the CGI/Perl app and struts - and does not require extensive modification of the session handling in your existing CGI/Perl app - others here may have some options you may be able to try. Hope that helps, Hue. -Original Message- From: Kapadia Mitesh-C23457 [mailto:[EMAIL PROTECTED] Sent: 11 September 2003 19:57 To: [EMAIL PROTECTED] Subject: Session Sharing Feasibility Hello - I have a question about potential sharing of session information between CGI/Perl and STRUTS applications. We have an application written in CGI/Perl on Netscape Enterprise Server in which we would like to have the capability to spawn the user off to a STRUTS application on a different server running WebLogic. The user would then be able to do the necessary processing in the STRUTS application and return to the CGI/Perl application. At present, the CGI/Perl application utilizes cookies to store session information. Is it possible to share session information (user ids, etc) between the two apps? If so, will the use of cookies on both ends make this feasible? What alternatives are there? Any advice and suggestions on the feasibility or infeasibility of this task would be most appreciated. Thanks in advance. - Mitesh --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 11/09/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Scheduling
Using this method could you not do this in a servlet set in web.xml with load-on-startup? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 01 September 2003 11:58 To: Struts Users Mailing List Subject: RE: [OT] Scheduling Yes, I have done that. But, now i am stuck as to where to invoke it from. I should not use Weblogic startup class. Any inputs ? thanks -raj Robert Taylor [EMAIL PROTECTED]To: Struts Users Mailing List [EMAIL PROTECTED] .comcc: Subject: RE: [OT] Scheduling 01/09/2003 03:46 PM Please respond to Struts Users Mailing List If you cannot use any third party tools, you can implement your own schedular using java.util.Timer and java.util.TimerTask. robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, September 01, 2003 1:37 AM To: [EMAIL PROTECTED] Subject: [OT] Scheduling Hi All, What would be the best implementation for scheduling a job in Weblogic/J2EE environment ? thanks -raj - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] how to open Postscript file on windows
I think taglibs questions or general java would probably qualify for [OT] but Postscript - come on, get real. It irritates me even more that you obviously haven't even bothered to try google for this: http://www.google.com/search?q=windows+postscript+viewer -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 03 September 2003 10:17 To: [EMAIL PROTECTED] Subject: [OT] how to open Postscript file on windows Hi, Is there any way to open a Postscript file on windows in a readable format. Regards, Tarun DISCLAIMER: This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to pre-populate - Husted post doesn't work (or I'm implementing it wrong)
Hi David, Try the following explanation: http://marc.theaimsgroup.com/?l=struts-userm=106123062505746w=2 -Original Message- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: 01 September 2003 23:55 To: Struts-Users Subject: How to pre-populate - Husted post doesn't work (or I'm implementing it wrong) Hi; I tried this below but when I did http://localhost/account/setup/pre it created a form but never called the action class. Any ideas? Also, shouldn't the scope below be session so the same form is used? thanks - dave -- -- a.. From: Ted Husted b.. Subject: Re: Pre populate c.. Date: Mon, 11 Jun 2001 08:20:16 -0700 -- -- Many times pre-processing and post-processing are related, and it can be convenient to handle both in the same Action class. A good way to implement this is to have a seperate Action Mapping for each task (pre-process and post-process). Both mappings would point to the same Action but use different (virtual) paths. Like say /account/setup/pre and /account/setup/post . These may both use the same Action class, which could be package/account/setup.java . The Struts mappings accept an extra parameter property that you can easily test in the Action to see which mapping has been chosen. Your action can then process each task differently, and even go to separate locations if successfuly. By managing this all in the struts-config.xml, you gain a lot of flexbility. In struts-config: action path=/account/setup/pre type=package.account.Setup.java name=setupForm scope=request validate=false input=/WEB-INF/jsp/account/setup/Form.jsp parameter=pre forward name=success path=/WEB-INF/jsp/account/setup/Form.jsp/ /action action path=/account/setup/post type=package.account.Setup.java name=setupForm scope=request validate=true input=/WEB-INF/jsp/setup/Form.jsp parameter=post forward name=success path=/WEB-INF/jsp/account/setup/View.jsp/ /action In your Action: String task = mapping.getParameter(); // handle task for pre or task for post // ... // ... return (mapping.findForward(success)); -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Kiet Nguyen wrote: I need to pre-populate my form and do some business processes prior to load a page. Where would be the best place for this. I don't want to put it in the peform method of the from page. And doing business process at the form bean does not seen appropriate. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to get the url containing anchor from request
Hi Marius, I wondered this too - so I had a look. I think the problem here is more of a HTTP one - if you use netcat - one of my most favouritest tools, available from: http://www.atstake.com/research/tools/network_utilities/ ... and run netcat with the following command: X:\nc -l -p 8000 .. this will then have nc listen on port 8000. Putting the following URL in Mozilla or IE: http://localhost:8000/page.do#booboo ... then this will be the result displayed in nc: GET /page.do HTTP/1.1 Host: localhost:8000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030718 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive ... and as you can see the anchor part is not actually passed to the server. This makes sense if you consider that the anchor is designed to position the browser at a particular point in a page - then there is no point in passing this to the server. More formally, this is probably documented in the HTTP protocol - but it doesn't harm to check. So, unfortunately - I don't think you can get the anchor from the URL as it's never passed as part of the HTTP request. You will need to use QueryString parameters as part of the URL, e.g. http://www.host.tld/myapp/myaction.do?parm1=booboo instead. Hue. -Original Message- From: Marius Oancea [mailto:[EMAIL PROTECTED] Sent: 02 September 2003 08:56 To: Struts Users Mailing List Subject: How to get the url containing anchor from request My action is called with a url like : http://site/context/action.do#ANCHOR The question is how to get the complete url from request in a way that I can see the ANCHOR part too. I tried getServletPath(), getPathInfo() but no success. Any ideea ? Is that not possible ? Thanx Marius -- Why program by hand in five days what you can spend five years of your life automating. - Terence Parr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Scheduling
Yep, sure. As for configuring cron - I think someone else has already posted this. My preferred option is to use wget: wget --non-verbose --output-document=- http://www.host.tld/page.ext $1 $2/dev/null I use the following bash script - which allows notification if a process fails a configurable number of times - it will then send an email to the address in the script. I normally have this script at /opt/net/openAction/wwwCallURL/wwwCallURL - but you can put it wherever you wan. To use the script you will need to change the log directory and error count file to valid directories (and possibly create directories) and update the email address to your address. To run the script use, typically from cron: path/wwwCallURL http://www.host.tld/page.ext The default behaviour is if it fails 5 times in succession it will send an email to the email address listed in errcntemailnotify - but you could also run other commands at this point to try to rectify the situation, e.g. we have scripts that monitor tomcat and send an email and issue a restart if it fails 3 times in a row - this script is run every 90 seconds. Hope that helps, Hue. # wwwCallURL: Calls a URL on a web server to initiate # a server process and facilitates running # an action in the event of configurable # number of failures. # This script needs to be run with sufficient # privileges to write to log directories # and to perform the specified custom action # and typically on the server being accessed # as this then allows filtering the server # processes only on localhost/127.0.0.1 # for improved security. # FHS: typically install under /opt/net/openAction/wwwCallURL/ # and logs in /var/opt/net/openAction/wwwCallURL/ # Developed under Debian GNU/Linux 3.0 # Language: bash # Depends: wget, mailx # Copyright 2000-2002 Hue Holleran [EMAIL PROTECTED] # This is free software; see the GNU General Public License version 2 # or later for copying conditions. There is NO warranty. ### # EDIT THIS SECTION TO CHANGE LOG FILE LOCATIONS # ### # define logs directory and files logfile=/var/opt/net/openAction/wwwCallURL/history.log errcntfile=/var/opt/net/openAction/wwwCallURL/errcnt.log # END SECTION ### # EDIT THIS SECTION TO CHANGE ERROR THRESHOLD AND ACTION # ### # define error count and action to be performed on error count errcntmax=5 errcntemailnotify=[EMAIL PROTECTED] errcntreachedaction=echo '' | mailx -s '$0: Process has failed: max of $errcntmax errors reached.' $errcntemailnotify # END SECTION # output program name, version and copy info echo -e $0 1.02 (06-Oct-2002) echo -e (c) 2002 Hue Holleran [EMAIL PROTECTED] echo -e Calls URL on web server. # define usage information usage=Usage: $0 URL\n # ensure a URL has been passed - if not exit with level 1 if [ $1 = ] ; then echo -e $usage 12 ; exit 1 ; fi # get the return value to variable 'result' result=$(wget --non-verbose --output-document=- $1 2/dev/null) exitcode=$? # check return value if [ $exitcode -ne 0 ] ; then # if there was an error - attempt to repeat # this time append stderr to input resultrepeat=$(wget --verbose --output-document=- $1 21) exitcode=$? # check return value (it may now be ok) if [ $exitcode -eq 0 ] ; then result=success... but on retry else result=$resultrepeat fi fi # determine if result was ultimately successful echo -en $(date --utc +'%a %d-%b-%Y %X') $logfile if [ $exitcode -eq 0 ] ; then # Result was successful - write to log echo -e OK $result $logfile echo -e OK: $result\n # Reset cumulative error count to 0 echo 0 $errcntfile # Exit script with no error exit 0 else # Result was NOT successful - write to log echo -e ERROR $result $logfile echo -e ** ERROR **:\n$result\n # Determine number of prior errors errcnt=$(cat $errcntfile) # Increment error counter and write to error counter echo $((++errcnt)) $errcntfile # See if error count has reached max threshold if [ $errcnt -ge $errcntmax ] ; then # Reset cumulative error count to 0 # NB: do this before running command to # avoid race condition that may arise # should repair command abend the script. echo 0 $errcntfile # Run command on number of errors threshold reached result=$($errcntreachedaction) echo -en $(date --utc +'%a %d-%b-%Y %X') $logfile echo -e ERROR COUNT AT MAXIMUM $errcntmax: $result\n fi # Exit script with error level 2 exit 2 fi
RE: [OT] Scheduling
Well, possibly not an elegant answer but... 1) Under *nix we've done this with cron and a bash script that invokes wget to launch a servlet process. 2) Under Windows we've used a VBS script via at/winat/Scheduled Tasks and Microsoft.XMLHTTPRequest to initiate a HTTP connection to launch a servlet process. Both have been very reliable (in fact both are in very widespread use on several servers) - and this is nice as it does not require any 3rd party components. If this is along the lines of what you're trying to do let me know and I can post some code. As regards Weblogic, there's possibly a more elegant solution, but sorry don't use it - so don't know. Hue. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 01 September 2003 06:37 To: [EMAIL PROTECTED] Subject: [OT] Scheduling Hi All, What would be the best implementation for scheduling a job in Weblogic/J2EE environment ? thanks -raj - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Scheduling
Resent because message still hasn't made it to the list! What's going on with posts to this list - some make it in seconds - others take days or never appear? Yep, sure. As for configuring cron - I think someone else has already posted this. My preferred option is to use wget: wget --non-verbose --output-document=- http://www.host.tld/page.ext $1 $2/dev/null I use the following bash script - which allows notification if a process fails a configurable number of times - it will then send an email to the address in the script. I normally have this script at /opt/net/openAction/wwwCallURL/wwwCallURL - but you can put it wherever you wan. To use the script you will need to change the log directory and error count file to valid directories (and possibly create directories) and update the email address to your address. To run the script use, typically from cron: path/wwwCallURL http://www.host.tld/page.ext The default behaviour is if it fails 5 times in succession it will send an email to the email address listed in errcntemailnotify - but you could also run other commands at this point to try to rectify the situation, e.g. we have scripts that monitor tomcat and send an email and issue a restart if it fails 3 times in a row - this script is run every 90 seconds. Hope that helps, Hue. # wwwCallURL: Calls a URL on a web server to initiate # a server process and facilitates running # an action in the event of configurable # number of failures. # This script needs to be run with sufficient # privileges to write to log directories # and to perform the specified custom action # and typically on the server being accessed # as this then allows filtering the server # processes only on localhost/127.0.0.1 # for improved security. # FHS: typically install under /opt/net/openAction/wwwCallURL/ # and logs in /var/opt/net/openAction/wwwCallURL/ # Developed under Debian GNU/Linux 3.0 # Language: bash # Depends: wget, mailx # Copyright 2000-2002 Hue Holleran [EMAIL PROTECTED] # This is free software; see the GNU General Public License version 2 # or later for copying conditions. There is NO warranty. ### # EDIT THIS SECTION TO CHANGE LOG FILE LOCATIONS # ### # define logs directory and files logfile=/var/opt/net/openAction/wwwCallURL/history.log errcntfile=/var/opt/net/openAction/wwwCallURL/errcnt.log # END SECTION ### # EDIT THIS SECTION TO CHANGE ERROR THRESHOLD AND ACTION # ### # define error count and action to be performed on error count errcntmax=5 errcntemailnotify=[EMAIL PROTECTED] errcntreachedaction=echo '' | mailx -s '$0: Process has failed: max of $errcntmax errors reached.' $errcntemailnotify # END SECTION # output program name, version and copy info echo -e $0 1.02 (06-Oct-2002) echo -e (c) 2002 Hue Holleran [EMAIL PROTECTED] echo -e Calls URL on web server. # define usage information usage=Usage: $0 URL\n # ensure a URL has been passed - if not exit with level 1 if [ $1 = ] ; then echo -e $usage 12 ; exit 1 ; fi # get the return value to variable 'result' result=$(wget --non-verbose --output-document=- $1 2/dev/null) exitcode=$? # check return value if [ $exitcode -ne 0 ] ; then # if there was an error - attempt to repeat # this time append stderr to input resultrepeat=$(wget --verbose --output-document=- $1 21) exitcode=$? # check return value (it may now be ok) if [ $exitcode -eq 0 ] ; then result=success... but on retry else result=$resultrepeat fi fi # determine if result was ultimately successful echo -en $(date --utc +'%a %d-%b-%Y %X') $logfile if [ $exitcode -eq 0 ] ; then # Result was successful - write to log echo -e OK $result $logfile echo -e OK: $result\n # Reset cumulative error count to 0 echo 0 $errcntfile # Exit script with no error exit 0 else # Result was NOT successful - write to log echo -e ERROR $result $logfile echo -e ** ERROR **:\n$result\n # Determine number of prior errors errcnt=$(cat $errcntfile) # Increment error counter and write to error counter echo $((++errcnt)) $errcntfile # See if error count has reached max threshold if [ $errcnt -ge $errcntmax ] ; then # Reset cumulative error count to 0 # NB: do this before running command to # avoid race condition that may arise # should repair command abend the script. echo 0 $errcntfile # Run command on number of errors threshold reached result=$($errcntreachedaction) echo -en
RE: [OT] Scheduling
Resent because message still hasn't made it to the list! What's going on with posts to this list - some make it in seconds - others take days or never appear? Using this method could you not do this in a servlet set in web.xml with load-on-startup? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 01 September 2003 11:58 To: Struts Users Mailing List Subject: RE: [OT] Scheduling Yes, I have done that. But, now i am stuck as to where to invoke it from. I should not use Weblogic startup class. Any inputs ? thanks -raj Robert Taylor [EMAIL PROTECTED]To: Struts Users Mailing List [EMAIL PROTECTED] .comcc: Subject: RE: [OT] Scheduling 01/09/2003 03:46 PM Please respond to Struts Users Mailing List If you cannot use any third party tools, you can implement your own schedular using java.util.Timer and java.util.TimerTask. robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, September 01, 2003 1:37 AM To: [EMAIL PROTECTED] Subject: [OT] Scheduling Hi All, What would be the best implementation for scheduling a job in Weblogic/J2EE environment ? thanks -raj - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What is Java Server faces ?
Maybe this: http://marc.theaimsgroup.com/?l=struts-userw=2r=1s=JSF+Java+Server+Faces; q=b -Original Message- From: Madhu Nair [mailto:[EMAIL PROTECTED] Sent: 29 August 2003 08:52 To: Struts Users Mailing List Subject: What is Java Server faces ? Hi, What is java server faces technology? Is it similar to Struts ? Will all that I learnt about Struts go waste? Regards, Madhu - Madhu Nair Member of Technical Staff, Persistent Systems Private Limited, Pune 411016 INDIA. Tel: +91-20-5678900 Ext: 335 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Tag Question
Hi David, Be aware that struts will use to delimit the href attribute, so try: html-el:link href=javascript:Start('${indexedBean.id}')test/html-el:link Hue. -Original Message- From: David Erickson [mailto:[EMAIL PROTECTED] Sent: 28 August 2003 22:57 To: Struts Mailing List Subject: Struts Tag Question Here is the code I'm trying to get to work: html-el:link href=javascript:Start(${indexedBean.id})test/html-el:link/ but what I need are double quotes around the ${indexedBean.id} part. I've tried using both quot; and \ both seem to not work because the link ends up stopping at wherever I insert that at.. for example if I try: html-el:link href=javascript:Start(\${indexedBean.id})test/html-el:link the link when moused over shows: javascript:Start( same thing if I try quot; instead of \ any ideas? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles not generating page properly
Hey Carl-Eric, If you're still stuck and you've got a zip file with this cut-down code in it - email it to me at the above email address and I'll try debugging it - as I'm interested to know what the problem is too. I personally still use NetBeans and have the struts source setup so this should not take long - debugging in eclipse is still a mystery to me! BTW we also use Debian and the tomcat4 .deb and use tiles in production and have not seen this issue - which makes me even more curious! Hue. -Original Message- From: Carl-Eric Menzel [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 18:53 To: [EMAIL PROTECTED] Subject: Re: Tiles not generating page properly Can you post some more info on the version of struts and the container. Sure: My app is running on a Debian woody system, using Java 1.3.1 (Blackdown-1.3.1-02b-FCS) and the Debian-packaged Tomcat 4.0.4-4. The Struts and Tiles files are the ones right out of the jakarta-struts-1.1.zip on the Jakarta site, all just dumped into the WEB-INF/lib directory. Whenever I get problems I don't understand my next port-of-call is to debug the app with the struts source present to see the flow through my code and the logic and flow through the struts code. It will depend on your IDE how to configure this but if you can post details of that too - I'm sure someone will jump-in to help. I'd do that too, but I'm not sure how. The app, its database and everything else is on the Debian machine, but my desktop is on a different machine, running under Win2K. Is it possible to step through stuff on the SSH console? Alternatively, if you're really stuck and you can produce a small stripped-down version of the problem with source code - then I'm sure someone will help. If this is a bug with tiles then it's better for everyone that it is fixed. I *am* really stuck at the moment ;-) What I included in my original post is all of the relevant code. None of my custom Actions or classes are called at the time this happens, this is the first entry point to the application. I tried the following, though: I reduced the layout.jsp to the bare minimum: ---layout.jsp--- %@ taglib uri=/tags/struts-tiles prefix=tiles % %@ taglib uri=/tags/struts-html-el prefix=html-el % %@ taglib uri=/tags/struts-bean-el prefix=bean-el % %@ taglib uri=http://java.sun.com/jstl/fmt; prefix=fmt % tiles:importAttribute scope=request/ html head /head body bean-el:message key=${title}/br/ menu:br/ !!tiles:insert attribute=menu/!!br/ editArea:br/ !!tiles:insert attribute=editArea/!!br/ help:br/ !!bean-el:message key=${help}/!!br/ /body /html --- The first bean-el:message works, it even gives me the correct message for the key I inserted in the tiles-defs.xml. The menu, which is not overridden by the extending definition and is just empty.jsp in the master definition works as well: It just outputs !! !!. The editArea, which *is* overridden, doesn't work: It outputs the first !! and then nothing. I had a look at the code created by Tomcat for the layout.jsp (layout$jsp.java), there's nothing really suspicious there: ---snippet of layout$jsp.java--- 147 // HTML // begin [file=/pages/editor/master/layout.jsp;from=(21,42);to=(23,10)] 148 out.write(!!br/\r\neditArea:br/\r\n!!); 149 150 // end 151 // begin [file=/pages/editor/master/layout.jsp;from=(23,10);to=(23,46)] 152 /* tiles:insert */ 153 org.apache.struts.taglib.tiles.InsertTag _jspx_th_tiles_insert_1 = new org.apache.struts.taglib.tiles.InsertTag(); 154 _jspx_th_tiles_insert_1.setPageContext(pageContext); 155 _jspx_th_tiles_insert_1.setParent(null); 156 _jspx_th_tiles_insert_1.setAttribute(editArea); 157 try { 158 int _jspx_eval_tiles_insert_1 = _jspx_th_tiles_insert_1.doStartTag(); 159 if (_jspx_eval_tiles_insert_1 == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED) 160 throw new JspTagException(Since tag handler class org.apache.struts.taglib.tiles.InsertTag does not implement BodyTag, it can't return BodyTag.EVAL_BODY_TAG); 161 if (_jspx_eval_tiles_insert_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { 162 do { 163 // end 164 // begin [file=/pages/editor/master/layout.jsp;from=(23,10);to=(23,46)] 165 } while (_jspx_th_tiles_insert_1.doAfterBody() == javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN); 166 } 167 if (_jspx_th_tiles_insert_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) 168 return; 169 } finally { 170 _jspx_th_tiles_insert_1.release(); 171 } 172 // end --- The only thing I can imagine here is that somewhere in there an Exception happens but is silently eaten somewhere. No Exceptions show up in catalina.out or anywhere else. I'm out of ideas right now. If anybody has an idea, I'll gladly try it. If you need more information, more code, or anything, ask,
RE: PLEASE HELP with Exception in error.jsp with Tiles
Hi Richard, First things first - ditch 1.4.1 and get 1.4.2 - I've had endless unusual problems with 1.4.1 - except the very latest release - but 1.4.2 seems faster to me as well. Hmmm - lots to look through ... msanger - Microsoft make you that mad, eh? It looks to me like a further exception is being thrown in the error.jsp (possibly relating to bean:message key=errorPage.heading - is this line correct?). My advice would be to simplify the error.jsp significantly (i.e. start with static content) and build it back gradually. I remember a post a while ago about a gotcha in that when using tiles the error page appears after the already committed content of the tiles - so you may need to consider this too? Good luck! Hue. -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: 28 August 2003 06:06 To: 'Struts Users Mailing List' Subject: PLEASE HELP with Exception in error.jsp with Tiles Sorry to plead, but I have been fighting this for the better part of two days now. I've done a line by line review of just about all of my code. Cannot find anything that appears out of whack - compared to similar programs that are working. Would really appreciate any tips or suggestions on how to track this down. Let me know if there is additional documentation needed. First, I am running the regular Struts 1.1 production release on Windows XP using Sun Java 1.4.1. In my main JSP I'm running into some type of exception that is causing me to switch to my error.jsp. However it never makes it there and I get about 2/3 of my original JSP page. This only occurs when I encounter an error in a multi-line update. I've turned on logging for the tiles and appropriate struts classes. The most I can see is that I'm getting an NPE in: org.apache.struts.taglib.html.MessagesTag.doAfterBody(MessagesTag. java:312) Below is my error.jsp file and the exception stack trace (sorry, its long chain of exceptions). Each exception refers to the same line in my main JSP - 849 - which is this line, I've just finished the /tiles:put tag for an inline put, and am encountering the /tiles:insert to end my tiles structure (I've included several lines after it): /*line 849*/ if (_jspx_th_tiles_insert_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) return; _jspx_tagPool_tiles_insert_flush_definition.reuse(_jspx_th_tiles_i nsert_0); out.write(\r\n); out.write(!-- html-el:javascript formName=\subjectAspectsForm\ dynamicJavascript=\true\ staticJavascript=\true\ htmlComment=\true\ cdata=\false\/ --\r\n\r\n); } catch (Throwable t) { out = _jspx_out; if (out != null out.getBufferSize() != 0) out.clearBuffer(); if (pageContext != null) pageContext.handlePageException(t); } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext); } } HERE'S the error.jsp: %@ page language=java isErrorPage=true % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; !-- I do not integrate this page as a tile, but rather as a standalone-page -- html head titlebean:message key=errorPage.title//title link rel=stylesheet type=text/css media=all href=%=request.getContextPath()%/styles/default.css / /head body div id=screen div id=content h1bean:message key=errorPage.heading//h1 %-- Error Messages --% logic:messagesPresent div class=error See error messages below /div /logic:messagesPresent %-- Success Messages --% logic:messagesPresent message=true div class=message See informational messages below /div /logic:messagesPresent %-- No Messages Message --% logic:messagesNotPresent message=true logic:messagesNotPresent div class=message No messages /div /logic:messagesNotPresent /logic:messagesNotPresent -- Error Messages -- logic:messagesPresent div class=error html:messages id=error bean:write name=error filter=false/br/ /html:messages /div /logic:messagesPresent !-- Success Messages -- logic:messagesPresent message=true div class=message html:messages id=message message=true bean:write name=message filter=false/br/ /html:messages /div /logic:messagesPresent % if (exception != null) { exception.printStackTrace(new java.io.PrintWriter(out)); } else { % !-- only show this if no error messages present -- logic:messagesNotPresent
RE: HibernatePlugIn for struts (a few questions)
Hi Bill, Not related to your Hibernate queries - but I'd also recommend you evaluate (if you've not already done so, of course!) iBATIS. The homepage is at: http://www.ibatis.com/ ... and Rick has written an excellent worked example on getting iBATIS working with Struts that really takes away any initial pain of integrating it and providing a simple, lightweight but extensible interface into iBATIS. http://www.reumann.net/ The only reason I mention this - is not to try and provoke you into more desk pounding - but after my brief evaluation of the two technologies - I preferred iBATIS (by long shot). I have also been watching various discussions recently and I notice several people moving from Hibernate - iBATIS but I've not seen any discussions on moving the other way. I thought I'd pass this on in case you had not had opportunity or had not considered iBATIS. Hue. -Original Message- From: Bill Chmura [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 07:20 To: 'Struts Users Mailing List' Subject: HibernatePlugIn for struts (a few questions) Okay, I managed after much beating and desk pounding got hibernate to work in struts. It just took some patience. Anyway, I now have two questions: #1 - Regarding the plugin that stuffs a hibernate sessionFactory into the servletContext. In my code I can use hibernate two ways: SessionFactory sessionFactory = (SessionFactory) getServlet().getServletContext().getAttribute(SessionFactory.class.getNa me()); or SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); The first is using the plugIn. Is the difference basically that the plug in will close it when the app closes, and there is no repeated cost if creating the session factory (as I believe it would only be done once)? The second would be created every time the action was invoked thus incuring mucho overhead yes? #2 - Best practices. I want to separate out the business logic into their own objects which I would then create and call different function on which would return data. To do this they need to have access to hibernate. What is the best way to pass down to these objects the connection to hibernate? Should I just pass a servletContext, or actually a SessionFactory reference. I am betting on the later as it would give a greater seperation from the app. For example I may have an object called CorporateInfo. Methods would be stuff like getEvilDepartments(), getUselessDepartments(), getAllDepartments(). They would return lists of beans retrieved from hibernate. My action could then use them. I would probably put any modification code down at that level (like fireAllEmployeesInDepartment(department) ). Feedback? Okay, I am going to stand up now for the first time in like 5 hours - probably followed by passing out... Danka Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tiles: condition in tile definition
As you've probably found-out this syntax does not work in tiles-defs.xml(!) ... but a similar result can be achieved in a definition in a JSP page. One option may be to define your loginform attribute as say, mainForm.jsp that could then use el (or logic) tags to determine which jsp to include. A better option may be to use the extends capability of tiles to define 2 layouts that extend layout and define the first, e.g. page.login with the login form and e.g. page.usermenu with the menu form. You can then forward to the desired layout based-on a condition, as you have indicated. Hue. -Original Message- From: Jiri Chaloupka [mailto:[EMAIL PROTECTED] Sent: 26 August 2003 13:30 To: Struts Users Mailing List Subject: tiles: condition in tile definition Hallo, haw I can define condition in tile definition? for example, I have 3 pages: basic.jsp: ** html head/head body blablabbla |tiles:insert attribute=loginform/| /body/html ** loginform.jsp: ** username:html:text property=uname /br/ password:html:password poperty=pwd /br/ html:submit/ ** usermenu.jsp: ** a href=changeme.jspChange my data/a ** object user with methods for example public boolean isLogged(); public int getUserID(); and how to write definition as: |tiles-definitions definition name=layout path=/layout/basic.jsp if user.isLogged() or user.getUserID() -1 -- first or second, do not need booth put name=loginform value=usermenu.jsp/ else ||put name=loginform value=loginform.jsp/ end if ... ||/definition tiles-definitions How to do it? Thanks, Jiri | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: J2EE IDE
This has been asked a few times previously. Search the list at: http://marc.theaimsgroup.com/?l=struts-user Here are a few links to get you going: http://marc.theaimsgroup.com/?l=struts-userm=105553549210511w=2 http://marc.theaimsgroup.com/?l=struts-userm=105340849127167w=2 http://marc.theaimsgroup.com/?l=struts-userm=105181912805195w=2 http://marc.theaimsgroup.com/?l=struts-userm=104693562228405w=2 http://marc.theaimsgroup.com/?l=struts-userm=104446665300603w=2 Hue. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 07:46 To: [EMAIL PROTECTED] Subject: J2EE IDE Can someone please suggest me a free J2EE IDE suitable for development of webapps using STRUTS. I know of some IDE's like the FORTE, ECLIPSE, NETBEANS. However I wanted to ckeckout if anyone has already evaluated any of these since I am not sure which one is easy to use and has reasonably good features as well. Regards Sreekant G --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem converting from Struts tags to JSTL
Try the User Guide: http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_act ion_form_classes -Original Message- From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 10:05 To: [EMAIL PROTECTED] Subject: Problem converting from Struts tags to JSTL Hello, I'm trying to convert some pages from Struts tags to JSTL for the next iteration of our product and I've hit a problem. [Struts 1.1, Tomcat 4.1.24, Java 1.4.2, JSTL 1.0.3] I need to be able to dynamically access nested fields of my form object. The Form object (instanceForm) contains a DynaBean (dynamic) as one of its fields. The fields of the DynaBean are what I'm trying to access. The name of the particular field within the DynaBean is stored in a local variable (fieldName) that is been populated in a loop. The following Struts tag works fine: bean:write name=instanceForm property='%= dynamic.+fieldName %'/ I'm new to JSTL, and I've tried various forms similar to those below without success. Is what I'm trying to do possible? c:out value='%= ${instanceForm.dynamic.+fieldName %}' / c:out value=${instanceForm.dynamic.%=fieldName%} / c:out value=${instanceForm.dynamic.${fieldName}} / Anyone have any ideas? Or should I stick with the Struts tags for this? Thanks in advance, Kev --- Dr. Kevin Palfreyman Apama (UK) Ltd, Cambridge, UK --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem converting from Struts tags to JSTL
Hi Kev, Sorry - I missed the fieldName being dynamic bit(!). I think you may want to consider moving to JSTL for the loop bit so it will save having to do conversions but I think the following will achieve what you're trying to do: bean:define id=fieldNameBean value=%=fieldName% / c:out value=${instanceForm.dynamic.map[fieldNameBean]} default=uh? / BTW you could remove the default=uh? bit - I use this for testing so that I can at least see the loop working. I don't tend to mix EL with non-EL so this may not be the optimum solution - someone else may have a better idea - as I guess the performance will be slower and heavier due to having to copy a value to a bean in page scope. Hue. -Original Message- From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 11:32 To: Struts Users Mailing List Subject: RE: Problem converting from Struts tags to JSTL Thanks for the pointer to the user guide, but unfortunately it doesn't help. I tried: c:out value=${instanceForm.dynamic.map.%=fieldName%} / And c:out value='%=${instanceForm.dynamic.map.+fieldName+}%' / And c:out value=${instanceForm.dynamic.map.${fieldName}} / But those didn't work either. I think the problem is with the nested evaluation - combining the scriptlet and the EL. Any other ideas? Kev -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 10:21 To: Struts Users Mailing List Subject: RE: Problem converting from Struts tags to JSTL Try the User Guide: http://jakarta.apache.org/struts/userGuide/building_controller .html#dyna_act ion_form_classes -Original Message- From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 10:05 To: [EMAIL PROTECTED] Subject: Problem converting from Struts tags to JSTL Hello, I'm trying to convert some pages from Struts tags to JSTL for the next iteration of our product and I've hit a problem. [Struts 1.1, Tomcat 4.1.24, Java 1.4.2, JSTL 1.0.3] I need to be able to dynamically access nested fields of my form object. The Form object (instanceForm) contains a DynaBean (dynamic) as one of its fields. The fields of the DynaBean are what I'm trying to access. The name of the particular field within the DynaBean is stored in a local variable (fieldName) that is been populated in a loop. The following Struts tag works fine: bean:write name=instanceForm property='%= dynamic.+fieldName %'/ I'm new to JSTL, and I've tried various forms similar to those below without success. Is what I'm trying to do possible? c:out value='%= ${instanceForm.dynamic.+fieldName %}' / c:out value=${instanceForm.dynamic.%=fieldName%} / c:out value=${instanceForm.dynamic.${fieldName}} / Anyone have any ideas? Or should I stick with the Struts tags for this? Thanks in advance, Kev --- Dr. Kevin Palfreyman Apama (UK) Ltd, Cambridge, UK --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Forwarding to existing Servlet
Never tried this! Depending what the existing servlet is doing - can you not just instantiate the servlet and call the servlet's doGet method with the request and response arguments passed to the action. You can put any arguments you need (that would've been passed from the browser) into request scope before calling the servlet? Hue. -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 15:36 To: Struts Users Mailing List Subject: Forwarding to existing Servlet Hi to all, I have an existing servlet which must be called in some cases. The serverlet nets a param which can be add to the request from the browser. How can I call an existing Servlet from a struts-action-class? I hope someone can help me, best regards, Manuel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tile definition name in the action class
mapping.findForwardConfig(found).getPath() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 14:30 To: Struts Users Mailing List Subject: tile definition name in the action class Is it possible to get the tiles-definition name inside the action class?? action path = /Retrieve type = mypack.RetrieveAction name = myFormBean scope = session forward name=found path=info.form / !-- info.form is a tiles definition -- forward name=not.found path=error.form / /action if we supply the input attribute in the action mapping section, it is possible to get the name using 'mapping.getInput()'. but, if the input attribute is not available, then how can I get the tiles definition name? Any clue? Thanks, Pramod This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem converting from Struts tags to JSTL
Ah good - glad it's sorted. BTW, as a matter of interest - I tend to use DynaActionForm as a nested bean in a DynaActionForm. This allows the properties of the Dyna to be defined in struts-config (may not suit you of course, just thought I'd mention it in case it's of use): // Get reference to DynaActionForm passed to action DynaActionForm dynaForm = (DynaActionForm) form; // Get dafc - to create DynaActionForms ModuleConfig mconfig = mapping.getModuleConfig(); FormBeanConfig fbconfig = mconfig.findFormBeanConfig(Sub-DynaActionForm-name-defined-in-struts-config ); DynaActionFormClass dafc = DynaActionFormClass.createDynaActionFormClass(fbconfig); DynaActionForm mySubForm = (DynaActionForm) dafc.newInstance(); ... // Populate Dyna etc. ... // Nest Dyna in main form bean form.set(subform,mySubForm); BTW - glad to see it's sunny in Cambridge today! Hue. -Original Message- From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 13:37 To: Struts Users Mailing List Subject: RE: Problem converting from Struts tags to JSTL Hi Hue - thanks for your efforts. I actually just managed to get it working as your mail arrived. Here is what I had to do: 1) Change the JSP to be c:out value=${instanceForm.dynamic.map[fieldName]} / (actually just like you suggested) 2) This is the interesting bit - I had to subclass BasicDynaBean to expose a getMap() method. This is what DynaActionForm does, and was discussed on the commons-dev list in Nov2002 by Craig, David, and co. I then had to pass that new class as the 2nd param of the constructor of BasicDynaClass that creates the instance for me. Thanks again, Kev -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 13:20 To: Struts Users Mailing List Subject: RE: Problem converting from Struts tags to JSTL Hi Kev, Sorry - I missed the fieldName being dynamic bit(!). I think you may want to consider moving to JSTL for the loop bit so it will save having to do conversions but I think the following will achieve what you're trying to do: bean:define id=fieldNameBean value=%=fieldName% / c:out value=${instanceForm.dynamic.map[fieldNameBean]} default=uh? / BTW you could remove the default=uh? bit - I use this for testing so that I can at least see the loop working. I don't tend to mix EL with non-EL so this may not be the optimum solution - someone else may have a better idea - as I guess the performance will be slower and heavier due to having to copy a value to a bean in page scope. Hue. -Original Message- From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 11:32 To: Struts Users Mailing List Subject: RE: Problem converting from Struts tags to JSTL Thanks for the pointer to the user guide, but unfortunately it doesn't help. I tried: c:out value=${instanceForm.dynamic.map.%=fieldName%} / And c:out value='%=${instanceForm.dynamic.map.+fieldName+}%' / And c:out value=${instanceForm.dynamic.map.${fieldName}} / But those didn't work either. I think the problem is with the nested evaluation - combining the scriptlet and the EL. Any other ideas? Kev -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 10:21 To: Struts Users Mailing List Subject: RE: Problem converting from Struts tags to JSTL Try the User Guide: http://jakarta.apache.org/struts/userGuide/building_controller .html#dyna_act ion_form_classes -Original Message- From: Kevin A. Palfreyman [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 10:05 To: [EMAIL PROTECTED] Subject: Problem converting from Struts tags to JSTL Hello, I'm trying to convert some pages from Struts tags to JSTL for the next iteration of our product and I've hit a problem. [Struts 1.1, Tomcat 4.1.24, Java 1.4.2, JSTL 1.0.3] I need to be able to dynamically access nested fields of my form object. The Form object (instanceForm) contains a DynaBean (dynamic) as one of its fields. The fields of the DynaBean are what I'm trying to access. The name of the particular field within the DynaBean is stored in a local variable (fieldName) that is been populated in a loop. The following Struts tag works fine: bean:write name=instanceForm property='%= dynamic.+fieldName %'/ I'm new to JSTL, and I've tried various forms similar to those below without success. Is what I'm trying to do possible? c:out value='%= ${instanceForm.dynamic.+fieldName %}' / c:out value=${instanceForm.dynamic
RE: tile definition name in the action class
mapping.findForward(found).getPath() -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 14:30 To: Struts Users Mailing List Subject: tile definition name in the action class Is it possible to get the tiles-definition name inside the action class?? action path = /Retrieve type = mypack.RetrieveAction name = myFormBean scope = session forward name=found path=info.form / !-- info.form is a tiles definition -- forward name=not.found path=error.form / /action if we supply the input attribute in the action mapping section, it is possible to get the name using 'mapping.getInput()'. but, if the input attribute is not available, then how can I get the tiles definition name? Any clue? Thanks, Pramod This electronic mail message is intended solely for the named recipients and may contain confidential and proprietary business information of eFunds Corporation and all its subsidiaries. If you are not a named recipient, please notify the sender immediately. You may not disclose the contents to any other person; use this electronic mail message or its contents for any other purpose; or further store or copy its contents in any medium - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to get a String object from request scope.
struts-bean: bean:write name=MY_NAME / or JSTL: c:out value=${MY_NAME} / -Original Message- From: Fumitada Hattori [mailto:[EMAIL PROTECTED] Sent: 27 August 2003 17:02 To: [EMAIL PROTECTED] Subject: How to get a String object from request scope. Hi gurus. I got one Action servlet class and one jsp. If the action servlet is successfully processed, it's forwarded to the jsp. In the Action servlet, there's a following statement. String my_name = JACK; request.setAttributte(MY_NAME,my_name); return (mapping.findForward(success)); Now I wanna get the MY_NAME property with a struts tag in the jsp which is redirected from the Action servlet. I don't know how to make it since the instance(my_name) in the action servlet is a just String Object...not a javabean. Thanks in advance. wolfgang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] A date utility? anyone, pls help
I read a lot about BigDate - but it's shareware @ $10, I think. Never had to use it myself but here's the link: http://mindprod.com/jgloss/bigdate.html#BIGDATE There is also a very good tutorial on dates (see Computer Dating link), here: http://java.sun.com/people/linden/intro.html Specifically for what you're asking ... the number of years between 2 dates? (are you sure you mean years?) try this: java.lang.Math.abs( myDate1.getTime()-myDate2.getTime() )/1000/3600/24/365.25 i.e. get abs difference in millisecs and convert to years - but your version of a year may vary (i.e. you may consider 365 to be a year)! BTW to setup date values for testing try the following code: java.text.DateFormat df = new java.text.SimpleDateFormat( .MMM.dd ); try { java.util.Date myDate1 = df.parse(1971.OCT.02); java.util.Date myDate2 = df.parse(1987.JAN.09); System.out.println( java.lang.Math.abs( myDate1.getTime()-myDate2.getTime() )/1000/3600/24/365.25 ); } catch (Exception ex) { System.out.println( ex.toString() ); } Hue. -Original Message- From: Butt, Dudley [mailto:[EMAIL PROTECTED] Sent: 26 August 2003 09:19 To: 'Struts Users Mailing List' Subject: [OT] A date utility? anyone, pls help I know you guys are all excellent java programmers, so I do believe someone has what I'm looking for? I really please need a date utility class that accurately calculates the number of years between 2 dates? Would appreciate it very much thx!! NOTICE: This message contains privileged and confidential information intended only for the person or entity to which it is addressed. Any review, retransmission, dissemination, copy or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient, is prohibited. If you received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and thereafter delete the material from any computer. The New Africa Capital Group, its subsidiaries or associates do not accept liability for any personal views expressed in this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Horizon: a view management plugin
I must confess to being a bit confused! What is the difference between your approach and getting an instance of a Dyna, viz: DynaActionFormClass dafc = DynaActionFormClass.getDynaActionFormClass(Dyna-Definition-Name-In-Struts-C onfig); DynaActionForm myBean = (DynaActionForm) dafc.newInstance(); At least with the above approach the beans are stored in struts-config in the usual struts syntax - it's just they're not used in the action name parameter - but are created on-the-fly in an action (or wherever) with the above code. I'm concerned I may be missing some obvious advantage to your approach - hence the reason for the question! Hue. -Original Message- From: Pedro Emanuel de Castro Faria Salgado [mailto:[EMAIL PROTECTED] Sent: 21 August 2003 16:15 To: [EMAIL PROTECTED] Subject: Re: Horizon: a view management plugin Pedro Emanuel de Castro Faria Salgado wrote: Hi, I have built a plugin for Struts that creates view beans using dynabeans that are defined on a xml file and i was wondering if anyone in the Struts project/mailing list was interested on checking the use of it? When I see dynabean are you saying BeanUtils.DynaBean and what is a 'view bean', do you mean a Action Form ? yes If so what is the difference between your plugin and a DynaActionForm ? i think, actually, there is none... the difference is for what i use the view beans for: transfering data from actions to build combobox on form and present data that isn't on a form. i know i can use the form itself to put a collection to build a combobox and use another form bean property to store the user input but it is less confusing if i define forms with only the properties the user can enter data and another bean for transmitting data (dto... in my case i call it view bean). before the plugin i had to define a new java class (attributes + getters/setters) for each new dto i wanted, now, i only need to add some lines to a xml file... Given that your plugin is generally useful then there are several options : 1) Since web space can gotten for free now days you could always post it on a site with some documentation on how to use it. i will see what i can do... 2) We are using the http://www.sf.net/projects/struts site as an incubator for projects you can post there to see if there is interest. thank you for the tip... 3) Find someone else with a struts web site, that would host it. Most importantly having an example, that is documented is key. I have already sent the source on another email so you can take a look (src + javadoc + ant file) and i am finishing a small web app. thanks for the tips... Pedro Salgado - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting a Welcome File + Tiles + PreCompiled JSP's
Use the HTML META ... tag? HTML HEAD META HTTP-EQUIV=Refresh CONTENT=0;URL=/myapp/do/myaction /HEAD BODY/BODY /HTML Or, alternatively if you want to use window.onLoad - checkout the source on IE's error page that does this pretty effectively by extracting the server information from document.location.href - full source attached below (you'll need to identify the appropriate bits): !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN html head style a:link {font:8pt/11pt verdana; color:red} a:visited {font:8pt/11pt verdana; color:#4e4e4e} /style meta HTTP-EQUIV=Content-Type Content=text-html; charset=Windows-1252 titleHTTP 404 Not Found/title /head script function Homepage(){ // in real bits, urls get returned to our script like this: // res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm //For testing use DocURL = res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm; DocURL = document.location.href; //this is where the http or https will be, as found by searching for :// but skipping the res:// protocolIndex=DocURL.indexOf(://,4); //this finds the ending slash for the domain server serverIndex=DocURL.indexOf(/,protocolIndex + 3); //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex); BeginURL=DocURL.indexOf(#,1) + 1; if (protocolIndex - BeginURL 7) urlresult= urlresult=DocURL.substring(BeginURL,serverIndex); //for display, we need to skip after http://, and go to the next slash displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex); // Security precaution: must filter out urlResult and displayresult forbiddenChars = new RegExp([\'\], g); // Global search/replace urlresult = urlresult.replace(forbiddenChars, ); displayresult = displayresult.replace(forbiddenChars, ); document.write('A target=_top HREF=' + urlresult + '' + displayresult + /a); } /script body bgcolor=white object id=saOC CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0 width=0/object table width=400 cellpadding=3 cellspacing=5 tr td id=tableProps valign=top align=leftimg id=pagerrorImg SRC=pagerror.gif width=25 height=33/td td id=tableProps2 align=left valign=middle width=360h1 id=errortype style=COLOR: black; FONT: 13pt/15pt verdanaspan id=errorTextThe page cannot be found/span/h1 /td /tr tr td id=tablePropsWidth width=400 colspan=2font style=COLOR: black; FONT: 8pt/11pt verdanaThe page you are looking for might have been removed, had its name changed, or is temporarily unavailable./font/td /tr tr td id=tablePropsWidth2 width=400 colspan=2font id=LID1 style=COLOR: black; FONT: 8pt/11pt verdanahr color=#C0C0C0 noshade p id=LID2Please try the following:/pul li id=list1If you typed the page address in the Address bar, make sure that it is spelled correctly.br /li li id=list2Open the script Homepage(); /script home page, and then look for links to the information you want. /li li id=list3Click the a href=javascript:history.back(1)img valign=bottom border=0 src=back.gif Back/a button to try another link. /li li ID=list4Click a onclick=saOC.NavigateToDefaultSearch();event.returnValue=false href=img border=0 src=search.gif width=16 height=16 alt=search.gif (114 bytes) align=center Search/a to look for information on the Internet. /li /ul pbr /p h2 id=ietext style=font:8pt/11pt verdana; color:blackHTTP 404 - File not foundbr Internet Explorer BR /h2 /font/td /tr /table /body /html -Original Message- From: Pat Quinn [mailto:[EMAIL PROTECTED] Sent: 21 August 2003 12:17 To: [EMAIL PROTECTED] Subject: Setting a Welcome File + Tiles + PreCompiled JSP's I'm using tiles and i know i can't set the welcomefile/ attribute in web.xml to a tile definition or a struts action url. I'm also precompiling all my JSP's so i can't assign it to a JSP... i was thinking about assign it to a html file and then onLoad i could redirect to my logon action url... to do this i'd have to hard code the ipaddress and port number into my url so i don't really want to do that. Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com).
RE: html:link and tiles definitions
I posted a (long) reply to this recently with code, see: http://marc.theaimsgroup.com/?l=struts-userm=106096350227227w=2 (look towards the end - there is a generic action class that forwards to a tiles def - you only need one generic action) Let me know if that does not solve your problem. Hue. -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 08:54 To: Struts Users Mailing List Subject: html:link and tiles definitions hi I'm trying to use tiles definitions with struts. On one page I want to create a html:link so that the user is sent to another page. Does anyone know how I can do this with tiles definitions. I'm really stuck, I'm looking for a few days now without finding the solution. I read that you can't link to a tiles definition, but there must be some solution, I hope. Koen Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:link and tiles definitions
That was part of the solution I posted. At the end of the action: ... // Forward to tiles def return ( new ActionForward(tilesDef,false) ); e.g. return ( new ActionForward(tiles.def,false) ); Does that not work? -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 12:54 To: Struts Users Mailing List Subject: RE: html:link and tiles definitions thanks for your answer, but maybe I did't explain my problem correctly. I start from a page where different organisation names are shown. This is the source for this page : logic:iterate id=i name=listAllOrganisations trtdhtml:link page=/loadOrganisation.do name=i property=orgIdmyOrganisationName/html:link /td/tr /logic:iterate When a user clicks on on organisation, I want to pass the organisation Id , go to my Action and in the action get all the data from the database. Then I want to go to a page where all the organisation details are shown. This last page is part of a definition. I tried to use the definition as a forward, but it didn't work. Maybe my logic is not correct, or maybe my html:link syntax Could you help me ? Koen -- - Original Message - DATE: Wed, 20 Aug 2003 12:14:19 From: Hue Holleran [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED],[EMAIL PROTECTED] Cc: I posted a (long) reply to this recently with code, see: http://marc.theaimsgroup.com/?l=struts-userm=106096350227227w=2 (look towards the end - there is a generic action class that forwards to a tiles def - you only need one generic action) Let me know if that does not solve your problem. Hue. -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 08:54 To: Struts Users Mailing List Subject: html:link and tiles definitions hi I'm trying to use tiles definitions with struts. On one page I want to create a html:link so that the user is sent to another page. Does anyone know how I can do this with tiles definitions. I'm really stuck, I'm looking for a few days now without finding the solution. I read that you can't link to a tiles definition, but there must be some solution, I hope. Koen Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:link ,tiles definitions, DefinitionDispatcherAction
You need an actionform - look at the original code. -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 15:10 To: Struts Users Mailing List Subject: RE: html:link ,tiles definitions, DefinitionDispatcherAction I have my previous problem solved. Thanks you. The next problem is to use a tiles definition directly in a html:link. Some of you sent me some source, so I tried that. This is my jsp page with the link : html:link action=/goToDef.do?def=isisLayout.organisation.customerInfoCont acts/html:link This is the struts-config file action path=/goToDef type=org.apache.struts.tiles.actions.DefinitionDispatcherAction parameter=def forward name=error path=/pages/error-tiles-def-not-passed.jsp / /action It does not work, I don't get an error, but a just get an empty screen. In my logs I see the message 'requestUtils.createActionForm=null' but I don't know if that has anything to do with it. Koen Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:link ,tiles definitions, DefinitionDispatcherAction
Sorry - ignore my last - this email was sent accidentally before I'd finished reading your email. -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 17:28 To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: html:link ,tiles definitions, DefinitionDispatcherAction You need an actionform - look at the original code. -Original Message- From: koen boutsen [mailto:[EMAIL PROTECTED] Sent: 20 August 2003 15:10 To: Struts Users Mailing List Subject: RE: html:link ,tiles definitions, DefinitionDispatcherAction I have my previous problem solved. Thanks you. The next problem is to use a tiles definition directly in a html:link. Some of you sent me some source, so I tried that. This is my jsp page with the link : html:link action=/goToDef.do?def=isisLayout.organisation.customerInfoCont acts/html:link This is the struts-config file action path=/goToDef type=org.apache.struts.tiles.actions.DefinitionDispatcherAction parameter=def forward name=error path=/pages/error-tiles-def-not-passed.jsp / /action It does not work, I don't get an error, but a just get an empty screen. In my logs I see the message 'requestUtils.createActionForm=null' but I don't know if that has anything to do with it. Koen Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mesage message account
How can we miss you if you won't go away? -Original Message- From: object worlds [mailto:[EMAIL PROTECTED] Sent: 19 August 2003 14:42 To: [EMAIL PROTECTED] Subject: mesage message account Did you take my message message account off the list ? Is that because that white shit Mark Galbreath said so and that shit Craig Mclanahan agreed. _ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.511 / Virus Database: 308 - Release Date: 18/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Help or tutorial
I'd definitely recommend Rick Reumann's Struttin' with Struts at: http://www.reumann.net/ Hue. -Original Message- From: Arindam Bhattacharjee [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 11:14 To: [EMAIL PROTECTED] Subject: Help or tutorial Hi All, I am a newbie in Struts. Can some one give some pointers towards any tutorials or FAQs especially regarding installation, deployment and basic features to start with. It will really be appreciated. Regards, Arindam Bhattacharjee Sapient Desk * 91.124.282.6451 Presidency Building, Mehrauli-Gurgaon Road Sector -14, Gurgaon, Haryana, India. --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaActionForms and html:text tags
How are you accessing your page - if you're calling the jsp direct then then struts will not have the opportunity to put the bean into scope for you? Hue. -Original Message- From: Louise Pryor [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 11:29 To: Struts Users Mailing List Subject: DynaActionForms and html:text tags I'm having problems getting a DynaActionForm to work with a jsp page, and wondered if anyone could help. I've defined all the properties in the DynaActionForm using form-property / tags. They all have type java.lang.String. The form is mapped to the Action in the usual way. Actual extracts from the files at the end of this message. I have a jsp page with an html:form tag that refers to the action. The trouble is, that none of the html:text tags work (they refer to properties as defined in the form). The symptom of the not working is org.apache.jasper.JasperException: No getter method for property whatever of bean org.apache.struts.taglib.html.BEAN An html:hidden tag and an html:password tag on the same form work fine. Could this be something to do with the fact that the hidden tag has a value set, and the password tag has redisplay=false, so that neither of them are looking in the form bean for values? Any help would be greatly appreciated. I am sure there is something basic I haven't done right, but I can't think what. -- Louise Pryor http://www.louisepryor.com - from struts-config.xml form-bean name=licForm type=org.apache.struts.actions.DynaActionForm form-property name=email type=java.lang.String / form-property name=password type=java.lang.String / ... /form-bean from the jsp file: html:form action=/private/issueLic html:hidden property=issuer value=manual / table tr tdfmt:message key=licenseForm.field.password /:/td tdhtml:password property=password size=15 redisplay=false //td /tr tr tdfmt:message key=licenseForm.field.email /:/td tdhtml:text property=email size=50 / /td /tr (the error happens on email - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaActionForms and html:text tags
(mapping.getInput())); } // We got here - so all must have OK - forward to Success page return (mapping.findForward(Success)); } } Hope that makes sense - it was copy-and-pasted from various places. Please post back if this does not work! Hue. -Original Message- From: Louise Pryor [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 12:33 To: Dirk Markert; Struts Users Mailing List; Hue Holleran Subject: Re: DynaActionForms and html:text tags On Monday, August 18, 2003 at 12:25:38 PM, Dirk Markert wrote: DM Hello Louise, DM what's the action and its mapping you are using to forward to your DM jsp containing DM html:form action=/private/issueLic DM html:hidden property=issuer value=manual / On Monday, August 18, 2003 at 12:22:31 PM, Hue Holleran wrote: HH How are you accessing your page - if you're calling the jsp direct then then HH struts will not have the opportunity to put the bean into scope for you? Thanks. It looks like we are converging on an answer. I am calling the jsp direct. From what you say it looks as if I should go via an action. What should that action do, or what should its mapping contain, to make things work? -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: alternative to hidden?
A sort-of server-side control state ... hmmm - scarey. A better option might be to incoporate all the state in a hidden field in the form that can be added by a tag lib - a la .NET _VIEWSTATE and then re-created when the form is submitted. I can think of lots of concerns with what you describe - for instance, a user with 2 instances of the browser open could easily cause carnage with this facility. An alternative is to identify the exact server state by a response token that would be unique per browser instance - but then this would need to be in a hidden field, anyway - catch 22. I like the idea in concept - I think, though there may be fundamental limitations to HTTP that would unfortunately scupper any neat solutions for this - but others may have some clever ideas. Hue. -Original Message- From: Mike Whittaker [mailto:[EMAIL PROTECTED] Sent: 18 August 2003 19:25 To: Struts List Subject: alternative to hidden? Seems to me there is a need for a further scope. application session subsequent_request request Like session but attributes are removed when the response has been committed in the request following the one they are added in. Has anyone come up with a neat way of implementing this? Suppose you could have an Object that tracks number of requests it has seen. By iterating through the session objects for a certain type (marker interface?) in the ActionServlet, and removing them as neccessary. Or is there a simpler way? -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: where is JSESSIONID?
If you wish to see struts' cookies in the browser - then the easiest way is to use Mozilla (http://www.mozilla.org/). After browsing your struts app then use the following mechanism to find the cookie that is being used: Moz: Edit... Preferences... Privacy Security / Cookies Select Manage Stored Cookies Look for the site, e.g. localhost, www.domain.tld There should be a cookie named JSESSIONID - click on it to see the session id More info on per session cookies -- IE does not seem to save the cookie to disk as the cookie is a per session cookie. A per session cookie is a cookie that is only valid for the current session - distinguished from a non-per session cookie by the fact a per session cookie does not have an EXPIRES attribute. See the following output from nc (http://www.atstake.com/research/tools/network_utilities/) that makes this clearer: 1) Output from a site with a per session cookie: -- X:\nc 127.0.0.1 8081 GET /index.jsp HTTP/1.0 HTTP/1.1 200 OK Content-Type: text/html;ISO-8859-1 Connection: close Date: Wed, 06 Aug 2003 12:04:34 GMT Server: Apache Tomcat/4.0.6 (HTTP/1.1 Connector) Set-Cookie: JSESSIONID=5BF64BD681D362A1962D81AF7A3B4362;Path=/ 2) Output from a site with a NON-per session cookie: -- X:\nc java.sun.com 8081 GET / HTTP/1.0 HTTP/1.1 200 OK Server: Netscape-Enterprise/6.0 Date: Sat, 16 Aug 2003 15:09:16 GMT Content-type: text/html Cache-control: no-cache=set-cookie Set-Cookie: SUN_ID=12.34.56.78:1615:1061046556:19410; EXPIRES=Wednesday, 31-Dec-2025 23:59:59 GMT; DOMAIN=.sun.com; PATH=/ Note the addition of the EXPIRES information in the second example that will indicate to the browser that this is _not_ a per session cookie. The latter will be visible in the IE; the former will not. Mozilla will display both in the Manage Stored Cookies window. Hue. -Original Message- From: Adolfo Miguelez [mailto:[EMAIL PROTECTED] Sent: 16 August 2003 14:53 To: [EMAIL PROTECTED] Subject: Re: where is JSESSIONID? I have also wondered the same question many times. I assume in browser's memory you mean. Good. Is there any way to access it from the client code, javascript or related stuff? I my understanding cookies are stored in browser's machine hard disk. Is this cookie for session an exception? I have seem many cookies in the temporary files directory of the browser installation. More info would be appreciated, Adolfo. From: Koni Roth [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: where is JSESSIONID? Date: Sat, 16 Aug 2003 04:20:37 +0200 If the browser does not accept cookies it is stored in the URL. If the browser accepts cookies it is stored in the memory (session). Koni Billy Ng wrote: Hi folks; Anybody knows where is the JSESSIONID cookie is? I search the whole Cookies folder, I can't find it. Billy Ng This mailbox protected from junk email by Matador from MailFrontier, Inc. http://info.mailfrontier.com -- Konrad Roth, - http://www.rothweb.ch - http://www.rothconsulting.com - Jump and the earth will rise to meet you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: persisting session id
Well, one option I can think of would be to send a non-per session cookie (with an EXPIRES attribute) - you probably will need to disable tomcat from sending cookies as sending 2 JSESSIONID cookies will probably confuse the browser! (this is configured in Tomcat with cookies=false attribute in the Context for your webapp). The following code should go at the very top of page(s) that are accessed frequently by users - this will generate a persistent cookie. The example uses a cookie that will expire after 24 hours - the time will be updated each time they hit the page - so should expire 24 hours after their last access of your app. Presumably you'll also need to set the expiration time for the session to at least 24 hours, too - so when the cookie is sent back to the server the session still exists! (Hopefully you don't have too many users so session state will not use too much memory!). % // Setup a calendar to calculate the expires date and time (in GMT) java.util.Calendar expires = java.util.Calendar.getInstance(); expires.setTimeZone( java.util.TimeZone.getTimeZone(GMT) ); // Add-on number of hours, e.g. 24 hours expires.add( java.util.Calendar.HOUR, 24 ); // Create a format object to output the date and time in the desired format (and in GMT) java.text.SimpleDateFormat format = new java.text.SimpleDateFormat(EEE, dd MMM HH:mm:ss zzz,java.util.Locale.US); format.setTimeZone( java.util.TimeZone.getTimeZone(GMT) ); // Send a cookie with the required information response.setHeader(Set-Cookie,JSESSIONID=+ session.getId() +; EXPIRES=+ format.format(expires.getTime()) +; PATH=/); % NB: Code has been written with fully-qualified classes so it will run as is - alternatively shorten the classes and us page imports. I've quickly checked code - it does compile and does send a cookie but you may need to check syntax of the cookie sent. Let me know if it works! Hue. -Original Message- From: Billy Ng [mailto:[EMAIL PROTECTED] Sent: 16 August 2003 06:36 To: Struts Users Mailing List Subject: Re: persisting session id Can I put the JSESSIONID in the persistent cookie? When user hit the page, will the serlvet pick up the JSESSIONID from the cookie instead of memory? Billy Ng This mailbox protected from junk email by Matador from MailFrontier, Inc. http://info.mailfrontier.com - Original Message - From: Max Cooper [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; Billy Ng [EMAIL PROTECTED] Sent: Friday, August 15, 2003 10:06 PM Subject: Re: persisting session id You will lose the session when you close the browser. The session cookie is not persistent, which means your browser will forget the session id when it shuts down. In addition to that, the app server will destroy old sessions after a timeout period that can be set in web.xml (usually 90 minutes or less). Do you want persistent logins, or are there other things in the session you wish to preserve? If you just want persistent logins, a remember me feature is coming together for SecurityFilter (http://securityfilter.org/) that should be available in the next few months. Note that things added to the session in the last session will not be present when you return -- you are just automatically logged in again. -Max - Original Message - From: Billy Ng [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 15, 2003 11:12 AM Subject: persisting session id Hi folks, This is really a tomcat related question, but I have no luck in tomcat ailing list. My question is I will lose the session everytime I close the browser. Is there a way to persist the session even I close the browser? Thanks! Billy Ng This mailbox protected from junk email by Matador from MailFrontier, Inc. http://info.mailfrontier.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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Global Forwards and Tiles
Hi David, I think the fundamental problem here is that global-forwards are not available to be called from outside the server. If one considers the URL one might use to call global-forwards, e.g.: http://myHost/myApp/myForward ... then this will not be passed-to struts - and will instead look for a servlet mapping matching the myForward pattern - and probably won't find one. If you look at the result of a global-forwards/forward generated by say: html:link forward=myForwardForward Me!/html:link ... e.g. where the following configures the forward in struts-config to forward to the myAction action: ... global-forwards ... forward name=myForward path=/do/myAction / ... /global-forwards ... ... then it will likely be of the form when rendered to HTML: a href=/do/myActionForward Me!/a ... then this _will_ go through the struts servlet and be correctly mapped to an action. If you wanted a way of configuring a method of calling any tiles def from a jsp then one option would be to have a generic action than can fwd to the tiles def, e.g. define a bean and action in struts-config: ... form-beans ... form-bean name=tilesDef type=org.apache.struts.action.DynaActionForm form-property name=tilesDef type=java.lang.String / /form-bean ... /form-beans ... ... action-mappings ... action path=/tilesDefFwd type=tld.domain.actions.TilesDefFwdAction name=tilesDef scope=request forward name=tiles-def-not-passed path=/error-tiles-def-not-passed.jsp / /action ... /action-mappings ... The action code would look like this (ok, error handling could be a bit tighter(!)) but this gives the idea: package tld.domain.actions; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletContext; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.struts.action.DynaActionForm; public final class TilesDefFwdAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String tilesDef = ; // Get our parameter(s) from the form DynaActionForm dynaForm = (DynaActionForm) form; try { tilesDef = dynaForm.get(tilesDef).toString(); } catch (Exception ex) { // Something went wrong - send to error page return ( mapping.findForward(tiles-def-not-passed) ); } // Forward to tiles def return ( new ActionForward(tilesDef,false) ); } } This would then allow a URL of the following format, e.g: http://www.domain.tld/myApp/do/tilesDefFwd?tilesDef=myDef ... that would then forward to the tiles def myDef, e.g. html:link page=/do/tilesDefFwd?tilesDef=myDefForward Me To Tiles Def!/html:link Alternatively, there may already be a mechanism to do this natively in struts - but have attached the above code as this is what I wrote when I was getting to grips with forwards/actions/tiles-defs etc - and hopefully it will be of some help! Hue. -Original Message- From: David Holtzhouser [mailto:[EMAIL PROTECTED] Sent: 15 August 2003 14:57 To: [EMAIL PROTECTED] Subject: Global Forwards and Tiles I've attached a discussion with a fellow developer regarding Global Forwards and Tiles. The tiles-defs are in xml if that makes any difference. * Here's the delima. I can configure a Global Forward that maps to my tiles definition. If I refer to this global forward from an Action then it finds my tile def. But, If I call this global forward from a jsp, then it craps out. But normally you can call a global forward from a JSP and it will work fine, as long as you are not using tiles defs. So, it seems like if I want to get from one JSP to another tiles def, then I have to go through a Action, which could be a ForwardAction. My Actions can use my global forwards, but my pages cannot. It's kind of weird, but I at least I understand what I can and can't do now. * So are thought is that Global ActionForwards defined in the global-forwards section of the struts-config.xml really don't go through the
RE: [OT] Interesting JSF info
Sorry, long reply. My first thoughts on JSF were that it looked really powerful and was a blast of fresh air. I think it's an excellent idea to have the ability to define controls and then have them rendered in a manner suitable for the target device with pluggable renderers. My only concern was that this was being done using XSLT (I think it is) - and from a personal experience viewpoint I've always found XSLT a resource hog on the server and slow when used by lots of users - but I am happy to be persuaded once I get to actually trying JSF. I'm grateful to whoever it was who provided the struts-JSF integration work as this allows me to see JSF working with my favourite web development framework! It's on my list to check-out and will happen in the next couple of weeks - so I'll be happy to report some more informed comments at that point! I'm very enthusiastic about Java Everywhere. Sun was really strong when all it did was talk java - java was _and_ _still_ _is_ a fantastic vision - you've just got to look at the number of mobile phone companies who've licenced java for mobile phones just recently. Java has experienced slower take-up than initially expected - but one can't help feeling that the view that was touted frequently a couple of years ago that java would die-out because it didn't explode overnight and wasn't immediately used for everything - has been proven completely false. Java is growing - and as netcraft reported - it is growing very rapidly: http://news.netcraft.com/archives/2003/07/23/jsp_continues_fast_growth_on_a_ surprisingly_diverse_set_of_operating_systems.html With the use of java on mobile phones - that will almost certainly grow-up to become devices to rival our current set of PDA-type devices - bringing java with them as the central VM on these devices. Sun obviously needs to offer something to counter Microsoft's .NET initiative. I know what I'm talking about here - I've run a few .NET courses and developed a few .NET apps. My problem with .NET and with many other people I speak to - is that it's tied totally to the Windows Operating System and involves a massive learning curve for traditional VB and ASP developers. That said, show a developer ASP.NET's ability to do GUI development of web applications with viewstate and transparent execution of server-side button code - just like VB does - and they can finally envisage writing web applications rather than GUI-based ones. Then show them a demo of a cut-down version of the same page working seamlessly with a downlevel (Microsoft-speak for non-Microsoft!) browser or handheld device or WAP phone and they can envisage writing apps for mobile devices as well - in exactly the same GUI way they've been used to writing VB apps. How can this equivalent functionality be catered for in struts? Well, for a start you need to code for the specific device - struts cannot magically produce WML instead of HTML for a WAP device. Sure, you can do it - but only by writing the JSP page in a way that it will output WML, changing the ContentType header appropriately as well. Ok, my personal view, at the moment is that a well-designed struts app will allow proper separation of view, anyway so it just needs for a template in WML to be created - chances are this will give a better end result. My understanding is that JSF will bring this functionality to web-based java applications - hopefully with a nice GUI development environment - so this will offer the same kind of oh, wow reaction that showing this kind of demo to the uninitiated always does! But, maybe - just maybe, JSF will deliver on the early promises and will become a truly indispensible view technology (and maybe a lot more) - time, as always will tell. Again, the licensing model for JSF will be another thing that one needs to be comfortable with - I understand it will not be Open Source ... but then neither is java. If Sun start asking for silly royalties: per server; per CPU; per Company; then, sorry I'm not sure it's a goer - as .NET is free for unlimited deployment: public-facing or whatever - it's only the Visual Studio.NET development IDE that is charged-for. Ok, admittedly only on a Microsoft OS so they've had money anyway. The only way I can see that Sun can get close to the java everywhere-type vision is that the use of JSF will be as unencumbered as java currently is and will realise widescale use - Ok, where's the revenue stream in that you might ask - well don't ask me because I don't immediately know ... but I can see how it is great for java (and for Sun) and for the rest of us if it turns-out half as good as it promises to be. Hue. -Original Message- From: Reinhard [mailto:[EMAIL PROTECTED] Sent: 11 August 2003 21:30 To: Struts Users Mailing List Subject: Re: [OT] Interesting JSF info Java (to Sun) is like Windows (to Microsoft): The browser is part of the OS. In the same vain it will come down to this: JSF is part of Java so therefore that
RE: Netscape vs. IE link problem
Hi, You may want to be using an html:link ... as opposed to a direct a tag. If you look at the source of the page (in either browser would be fine - you'll likely find it is a relative link, e.g. a href=myFwdPress Me!/a If you create this as a path from the root, e.g. a href=/myApp/myFwdPress Me!/a ... then this should work fine on either browser. Alternatively, I may have completely misunderstood what the problem is - but please post some additional info is this is not correct. Hue. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 11 August 2003 20:54 To: [EMAIL PROTECTED] Subject: Netscape vs. IE link problem Hi, In one of our Struts applications, we have created tile definitions for every page and action-mappings that link to and from these definitions instead of the JSPs themselves. The rationale for this approach is to make it easy to replicate a site using the same, or mostly the same, pages. But an interesting snafu employing Netscape (as opposed to IE) has arisen with this schema: you can evoke the appropriate forward from both browsers when submitting a form, yet if you attempt to link to the same page via an href, IE finds its way to the correct page but Netscape apparently searches for the forward in the same directory as the calling page (paying no attention to the action-mapping). I was wondering if anyone had encountered this problem and knew of a work-around. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Resin and struts 1.1 Final tiles error
What does resin give when intialising the webapp as opposed to TC - particularly look for (or absence of) a line like: INFO: Tiles definition factory loaded for module ''. Are any errors thrown when the tiles definition factory should be initialised? Posting the output from resin would help. Hue. -Original Message- From: Barry Volpe [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 23:31 To: Struts Users Mailing List Subject: Resin and struts 1.1 Final tiles error This error does not occur in Tomcat 4.1 (struts 1.1 Final). Resin works fine using the struts.jar from struts 1.1b2 When upgrading to struts 1.1 Final the following error occurs in Resin: 500 Servlet Exception javax.servlet.jsp.JspException: Can't get definitions factory from context. at org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(Ins ertTag.java:583) at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTa g.java:487) at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:451) at _index__jsp._jspService(/childrencare/index.jsp:9) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:344) at com.caucho.server.http.RunnerRequest.handleConnection(RunnerReques t.java:274) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:536)Any suggestions?Barry --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deployment of Struts App in Linux/Tomcat
André, It does depend on quite a few factors, if you're able to provide some info on the following someone here may be able to help: 1) What version of tomcat? i.e. 4.0.x, 3.x, 4.1.x? 2) Does tomcat serve pages correctly now, i.e. what does browsing to the following URL give (replace 127.0.0.1 with server ip address if not on server): http://127.0.0.1:8081/ Does it give an error or does tomcat holding page come-up, i.e. is tomcat running OK? You might also want to try replacing 8081 with 8180 which some distros use for TC (Debian, for example). 3) It should only be necessary to deploy the .war to the expected directory and restart TC. Although it could also be necessary to manually unpack the war depending on how TC is configured. What directory are you attempting to deploy to? 4) A summary of what your friend has already tried and why you think paths might be the problem. BTW deploying a struts app on TC can require some minor changes if TC is running under a Java Security Manager, JSM, as documented here: http://jakarta.apache.org/struts/userGuide/installation.html (sub-section Running Struts Applications Under A Security Manager) Hue. -Original Message- From: Andre Michel [mailto:[EMAIL PROTECTED] Sent: 11 August 2003 18:43 To: [EMAIL PROTECTED] Subject: Deployment of Struts App in Linux/Tomcat Hello, a friend of mine is trying to deploy a Struts application on a linux server and is encountering severe problems (with pathes in particular). Because my knowledge of linux is marginal at best, I am not able to help him but I do remember to have seen a tutorial on the web covering this topic. Does anyone has a link? Thanks, André Michel -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: another question to tiles
Reinhard, What you are asking - I do not believe to be straightforward and I have not seen any sample code showing how to do this. I have often considered doing this and remember a few posts from Cedric on this topic, the following one in particular: http://marc.theaimsgroup.com/?l=struts-userm=104630401320509w=2 ... in which Cedric gives the link to: http://www.lifl.fr/~dumoulin/howto/writeAFactory.doc Here are some other links I found which I've kept to one side when I get around to looking at this (sorry - all may not be relevant): http://marc.theaimsgroup.com/?l=struts-userm=105654460717516w=2 http://marc.theaimsgroup.com/?l=struts-userm=105366427120584w=2 http://marc.theaimsgroup.com/?l=struts-userm=105089975605717w=2 http://marc.theaimsgroup.com/?l=struts-userm=104914441232186w=2 http://marc.theaimsgroup.com/?l=struts-userm=104748278524593w=2 http://marc.theaimsgroup.com/?l=struts-userm=104670782103419w=2 Hue. -Original Message- From: Reinhard [mailto:[EMAIL PROTECTED] Sent: 11 August 2003 14:09 To: Struts Users Mailing List Subject: Re: another question to tiles Hi Cal, many thanks for your answer! If you check out the Advanced Manual on the Tiles site there is a section on dynamic definitions. http://www.lifl.fr/~dumoulin/tiles/ I was surprised about this hint, cause I startet with this documents. So I rechecked to document and - IMHO - it's not talking about dynamic handling, like I asked for. The dynamic stuff is, having various alternatives configured, switch between them. I already reached that step. With the ActionForward I create Forwards, which are NOT in the struts-config. Now I would like to do something similar with the tiles, to cleanup the tiles-config. Nothing, I couldn't live without, but I think, the less you have to configure, the more stable is the application. Just an idea. I came to 8.4 writing your own definition factory. There's a (big) warning, that it's outdated. The document is from last year, so I have no idea about the changes from then on. The homepage of the creator is although frozen. Is the tiles-definition-factory similar to the definition-factory of struts? The later was easy to implement. But what is the counterpart to the ActionForward in tiles? The technique I use is the same as Cedric's example - but I simplified a bit. The downside is a trip to an action for each page to determine the layout. I thought, that I simplified it too - and yes, I also have to trip to an action. - Do you have any experiences about the cost of the additional trip to an action? - Why do you write an extra cookie. Is it not ok, to store the user-settings in the session-context? - Do you know, where the default locale comes from? Does it come from the user-agent (browser) or from the server-environment? kind regards Reinhard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Resin does not work with Struts 1.1 Final
Barry, As I replied to your previous post - you really do need to include the output of the resin log on startup. -Original Message- From: Barry Volpe [mailto:[EMAIL PROTECTED] Sent: 08 August 2003 22:33 To: Struts Users Mailing List Subject: [OT] Resin does not work with Struts 1.1 Final Resin does not work with Struts 1.1 Final Question by Barry on Fri, 08 Aug 2003 14:05:26 -0700 (PDT) [ edit | delete ] When upgrading to Struts RC2 or 1.1 Final the following error occurs: (further description of problem below) 500 Servlet Exception javax.servlet.jsp.JspException: Can't get definitions factory from context. at org.apache.struts.taglib.tiles.InsertTag.processDefinitionName(Ins ertTag.java:583) at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTa g.java:487) at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java :451) at _index__jsp._jspService(/childrencare/index.jsp:9) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.ja va:182) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.j ava:344) at com.caucho.server.http.RunnerRequest.handleConnection(RunnerReques t.java:274) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:536) -- -- Resin 2.1.9 (built Tue Apr 15 14:28:40 PDT 2003) Although the message indicates a tiles problem the real problem appears to be in initializing a datasource. If I remove the datasource from the struts-config the error goes away (of course cannot connect to a datasource but the jsp comes up). In versions RC1 or earlier the problem does not exist. The main difference from RC2,1.1 Final and earlier versions starting from RC1 is (from release notes): In RC2, the Commons-DBCP and Commons-Pool dependencies have been removed. These are replaced with a dependency on the Struts-Legacy package, containing the GenericDataSource and GenericConnection classes from Struts 1.0.2. These are distributed for J2SE 1.3 but may be recompiled for J2SE 1.4. Other DataSource implementations may be plugged in (recommended). RC2 is dependent upon Commons FileUpload RC1. The final release of Struts 1.1 cannot happen until this dependency is updated to a final release of FileUpload. All other dependencies are in their final release. Other changes since RC1 have been routine fixes and refactorings. I have tried using DBCP and General methods of connecting using the mysql driver and both will not work. The RC2 and Struts Final 1.1 work fine in Tomcat 4.1 but do not work in Resin. I am using J2SE 1.4 on Tomcat and Resin Any suggestions? Thanks, Barry --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache Tomcat web servers
Hi yan, Memset support only the virtual server. They are well versed in Linux - RH and Debian certainly and they're bright guys from what I've seen. They provide unmetered bandwidth on a shared connection and you can install whatever you want to install. I'm sure they'll help you with Apache - but not sure what their abilities are on TC - my guess is you'll get minimal help with TC setup or configuration - but hey use the TC list - it's great! After having grief with TC hosting (not tried kgbinternet, though!) - it seemed much easier to roll our own. We tested a Debian production server in-house with Apache, Tomcat and mod_ssl (for Apache) - with multiple domains for apache (and obviously TC). With full root access it has proved _much_ less grief than trying to get equivalent functionality from a dedicated TC hosting company - but maybe we are just awkward! Hope that helps, Hue. -Original Message- From: yan [mailto:[EMAIL PROTECTED] Sent: 10 August 2003 13:49 To: Struts Users Mailing List Subject: Apache Tomcat web servers Thanks for the advice Hue, you have given me a lot to go on there - much appreciated. Do memset.com actually support Apache/Tomcat? I couldn't quite see a reference to it under their products on there site. I have been considering http://www.nameonthe.net or http://www.joshuainternet.com Anybody know about them who can comment as to their suitability? Thanks again yan KickStartESolutions - Intelligent Web Services [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Welcome.do;jsessionid=C36048429636E35FB1ECAA5978E23132 [Solved for me]
I had the same problem and sorted it thus: 1) Create a new page, say index_entry.jsp with the following content (it is assumed your previous entry point was index.jsp): HTML HEADMETA HTTP-EQUIV=Refresh CONTENT=0;URL=index.jsp/HEAD BODY/BODY /HTML (Ok, if you have a particularly complex app structure, with modules etc - then you may need to change above path to index.jsp programmatically). 2) Change your welcome file in the app's web.xml to index_entry.jsp ... welcome-file-list welcome-fileindex_entry.jsp/welcome-file /welcome-file-list ... 3) Explanation (long): This technique only works for me on tomcat as, tomcat does not seem to send a session cookie (nor indeed start a session) for the initial request to the root of the webapp, e.g. http://host.domain.tld/ - it only starts a session on request to a resource in the webapp, e.g. page/action. This is probably part of the spec - don't know because I haven't checked yet. NB: This was using TC 4.0.6 (bundled with netbeans on Windows 2000 with Sun's JDK 1.4.2). a) NO COOKIE FROM WEBAPP ROOT WITH RETURNED 302 When browsing to http://host.domain.tld/ - a cookie is not sent with the 302 (Moved Temporarily) response that re-directs to the welcome file, e.g. index_entry.jsp. See the following output from nc (http://www.atstake.com/research/tools/network_utilities/): X:\nc 127.0.0.1 8081 GET / HTTP/1.0 HTTP/1.1 302 Moved Temporarily Content-Type: text/html Connection: close Date: Wed, 06 Aug 2003 11:58:11 GMT Server: Apache Tomcat/4.0.6 (HTTP/1.1 Connector) Location: http://localhost:8081/index_entry.jsp htmlheadtitleApache Tomcat/4.0.6 - Error report/titleSTYLE!--H1{font- family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY {font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --/STYLE / headbodyh1Apache Tomcat/4.0.6 - HTTP Status 302 - Moved Temporarily/h1HR size=1 noshadepbtype/b Status report/ppbmessage/b uMoved Tem porarily/u/ppbdescription/b uThe requested resource (Moved Temporari ly) has moved temporarily to a new location./u/pHR size=1 noshade/body /html b) BROWSER REQUESTS WELCOME FILE, e.g. index_entry.jsp This time a cookie is sent server-browser with JSESSIONID in it. The server is not aware yet that the browser can send cookies (as one has not been sent from browser-server yet) - so if any links in this page use URL Rewriting then they will have the JSESSIONID appended to ensure session state is maintained. X:\nc 127.0.0.1 8081 GET /index_entry.jsp HTTP/1.0 HTTP/1.1 200 OK Content-Type: text/html;ISO-8859-1 Connection: close Date: Wed, 06 Aug 2003 12:04:34 GMT Server: Apache Tomcat/4.0.6 (HTTP/1.1 Connector) Set-Cookie: JSESSIONID=5BF64BD681D362A1962D81AF7A3B4362;Path=/ HTML HEADMETA HTTP-EQUIV=Refresh CONTENT=0;URL=index.jsp/HEAD BODY/BODY /HTML c) BROWSER REQUESTS REAL WELCOME FILE, e.g. index.jsp This time the cookie is sent browser-server so the server is now aware that the browser can send cookies. Any links in this page will not now use URL Rewriting (unless of course browser has cookies disabled). Well that works for me - hopefully it will help someone else. Hue. -Original Message- From: Marcel Overdijk [mailto:[EMAIL PROTECTED] Sent: 04 August 2003 08:08 To: [EMAIL PROTECTED] Subject: Welcome.do;jsessionid=C36048429636E35FB1ECAA5978E23132 Hello, I never noticed it but when I start my application http://localhost:8080/overdijk http://localhost:8080/overdijk/Welcome.do;jsessionid=C36048429636E35FB1 ECAA5978E23132 I will be forwarded to Welcome. Suddenly (I didn't noticed it before) I see some session information in my url bar: http://localhost:8080/overdijk/Welcome.do;jsessionid=C36048429636E35FB1E CAA5978E23132 When I start struts-documentation I don't see this session information. Can anybody explain why this information is displayed ? Kind regards, Marcel Overdijk --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.505 / Virus Database: 302 - Release Date: 30/07/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Apache Tomcat web servers
Hi yan, I would be inclined to keep-away from ISPs who do not have good and *extensively* proven experience with JSP and only go with those who are specifically recommended to you for JSP. I fell-out with a UK-based ISP (servers hosted in the US/Canada) in the last 6 months after failure-after-failure with Tomcat - although they apparently supported tomcat. They felt I was being unreasonable if I complained that TC was down frequently as they claimed their servers were still up and serving static content - so this was fine in their mind - the simple website in question was finally offline for at least 2 weeks. We were being blamed for apparent errors in the pages although the website had not been changed and had worked flawlessly for 3 months prior to this outtage ... and also worked without changes on a fresh download of Tomcat and on every configuration of ours: Windows and Debian Linux with IBM, BEA and Sun's JDKs 1.3-1.4 and under a JSM and without a JSM! We did attempt to get a refund as we'd paid for 12 months hosting in advance - but they refused and unless we wanted to get legal they would not pay up - in the end we transferred to another ISP (easy to do as our DNS is located elsewhere and enabled us to do this). A *costly* lesson. The lessons we learned are: 1) Always keep control of DNS records - and allows easily and quickly moving from a poorly-performing ISP. Ours are with register.com - not cheap but their DNS appears to be very solid and all DNS can be configured online and DNS costs are included in the domain registration costs. There are plenty of other options for other DNS providers, though. 2) Never go with an ISP for technologies they seem to support - only ever go with a technology from an ISP if they specialise in this and really know what they're doing. Recommendations seem to be the key, here - recommendations for kgbinternet seem to crop-up a lot - I haven't personally read a bad word about them yet. 3) For JSP specifically - always consider what _could_ go wrong with hosting and what implications sharing with other sites could have. For instance a private JVM is a really good idea - from a security, performance and reliability viewpoint. Also, consider what effect other services running on the same server could have - for instance we lost tomcat once as, unknown to us - the server was also being used for users just playing about with tomcat - another user had deleted their jserv directory and this caused tomcat to fail to start - taking our site with it. We also had problems wanting to change some settings for the JSM - in order to run Struts/Tiles - this was finally done - but grudgingly only by the above ISP. 4) Consider what version of Tomcat (or other container) you'd like to be running and ask whether this is the version they run and how proactive are they at installing security updates and fixes. When we first investigated the version running with our ISP it was Tomcat 3.2 beta 4(!) - even though 3.3a Final and 4.1.x was also suitable for production. From the Tomcat bug database there appeared to be some very serious security problems with the version they were running: source disclosure, web.xml disclosure etc.! Our Choice ** After trying 4 different shared hosting providers we now use http://www.memset.com/ - who supply a very competitively-priced complete virtual Linux server - with unlimited bandwidth and full root access and control panel to remotely reboot the server, if necessary. There are more options here: http://user-mode-linux.sourceforge.net/uses.html and http://usermodelinux.org/modules.php?name=Newsfile=categoriesop=newindexc atid=12 The option we have provides Debian (they also do RH) Linux, 2 IP Addresses, shared but unlimited 1.5Mbps connection. Ok, admittedly the downside is that if you're not familiar with Linux then you may have a stiff learning curve - but they have excellent and very helpful tech support staff and if you're running Debian apt-get install tomcat gets you a fully-running Tomcat 3.x installation - JVM, JSM (Java Security Manager enabled) all correctly setup! The real advantage is that this allows hosting of multiple domains; full root access; ability to host email if you need it; ability to choose JVM; ability to run apache to front tomcat if you want; ability to run own SSL-enabled service if needed; basically pretty much anything that you can figure-out how to do it! The obvious real downside is that with power comes responsibility and the responsibility is with you to ensure you don't leave the server wide-open to attack; leave an open mail relay; leave a host that can be commandeered in an attack etc. etc. But starting with modest objectives and building from there can get you the service you need without great cost and with full control - and if you're unsure there are plenty of resources from where help can be sought. Hope the above helps, Hue. -Original Message- From: yan [mailto:[EMAIL
RE: Apache Tomcat web servers
discovered it. Cost him 2 grand - eek! Adam Hue Holleran wrote: Hi yan, I would be inclined to keep-away from ISPs who do not have good and *extensively* proven experience with JSP and only go with those who are specifically recommended to you for JSP. I fell-out with a UK-based ISP (servers hosted in the US/Canada) in the last 6 months after failure-after-failure with Tomcat - although they apparently supported tomcat. They felt I was being unreasonable if I complained that TC was down frequently as they claimed their servers were still up and serving static content - so this was fine in their mind - the simple website in question was finally offline for at least 2 weeks. We were being blamed for apparent errors in the pages although the website had not been changed and had worked flawlessly for 3 months prior to this outtage ... and also worked without changes on a fresh download of Tomcat and on every configuration of ours: Windows and Debian Linux with IBM, BEA and Sun's JDKs 1.3-1.4 and under a JSM and without a JSM! We did attempt to get a refund as we'd paid for 12 months hosting in advance - but they refused and unless we wanted to get legal they would not pay up - in the end we transferred to another ISP (easy to do as our DNS is located elsewhere and enabled us to do this). A *costly* lesson. The lessons we learned are: 1) Always keep control of DNS records - and allows easily and quickly moving from a poorly-performing ISP. Ours are with register.com - not cheap but their DNS appears to be very solid and all DNS can be configured online and DNS costs are included in the domain registration costs. There are plenty of other options for other DNS providers, though. 2) Never go with an ISP for technologies they seem to support - only ever go with a technology from an ISP if they specialise in this and really know what they're doing. Recommendations seem to be the key, here - recommendations for kgbinternet seem to crop-up a lot - I haven't personally read a bad word about them yet. 3) For JSP specifically - always consider what _could_ go wrong with hosting and what implications sharing with other sites could have. For instance a private JVM is a really good idea - from a security, performance and reliability viewpoint. Also, consider what effect other services running on the same server could have - for instance we lost tomcat once as, unknown to us - the server was also being used for users just playing about with tomcat - another user had deleted their jserv directory and this caused tomcat to fail to start - taking our site with it. We also had problems wanting to change some settings for the JSM - in order to run Struts/Tiles - this was finally done - but grudgingly only by the above ISP. 4) Consider what version of Tomcat (or other container) you'd like to be running and ask whether this is the version they run and how proactive are they at installing security updates and fixes. When we first investigated the version running with our ISP it was Tomcat 3.2 beta 4(!) - even though 3.3a Final and 4.1.x was also suitable for production. From the Tomcat bug database there appeared to be some very serious security problems with the version they were running: source disclosure, web.xml disclosure etc.! Our Choice ** After trying 4 different shared hosting providers we now use http://www.memset.com/ - who supply a very competitively-priced complete virtual Linux server - with unlimited bandwidth and full root access and control panel to remotely reboot the server, if necessary. There are more options here: http://user-mode-linux.sourceforge.net/uses.html and http://usermodelinux.org/modules.php?name=Newsfile=categoriesop= newindexc atid=12 The option we have provides Debian (they also do RH) Linux, 2 IP Addresses, shared but unlimited 1.5Mbps connection. Ok, admittedly the downside is that if you're not familiar with Linux then you may have a stiff learning curve - but they have excellent and very helpful tech support staff and if you're running Debian apt-get install tomcat gets you a fully-running Tomcat 3.x installation - JVM, JSM (Java Security Manager enabled) all correctly setup! The real advantage is that this allows hosting of multiple domains; full root access; ability to host email if you need it; ability to choose JVM; ability to run apache to front tomcat if you want; ability to run own SSL-enabled service if needed; basically pretty much anything that you can figure-out how to do it! The obvious real downside is that with power comes responsibility and the responsibility is with you to ensure you don't leave the server wide-open to attack; leave an open mail relay; leave a host that can be commandeered in an attack etc. etc. But starting with modest objectives
RE: Avoiding jsessionid appending in a redirect
Hi Chris, I posted a response to this recently: http://marc.theaimsgroup.com/?l=struts-userm=106018678002719w=2 -Original Message- From: Chris Boulter [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 19:27 To: [EMAIL PROTECTED] Subject: Avoiding jsessionid appending in a redirect Hi, Is there a way to insist that a jsessionid _doesn't_ get appended when returning a redirect from an Action? In my case, I'm redirecting to an external (non-Java) system and the jsessionid is causing the external system problems. I have return new ActionForward(http://some.external.url/options;, true) at the end of my execute() method in the Action. This is exactly the URL to which I want to redirect, but by the time the HTTP response is seen by the browser, it has a jsessionid on the end: HTTP/1.1 302 Moved Temporarily Set-Cookie: . Location: http://some.external.url/options;jsessionid=foo.bar.com-24%3A3f4 I'm using SunONE v6 web server. I've tried adding this to web-apps.xml: session-tracking use-cookies=true use-url-rewriting=false / but it makes no difference. Interestingly, I can't reproduce the problem with TomCat (3.3.1a), although I'm not able to engineer exactly the same environment using TomCat. One theory I have is that Struts (or SunONE?) is interpreting my redirect as the first request to a webapp and, since it doesn't know whether cookies will be accepted, it is using URL rewriting 'just in case'. Many thanks, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles status and feature suggestion WAS accessing Attribute of a parent-tile-definition
Hi Richard, Please see below... -Original Message- From: Richard Tomlinson [mailto:[EMAIL PROTECTED] Sent: 06 August 2003 10:58 To: [EMAIL PROTECTED] Subject: Tiles status and feature suggestion WAS accessing Attribute of a parent-tile-definition 2. Is tiles considered a deprecated technique? I don't think so - and I hope not! I too would like to know the status of Tiles and whether there's any ongoing development with it. I'm looking at redesigning a proprietary composite page handler to use Tiles but see a number of areas where tiles could be improved and where it is not suitable at present to meet all of my requirements: o Firstly, Tiles assumes that a page is composed of multiple content areas where you have one piece of content to an area. This is true for a simplistic site but, as in the case we have, the area on a page can be determined by a condition so that a single area could contain say one of many possible files. An example would be a page where the display differs slightly per category of user and some areas within the template are populated by different content. The ability to conditionally choose a template would also be beneficial. It is possible to create a custom tag to wrap the tiles:put ... in each page but this results in the page being uneditable by the growing number of tiles compliant editors and therefore they would be unable to give any improvement in productivity when creating pages. Has anyone else created pages this way using another composite page handler or product? Tiles works very effectively for us with the logic:equal ... and such tags to conditionally include a tiles:insert ... - we use it extensively and it is very effective. As another poster mentioned - if you need additional capabilities then consider utilising a specific controller. We have been able to achieve what we need just using the aforementioned technique. Alternatively when the page gets too large - we tend to split to include only one portion that then has additional logic as to whether to include additional portions by selectively including other tiles. Performance does seem to suffer a little (or it may just be it's a complex page) - hence our intention to utilise OSCache at various points to avoid re-rendering essentially static data. It may also be that we are not using any tiles-aware IDE - but hopefully any IDE should be aware of logic:... and JSTL so why is this a problem? o Secondly, would it make sense to have a 'static' identifier that could be used to perform the equivalent of a %@ include ... directive to embed content and thereby result in more optimised code? The static attribute would be environment switchable to allow the static functionality to be disabled during development but enabled when deployed in a production environment. I'm not sure I fully understand the question but I presume you're talking about caching static or semi-static portions. We are just starting to use OSCache cache for this - there was a post to the list recently that may discuss this in more detail. Sorry if I haven't understood correctly what you mean. Here's the thread: http://marc.theaimsgroup.com/?l=struts-userm=106002680511323w=2 Here's the link to OSCache: http://www.opensymphony.com/oscache Comments and suggestions, please. Regards Richard Tomlinson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.507 / Virus Database: 304 - Release Date: 04/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts-el example app not working?
Yep, I've been bitten by this one too. There are a few workarounds: 1) Change the JSP compiler to not compile JSPs: http://marc.theaimsgroup.com/?l=struts-userm=105334711431267w=2 2) Workaround by Brian Cross (at end of this thread) - this works well for us: http://marc.theaimsgroup.com/?l=struts-userm=105147011604944w=2 Hope that helps. Hue. -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: 31 July 2003 06:10 To: Struts Users Mailing List Subject: RE: struts-el example app not working? Well, I managed to get it running but I'm definitely not a convert to Netbeans :-( - In Netbeans, go to the Runtime tab and expand the Explorer view until you see the 'Internal Tomcat' server. - Right click on it and change the IDE Integration Mode from Full to Minimum. That seems to get it working. You could also look at the External Tomcat Server feature as an alternative. There's information in the application Help. I think this http://www.netbeans.org/issues/show_bug.cgi?id=32425 is the cause of the problem. In any case, this issue is with Netbeans integration of Tomcat and not with Struts. Related information: James Mitchell has written a guide to setting up a Struts project in Netbeans (version 3.4) http://jakarta.apache.org/struts/faqs/netbeans.html. He's using Ant to build and deploy the web application so that probably gets round the problems by avoiding the IDE's build/deploy features. If you have access to WebSphere Studio it is IMHO a *much* more pleasant experience than Netbeans and importing a WAR is straightforward. I haven't tried Eclipse (on which Websphere Studio is based) with the Sysdeo plugin for Tomcat, but that would be a cheaper (free!) option than WS Studio. Hope this works for you... now where's that uninstall option :-) Steve -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: July 30, 2003 7:12 PM To: Struts Users Mailing List Subject: RE: struts-el example app not working? I'll try to take a look at Netbeans sometime, but it may not be for a few days. If I have any success I'll post back to the list and copy you. If, in the meantime you find the problem, do post the result here. Steve -Original Message- From: struts [mailto:[EMAIL PROTECTED] Sent: July 30, 2003 5:51 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: struts-el example app not working? Yep the stand alone (Tomcat 4.1) works fine. Just install the struts-el-exercise-taglib.war through the tomcat manager and no problems. Barry - Original Message - From: Steve Raeburn [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 4:27 PM Subject: RE: struts-el example app not working? 4.0.6 works for me. I don't remember the details, but I *think* Netbeans has cropped up as a problem before. If you can, try it with a standalone version of Tomcat and check the mail archives for Netbeans issues. Steve -Original Message- From: struts [mailto:[EMAIL PROTECTED] Sent: July 30, 2003 4:06 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: struts-el example app not working? I am running Tomcat 4.0xx (using netbeans 3.5 with Tomcat bundle) Barry - Original Message - From: Steve Raeburn [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 4:03 PM Subject: RE: struts-el example app not working? Works fine for me with the 1.1 release version on Tomcat 4.1.24. What container are you running on? Steve -Original Message- From: struts [mailto:[EMAIL PROTECTED] Sent: July 30, 2003 3:52 PM To: [EMAIL PROTECTED] Subject: struts-el example app not working? Hello, When testing the struts-el example I get the following error. The problem goes away if I remove: %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % Of course this is useless because the html-el tags do not function. I have even tried incorporating the struts-html-el in my own app and included all jars from the struts 1.1 release, defined the el tld's in my web.xml and I get the same exact error. Same partial solution if I remove the %@ taglib uri=/WEB-INF/struts-html-el.tld prefix=html-el % the error goes away and the jsp page is displayed and of course without the properly generated html. Appreciate any suggestions Barry I get the following error: index.jsp [-1:-1] java.lang.ExceptionInInitializerError
RE: Design Question - same action, many jsps/views
Hi Brian, Why not use different named forwards for the action and access each one from the action with a: { ... return (mapping.findForward(page1/page2/page3)); } In s-c: action path=/myAction type=FQ Class name=bean ... forward name=page1 path=/page1.jsp/ forward name=page2 path=/page2.jsp/ forward name=page3 path=/page3.jsp/ /action Hue. -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: 28 July 2003 10:39 To: [EMAIL PROTECTED] Subject: Design Question - same action, many jsps/views Hi all, I've come across a situation which I'm not sure how to handle with struts. I have an action which, depending on from which page it's called, should forward to different jsps pages. Currently, for each resultant jsp, I create a new action with the exact same logic code inside which forwards to the right jsp. I'm just not sure if this is the right way to do it, because it's replication of code. An alternative might be to switch on the input path of the request and forward to The right jsp, but I'm not sure if this is right either. This has to have come up before, so I'm looking for a best practice solution. What do you guys reckon? Thanks, Brian --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Design Question - same action, many jsps/views
Hi Brian, Yes - I can see your point. Whenever I need to do this (with multi-page forms, for instance - where the Next button should forward to the next page) - I use a property on the form, from memory it might be currentPage (which is numeric for me) that is held as a hidden form property that is used to do the from logic you are describing. Ok, this was done specifically as we are using tiles, as I believe this may confuse the getRequestURI() return value(?). The alternative may be to use the dispatcher to define a specific entry point in your action that can call some generic code (i.e. that presumably you're now concerned about duplicating - and I agree with your concerns) - and then forward to the correct forward? Alternatively the struts-workflow extensions may provide additional clues for you on how this may be done. From memory, we were discouraged from using this as it had several pre-requisites, like appending something to every action and actions needing to work in a particular way that was too much work for us (and I think there some issues using it with tiles?). I think the new version integrates much better with 1.1 so this may be worth a look, too? URL in case you don't have it: http://www.livinglogic.de/Struts Hue. -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: 28 July 2003 16:27 To: 'Struts Users Mailing List' Subject: RE: Design Question - same action, many jsps/views Hi Hue, That's definitely one way to go, but the disadvantage that I see of using this way is that you presumably have to hard code into the action, some way of identifying where the request came from. Perhaps something like: String input = request.getRequestURI(); if(input.equalsIgnorCase(inputpath1) return (mapping.findForward(page1)); else if(input.equalsIgnorCase(inputpath2); return (mapping.findForward(page2)); else if(input.equalsIgnorCase(inputpath3); return (mapping.findForward(page3)); The previous new action mapping idea means you don't have to do this I think, which might make it a better solution. What do you think? I'm not sure though, and thanks very much for the help. Brian -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 28 July 2003 16:11 To: Struts Users Mailing List Subject: RE: Design Question - same action, many jsps/views Hi Brian, Why not use different named forwards for the action and access each one from the action with a: { ... return (mapping.findForward(page1/page2/page3)); } In s-c: action path=/myAction type=FQ Class name=bean ... forward name=page1 path=/page1.jsp/ forward name=page2 path=/page2.jsp/ forward name=page3 path=/page3.jsp/ /action Hue. -Original Message- From: Brian McSweeney [mailto:[EMAIL PROTECTED] Sent: 28 July 2003 10:39 To: [EMAIL PROTECTED] Subject: Design Question - same action, many jsps/views Hi all, I've come across a situation which I'm not sure how to handle with struts. I have an action which, depending on from which page it's called, should forward to different jsps pages. Currently, for each resultant jsp, I create a new action with the exact same logic code inside which forwards to the right jsp. I'm just not sure if this is the right way to do it, because it's replication of code. An alternative might be to switch on the input path of the request and forward to The right jsp, but I'm not sure if this is right either. This has to have come up before, so I'm looking for a best practice solution. What do you guys reckon? Thanks, Brian --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.504 / Virus Database: 302 - Release Date: 24/07/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Simple Tiles question
Erez, Tiles are included in the HTML page like any other 'fragment' - the resultant HTML needs to be properly formed. If the outermost tile or page already has html etc. then the included tiles should not have this - so yes - you need to remove this. For simplicity my tiles are normally self-contained tables, i.e. tabletrtd.../td/tr/table but sometimes are just self-contained rows but can be anything - providing the HTML page that is finally generated from all the tiles is valid. Hue. -Original Message- From: Erez Efrati [mailto:[EMAIL PROTECTED] Sent: 24 July 2003 20:51 To: 'Struts Users Mailing List' Subject: Simple Tiles question A simple question I guess, Is it legal to have the tags like html /html and others in a tile. Meaning, when converting a page to a tile, do I have to remove those html:html header etc. tags? Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.502 / Virus Database: 300 - Release Date: 18/07/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.502 / Virus Database: 300 - Release Date: 18/07/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles attributes in jsp tags problems
Try: tiles:useAttribute name=division classname=java.lang.String / ... jsp:param name=division value=%=division% / Or alternatively use EL. H. Hi all, I changed from using the HTML embed tag to using the jsp:include tag to embed a applet in a webpage. The problem however is that since I'm using tiles I can't get the values of the attributes passed to tiles in the attributes of the jsp:include tag because it is itself a jsp-tag. Can someone please tell me how should I solve this problem? Here is the jsp that embeds the applet: %@ taglib uri=/WEB-INF/struts/struts-tiles.tld prefix=tiles % html body style=margin: 0px; padding: 0px; jsp:plugin type=applet code=com.mycomp.composer.client.AppletLauncher archive=../client.jar,../thinlet.jar jreversion=1.4 jsp:params jsp:param name=division value=tiles:getAsString name=division// jsp:param name=listAction value=tiles:getAsString name=buttonPanel// jsp:param name=currentUriField value=tiles:getAsString name=buttonPanel// jsp:param name=buttonPanel value=tiles:getAsString name=buttonPanel// /jsp:params jsp:fallback Plugin tag OBJECT or EMBED not supported by browser. /jsp:fallback /jsp:plugin /body /html Thanks and regards, Jeroen - 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: redirect users after x-minutes?
I'm not sure I understand - but I think this may be more of a 'limitation' with HTML rather than particularly with tiles. A page composed of tiles is still just 1 complete HTML page. If you want to redirect any part of it I think you will need to consider using frames or iframes that has its own 'src' property that can be set. H. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: 07 June 2003 05:59 To: [EMAIL PROTECTED] Subject: redirect users after x-minutes? How do I add a redirect, in a single tile instead of the layout? I have several different body tiles, and I want to add a redirect there in some of them. But it will then effect the whole page. --- Thanks... Mick Knutson --- _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tiles:getAsString within bean:message?
I think this may what you're after? http://marc.theaimsgroup.com/?l=struts-userm=104777946004100w=2 -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: 03 June 2003 19:42 To: [EMAIL PROTECTED] Subject: tiles:getAsString within bean:message? I am trying, unsuccesfully to create an ApplicationResource driven label for the menu.jsp. Can anyone help get this to work: bean:message key='tiles:getAsString name=title /' / --- Thanks... Mick Knutson --- _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tiles:getAsString within bean:message?
see below -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: 03 June 2003 20:56 To: 'Struts Users Mailing List' Subject: RE: tiles:getAsString within bean:message? Try something like this: Template.jsp: ... tiles:insert attribute='menu' !-- pass the title to the menu-- tiles:put name=title beanName=title beanScope=request/ /tiles:insert ... in menu.jsp: bean:message key='tiles:getAsString name=title /' / Is this allowed - surely one custom tag cannot nest another? -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 2:42 PM To: [EMAIL PROTECTED] Subject: tiles:getAsString within bean:message? I am trying, unsuccesfully to create an ApplicationResource driven label for the menu.jsp. Can anyone help get this to work: bean:message key='tiles:getAsString name=title /' / --- Thanks... Mick Knutson --- _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tiles:getAsString within bean:message?
I though the answer may be in the thread - link sent to you, previously: In menu.jsp: tiles:useAttribute name=title classname=java.lang.String / ... bean:message key=%=title% / Does this not work? See also other msgs on thread rgding using el. el is a better approach but may not fit as well if you have not used el before. H. -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: 03 June 2003 21:41 To: [EMAIL PROTECTED] Subject: RE: tiles:getAsString within bean:message? OK, but I don't understand where the bean:message comes in now? How does the key get accessed through the ResourceBundle? --- Thanks... Mick Knutson --- From: Bailey, Shane C. [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: tiles:getAsString within bean:message? Date: Tue, 3 Jun 2003 15:56:10 -0400 Try something like this: Template.jsp: ... tiles:insert attribute='menu' !-- pass the title to the menu-- tiles:put name=title beanName=title beanScope=request/ /tiles:insert ... in menu.jsp: bean:message key='tiles:getAsString name=title /' / -Original Message- From: Mick Knutson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2003 2:42 PM To: [EMAIL PROTECTED] Subject: tiles:getAsString within bean:message? I am trying, unsuccesfully to create an ApplicationResource driven label for the menu.jsp. Can anyone help get this to work: bean:message key='tiles:getAsString name=title /' / --- Thanks... Mick Knutson --- _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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 new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts tags vs jstl
See below: -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: 03 June 2003 07:15 To: Struts Users Mailing List Subject: Re: struts tags vs jstl thanks so, if I understand it right. you would use c:forEach items= rather than logic:iterate name=... and behind the scenes the class implementing the c:forEach is a struts-el class? No, c:* as in core from JSTL. or should you call the tags their struts names but jstl attributes? logic-el:iterate items- We tend not to use logic-el tags, only html-el and JSTL for everything else, so this would be a c:forEach. if the latter, what are the preferred prefixes for the el tags? the same as their struts counterparts or with some el prefix or suffix? We prefer to still use html:* for struts-el: easier to type, remember and you're unlikely to ever want to mix html and html-el on the same page or even in same app. cheers Nathan David M. Karr wrote: Nathan == Nathan Coast [EMAIL PROTECTED] writes: Nathan is this documented somewhere? ie which tags have / haven't been ported As other posters implied, if both a Struts tag and a JSTL tag overlap, the tag wasn't ported to Struts-EL, in general. The README.txt file in the struts-el directory tries to list what tags were not ported, and why. Note that there were some problems in the RC1 release of Struts-EL, so you should probably use the nightly build, or wait until RC2. Nathan James Norman wrote: I'm pretty sure that the latest release of Struts includes a subset of Struts tags that have been configured to support the EL Expression language. This is the expression language that is built into JSTL. I think that only the Struts tags that don't have equivalents in the JSTL have been ported. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.486 / Virus Database: 284 - Release Date: 29/05/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 01/06/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [ANN] New York Struts Group - Manchester UK
I'm in Cambridge, UK - not that near to Manchester but I do find myself out-and-about around the UK a lot - if it were nearer to Birmingham I'd be interested - anyone else nearer to Cambridge in the UK? H. -Original Message- From: Chris May [mailto:[EMAIL PROTECTED] Sent: 26 March 2003 10:26 To: [EMAIL PROTECTED] Subject: RE: [ANN] New York Struts Group - Manchester UK Maybe, if it was south Manchester (I'm based in the Midlands). Any takers? Chris David Bolsover [EMAIL PROTECTED] 03/25/03 11:10pm New York a bit far for me on a regular basis Any interest in somthing similar in Manchester UK - has distinct benefit of better beer =:o) db -Original Message- From: Daniel Jaffa [mailto:[EMAIL PROTECTED] Sent: 25 March 2003 21:45 To: Struts Users Mailing List Subject: [ANN] New York Struts Group Vic pushed into creating a group (thx vic for taking the plunge) http://groups.yahoo.com/group/struts_NYC I have created two polls one for how often monthly, bi-monthly, once a quarter, and another for the day of the week. Once we have those down we can choose the actual date, and location. Depending on how big the group is i think i can find a spot for a group under 20-25 people. Daniel Jaffa - Original Message - From: Jimmy Emmanual [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 3:30 PM Subject: RE: New York City Struts Group I would love to also... Jimmy Jimmy x2723 -Original Message- From: Elio Bonazzi [mailto:[EMAIL PROTECTED] Sent: March 25, 2003 3:32 PM To: Struts Users Mailing List Subject: RE: New York City Struts Group I would love to participate in it. Elio -Original Message- From: Michelle Harris [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 25, 2003 3:25 PM To: Struts Users Mailing List Subject: RE: New York City Struts Group I'd be in for it. Thanks, Michelle Harris -Original Message- From: Daniel Jaffa [mailto:[EMAIL PROTECTED] Sent: Tue 3/25/2003 15:21 To: Struts Users Mailing List Cc: Subject: New York City Struts Group How many people would be intrested in the formation of a New York City Struts User group. If Atlanta GA, New Jersey can have one so should we. Daniel Jaffa - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 - 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: Good Combination
1) Struts alone As in benefits of struts versus no struts - maybe try: http://jakarta.apache.org/struts/ 2) Struts with tiles http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] he.orgmsgId=658517 3) Struts with Sitemesh Never used it, sorry. -Original Message- From: Jagadeesan,Sivakumar [mailto:[EMAIL PROTECTED] Sent: 19 March 2003 21:02 To: 'Struts Users Mailing List' Subject: Good Combination Hi All: Could anyone list the advantages and disadvantages of these combinations 1) Struts alone 2) Struts with tiles 3) Struts with Sitemesh --Siva Jagadeesan - 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] Meeting in Paris this Saturday
Who gives a (word removed) if Cedric is going to be in a bookstore this Saturday? I was being sarcastic, not inflammatory, in the traditional hacker sense. I do - and probably some others who subscribe to this list - who will be in Paris and who may be interested in having a face-to-face discussion with the author of tiles - arguably a very important component of struts. Perhaps he will be dipping his freedom fries in freedom dressing sitting by the freedom doors before ordering freedom toast? I presume this is a reference to French President Chirac's stance on the imminent war to disarm Iraq - and the American 'humour' cited at the French people as a whole. In my view - this comment is very inflamatory and I think it has previously been agreed that prejudiced (and potentially racist) comments such as this have no place on this list - in my view whether they are marked as '[OT]' or not. Personally, I have a view on Chirac's stance also - but do not feel this list is the appropriate medium on which to voice it. Neither would I, as you seemed to have - presumed to know Cedric's personal stance on this. Alternatively, you may view that - Cedric is French and all French people will share the same view and traits - and can be insulted and mocked - this then would definitely be racist, in my personal view, of course. And I've been helping people on this list since 1.0 beta, though got preoccupied for a couple of months on my last project. Great - technologies like struts can only survive with list such as these and useful input from individuals such as yourself. I hope your project was completed successfully. Don't like my posts? Can you spell f-i-l-t-e-r? I think everyone is entitled to their own views and some of the [OT] posts *are* amusing - but when they may cause personal offence or voice prejudiced views then I think we all have a personal duty to voice our dissatisfaction with the sender. Whether in the sender's view they were meant to be 'humourous' or not or were posted merely to provoke a reaction - I still think they are inappropriate. Dissatisfaction voiced. Yes, I appreciate that Mark's comments should be taken with a 'ladleful of salt' but I do *not* think Mark has '... earned the privilege to flame who he wishes ...' - so, pretty please, Mark - apologise - I believe you have overstepped the mark on this occasion. H. -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: 20 March 2003 15:16 To: 'Struts Users Mailing List' Subject: RE: [OT] Meeting in Paris this Saturday Who gives a shit if Cedric is going to be in a bookstore this Saturday? I was being sarcastic, not inflammatory, in the traditional hacker sense. Perhaps he will be dipping his freedom fries in freedom dressing sitting by the freedom doors before ordering freedom toast? And I've been helping people on this list since 1.0 beta, though got preoccupied for a couple of months on my last project. Don't like my posts? Can you spell f-i-l-t-e-r? Mark -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 9:52 AM Why do you always bait people with inflamatory OT posts? It would be interesting to compare the number of your helpful posts vs. OT. David From: Mark Galbreath [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT] Meeting in Paris this Saturday Date: Thu, 20 Mar 2003 09:09:53 -0500 Gee, and I was just looking for an excuse to go to FranceNOT. Mark -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 9:00 AM For those interested to discuss with me about Struts and Tiles, I will be this Saturday 22 march in Paris at the bookstore Le Monde en 'tique' from 16h to 18h (www.lmet.fr). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - 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: [Q] Accessing struts-tiles attribute in a bean?
Ted (Husted) has created a 'tiles for Velocity'. He did qualify that by saying it was not as fully-featured as Cedric's - as I think original tiles took a good while to develop - but Ted's was designed in the shower (or bath - I don't recall) and then developed quickly afterwards. However, that said - I'd be really interested in taking a look at that code - maybe his new book could be 'Struts on Speed' (not the author as he'd never get on those stilts - but Struts with Velocity). Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? H. -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 05:02 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Yeah, I'm exacly the same with Velocity. It is clean as a whistle, but I've gotta have my Tiles :) Scott Barr www.exergonic.com.au On Mon, 2003-03-17 at 04:49, Hue Holleran wrote: Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - 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: [Q] Accessing struts-tiles attribute in a bean?
tiles-documentation.war http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] he.orgmsgNo=64863 -Original Message- From: Kola Oyedeji [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 09:31 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Hi I've been trying to get to grips with Tiles, can anyone point me to some resources, there seems to be a lack of information available on them. Thanks Kola -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 08:16 To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Ted (Husted) has created a 'tiles for Velocity'. He did qualify that by saying it was not as fully-featured as Cedric's - as I think original tiles took a good while to develop - but Ted's was designed in the shower (or bath - I don't recall) and then developed quickly afterwards. However, that said - I'd be really interested in taking a look at that code - maybe his new book could be 'Struts on Speed' (not the author as he'd never get on those stilts - but Struts with Velocity). Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? H. -Original Message- From: Scott Barr [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 05:02 To: 'Struts Users Mailing List' Subject: RE: [Q] Accessing struts-tiles attribute in a bean? Yeah, I'm exacly the same with Velocity. It is clean as a whistle, but I've gotta have my Tiles :) Scott Barr www.exergonic.com.au On Mon, 2003-03-17 at 04:49, Hue Holleran wrote: Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Accessing struts-tiles attribute in a bean?
Great links, Thanks Ted. I suppose the ultimate objective (imho) would be to extend tiles so it could utilise other views rather than just jsp. This could then leverage the great work Cedric has done on tiles wrt XML definitions and 'extends' definitions. Sorry if this seems like a really dumb/lazy q but how does the .vm get passed to velocity for processing - is this just via a servlet-mapping in web.xml. If so, could tiles not be extended to also pass the appropriate extension to a servlet mapping for processing? (Has anyone run any ideas past Cedric?). I'm not advocating even stronger dependence between the components - as I know you have strong and I think perfectly justifiable views on this - but tiles allowing a different processing engine for a resource could be very powerful. Ok, it could be tiles already does this - and I'm just rambling. I'll have a look again at the tiles code and try some examples before posting again. H. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED] Sent: 17 March 2003 09:31 To: Hue Holleran Cc: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: Re: [Q] Accessing struts-tiles attribute in a bean? Hue Holleran wrote: Ted - what's the chance of posting your views (or pointing us to a link) on how you're using Velocity with Struts. I did have another look at Velocity after your presentation but I still don't think I can do without tiles - even with the promise of 'cross platform' Velocity.NET/NVelocity it doesn't do it for me? I should probably do a how-to, but here's a clip from a Tiles Support thread on the Velocity User list: = Mark de Reeper wrote: #parse(/WEB-INF/templates/vm/htmlheader.vm) table width=100% border=0 tr td#if($header)#parse($header)#end/td /tr tr td#if($body)#parse($body)#end/td /tr tr td#if($footer)#parse($footer)#end/td /tr /table #parse(/WEB-INF/templates/vm/htmlfooter.vm) Then define a template to set the layout and the various bits, this is what is loaded as the main template to parse: #set ($body = /WEB-INF/templates/vm/templatebody.vm) #set ($footer = /WEB-INF/templates/vm/templatefooter.vm) #set ($header = /WEB-INF/templates/vm/templateheader.vm) #parse(/WEB-INF/templates/layouts/layoutHBF.vm) Ted Husted wrote: This is just how the original Struts Template library worked. (Great minds and all that.) You defined a second file to administer the template. This works well enough but it tends to generate a lot of meta-templates that are just used to call other templates. As Slavik pointed out, Tiles extended the template library so that you could express the meta-templates in XML. Instead of forwarding to the glockenspiel.vm template, you can foward to make a reference to say /vm/Glockenspiel and Struts will automatically look for a vmGlockenspiel element, do whatever sets you need, and the forward to the layout. A very neat aspect of Tiles, that we need to adopt for the other Struts configurations, is that one element can extend another. So if you just needed to replace the title on a page, you can extend one element and just override that one set. This makes a *huge* difference in maintenance when you pass the thirty page mark. Until one of us gets around to writing a Tiles tool, I've prototyped what you can do in the Struts config. I've a ViewAction that does the setting. You create the variables to set as Struts ActionForwards and pass their names to ViewAction as ActionMapping parameter. So I have something like this to describe a page: action path=/vm/main/permit/View type=us_ok_deq_wqdata.http.ViewAction validate=false name=permit_select_id parameter=vmTitle,vmChoice,vmMenu,vmBody,vmAction,vmButtonBar forward name=vmTitle path=Permit Detail / forward name=vmChoice path=View / forward name=vmMenu path=/cpu/menu/main.vm / forward name=vmBody path=/cpu/permit/view.vm / forward name=vmAction redirect=false path=/Main / forward name=vmButtonBar path=/cpu/permit/viewMain.vm / /action To render the same page but with a different button bar, I'd just change that forward to include some other template instead. Besides URI's for parse statements, you can also pass any variable you need to create. For example, vmChoice tells the menu which item we are on, so it can dim that one (and leave the rest linked). While we can't extend struts-config elements (yet), the ActionForwards do have a local and global scope. So you can do things like create a global default forward and let that pass through when it doesn't need to be changed. This is done for the Layout. There's a default vmLayout forward which can be overridden by an element if you need to use a different layout. This works fine inside of Struts and will work even better when we get the Struts config to support extended elements like the Tiles config. But, it seems to me that it's something that could also be done outside of Struts and made available to anyone
RE: [OT] Learning Curve Management or Confusions of a Newbie
Hi Jeff, I read with interest your comments on the above. I think Rick Reumann has done a great example recently of a 'walkthrough' which I presume you'll have seen: Struttin' with Struts: http://www.reumann.net/do/struts/main I agree entirely with your comments - I'm still learning some bits of struts myself. What I've found really useful in the past has been Microsoft's Knowledge Base articles which you may/may not have used on msdn.microsoft.com. Of late they seem to have become less relevant as it has been much easier to just view the source with struts and related products - what a great idea: Open Source Software. I've found Vic's basebeans classes really useful also in understanding other complete approaches to building a struts application and I really like Vic's basebeans approach - it has some excellent merits in terms of performance and certainly speed of development. We have *loads* of 'Knowledge Base' articles we have prepared mainly on (Debian) Linux, Tomcat, Struts ( tiles, etc.) and quite a few other (largely unrelated) topics. Most of these are actually on paper at the moment, though. I'm putting together a similar example to Vic (Cekvenich)'s basicPortal but more for the content rather than the approach (the code for this is mainly Vic's). This can be hosted somewhere - on of our servers initially - but with public access in case anybody else is interested. Here is an extract from a previous mail I sent out on 8th November 2002: Sorry to perpetuate something that could be construed to be OT... but I'd like to chip-in with my 2p worth if that's OK. As relatively very new users to Struts we have found getting up-to-speed with Struts more difficult than we originally envisaged - probably due to being used to being spoon-fed over the years and not used-to really grown-up technologies like Struts, i.e. we have considered MVC before but it was easier just to get the job done - MS VB/ASP/.NET makes it very easy to get a solution up-and-running but we have always found we pay for this in maintenance times later! Having now committed to going Struts 1.1 - what we find we're missing are simple, complete and specifically targeted HowTo's or a Knowledge Base of worked examples on specific topics. Yes, javadoc is very useful - source (yippee!) is even more useful, user guide is detailed but has - clearly every possible option and it is not always clear which options we need in the (usually) simple solution that we're attempting to find. OK, google search is useful, apache.struts newsgroup even more useful and other great articles such as IBM Developer Works and other sites, e.g. Cedric's articles on tiles. However - well written it is not always clear to which version they refer and these complete articles are more like mini books and obviously take a significant amount to maintain and can sometimes quickly get out-of-date and cause a great deal of confusion to novices such as we consider ourselves to be. This list has been extremely useful - the replies, to be honest are staggering in their excellent quality. I always feel a bit (honoured and at the same time) distressed that authors (just speaking from limited personal experience) Cedric and Craig (obviously and others) have read and taken time to post a response - these people must be extremely busy just developing the core product to be answering questions that must seem fundamental. OK, I'm sure they don't mind but there must be a better way... We've started compiling internally, for our own use - our own KB articles - to be honest this is just a simple tile template (cheers, Cedric) with areas such as Sensible Title, Summary, Product (struts, tomcat, jikes, debian), Version(s) covered (usually common tile) as far as we can tell, More Information (body text) with file links, Other Resources and References (links to other articles). Ok, not rocket science - but this has been extremely useful to us. I gave up 2 years ago trying to remember everything (anything :-) and this is always my first port-of-call as it's easily searchable ... but this could be extended to comprise summarised information from these lists - OK this would be manual - but honestly how many would we need for simple repeated stuff for Struts = 50-100? e.g. mail from Mark Zeltser (Can forward action point to tiles definition?) - ok this can be got from the user guide, Cedric's article, Wellie Chao's article (IBM), probably from this list in a previous post - has solicited 9 responses. Unsuprisingly this really foxed us for a few hours - we realised in the end we could only do this via an action but a simple howto to cover this and include some info on Global Forwards would answer this question and the potential next one How do I create an action to do this? with an example of it in use would be an excellent searchable resource for everyone and a real jumpstart for anyone just getting-into
RE: [Q] Accessing struts-tiles attribute in a bean?
Not sure of 'best' way to this but I think this may work: tiles:useAttribute name=booboo classname=java.lang.String / ... bean:message key=%=booboo% / Yes, I agree tiles is great - been looking at Velocity again just recently but I just don't think I could live without tiles now. There always seems to be more to discover with tiles and so many ways it can be extended to suit new requirements. H. -Original Message- From: Jeff Smith [mailto:[EMAIL PROTECTED] Sent: 16 March 2003 00:48 To: Struts Users Mailing List Subject: [Q] Accessing struts-tiles attribute in a bean? James and Dan turned me on to tiles. I love them - as I love any tool that simplifies what I was already doing via brute force. :-) I feel I'm on the verge of a new level of understanding, but sadly, haven't quite crossed over. In my tiles structure, I want to have my pages get their titles from the application resource. So I dutifully created a titleKey attribute in my tile-description.xml, like so: definition name=StandardLayout path=/Jsps/Templates/TemplateMain.jsp put name=titleKey value=some.resource.key/ put name=header value=/Jsps/Tiles/TileHeader.jsp/ put name=content value=/Jsps/Tiles/TileWelcome.jsp/ put name=menu value=/Jsps/Tiles/TileMenu.jsp/ /definition In my TemplateMain.jsp, I want to take that titleKey and look up the proper title string from my application resource file. But I can't figure out how to access the value of the titleKey attribute into the key field of the bean:message tag. Is this possible? One day a light will go on in my head, and I won't feel so confused by all this. :-) Jefficus - 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: BaseBean questions [was] [ANN] Struttin' With Struts beta (newbies esp. welcome)
Maybe you should be doing Vic's labs, Rick ;- I loved the walkthroughs BTW - it is particularly useful to have worked examples of various concepts - this can save literally hours by having a working example - particularly with new bits one may not have used previously, i.e. all of it is incredibly useful for beginners. It *can* take a while trying to understand the various options with struts - at least getting something working is a great starting point. Kudos to you for the Struttin' With Struts idea *and* implementation. Looking forward to the next bits :- I must admit to being a (recently introduced but) great fan of Vic's basebeans approach - it has greatly simplified getting CRUD working with struts for me and introduced me to some very neat OO techniques. The code is minimal - and as with all great ideas - its elegance is in its simplicity. I'll refrain from trying to answer your question as I may be speaking out-of-turn - might be better for Vic to answer this direct. H. -Original Message- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: 13 March 2003 16:42 To: Struts Users Mailing List Subject: Re: BaseBean questions [was] [ANN] Struttin' With Struts beta (newbies esp. welcome) On Thu, 13 Mar 2003 06:22:58 -0500 Vic Cekvenich [EMAIL PROTECTED] wrote: Also, a bean should not do persistence, but should delegate. So I create a helper object, a DAOImplementation. ( a DAO also has a base). One thing is obvoice, a baseBean needs to CRUD, so it makes sense to baseBean { public void save() { DAO.update(); }} I love the OO approach to your code, I'm just still very confused about how a simple implementation of a BaseBean would work in calling a DAO to save itself? In other words, what gets passed to the DAO from the BaseBean implementation to do the CRUD? For example in a case where you had: EmployeeFormBean extends BaseBean I would take it EmployeeForBean would need to hold user fields such as firstName, lastName, address, etc with appropriate getter and setters. How do these fields then get passed to your DAO for the CRUD operations? Thanks, -- Rick Reumann - 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 - Network Traffic...
Hi Puneet, Sorry for the delay in responding - I've been away for a few days. What you describe is similar to what we did in a web application about 12 months ago - but that was using SPAN... to display/hide the page contents - so in fact all tabs were loaded first and then just displayed when needed. This was using a bit of javascript on the client - the most difficult part was rebuilding the tabs on the client browser - to visibly highlight the page being displayed. This was done by building a HTML string in script and assigning the contents of the string to the innerHTML of a DIV... I guess it may be possible to check if the IFrame has been loaded (i.e. src has been populated) and if not set the src property and set visibility to visible (after setting the non-selected tabs' visibility to hidden). This would allow re-displaying already downloaded tab's contents and downloading on-the-fly new tabs. Already downloaded IFrames would be rendered but hidden. This may work very nicely indeed. H. -Original Message- From: Puneet Agarwal [mailto:[EMAIL PROTECTED] Sent: 03 March 2003 20:11 To: Struts Users Mailing List Subject: Re: TILES - Network Traffic... Hue, That's exactly what I am looking at to be able to use both TILES and IFRAMES. Especially for TAB's, I want to achieve the following : My page has two tabs, when the page loads up, it shows the fist tab and has not brought the information about second tab, but when use clicks on the second tab, information about the second tab comes from the server side, now after this if user goes back to tab 1, it should not go to server side. I am looking as to how can I achieve this using both TILES and IFRAMES, to avoid the network round-trip. I understand that this may not be possible by using TILES only. Thanks for your views Cheers Puneet - Original Message - From: Hue Holleran [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED]; 'Puneet Agarwal' [EMAIL PROTECTED] Sent: Monday, March 03, 2003 6:22 PM Subject: RE: TILES - Network Traffic... Please don't flame - I'm not trying to start a tiles vs frames debate. If bandwidth is absolutely critical then you may want to consider (shock! horror!) frames or use inline IFrames. Tiles is great but will produce a bit of extra output over frames as it will generally be used to render the entire page, header, body, menu footer etc. Images should be cached by the browser, as will other add-in files if you use references to external .js files etc. I think it will be unlikely that you could save much bandwidth by using frames but you may be able to reduce the bandwidth a little - if you really, really have to - but this will be offset by the (significantly?) increased difficulty of managing and developing with frames, particularly. Personally I do not favour frames. Tiles makes it much, much easier to manage layouts but is analagous to a jsp:include (but oh so much more powerful - see link in Cedric's email for earlier thread) so will not, in itself save bandwidth. You can still use IFrames with tiles and this combination can be great for say a menu that needs to flick between a few options - I guess you could use javascript to dynamically update the reference in an IFrame and this will save bandwidth. H. -Original Message- From: Puneet Agarwal [mailto:[EMAIL PROTECTED] Sent: 03 March 2003 16:45 To: Struts Users Mailing List Subject: TILES - Network Traffic... I am quite new to TILES and have a query abt the way it renders HTML pages. Does it embed the javaScript code into the HTML page itself or it has generic JavaScript Library files, and includes them using a JavaScript include directive in HTML for JavaScript file, so that it could be cached at client side and lead to smaller payload on network front. If not is there any other advantage of using TILES. For our project network traffic is the biggest concern, the decision to use TILES greatly depend on the above. Your view shall help us greatly. Cheers Puneet - 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: TILES - Network Traffic...
Please don't flame - I'm not trying to start a tiles vs frames debate. If bandwidth is absolutely critical then you may want to consider (shock! horror!) frames or use inline IFrames. Tiles is great but will produce a bit of extra output over frames as it will generally be used to render the entire page, header, body, menu footer etc. Images should be cached by the browser, as will other add-in files if you use references to external .js files etc. I think it will be unlikely that you could save much bandwidth by using frames but you may be able to reduce the bandwidth a little - if you really, really have to - but this will be offset by the (significantly?) increased difficulty of managing and developing with frames, particularly. Personally I do not favour frames. Tiles makes it much, much easier to manage layouts but is analagous to a jsp:include (but oh so much more powerful - see link in Cedric's email for earlier thread) so will not, in itself save bandwidth. You can still use IFrames with tiles and this combination can be great for say a menu that needs to flick between a few options - I guess you could use javascript to dynamically update the reference in an IFrame and this will save bandwidth. H. -Original Message- From: Puneet Agarwal [mailto:[EMAIL PROTECTED] Sent: 03 March 2003 16:45 To: Struts Users Mailing List Subject: TILES - Network Traffic... I am quite new to TILES and have a query abt the way it renders HTML pages. Does it embed the javaScript code into the HTML page itself or it has generic JavaScript Library files, and includes them using a JavaScript include directive in HTML for JavaScript file, so that it could be cached at client side and lead to smaller payload on network front. If not is there any other advantage of using TILES. For our project network traffic is the biggest concern, the decision to use TILES greatly depend on the above. Your view shall help us greatly. Cheers Puneet - 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: websites that use Struts..
UK's National Lottery by the looks of it uses struts: http://www.national-lottery.co.uk (BTW just tried and it refuses to connect from Mozilla - it always used to) NB: I don't know this for sure but it looks like struts, i.e. it uses .do for actions, runs on IBM web server and pages are .jsp but of course it may be something else. -Original Message- From: James Prance [mailto:[EMAIL PROTECTED] Sent: 26 February 2003 15:42 To: [EMAIL PROTECTED] Subject: websites that use Struts.. The list on the Apache website, half the links dont work... does anyone know of some websites out there on the old 'interweb' that are currently live using struts.. I need to find some good examples to convince our PM's that this is our way forward.. James - 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... When to use?
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] he.orgmsgId=658517 -Original Message- From: Amit Keshav Kulkarni [mailto:[EMAIL PROTECTED] Sent: 24 February 2003 04:28 To: Struts Users Mailing List Subject: Tiles... When to use? Hi I have a web application in which I need to have a header, a menu and body section for the pages. Now, AFAIK, I can achieve the same functionality with HTML Frames, JSP Includes and Tiles. So what are the pros and cons of using each? When should I go for Tiles? Thanks in Advance. Amit - 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] RE: Sell me on tiles
(apologies if you've already seen this but it did not seem to appear on the list - almost positively user error - but attached again). Hi Olivier, I notice, actually in tiles examples, specifically: tiles-documentation/layouts/vboxLayout.jsp ... there is a note that don't use iterate tag because it doesn't allow insert (in JSP1.1) - there is a workaround though using scriptlet code - that I think may be what you need. H. tiles-documentation/layouts/vboxLayout.jsp -- %@ page import=java.util.Iterator% %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % %-- Layout component Render a list of tiles in a vertical column @param : list List of names to insert --% tiles:useAttribute id=list name=list classname=java.util.List / %-- Iterate over names. We don't use iterate tag because it doesn't allow insert (in JSP1.1) --% % Iterator i=list.iterator(); while( i.hasNext() ) { String name= (String)i.next(); % tiles:insert name=%=name% flush=true / br % } // end loop % -Original Message- From: ROSSEL Olivier [mailto:[EMAIL PROTECTED] Sent: 18 February 2003 16:50 To: 'Struts Users Mailing List' Subject: RE: Sell me on tiles Tiles is a major pita to set up but its amazing how much time it saves down the road. I think its awesome just from the fact that u dont need to worry about putting all the decorations on a page (nav bar/header/footer etc) and only need to worry about the meat and potatoes part. Aside from using it as a layout manager however, there's a few other things that it can be helpful for. I would suggest going to the main tiles site to see all the stuff it can add. A tiles tag can not be inside a logic:iterate. It is a very painful limitation. This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. - 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] Foxy Tiles Problem
Hi Peter, I'm not sure I fully understand but we're using ... template layout within templates layout? successfully and I think this is necessary for all but the simplest tiles layouts. Indeed, tiles examples have used this mechanism a lot and appears the only way of using layouts within layouts. I'm concerned that run an html:form outside all the shareable and non-shareable tiles will severely limit the true flexibility of tiles as clearly HTML FORM .. cannot be nested and so you would not be able to insert a tile that say asked for one or more input fields with a submit. I guess you could change your global FORM... action= usind javascript to post to a different action but that seems yukky in the extreme. We use this run an html:form outside all the shareable and non-shareable tiles for wizards and this works really nicely as clearly data is entered on one page before posting to the next page. I hope I'm on track so far? All I would ask is that is there a way to avoid the run an html:form outside all the shareable and non-shareable tiles and have a different mechanism for changing pages (sorry haven't seen amazon for a while so do not know their layout) - this would clearly be a problem if you wanted to post values from one page on changing page. Maybe using a A.. may be possible to change pages. Not sure that helps but I've written it now so I'll post it. H. -Original Message- From: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED] Sent: 24 February 2003 14:28 To: Struts Users Mailing List (E-mail) Subject: [TILES] Foxy Tiles Problem Hi I got a Tiles template design question. I have a web site like Amazon.com that using Tabs to navigate around a set of HTML Form elements. Each Page has a HTML Form that contain lots of HTML Input elements. I have written the JSP in the first phase to be monolithic and now I want to break down the layout to use Tiles. I want to take advantage of the fact, that certain areas of the layout design are shared. Unfortunately I have run in to difficulty because they want a specific design that forces me to run an html:form outside all the shareable and non-shareable tiles. Ideally, I would like to dynamically set the name of the `action' tag of html:form below. I would like to say action=/Main.do and then action=/Shipping.do for a single template layout. How can I do this, using TILES? Otherwise I will have to create template layouts for each tab page. (Yuck) Also is it good practice to have template layout within templates layout? // This is a template layout.jsp !-- Search form -- tiles:insert attribute=customer-search-form / %-- e.g. ``customerSearchPrompt.jsp'' grabs a CRM record from database. This tile is common to all tabbed pages --% html:form action=... / !-- Order Type and Id -- tiles:insert attribute=form-header / %-- e.g. `sectionHeaderType.jsp' common to all tabs --% !-- Core Tab Navigation -- tiles:insert attribute=tab-navigation / %-- e.g. `tabNavigation.jsp' common to all tabs -- !-- Form area -- tiles:insert attribute=form-content / %-- e.g.``MainTab.jsp'', ``ShippingTab.jsp'' this is the heart of the form entry area. This tile will change from tab page to tab page. --% !-- Form action -- tiles:insert attribute=form-action / %-- e.g. `MainActions.jsp'', ``ShippingActions.jsp'' Each tab page shares a set of common buttons, but has it possible for a tab page to have its own custom buttons. This tile will change from tab page to tab page. --% /html:form Any ideas appreciated, MTIA -- Peter Pilgrim, Struts/J2EE Consultant, RBoS FM, Risk IT Tel: +44 (0)207-375-4923 Visit our Internet site at http://www.rbsmarkets.com This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority - 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: NPE, webapp broken after moving to 1.1-rc1
It seems to be related to the html/html-el:form... tag in the JSP could you post this part of the JSP? H. -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: 24 February 2003 15:44 To: '[EMAIL PROTECTED]' Subject: NPE, webapp broken after moving to 1.1-rc1 This morning I got rc1 and copied over all the .jar and .tld files, plus validator-rules.xml into my webapp. I cleaned, recompiled, deleted all the work files, restarted Tomcat, reinstalled my app, and I repeatedly get a NPE when trying to access my forms: [ServletException in:/WEB-INF/jsp/chooseProfileBody.jsp] null' java.lang.NullPointerException at org.apache.struts.util.RequestUtils.getActionMappingName(RequestUtils.java:5 77) at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:726) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:501) at org.apache.strutsel.taglib.html.ELFormTag.doStartTag(ELFormTag.java:325) at org.apache.jsp.chooseProfileBody_jsp._jspx_meth_html$1el_form_0(chooseProfil eBody_jsp.java:91) at org.apache.jsp.chooseProfileBody_jsp._jspService(chooseProfileBody_jsp.java: 70) line 70 of chooseProfileBody_jsp.java is: if (_jspx_meth_html$1el_form_0(pageContext)) Did I miss some vital part of 1.1-rc1? The only old .jar file that's left is commons-services.jar. I have debugging info showing at the bottom of my jsp's, and I can see the Form beans in the appropriate scope. The struts-example works, but so did this webapp on Friday! I didn't change any of the code, I only replaced all of the .jar and .tld files in the project with the ones from 1.1-rc1. Help! -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: microsoft .doc struts
Hi Andy, Found this link that I had a little while back - not sure if in itself it's particularly useful but explains neatly how RTF formats images and has some potentially useful links, particularly irfanView that allows conversion to WMF - which seems to be the format used in RTF: http://www-106.ibm.com/developerworks/xml/library/x-tiprtfg.html Best of luck, H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 08:46 To: Hue Holleran Cc: 'Struts Users Mailing List' Subject: RE: [OT] RE: microsoft .doc struts Thanks hue, This shall be the route we will take i think, i had a play around with rtf, and cutting and pasting the images sections into different documents, and eveything worked fine. As you suggest though i need some kind of way to do this on the fly? will have to look into this one. Regular expressions make sense thanks, would this not be asier to do with a velocity template in java? , i have never implemented one i am just guessing? geeting a good idea of what i am going to do thoughthanks for the help. Regards Andy On Tue, 2003-02-18 at 18:36, Hue Holleran wrote: Hi Andy, The (MS) reference was because this was using the regular expression syntax used by Microsoft's VBScript RegEx object and I'm not sure if this is the correct format for java regular expressions. I think jakarta-oro is a reg ex library that is included with struts - but sorry I have no experience with this - although someone on this group almost certainly will - so might be worth a separate post - but the example will serve as a good start point. It basically means: \[- string to match begins with [ ([ is escaped because it's a delimiter) \S- match any non-whitespace [ - (delimiter) ^\[ - stop if you encounter another [ (to trap error with unclosed [] blocks) ] - (delimiter) * - match any character \]- ends with ] (] is escaped because it's a delimiter) Images would be a different problem - if you look at an RTF file then it is quite straightforward to extract the image from the rtf - but each image would need to be converted in this way or find some way of doing this on-the-fly - but I'm not aware of any tool to do this! If you have a limited number of images, e.g. logos etc. then it would be possible to insert the converted one of these at the appropriate point. Images begin with something like: {\*\shppict{\pict{\ ... }} with loads of hex digits in-between. If you have loads of images stored as say gifs or jpgs then you will need to find some way of doing this on-the-fly to rtf format. Hope the above helps a bit more. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 15:53 To: 'Struts Users Mailing List' Cc: [EMAIL PROTECTED] Subject: Re: [OT] RE: microsoft .doc struts Hi hue, sounds great, i understand that you replace dynamic data into the template where where ever you have a [oTb*.field]. but what is (MS) reg ex,,,? some kind of regular expression api? if so i will have to do some more research as i am yet to understand regular expressions, and how to use them. (there is a jakarta api i think though). Also does this method work with images?, if so i think this is the route i will have to take. Regards Andy On Tue, 2003-02-18 at 15:36, Hue Holleran wrote: Hi Andy, I've looked through the thread and can't see specifically what you're trying to do but we had exactly the same problem and was solved using RTF, thus: (this was for submission of documents to a UK government body that needed to be in MS Word .DOC format - they were able to open these documents with no problem in Word: edit, print, save etc.). We used RTF for the document - generated manually in MS Word and exported to a .RTF - and used placeholders to hold active data that was to be inserted into the template of format [oTbl.Field] (allowable in RTF - and replaced these using (MS) reg ex of format \[\S[^\[]*\]). This then gave us an RTF format document which was then saved with the extension .DOC - which MS Word opens with no problem at all. This was in fact sent to the browser by adding a header content-disposition of type attachment; filename=WORD.DOC and also specifying the ContentType of application/rtf. Saving this document saves the document in Word .DOC although it is really an RTF. Not sure it's what you're after but after battling trying to open MS Word on the server - which needs administrator privileges for the user running the web app (scary) or using vbscript/javascript in the browser (requires the site to be added to IE Trusted Sites) - not ideal. The solution outlined, using RTF is not dependent on the browser used and the above solution is being used to generate around 200-300 (probably more) MS Word .DOC files a week which are emailed
RE: Sell me on tiles
I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. This was developed entirely using tiles and would have taken much, much longer without tiles. It's using tiles everywhere - mainly using definitions from tiles-defs.xml. The main menu is a header/body/footer tile with a niceBoxGreen tile inserted that has a further body content - and each menu bar option is a tile - so the hover/onclick code was only written once and then used by inserting 6 tiles with different parameters. The tabbed-frame on the first option was also created using tiles - this would have been a nightmare without tiles - trust me this was first developed in ASP and ASP.NET until I discarded both and looked for something better - and it now uses the very wonderful struts. Also see: http://www.openaction.co.uk/jserv/ ... ok it's just a pretty naff holding page but tiles allowed this to be created in 1 hour. It has a tiles header/body/footer outer definition. A further niceBoxBlue is inserted in the bodyContent that gives the Coming Soon! box and this has a titleString property for the header and a further bodyContent that contains the page with the text. This wouldn't even be possible to do without really inelegant code and jsp includes. I'm not saying these are great examples of what tiles can do - Cedric has some superb portal and other configurable options that really show the power of tiles. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. There are loads of examples on tiles - I found Wellie Chao's article (referenced in tiles resources) at the IBM site really helped me learn tiles initially and also has a great justification for using tiles: http://www-106.ibm.com/developerworks/java/library/j-strutstiles.html?loc=j Hue. -Original Message- From: Southard, Don [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:34 To: Struts User Group (E-mail) Subject: Sell me on tiles We are starting a fairly new project using struts. We are at a point where we need to make a decision on using tiles or not using tiles. On one hand it's not too hard to implement (one developer already has it working with our project). On the other hand we haven't seen any added functionality that would really make us want to go with this feature. All that said can someone give me some brief points on why we should use tiles? -- L. Don Southard 303 218 4823 x4823 - 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] RE: Sell me on tiles
Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - 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] RE: Sell me on tiles
Sorry to all who can't access - I've had a few emails! The site is actually hosted on a high port number that some firewalls/corporate proxies will not connect to. Once in production it will be on good ol' port 80. Also the mods for Opera have not been done yet - so Opera may display a bit strangely but again will be fine in production. IE and Moz are fine if you can connect! H. -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 16:22 To: Struts Users Mailing List Subject: RE: [OT] RE: Sell me on tiles I can't get the site to display at all, and i've tried both IE and Mozilla. -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 10:20 AM To: 'Struts Users Mailing List' Subject: [OT] RE: Sell me on tiles Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - 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] RE: Sell me on tiles
Opera suppports the w3c standards more closely than the other browsers. That's probably the problem! No, seriously there are some dirty tricks used just to get the site up and running - before a proper review to ensure it is compliant. Last time I tried Opera it was not displaying nicely - lines very thick I think (but does not occur on IE or Moz) - I was just warning in case I got emails from anyone pointing out Opera may look strange. Rightly or wrongly we get to checking Opera last - but it will displays correctly in Opera before it's in production. H. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 17:45 To: [EMAIL PROTECTED] Subject: RE: [OT] RE: Sell me on tiles Why do you need special stuff for Opera? Opera suppports the w3c standards more closely than the other browsers. David From: Hue Holleran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT] RE: Sell me on tiles Date: Wed, 19 Feb 2003 17:34:29 - Sorry to all who can't access - I've had a few emails! The site is actually hosted on a high port number that some firewalls/corporate proxies will not connect to. Once in production it will be on good ol' port 80. Also the mods for Opera have not been done yet - so Opera may display a bit strangely but again will be fine in production. IE and Moz are fine if you can connect! H. -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 16:22 To: Struts Users Mailing List Subject: RE: [OT] RE: Sell me on tiles I can't get the site to display at all, and i've tried both IE and Mozilla. -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 10:20 AM To: 'Struts Users Mailing List' Subject: [OT] RE: Sell me on tiles Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - 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] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
RE: [OT] RE: Sell me on tiles
;- Actually Opera do supply it as a deb for Linux so we might well give it a try - as all development happens on Debian workstations. I guess it's not supplied as part of Debs as it's not OSS? I remember the problem now... when using TR HEIGHT=100% Opera (probably rightly) allocates 100% of the table - the consequence being the footer drops off the bottom of the browser and you get a scrollbar at any resolution. This doesn't happen in IE or Moz. (Of course I'm not saying IE and Moz are correct to do this). I'm pretty sure the solution is to use another table outside of this one and have yet another nested table - but this is a special case just for Opera. (Ok and w3c compliance, presumably). There are loads of googles on this and just before we get to production we'll deal with it then. After all we have to keep the Opera fans happy - it was my first real browser before I was Mozilla.org'ed. Thanks for your comments. If you don't mind - I appreciate it's very OT - but if you have the answer to the above I'd be very grateful of your input. Kind regards, H. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 19:21 To: [EMAIL PROTECTED] Subject: RE: [OT] RE: Sell me on tiles If it looks ok in Opera, then it will look ok in the other browsers. Maybe you should test in Opera first ;-). David From: Hue Holleran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT] RE: Sell me on tiles Date: Wed, 19 Feb 2003 17:54:45 - Opera suppports the w3c standards more closely than the other browsers. That's probably the problem! No, seriously there are some dirty tricks used just to get the site up and running - before a proper review to ensure it is compliant. Last time I tried Opera it was not displaying nicely - lines very thick I think (but does not occur on IE or Moz) - I was just warning in case I got emails from anyone pointing out Opera may look strange. Rightly or wrongly we get to checking Opera last - but it will displays correctly in Opera before it's in production. H. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 17:45 To: [EMAIL PROTECTED] Subject: RE: [OT] RE: Sell me on tiles Why do you need special stuff for Opera? Opera suppports the w3c standards more closely than the other browsers. David From: Hue Holleran [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: [OT] RE: Sell me on tiles Date: Wed, 19 Feb 2003 17:34:29 - Sorry to all who can't access - I've had a few emails! The site is actually hosted on a high port number that some firewalls/corporate proxies will not connect to. Once in production it will be on good ol' port 80. Also the mods for Opera have not been done yet - so Opera may display a bit strangely but again will be fine in production. IE and Moz are fine if you can connect! H. -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 16:22 To: Struts Users Mailing List Subject: RE: [OT] RE: Sell me on tiles I can't get the site to display at all, and i've tried both IE and Mozilla. -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 10:20 AM To: 'Struts Users Mailing List' Subject: [OT] RE: Sell me on tiles Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze
[OT] RE: microsoft .doc struts
Hi Andy, I've looked through the thread and can't see specifically what you're trying to do but we had exactly the same problem and was solved using RTF, thus: (this was for submission of documents to a UK government body that needed to be in MS Word .DOC format - they were able to open these documents with no problem in Word: edit, print, save etc.). We used RTF for the document - generated manually in MS Word and exported to a .RTF - and used placeholders to hold active data that was to be inserted into the template of format [oTbl.Field] (allowable in RTF - and replaced these using (MS) reg ex of format \[\S[^\[]*\]). This then gave us an RTF format document which was then saved with the extension .DOC - which MS Word opens with no problem at all. This was in fact sent to the browser by adding a header content-disposition of type attachment; filename=WORD.DOC and also specifying the ContentType of application/rtf. Saving this document saves the document in Word .DOC although it is really an RTF. Not sure it's what you're after but after battling trying to open MS Word on the server - which needs administrator privileges for the user running the web app (scary) or using vbscript/javascript in the browser (requires the site to be added to IE Trusted Sites) - not ideal. The solution outlined, using RTF is not dependent on the browser used and the above solution is being used to generate around 200-300 (probably more) MS Word .DOC files a week which are emailed directly to the UK government body. Let me know if this is an option for you - and if you need any more info but BTW the above was implemented in MS ASP so I can only send you some ASP/VBScript code if that will help. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 14:12 To: [EMAIL PROTECTED] Subject: microsoft .doc struts Hi, I have read with interest from the struts archives where a user posted the following question to do with producing microsoft .doc files for clients. See: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html Peter S. Hamlen: posted a follow up talking about using office 2000 html, see: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html What i cant understand and i am hoping that someone will be able to help me, is that once you have parsed the .html template ie with velocity, then how do you convert the html back to a .doc file. I could provide for download the html pages, but the images i want to include would be seperate from the html file. I am trying to think of a tidier way? looking down the thread .rtf format is not the easiest, and POI is in a early release. Anyone know what i can do? or have any suggestions? dont worry i made my point about cross platform and proprietory .doc, doc is what the client wants, and therefor .doc is what i am having to try and give. Regards Andy - 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] RE: microsoft .doc struts
Hi Andy, The (MS) reference was because this was using the regular expression syntax used by Microsoft's VBScript RegEx object and I'm not sure if this is the correct format for java regular expressions. I think jakarta-oro is a reg ex library that is included with struts - but sorry I have no experience with this - although someone on this group almost certainly will - so might be worth a separate post - but the example will serve as a good start point. It basically means: \[- string to match begins with [ ([ is escaped because it's a delimiter) \S- match any non-whitespace [ - (delimiter) ^\[ - stop if you encounter another [ (to trap error with unclosed [] blocks) ] - (delimiter) * - match any character \]- ends with ] (] is escaped because it's a delimiter) Images would be a different problem - if you look at an RTF file then it is quite straightforward to extract the image from the rtf - but each image would need to be converted in this way or find some way of doing this on-the-fly - but I'm not aware of any tool to do this! If you have a limited number of images, e.g. logos etc. then it would be possible to insert the converted one of these at the appropriate point. Images begin with something like: {\*\shppict{\pict{\ ... }} with loads of hex digits in-between. If you have loads of images stored as say gifs or jpgs then you will need to find some way of doing this on-the-fly to rtf format. Hope the above helps a bit more. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 15:53 To: 'Struts Users Mailing List' Cc: [EMAIL PROTECTED] Subject: Re: [OT] RE: microsoft .doc struts Hi hue, sounds great, i understand that you replace dynamic data into the template where where ever you have a [oTb*.field]. but what is (MS) reg ex,,,? some kind of regular expression api? if so i will have to do some more research as i am yet to understand regular expressions, and how to use them. (there is a jakarta api i think though). Also does this method work with images?, if so i think this is the route i will have to take. Regards Andy On Tue, 2003-02-18 at 15:36, Hue Holleran wrote: Hi Andy, I've looked through the thread and can't see specifically what you're trying to do but we had exactly the same problem and was solved using RTF, thus: (this was for submission of documents to a UK government body that needed to be in MS Word .DOC format - they were able to open these documents with no problem in Word: edit, print, save etc.). We used RTF for the document - generated manually in MS Word and exported to a .RTF - and used placeholders to hold active data that was to be inserted into the template of format [oTbl.Field] (allowable in RTF - and replaced these using (MS) reg ex of format \[\S[^\[]*\]). This then gave us an RTF format document which was then saved with the extension .DOC - which MS Word opens with no problem at all. This was in fact sent to the browser by adding a header content-disposition of type attachment; filename=WORD.DOC and also specifying the ContentType of application/rtf. Saving this document saves the document in Word .DOC although it is really an RTF. Not sure it's what you're after but after battling trying to open MS Word on the server - which needs administrator privileges for the user running the web app (scary) or using vbscript/javascript in the browser (requires the site to be added to IE Trusted Sites) - not ideal. The solution outlined, using RTF is not dependent on the browser used and the above solution is being used to generate around 200-300 (probably more) MS Word .DOC files a week which are emailed directly to the UK government body. Let me know if this is an option for you - and if you need any more info but BTW the above was implemented in MS ASP so I can only send you some ASP/VBScript code if that will help. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 14:12 To: [EMAIL PROTECTED] Subject: microsoft .doc struts Hi, I have read with interest from the struts archives where a user posted the following question to do with producing microsoft .doc files for clients. See: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html Peter S. Hamlen: posted a follow up talking about using office 2000 html, see: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg58536.html What i cant understand and i am hoping that someone will be able to help me, is that once you have parsed the .html template ie with velocity, then how do you convert the html back to a .doc file. I could provide for download the html pages, but the images i want to include would be seperate from the html file. I am trying to think of a tidier way? looking down the thread .rtf format is not the easiest, and POI is in a early release. Anyone
RE: Tiles Portal
Hi Jay, I've not actually done exactly what you're asking, however it would seem to me quite straightforward to determine the url that was used to access the site using: String cURL = request.getParameter(url); You could then use string extraction techniques to get the portion of the URL and I would guess it would be easier to store this in session scope. I would guess that the colours for the web site could be determined by loading a specific CSS Style Sheet that would be determined by examining the value stored in session scope. The tile templates could be determined by say concatenating a code onto the template or looking in a directory for all tile templates for that company. I'm pretty sure this would not work with tile definitions defined in tiles-defs.xml so you may need to restrict yourself to definitions stored in JSP files. Hue. -Original Message- From: Jay Andrews [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 21:01 To: [EMAIL PROTECTED] Subject: Tiles Portal Ive been looking into using struts and tiles for an upcoming project. I need to be able to change the look and feel of the website based on the url the site was entered from. For example, if a user enters from company1.foo.com then show their company colors and logo. if a user enteres from company2.foo.com then use different color scheme and logos... and so on. Is this something tiles should be used for? Has anyone acomplished such a project? Thanks. Jay. __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.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 newbie
Yes, we were using Tiles (just) before Struts - and then went to use Struts+Tiles. The only aspect AFAIK that will not be available is using Tiles as Struts forwards. There was also a thread about using Tiles with Struts 1.0.2 - try ng apache.struts on news server news.basebeans.net and look for title: Tiles and Struts 1.0.2?, the most relevant answer seems to be: The Tiles site (http://www.lifl.fr/~dumoulin/tiles/) is the place to go. The binary download (tiles.zip for ex.) contains the 'tilesForStruts1.0.jar' you mention and also a 'tiles-blank-struts1-0.war to help you get started. g Esther Hue. -Original Message- From: Brian Hickey [mailto:[EMAIL PROTECTED]] Sent: 21 November 2002 16:21 To: Struts Users Mailing List Subject: Tiles newbie A coworker asked the following question Can I implement Tiles as a stand alone? I was busy so I said Not likely and we are only in production with 1.0.2 A quick search (if there is such a thing) of the archives reveals a lot of Tiles info, but nothing specific to his question. Does anyone know if I was too quick with my answer? I will send pizza :o) Brian -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:link question
:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 04) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:380) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:533) at java.lang.Thread.run(Thread.java:484) I've been trying different things and now I'm getting it on welcome ... it's going from bad to worse. Thanks, Mike -Original Message- From: Hue Holleran [mailto:hueh;softwareskills.net] Sent: Friday, November 08, 2002 2:58 PM To: 'Struts Users Mailing List' Subject: RE: html:link question Hi Mike, What is the full error message that the referred to by the error (i.e. does it give a hint which component it was attempting to execute when this error occurred?): jasper.JasperException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named /admin e.g. you may get a line a few lines down such as: ... at org.apache.jsp.index$jsp._jspService(index$jsp.java:87) ... That would indicate this occurred whilst executing index.jsp. I would guess this is indicating a runtime error - does it report the component, e.g. JSP it is attempting to execute when it reports this error. I get some interesting behaviour with NetBeans on Windows 2000 when changing the case of a JSP file, e.g. MyPage.jsp - myPage.jsp which compiles the JSP to a servlet but then can't find the servlet. What I would recommend you do is to look for the file named above on the disk and (with .java or .class extension) and delete any that are not the original copy of the file, e.g. .jsp Best of luck, Hue. -Original Message- From: [EMAIL PROTECTED] [mailto:mike.witt;honeywell.com] Sent: 08 November 2002 19:00 To: [EMAIL PROTECTED] Subject: RE: html:link question I didn't notice that the entire message is: jasper.JasperException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named /admin My forward is called adminMenu, I renamed it from admin a while ago. Now, when I look, I don't see
RE: html:link question
As you say welcome works fine, your syntax looks fine. However the error message is a bit strange and doesn't correspond to the name of the forward or of the action! All I can really think of - we find ourselves in this situation a lot by the way and it's always our fault if that's any consolation at all - is to look for possibly a duplicate definition of adminMenu action/a forward that may be causing the problem or that it's actually getting to /WEB-INF/pages/admin-menu.jsp and something there is giving the error you describe. BTW I pasted your code into our sample - we seem to use it a lot ourselves! ... and it worked OK, i.e. for the page with a link for Adm. Funcs. and on clicking link got a 404: The requested resource (/WEB-INF/pages/admin-menu.jsp) is not available, as to be expected. Maybe try posting your complete struts-config.xml? Sorry can't help, Hue. -Original Message- From: [EMAIL PROTECTED] [mailto:mike.witt;honeywell.com] Sent: 08 November 2002 13:49 To: [EMAIL PROTECTED] Subject: html:link question Hello, I'm having a problem with html:link which gives me the Cannot retrive ActionForward named /admin message. My struts config has: global-forwards forward name=welcome path=/welcome.do/ forward name=adminMenupath=/adminMenu.do / /global-forwards action-mappings action path=/welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/pages/welcome.jsp/ action path=/adminMenu type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/pages/admin-menu.jsp/ /action-mappings My jsp has: html:link forward=adminMenuAdministrative Functions/html:link This gives me the error message. However, if I replace adminMenu with welcome it works just fine. Also, if I use the page attribute it works for welcome.do and not for adminMenu.do. Any help is appreciated! Mike -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Merging Tiles body into tile definition
Sorry if this is lame, do you need a direct=true on the tiles:put name=body ... never tried doing this but I assume you're using a tiles:insert... not a tiles:getAsString... in the template so you may need to indicate direct here? Hue. -Original Message- From: Brian Topping [mailto:topping;digidemic.com] Sent: 08 November 2002 15:39 To: [EMAIL PROTECTED] Subject: Merging Tiles body into tile definition Good day all, happy Friday! I'm building another application using tiles (hopefully this one will ship sooner than the others :-) and coming across the geometric explosion of tiles and body files, wondering if there is a solution that others are using that I might be able to take advantage of. The basic problem is that of having one file for the tiles:insert statement and the tiles body file that it references. In the basic case, my setup looks like: * login.jsp %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles-1.1; prefix=tiles % tiles:insert page=/templates/main_layout.jsp flush=true tiles:put name=title value=GSUMC - Login / tiles:put name=header value=/templates/header.jsp / tiles:put name=menu value=/templates/menu.jsp / tiles:put name=body value=/login_body.jsp/ /tiles:insert * login_body.jsp %@ page language=java % snip.../ What I would like to do is merge these in the form of: %@ taglib uri=http://jakarta.apache.org/struts/tags-tiles-1.1; prefix=tiles % %@ page language=java % tiles:insert page=/templates/main_layout.jsp flush=true tiles:put name=title value=GSUMC - Login / tiles:put name=header value=/templates/header.jsp / tiles:put name=menu value=/templates/menu.jsp / tiles:put name=body snip.../ /tiles:put /tiles:insert Makes sense, should work according to the javadoc and the tag code, but I can't get my head around the reason that it doesn't. The point where the content should be inserted into the template is untouched. Any ideas? best regards, Brian -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org attachment: winmail.dat-- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: html:link question
Hi Mike, What is the full error message that the referred to by the error (i.e. does it give a hint which component it was attempting to execute when this error occurred?): jasper.JasperException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named /admin e.g. you may get a line a few lines down such as: ... at org.apache.jsp.index$jsp._jspService(index$jsp.java:87) ... That would indicate this occurred whilst executing index.jsp. I would guess this is indicating a runtime error - does it report the component, e.g. JSP it is attempting to execute when it reports this error. I get some interesting behaviour with NetBeans on Windows 2000 when changing the case of a JSP file, e.g. MyPage.jsp - myPage.jsp which compiles the JSP to a servlet but then can't find the servlet. What I would recommend you do is to look for the file named above on the disk and (with .java or .class extension) and delete any that are not the original copy of the file, e.g. .jsp Best of luck, Hue. -Original Message- From: [EMAIL PROTECTED] [mailto:mike.witt;honeywell.com] Sent: 08 November 2002 19:00 To: [EMAIL PROTECTED] Subject: RE: html:link question I didn't notice that the entire message is: jasper.JasperException: Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrive ActionForward named /admin My forward is called adminMenu, I renamed it from admin a while ago. Now, when I look, I don't see the admin by itself anywhere. I'm using Tomcat.4.12. I removed the work directories and restarted Tomcat but without success. Here is my entire struts config ... notice that the datasource references are commented out right now. Thanks for your help. Mike ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; !-- This is the Struts configuration file for the example application, using the proposed new syntax. NOTE: You would only flesh out the details in the form-bean declarations if you had a generator tool that used them to create the corresponding Java classes for you. Otherwise, you would need only the form-bean element itself, with the corresponding name and type attributes. -- struts-config !-- == Data Source Configuration === -- data-sources !-- data-source set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=description value=Artimus:MySQL Data Source Configuration/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=url value=jdbc:mysql://localhost:3306/artimus/ set-property property=autoCommit value=true/ set-property property=user value=root/ set-property property=password value=/ /data-source -- /data-sources !-- == Form Bean Definitions === -- form-beans /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=welcome path=/welcome.do/ forward name=adminMenupath=/adminMenu.do / /global-forwards !-- == Action Mapping Definitions == -- action-mappings action path=/welcome type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/pages/welcome.jsp/ action path=/adminMenu type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/pages/admin-menu.jsp/ /action-mappings !-- == Controller Configuration -- controller !-- The input parameter on action elements is the name of a local or global forward rather than a subapp-relative path -- set-property property=inputForward value=true/ /controller !-- == Message Resources Definitions === -- message-resources parameter=org.apache.struts.webapp.example.ApplicationResources/ /struts-config -Original Message- From: Hue Holleran [mailto:hueh;softwareskills.net] Sent: Friday, November 08, 2002 10:41 AM To: 'Struts Users Mailing List' Subject: RE: html:link question As you say welcome works fine, your syntax looks fine. However the error message is a bit strange and doesn't correspond to the name of the forward or of the action! All I can really think of - we find ourselves in this situation a lot by the way and it's always our fault if that's any consolation at all - is to look for possibly
[OT] RE: Entire Struts Mail Archive
Sorry to perpetuate something that could be construed to be OT... but I'd like to chip-in with my 2p worth if that's OK. As relatively very new users to Struts we have found getting up-to-speed with Struts more difficult than we originally envisaged - probably due to being used to being spoon-fed over the years and not used-to really grown-up technologies like Struts, i.e. we have considered MVC before but it was easier just to get the job done - MS VB/ASP/.NET makes it very easy to get a solution up-and-running but we have always found we pay for this in maintenance times later! Having now committed to going Struts 1.1 - what we find we're missing are simple, complete and specifically targeted HowTo's or a Knowledge Base of worked examples on specific topics. Yes, javadoc is very useful - source (yippee!) is even more useful, user guide is detailed but has - clearly every possible option and it is not always clear which options we need in the (usually) simple solution that we're attempting to find. OK, google search is useful, apache.struts newsgroup even more useful and other great articles such as IBM Developer Works and other sites, e.g. Cedric's articles on tiles. However - well written it is not always clear to which version they refer and these complete articles are more like mini books and obviously take a significant amount to maintain and can sometimes quickly get out-of-date and cause a great deal of confusion to novices such as we consider ourselves to be. This list has been extremely useful - the replies, to be honest are staggering in their excellent quality. I always feel a bit (honoured and at the same time) distressed that authors (just speaking from limited personal experience) Cedric and Craig (obviously and others) have read and taken time to post a response - these people must be extremely busy just developing the core product to be answering questions that must seem fundamental. OK, I'm sure they don't mind but there must be a better way... We've started compiling internally, for our own use - our own KB articles - to be honest this is just a simple tile template (cheers, Cedric) with areas such as Sensible Title, Summary, Product (struts, tomcat, jikes, debian), Version(s) covered (usually common tile) as far as we can tell, More Information (body text) with file links, Other Resources and References (links to other articles). Ok, not rocket science - but this has been extremely useful to us. I gave up 2 years ago trying to remember everything (anything :-) and this is always my first port-of-call as it's easily searchable ... but this could be extended to comprise summarised information from these lists - OK this would be manual - but honestly how many would we need for simple repeated stuff for Struts = 50-100? e.g. mail from Mark Zeltser (Can forward action point to tiles definition?) - ok this can be got from the user guide, Cedric's article, Wellie Chao's article (IBM), probably from this list in a previous post - has solicited 9 responses. Unsuprisingly this really foxed us for a few hours - we realised in the end we could only do this via an action but a simple howto to cover this and include some info on Global Forwards would answer this question and the potential next one How do I create an action to do this? with an example of it in use would be an excellent searchable resource for everyone and a real jumpstart for anyone just getting-into tiles. The questions would really be ... where could it be hosted, any articles would need to be vetted but where better than this list, who decides on which howtos to write. OK, resources like theserverside (and many others) already does this kind of thing but most I've read are more like mini books again - nice to read - I've printed 5,000 sheets of paper (to read in the bath) to get up-to-speed over the last 6 months - hence our reason for compiling our own KB. Ok, I've probably bored you now - any comments or anyone else have any comments? Hue. -Original Message- From: Eddie Bush [mailto:ekbush;swbell.net] Sent: 06 November 2002 18:25 To: Struts Users Mailing List Subject: Re: Entire Struts Mail Archive You're not the first to propose something along those lines. The fact of the matter is that, until some generous person writes such a thing and makes it open-source or contributes it to Apache, there's not likely to be such an option available to us. It could be worse; it could be much better too. For now, we have what we have. What I typically try to do when I get stuck is: - consult the user guide - consult relevant javadoc - search google.com - post to the list Sorry for the rude welcoming :-( It does get annoying to see the same questions asked over and over though. Mark Ayad wrote: It would be great is messages could be some how tied to a release. I know of a company that wrote search engine software for Altavista here in Paris, they perform stuff like Natural Langauage Processing,
[Tiles] Tiles vs. Custom Tag - anyone have a view?
We've been using tiles extensively in an app and it has been extremely effective - as one might expect for including tiles of information on a page and consolidating standard layout into templates - however I'm concerned that we might be going too far in its use... and using it where we might otherwise have used a custom tag: For a single img that is used extensively in an app that has mouseover/out/down behaviour, e.g. (in HTML - lots of code left out deliberately here): img src=/images/navigation/right.gif onmouseover=javascript:setImg(this,'/images/right_hot.gif') onmousedown=javascript:setImg(this,'/images/right_hot_down.gif') onmouseout=javascript:setImg(this,'/images/right.gif') This can be much simplified to including a tile of just this control: tiles:insert template=/tiles-components/controls/imgactive.jsp tiles:put imgName=/images/right / /tiles:insert The alternative would be a custom tag, e.g: sshtml:imgactive imgName=/images/navigation/right / Which is obviously much easier to include but so much less flexible - requiring editing tag handler java code to edit html - and all of the issues this entails - tiles allows us to edit the html in a nice easy jsp. This is much more effective for complete chunks of html and has saved huge amounts of time for large composite controls that we have everywhere. I feel it is neater but am concerned we are introducing too much processing for just producing the html for the control - does anyone else have a view on this ... any comments appreciated (even Stupid Idea if this is). (code for the template is included below). Thanks, Hue. /tiles-components/controls/imgactive.jsp % taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % img src=tiles:getAsString name='imgName'/.gif onmouseover=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot.gif'); onmousedown=javascript:setImg(this,'tiles:getAsString name='imgName'/_hot_down.gif') onmouseout=javascript:setImg(this,'tiles:getAsString name='imgName'/.gif') -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: WebLogic/Struts/JSP performance woes...
I do not think even Client/Server could do this nicely. Have you ever seen anyone else put out an application in any design that has 2000 rows? In a word, Yes. We had a client - system went live over 2 years ago using IIS on an Intranet as it happens. Client had 600 branches UK wide, with = 10 clients per branch (and in some cases many more than this) and wanted to see - on one page top (usually) 20 clients per branch with various metrics per client. No, they didn't want paging. No, they didn't want a smaller list (on this page). Yes - they wanted to see all records and then drill-down on the ones that interested them in a new browser window. We had to find a way to giving the customer what they had asked for or tell them it was not _technically_ feasible. The browser was known: IE5.5; it was always only ever accessed from a 100MBit LAN; the users were using powerful workstations. We used hints on the query to return top rows quickly - the metrics were calculated on data loading into the database - with incremental fetching and used fixed-width table to allow progresive fetching. Problem solved .. page was starting to render after about 3-4s and took about 40s to render fully - they could start viewing the data as soon as it started loading. Result: happy customer. What JDBC driver lets you stream data over, before the resultset/rowset has finished retreving? Or is the data fast, just the rendering is slow? I don't know if JDBC can do incremental fetching - even so retrieving 1,600 rows should not take that long if the query is sensibly written and has useful indexes available. H. -Original Message- From: news [mailto:news;main.gmane.org]On Behalf Of V. Cekvenich Sent: 02 November 2002 14:37 To: [EMAIL PROTECTED] Subject: Re: WebLogic/Struts/JSP performance woes... Are you saying you could write a servlet that could stream out javascript? Interesting. Else search for the display tag on google. What JDBC driver lets you stream data over, before the resultset/rowset has finished retreving? Or is the data fast, just the rendering is slow? Like Craig says, you should use busines domain knowledge to improve the users experience, so they could drill down somehow. I do not think even Client/Server could do this nicely. Have you ever seen anyone else put out an application in any design that has 2000 rows? V Davide Bruzzone wrote: Lots of very ugly scriptlet code... :-) -Original Message- From: V. Cekvenich [mailto:vicc;users.sourceforge.net] Sent: Friday, November 01, 2002 2:32 PM To: [EMAIL PROTECTED] Subject: Re: WebLogic/Struts/JSP performance woes... How would you solve this w/o Struts? .V Davide Bruzzone wrote: Greetings all... I'd like to try to find out if anyone else out there is using WebLogic (We're using version 6.1 SP2) with Struts and/or just JSPs that might have some performance tips that they might be able to share... Snip -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: null pointer exception in tiles-documentation/examples/summariesTabs.jsp
It was the 21/10/2002 nightly build that we used. Hue. -Original Message- From: Zsolt Koppany [mailto:zk;intland.com] Sent: 01 November 2002 09:18 To: Struts Users Mailing List; Hue Holleran Subject: Re: null pointer exception in tiles-documentation/examples/summariesTabs.jsp Hi Hue, I do have problems with the latest nightly builds. Which one did took? Zsolt On Thursday 31 October 2002 21:43, Hue Holleran wrote: Hi Zsolt, If it's the version of tiles-documentation.war that came with 1.1b2 then it did not work for us - we tried to identify the issues but did not get very far - probably due to tiles being very new to us. The tiles-documentation.war from the nightly build worked immediately for us ... in fact it was on the tabs examples that we had the problems with the one from 1.1b2 - the rest of the examples did appear to work. The nightly build version sorted all of these - so I'd recommend you try this first! Hue. -Original Message- From: Zsolt Koppany [mailto:zkoppany;web.de] Sent: 31 October 2002 20:18 To: [EMAIL PROTECTED] Subject: null pointer exception in tiles-documentation/examples/summariesTabs.jsp Hi, I get a null pointer exception in tiles-documentation/examples/summariesTabs.jsp I using struts-1.1-b2 with tomcat-4.12 when enablePooling=true in web.xml. Do you know any fix? Zsolt -- Zsolt Koppany Intland GmbH www.intland.com Schulze-Delitzsch-Str. 16 70565 Stuttgart Tel: +49-711-7221873 Fax: +49-1212-5168-29527 -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: WebLogic/Struts/JSP performance woes...
Hi Davide, I'm pretty sure what you're seeing is browser-related, if you are flushing the output periodically from the server: Nat and James have already stated, tables will _likely_ not render until the width of all columns are known ... sometimes the table _will_ progressively render and then shift about as wider columns are required in later rows. (You can sometimes check this by waiting a short while so the table has partly downloading and pressing stop which usually causes what has been downloaded to display). The actual behaviour tends to be browser-specific and from our tests with IE (5.01SP2) also seemed inconsistent. This is how we got a very satisfatory result: I'm not sure if this is IE-only behaviour so forgive me if this does not apply to other browsers - but this may serve as a starting point for investigation. CSS2 which I presume is Cascade Style Sheets V2 supports the concept of fixed-width tables, from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie50/html /cheatsheet.asp (Fixed Width Tables section): HTML tables are normally relatively slow to appear, since browsers calculate the size of each cell in the table before beginning to draw it. When you set the CSS2 table-layout property to FIXED, the browser uses the column-width and row-height information in the first row of the table to lay out the table immediately. Fixed tables render progressively, resulting in a significant speed improvement. We had to use this in an Intranet app that was producing huge tables, i.e. sometimes 30,000 rows. And, yes, they did ...really, really want to see all the data... (accountants). Utilising fixed-width tables produced a _significant_ increase in *perceived* speed of page download. The following excerpt was taken from: http://msdn.microsoft.com/workshop/author/tables/tables_overview.asp#layout The following example shows the use of the Cascading Style Sheets (CSS) attribute, table-layout, to fix the table layout, resulting in faster rendering of the table. Note that the widths need not be set on the TABLE and COL objects. When the width is not specified, the browser looks to the contents of the first row's cells to fix the column widths and, consequently, the table width. TABLE STYLE=table-layout:fixed WIDTH=600 COL WIDTH=100COL WIDTH=300COL WIDTH=200 TR HEIGHT=20 TD.../TDTD.../TDTD.../TD /TR : /TABLE The performance gains are significant, especially for large tables. Because the browser does not need to parse through the table once simply to lay it out, the table rows can start to render immediately. HTH, Hue. -Original Message- From: Davide Bruzzone [mailto:Davide.Bruzzone;ngt.com] Sent: 01 November 2002 21:03 To: 'Struts Users Mailing List' Subject: RE: WebLogic/Struts/JSP performance woes... Yes... Again, what's strange is that during my extensive tests/experiments/hair pulling sessions I've actually seen this type of code work (using tables) - There's still a small lag between when the page clears and when the output starts to appear, but output definately starts to appear before the server is done: for (int i = 0; i myCollection.size(); i++) { out.print(/tr); out.print(td); out.print(myData); out.print(/td); out.print(/tr); out.flush(); } Although by that point, the page that I was using to perform the tests had been tinkered with extensively, so not all the table tags may have been there which might have allowed the browser to render the output sooner. What other tags would you suggest? divs? Cheers... Dave -Original Message- From: James Mitchell [mailto:jmitchtx;telocity.com] Sent: Friday, November 01, 2002 1:55 PM To: Struts Users Mailing List Subject: RE: WebLogic/Struts/JSP performance woes... Also, are you using tables to display? You know table tr tdinserting data here.. Are you aware that these tables won't be displayed until all text required for this table have been downloaded? (This is true for IE and most others I'm sure) James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein (1879-1955) -Original Message- From: Karr, David [mailto:david.karr;attws.com] Sent: Friday, November 01, 2002 3:49 PM To: Struts Users Mailing List Subject: RE: WebLogic/Struts/JSP performance woes... Is your page precompiled? Are you doing the timing test on your second display of the page? The first display of a non-precompiled JSP will take much longer, as it has to generate and compile the servlet class. -Original Message- From: Davide Bruzzone [mailto:Davide.Bruzzone;ngt.com] Sent: Friday, November 01, 2002 12:43 PM I have a page that, for test purposes, is generating a 1760 row table (Not a gigantic table by any stretch of the imagination). Although I don't expect our data sets to be this
RE: [OT] Run Java App as a Win Service
Hi Mark, There may be another way but I like SrvAny that has served us well - a really nice example of getting and using is given here: http://yakko.bme.virginia.edu/lab/mercury_as_service.htm Basically you run InstSrv.exe - using SrvAny.exe to create the service - hack the registry and the service is run through SrvAny.exe, i.e. any command line you like - java too, I guess (although never tried it with java BTW). (There may be an easier and java-specific way of achieving this though but thought this might help). Hue. -Original Message- From: Mark Silva [mailto:msilva;authenex.com] Sent: 01 November 2002 23:04 To: Struts Users Mailing List Subject: RE: [OT] Run Java App as a Win Service sorry, i was typing too fast in my subject, Web -- Win. i guess this deadline is making me nervous. and you noticed my [OT]. this is not an application server, this is a java application. -Original Message- From: Karr, David [mailto:david.karr;attws.com] Sent: Friday, November 01, 2002 3:02 PM To: Struts Users Mailing List Subject: RE: [OT] Run Java App as a Web Service Let's see. First of all, this question is only barely relevant to this mailing list. Second, your subject line talks about something completely different from what you describe in your note. A web service has nothing to do with running a Windows application as a service. Assuming you really meant the latter, I suggest you read the documentation for your application server to determine how to run it as a Windows service. -Original Message- From: Mark Silva [mailto:msilva;authenex.com] Sent: Friday, November 01, 2002 2:58 PM To: Struts Users Mailing List Subject: [OT] Run Java App as a Web Service ok, i have this new requirement that has just come down today for a release next week. these things arren't supposed to happen but they do! the java app i am providing needs to run as a WIN2000 Service. has anybody done thid before? can you point me in the right direfction? thanks, mark -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org attachment: winmail.dat-- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: 2 temp positions available
Hi Tim, Which country? -Original Message- From: Tim Dysinger [mailto:struts;dysingers.com] Sent: 01 November 2002 23:17 To: [EMAIL PROTECTED] Subject: 2 temp positions available Hello, I need two full time Struts/J2EE resources for the next two months. If you need some work and know Struts well, please forward your contact/resume. Sorry for the of topic post. -Tim Dysinger -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: tiles definition doesn't work, config looks correct, am baffled
Hi Alayne, From one tiles newbie to another... The general format of the action... for tiles is shown below: action-mappings !-- Action mapping for profile form -- action path=/profileInput type=com.caraveltech.ex2.ProfileAction name=profileForm scope=request input=tile.profileInput validate=true forward name=success path=tile.profileOutput/ /action /action-mappings Where input is the tiles definition to be displayed. This was from a lovely little training app by Wellie Chao that I found personally very useful when learning tiles obtained from IBM's site: http://www-106.ibm.com/developerworks/java/library/j-strutstiles.html Apologies if you're already aware of this article ... it provides some really nice, simple worked examples of tiles with struts and comes with downloadable source and interestingly a nice coverage of ant - if you've not used that before also. Hue. -Original Message- From: Alayne Wartell [mailto:alayne.wartell;towers.com] Sent: 31 October 2002 14:49 To: Struts Users Mailing List Subject: Re: tiles definition doesn't work, config looks correct, am baffled Oops, meant to include the error message (404 error): The requested resource (/tilesproj/.mydefinition) is not available. mydefinition is in my tiles-defs.xml, but struts is apparently thinking it should be a file in my web app directory. The JSP files I'm specifying do all exist. I'm currently figuring out how to configure tomcat logging (tomcat newbie too) but maybe the above info will tell you something? Thanks. To: Struts Users Mailing List [EMAIL PROTECTED] Cedric Dumoulin cc: (bcc: Alayne Wartell/Towers Perrin) [EMAIL PROTECTED]Subject: Re: tiles definition doesn't work, config looks correct, am gbaffled 10/31/2002 04:01 AM Please respond to Struts Users Mailing List Hi, What is the error ? Also check the output in the tomcat error log file. Alayne Wartell wrote: Hi, I'm trying to get Tiles running with Struts, and I'm getting 404's when I try to use tiles definitions. I'm running Struts 1.1b2 and Tomcat. I can run a JSP-only Tiles template just fine. I really hope someone can help. I've checked everything I can think of and have run out of ideas. Details follow. Thanks very much, Alayne (struts newbie) I'm trying to access http://localhost:8080/tilesproj/testdefinition.do which forwards to definition .mydefinition which is in tiles-defs.xml I've configured the Tiles plug-in in struts-config.xml. I originally had it in web.xml but either way I get the same behavior. I'm running the regular Struts controller. Here are my configuration files: tiles-defs.xml : ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD Tiles Configuration//EN http://jakarta.apache.org/struts/dtds/tiles-config.dtd; tile-definitions !-- page templates -- definition name=.standardBaseLayout path =/standardBaseLayout.jsp put name=header value=/header.jsp / put name=body value= / put name=footer value=/footer.jsp / /definition !-- put application pages here -- definition name=.mydefinition extends=.standardBaseLayout put name=body value=/mypage.jsp / /definition /tile-definitions struts-config.xml : ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config global-forwards forward name=index path=/index.jsp/ /global-forwards action-mappings action path=/testuse forward=/testuse.jsp / /action action path=/testdefinition type=org.apache.struts.tiles.actions.NoOpAction forward name=success path=.mydefinition / forward name=failure path=.mydefinition / /action /action-mappings !-- tiles plug-in -- plug-in className=org.apache.struts.tiles.TilesPlugin set-property property=definitions-config value=/WEB-INF/tiles-defs.xml / set-property property=definitions-debug value=2 / set-property property=definitions-parser-details value=2 / set-property property=definitions-parser-validate value=true / /plug-in message-resources parameter=resources.application/ /struts-config