Re: how to lock the access to an array till a method is finished ...
Yes Adrian, if I synch ON THE OBJECT and only the access code for that object on both sides, it works... Many thanks. Ionel. - Original Message - From: "Adrian Janssen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 3:21 PM Subject: Re: how to lock the access to an array till a method is finished ... > syncronise all and any code that accesses the array, and make sure that your > blocks are "wide" enough. > > E.G. this WON'T work because the "syncronized" bock should be out-side of > the loop. > > public void populateBigArray ( long[] bigArray ) > { > for (i = 0 ; i< VERY_BIG_NUMBER ; i++) > { > syncronized (bigArray) > { > bigArray[i] = i; > } > } > } > > > > > -Original Message- > > From: Ionel Condor [SMTP:[EMAIL PROTECTED]] > > Sent: 07 November 2002 03:16 > > To: [EMAIL PROTECTED] > > Subject: Re: how to lock the access to an array till a method is > > finished ... > > > > I have already do this but does not help. > > The synch in this case does not help, as it LOCKS the object that calls > > the > > method and NOT THE the array that is used by the method and also by the > > jsp > > page. > > (my use of 'volatile' also does not help). > > > > Ionel. > > > > > Syncronize the code/method that populates the array as well as the > > > code/methods that access it. This can either be done using the > > syncronise > > > method modifier, or using syncronised blocks, which is better. > > > > > > This is however more of an elementary Java issue though, search the web > > for > > > the PDF version of Bruce Eckel's book: "Thinking in Java" and read > > chapter > > > 14. > > > > > > > > > > > > > -Original Message- > > > > From: Ionel Condor [SMTP:[EMAIL PROTECTED]] > > > > Sent: 07 November 2002 02:43 > > > > To: [EMAIL PROTECTED] > > > > Subject: how to lock the access to an array till a method is > > > > finished... > > > > > > > > Hi, > > > > I have the following situation: > > > > In a bean, I have a method that populates an array with a large, very > > > > large > > > > amount of data (required for some operations). > > > > From my jsp page I do not want to allow any web clients to see the > > length > > > > of > > > > this array, till the process of population is finishedI mean that > > > > otherwise one can see intermediary results and I want to avoid this. > > > > > > > > (I have tried to mark volatile the array but this helps me only to > > keep > > > > the > > > > correct value in all the threads, does not lock me also the object). > > > > > > > > Do I have to use a complicated wait/notify mechanism to achive this or > > how > > > > can I do ? > > > > > > > > Many thanks, > > > > Ionel C. > > > > > > > > > > == > > > > = > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > > > DIGEST". > > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > > > http://archives.java.sun.com/jsp-interest.html > > > > http://java.sun.com/products/jsp/faq.html > > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > > http://www.jguru.com/faq/index.jsp > > > > http://www.jspinsider.com > > > -- > > > > > > It is the strict policy of Truworths that its e-mail facility and all > > > e-mail communications emanating therefrom, should be utilised for > > > business purposes only and should conform to high professional and > > > business standards. Truworths has stipulated certain regulations in > > > terms whereof strict guidelines relating to the use and content of > > > e-mail communications are laid down. The use of the Truworths e-mail > > > facility is not permitted for the distribution of chain letters or > > > offensive mail of any nature whatsoever. Truworths hereby distances > > >
Re: how to lock the access to an array till a method is finished ...
I have already do this but does not help. The synch in this case does not help, as it LOCKS the object that calls the method and NOT THE the array that is used by the method and also by the jsp page. (my use of 'volatile' also does not help). Ionel. > Syncronize the code/method that populates the array as well as the > code/methods that access it. This can either be done using the syncronise > method modifier, or using syncronised blocks, which is better. > > This is however more of an elementary Java issue though, search the web for > the PDF version of Bruce Eckel's book: "Thinking in Java" and read chapter > 14. > > > > > -Original Message- > > From: Ionel Condor [SMTP:[EMAIL PROTECTED]] > > Sent: 07 November 2002 02:43 > > To: [EMAIL PROTECTED] > > Subject: how to lock the access to an array till a method is > > finished... > > > > Hi, > > I have the following situation: > > In a bean, I have a method that populates an array with a large, very > > large > > amount of data (required for some operations). > > From my jsp page I do not want to allow any web clients to see the length > > of > > this array, till the process of population is finishedI mean that > > otherwise one can see intermediary results and I want to avoid this. > > > > (I have tried to mark volatile the array but this helps me only to keep > > the > > correct value in all the threads, does not lock me also the object). > > > > Do I have to use a complicated wait/notify mechanism to achive this or how > > can I do ? > > > > Many thanks, > > Ionel C. > > > > == > > = > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > -- > > It is the strict policy of Truworths that its e-mail facility and all > e-mail communications emanating therefrom, should be utilised for > business purposes only and should conform to high professional and > business standards. Truworths has stipulated certain regulations in > terms whereof strict guidelines relating to the use and content of > e-mail communications are laid down. The use of the Truworths e-mail > facility is not permitted for the distribution of chain letters or > offensive mail of any nature whatsoever. Truworths hereby distances > itself from and accepts no liability in respect of the unauthorised > use of its e-mail facility or the sending of e-mail communications > for other than strictly business purposes. Truworths furthermore > disclaims liability for any unauthorised instruction for which > permission was not granted.Truworths Limited accepts no liability > for any consequences arising from or as a result of reliance on this > message unless it is in respect of bona fide Truworths business for > which proper authorisation has been granted. > > Any recipient of an unacceptable communication, a chain letter or > offensive material of any nature is requested to notify the Truworths > e-mail administrator ([EMAIL PROTECTED]) immediately in order that > appropriate action can be taken against the individual concerned. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
how to lock the access to an array till a method is finished...
Hi, I have the following situation: In a bean, I have a method that populates an array with a large, very large amount of data (required for some operations). >From my jsp page I do not want to allow any web clients to see the length of this array, till the process of population is finishedI mean that otherwise one can see intermediary results and I want to avoid this. (I have tried to mark volatile the array but this helps me only to keep the correct value in all the threads, does not lock me also the object). Do I have to use a complicated wait/notify mechanism to achive this or how can I do ? Many thanks, Ionel C. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Thread dumps with weblogic
to see if the core file is really generated (and it is), you may simply try the following: from your shell: 1. in your current dir, do a 'sleep 2&' 2. ps -ef|grep sleep 3. kill -3 PID of the 'long' sleep 4. you may find a core file in your current dir...this will be the prove that the core file is generated just do a 'ls -latr' Regards, Ionel Condor. - Original Message - From: "Shahata, Ash" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 28, 2002 3:45 PM Subject: Re: Thread dumps with weblogic > doing a ps -aef | grep java, gives me the following: > > si 17621 1 0 09:10:11 pts/0 2:55 > /usr/si/si_test1_20/jdk/bin/../bin/PA_RISC2.0/native_threads/ja > > so I did a kill -3 17621, and did a find /-name core -print, but nothing was > found! Is there any system setting that needed to be added!? > I ran the above kill as the same user once and again as root! > > Any idea? > Thanks > > -Original Message- > From: Ionel Condor [mailto:cionel@;RO-PLANET.RO] > Sent: Monday, October 28, 2002 12:44 PM > To: [EMAIL PROTECTED] > Subject: Re: Thread dumps with weblogic > > > Hi, > IF you have done a > 'kill -3 PID' > than the core dump of the memory will be in a file called 'core' that is > located in > the directory from where the killed process (java) was started. > So if your process was started (just an example) from /usr/bin/... and > you are trying to kill it from /home/myaccount and you don't have the write > permission to /usr/bin, IMHO the core will not be created even if the > process will be killed, so you have (the right to kill it). > (at least works in this way on redhat linux). > > Regards, > Ionel C. > > - Original Message - > From: "Shahata, Ash" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, October 28, 2002 1:26 PM > Subject: Thread dumps with weblogic > > > > Hi all, > > I have an application running on weblogic 6.1 and I'm getting exceptions > > with running out of memory, so I wanted to get a thread dump for the JVM, > > and I used kill -3, however I cant find the javacore file that should be > > created! Does anyone know where would the thread dump file get created and > > what would it be called? > > > > Thanks > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Thread dumps with weblogic
Hi, IF you have done a 'kill -3 PID' than the core dump of the memory will be in a file called 'core' that is located in the directory from where the killed process (java) was started. So if your process was started (just an example) from /usr/bin/... and you are trying to kill it from /home/myaccount and you don't have the write permission to /usr/bin, IMHO the core will not be created even if the process will be killed, so you have (the right to kill it). (at least works in this way on redhat linux). Regards, Ionel C. - Original Message - From: "Shahata, Ash" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 28, 2002 1:26 PM Subject: Thread dumps with weblogic > Hi all, > I have an application running on weblogic 6.1 and I'm getting exceptions > with running out of memory, so I wanted to get a thread dump for the JVM, > and I used kill -3, however I cant find the javacore file that should be > created! Does anyone know where would the thread dump file get created and > what would it be called? > > Thanks > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: obtaining date and time in suitable format for MySQL
No way Hugo !!! You should use the java.util.GregorianCalendar class , as follows: Calendar calendar = new GregorianCalendar(); Date trialTime = new Date(); calendar.setTime(trialTime); System.out.println("YEAR: "+calendar.get(Calendar.YEAR)); here your code... For any reference, please consult http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html and you will find all the methods() that you need. Regards, Ionel Condor. - Original Message - From: "hugo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 18, 2002 6:23 AM Subject: obtaining date and time in suitable format for MySQL > Hi > > I am javing a jsp file where I would like to get the current date and > time to be inserted in fields of an SQL table. The date should go into > the MySQL date field and hence should be of format -mm-dd. I tried > to use java.sql.Date, but I couldn't get it to work. If I simply use > > long date = 0; > java.sql.Date sqlDate = new java.sql.Date(date); > int year = sqlDate.getYear(); > > I get back "70". So obviously I have to get the year from the machine's > time, which is a linux box with Redhat 7.3. > > So I tried this: > > long date = 0; > java.sql.Date sqlDate = new java.sql.Date(date); > String thetime = sqlDate(System.currentTimeinMillis()); > out.println ("SQL time is " + thetime); > > But this didn't work either. > > How do you do this? > > In addition, I would like to get the time, but in decimal format i.e. > rather than 11:15 I would like to get 11.25 > > Is there a way of doing this? > > Any help will be greatly appreciated. > > Thanks > > Hugo > -- > Dr Hugo Bouckaert > Systems and Programming Engineer > > GeoInformatics Exploration Australia P/L > 57 Havelock St > West Perth, WA 6005 > PO Box 1675, West Perth 6872 > > Ph: 61 08 9420 7400 > Fax: 61 08 9226 1299 > > www.geoinformex.com > > > This email and any attachments may be confidential or legally > privileged. If you received this message in error or are not the > intended recipient, you should destroy the e-mail message and any > attachments or copies, and you are prohibited from retaining, > distributing, disclosing or using any information contained herein. > Please inform us of the erroneous delivery by return e-mail. Thank you > for your cooperation. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Pausing execution?
Hi, beyween two consecutive 'send mail' you may introduce a sleep, as follows: Thread.currentThread().sleep(time_in_miliseconds); Regards, Ionel Condor. - Original Message - From: "David Castro" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 17, 2002 1:41 PM Subject: Pausing execution? > I looked in the list archives, and didn't find an answer for my dilemma. > > I've got a web application that mails all of the opt-in addresses in my > client's database. I want to avoid overloading his host's SMTP server, so I > want to delay execution between sending each email. > > Can anyone tell me how to code this? > > Also, I'm planning to write to the client a summary line with each email that > is sent, and flush the cache with each line. Will this keep the page alive? Or > will it eventually time out? > > Thanks a million! > > -David Castro > email[at]davidcastro[dot]com > http://jsp.davidcastro.com > > __ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: javamail and carriage return
Concatenate the text with: System.getProperty("line.separator") and, if necessary, with some other system properties Regards, Ionel Condor. - Original Message - From: "Ronny Van der Perre [Smart IT Systems]" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 12:53 PM Subject: javamail and carriage return > hello, > > i am trying to lay-out a mail, sent via javamail. > > i cannot find a way to incorporate a carriage return (or linefeed) in the message part. > > any suggestions? > > > thx in advance > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: jsp editor
No way !!! HomeSite is neither free, nor opensource regards, ionel. - Original Message - From: "Sanjika Abeyratna" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 12:55 PM Subject: Re: jsp editor > Home site > > - Original Message - > From: "Shahata, Ash" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 10, 2002 4:47 PM > Subject: jsp editor > > > > Does anyone know of a freeware/opensource jsp editor? Anything that allow > > drag & drop for controls, etc.. > > > > Thanks > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Tomcat on Linux
If I remember well, you should add a line that contains the full name (starting from root to the .sh file...)...than reboot... - Original Message - From: "Shahata, Ash" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 10:25 AM Subject: Re: Tomcat on Linux > would I just add /catalina/bin/startup.sh as an entry to rc.local? > > Thanks > > -----Original Message- > From: Ionel Condor [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 10, 2002 10:21 AM > To: [EMAIL PROTECTED] > Subject: Re: Tomcat on Linux > > > in linux: init calls /etc/rc.d/rc . > This one executes all the scripts that are in the folder /etc/rc.d/rcN.d, > where N is the number of the level. > Than the rc.local is executed. You may put your stuff there "if you don't > # want to do the full Sys V style init stuff." > > Regards, > Ionel CONDOR. > > > - Original Message - > From: "Shahata, Ash" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 10, 2002 10:07 AM > Subject: Tomcat on Linux > > > > Hi all, > > > > I want to let Tomcat to start up automatically whenever redhat is > restarted, > > where would I place my startup scripts, or how can I do it? I heared about > > the rc.d dir but not sure how to do it? > > > > Thanks > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Tomcat on Linux
in linux: init calls /etc/rc.d/rc . This one executes all the scripts that are in the folder /etc/rc.d/rcN.d, where N is the number of the level. Than the rc.local is executed. You may put your stuff there "if you don't # want to do the full Sys V style init stuff." Regards, Ionel CONDOR. - Original Message - From: "Shahata, Ash" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 10:07 AM Subject: Tomcat on Linux > Hi all, > > I want to let Tomcat to start up automatically whenever redhat is restarted, > where would I place my startup scripts, or how can I do it? I heared about > the rc.d dir but not sure how to do it? > > Thanks > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: share objects
Hi, Probably he wants to say primitive types (int, char, ...) for 'variables'. Ionel Condor. - Original Message - From: "Adrian Janssen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 25, 2002 11:00 AM Subject: Re: share objects > What exactly, in your opinion is the difference between an OBJECT and a > VARIABLE ? > > The jsp:useBean tag ONLY works for OBJECTS. > > > -Original Message- > > From: Martin Simon [SMTP:[EMAIL PROTECTED]] > > Sent: 24 September 2002 04:13 > > To: [EMAIL PROTECTED] > > Subject: Re: share objects > > > > i read about it, but with beans i CANNOT give OBJECTS between JSP. I can > > only give VARIABLES. > > > > - Original Message - > > From: Steven A. Martin <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, September 24, 2002 3:53 PM > > Subject: Re: share objects > > > > > > > Again, read about the jsp:useBean tag and scope. Learn to fish instead > > of > > > being given the fish. > > > > > > > > > - Original Message - > > > From: "Martin Simon" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Tuesday, September 24, 2002 9:52 AM > > > Subject: share objects > > > > > > > > > > How can i share objects between JSP? > > > > > > > > > > > > > == > > = > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > > DIGEST". > > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > > > http://archives.java.sun.com/jsp-interest.html > > > > http://java.sun.com/products/jsp/faq.html > > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > > http://www.jguru.com/faq/index.jsp > > > > http://www.jspinsider.com > > > > > > > > > > > > == > > = > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > http://archives.java.sun.com/jsp-interest.html > > > http://java.sun.com/products/jsp/faq.html > > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > > http://www.jguru.com/faq/index.jsp > > > http://www.jspinsider.com > > > > > > > > > > == > > = > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > -- > > It is the strict policy of Truworths that its e-mail facility and all > e-mail communications emanating therefrom, should be utilised for > business purposes only and should conform to high professional and > business standards. Truworths has stipulated certain regulations in > terms whereof strict guidelines relating to the use and content of > e-mail communications are laid down. The use of the Truworths e-mail > facility is not permitted for the distribution of chain letters or > offensive mail of any nature whatsoever. Truworths hereby distances > itself from and accepts no liability in respect of the unauthorised > use of its e-mail facility or the sending of e-mail communications > for other than strictly business purposes. Truworths furthermore > disclaims liability for any unauthorised instruction for which > permission was not granted.Truworths Limited accepts no liability > for any consequences arising from or as a result of reliance on this > message unless it is in respect of bona fide Truworths business for > which proper authorisation has been granted. > > Any recipient of an unacceptable communication, a chain letter or > offensive material of any nature is r
Re: TEXTAREA behavior in IE and Netscape
> Ok, I have found a solution for IE: I just put wrap="hard" as attrib of the textarea and everything is OK, I can't understand why, as wrap is said to be used only for alignment. Any comments Ionel C. > > > -Original Message- > From: Ionel Condor [mailto:[EMAIL PROTECTED]] > Sent: 08 August 2000 10:11 > To: [EMAIL PROTECTED] > Subject: TEXTAREA behavior in IE and Netscape > > Hi, > Here is my problem: > In a textarea a user must be able to inputs (to paste) a text > document > than sends the form (which contains some other Input elements) to > the > server using post. > In Netscape the textarea limits myself to introduce more than > approx. > 24376 chars (I can't TYPE more chars). > > But the problem is in IE: > I introduce less than approx 2000 chars, works ok but if I try to > introduce let's say the number of chars allowed in netscape the IE > is > not able to sent the info to the server, > sometimes gives me a timeout operation, otherwise "...cannot open > site, > terminated" > and otherwise simply does nothing, just tries to send ...than... > back to > my page. > > The problem is that I HAVE TO use IE asap, so how can I solve the > problem ? > Do you know if it is related to HTTP or simply a different > convention > in IE and netscape, as seems for me. > > Many thanks, > Ionel C. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
TEXTAREA behavior in IE and Netscape
Hi, Here is my problem: In a textarea a user must be able to inputs (to paste) a text document than sends the form (which contains some other Input elements) to the server using post. In Netscape the textarea limits myself to introduce more than approx. 24376 chars (I can't TYPE more chars). But the problem is in IE: I introduce less than approx 2000 chars, works ok but if I try to introduce let's say the number of chars allowed in netscape the IE is not able to sent the info to the server, sometimes gives me a timeout operation, otherwise "...cannot open site, terminated" and otherwise simply does nothing, just tries to send ...than... back to my page. The problem is that I HAVE TO use IE asap, so how can I solve the problem ? Do you know if it is related to HTTP or simply a different convention in IE and netscape, as seems for me. Many thanks, Ionel C. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: UML Tutorial Pointers
Hi, I think that www.rational.com is (Rational Rose) the best of the web related to UML. Regards, Ionel Condor. Khem Chand Sachdeva wrote: > Hi Everybody > This is slightly offtopic. > Could anybody tell me how should i go abt learning UML. > I want some site where i can find meaning of all the notations and some > examples. > Thanx > Khem > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: How do I Change the Sort Order?
Hi, I am not absolutely sure but I think that in the class which inherits this class you should explicitly write "<" or " >" in the overriden method compareElementAt(...) ex. public int compareElementsAt(int beginLoc, int endLoc) { if(beginLoc>endLoc) return -1; else return 1; } or for reverse order: public int compareElementsAt(int beginLoc, int endLoc) { if(beginLoc How do I change the sort order in this code? > > SanJo;) > > /* > * MergeSort.java > * > * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. > * > * This software is the confidential and proprietary information of Sun > * Microsystems, Inc. ("Confidential Information"). You shall not > * disclose such Confidential Information and shall use it only in > * accordance with the terms of the license agreement you entered into > * with Sun. > * > * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE > * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE > * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR > * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES > * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING > * THIS SOFTWARE OR ITS DERIVATIVES. > * > */ > > /** > * An implementation of MergeSort, needs to be subclassed to > * compare the terms. > * > * @author Scott Violet > */ > public abstract class MergeSort extends Object { > protected Object toSort[]; > protected Object swapSpace[]; > > public void sort(Object array[]) { > if(array != null && array.length > 1) > { > int maxLength; > > maxLength = array.length; > swapSpace = new Object[maxLength]; > toSort = array; > this.mergeSort(0, maxLength - 1); > swapSpace = null; > toSort = null; > } > } > > public abstract int compareElementsAt(int beginLoc, int endLoc); > > protected void mergeSort(int begin, int end) { > if(begin != end) > { > int mid; > > mid = (begin + end) / 2; > this.mergeSort(begin, mid); > this.mergeSort(mid + 1, end); > this.merge(begin, mid, end); > } > } > > protected void merge(int begin, int middle, int end) { > int firstHalf, secondHalf, count; > > firstHalf = count = begin; > secondHalf = middle + 1; > while((firstHalf <= middle) && (secondHalf <= end)) > { > if(this.compareElementsAt(secondHalf, firstHalf) < 0) >swapSpace[count++] = toSort[secondHalf++]; > else >swapSpace[count++] = toSort[firstHalf++]; > } > if(firstHalf <= middle) > { > while(firstHalf <= middle) >swapSpace[count++] = toSort[firstHalf++]; > } > else > { > while(secondHalf <= end) >swapSpace[count++] = toSort[secondHalf++]; > } > for(count = begin;count <= end;count++) > toSort[count] = swapSpace[count]; > } > } > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: SQL server and JDBC under WinNT
Hi, A solution is to use the Bea JDBC driver (4 type driver) : http://www.bea.com/products/weblogic/drivers_platforms.html or http://www.bea.com/products/ Regards, Ionel CONDOR. Oscar Silván wrote: > How can I access SQL Server database under Win NT without ussing the > JDBC-ODBC driver. That is, I want to use a JDBC SQL Server driver to access > the database directly, not ussing ODBC. > > the code I use is: > > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > connSQLS=DriverManager.getConnection("jdbc:odbc:globaliza","glo",""); > > Thank you... > > Oscar Silván Oró > Globaliza Network, S.A. > Telf.: 91 351 39 69 > Fax: 91 351 37 13 > E-mail: [EMAIL PROTECTED] > Web: http://www.globaliza.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: MD5 Hash
*/ public synchronized void update(byte input[]) { update(input, 0, input.length); } /** * Add an array of shorts to the digest. */ public synchronized void update(short input[]) { for (int i = 0; i < input.length; i++) { update(input[i]); } } /** * Add an array of integers to the digest. */ public synchronized void update(int input[]) { for (int i = 0; i < input.length; i++) { update(input[i]); } } /** * Add an array of longs to the digest. */ public synchronized void update(long input[]) { for (int i = 0; i < input.length; i++) { update(input[i]); } } /** * Add the bytes in the String 'input' to the current digest. * Note that the string characters are treated as unicode chars * of 16 bits each. To digestify ISO-Latin1 strings (ASCII) use * the updateASCII() method. */ public void update(String input) { int i, len; short x; len = input.length(); for (i = 0; i < len; i++) { x = (short) input.charAt(i); update(x); } } /** * Treat the string as a sequence of ISO-Latin1 (8 bit) characters. */ public void updateASCII(String input) { int i, len; bytex; len = input.length(); for (i = 0; i < len; i++) { x = (byte) (input.charAt(i) & 0xff); update(x); } } /** * Read a stream and update a digest until the * stream sends an EOF. */ public void update(InputStream in) { byteb; try { while ((b = (byte) in.read()) != -1) update(b); } catch (Exception e) { } } /** * Perform the final computations and cleanup. */ public abstract void finish(); /** * Complete digest computation on an array of bytes. */ public void computeDigest(byte source[]) { init(); update(source); finish(); } public void computeDigest(InputStream in) { init(); update(in); finish(); } /** * helper function that prints unsigned two character hex digits. */ private void hexDigit(PrintStream p, byte x) { char c; c = (char) ((x >> 4) & 0xf); if (c > 9) c = (char) ((c - 10) + 'A'); else c = (char) (c + '0'); p.write(c); c = (char) (x & 0xf); if (c > 9) c = (char)((c-10) + 'A'); else c = (char)(c + '0'); p.write(c); } /** * Return a string representation of this object. */ public String toString() { ByteArrayOutputStream ou = new ByteArrayOutputStream(); PrintStream p = new PrintStream(ou); p.print(this.getClass().getName()+" Message Digest "); if (digestValid) { p.print("<"); for(int i = 0; i < digestBits.length; i++) hexDigit(p, digestBits[i]); p.print(">"); } else { p.print(""); } p.println(); return (ou.toString()); } /** * Compare two digests for equality. Simple byte compare. */ public static boolean isEqual(byte digesta[], byte digestb[]) { int i; if (digesta.length != digestb.length) return (false); for (i = 0; i < digesta.length; i++) { if (digesta[i] != digestb[i]) { return (false); } } return (true); } /** * Non static version that compares this digest to one passed. */ public boolean isEqual(byte otherDigest[]) { return (MessageDigest.isEqual(digestBits, otherDigest)); } /** * Return a string that represents the algorithim of this * message digest. */ public abstract String getAlg(); static byte testdata[]; public static void benchmark(MessageDigest md) { Random rnd = new Random(); // use random data testdata = new byte[16384]; long times[] = new long[14]; double rates[] = new double[14]; for (int i = 0; i < testdata.length; i++) { testdata[i] = (byte) (rnd.nextInt() >>> 8); } System.out.println("Benchmarking "+md.getAlg()); System.out.println("Bytes Time (mS) Rate (Bytes/Sec)"); for (int i = 1; i < 10; i++) { long t1 = System.currentTimeMillis(); md.init(); for (int k = 0; k < i; k++) md.update(testdata); md.finish(); times[
Re: OLE DB drivers for Java ?
Hi, A solution is to use the JDBC driver provided by Bea: http://www.bea.com/products/weblogic/drivers_platforms.html Regards, Ionel CONDOR. Franck Rageade wrote: > Dear JSP gurus, > > I tried to use ODBC JDBC drivers to upload a blob in a SQL Server database. >Unfortunately, I got the error message : > > java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not >implemented > > A friend of mine suggested me to use an OLE DB provider instead, because blobs >feature are supported by OLE DB. Does anyone know where I can find an OLE DB package >for Java ? > > Regards, > > Franck > > ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø > > FRANCK RAGEADE > Skill Group e-Business > > SBA 67 - France & Abroad > Cap Gemini France - Division Rhône-Alpes > > 11, Chemin des Prés > ZIRST 4403 > 38944 Meylan , France > > LoginId: frageade > Email: [EMAIL PROTECTED] > Phone: +33 (04) 76 52 64 31 > Fax: +33 (04) 76 52 62 01 > > ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: minutes ,seconds????
Hi, If you refer to the methods of the java.util.Date class, they are deprecated (considerate old), since it is encouraged the use of the java.util.Calendar class or better the java.util.GregorianCalendar. If you refer to the methods of java.sql.Date class, they are deprecated because an SQL JDBC Date object does not contain time information, only date. For the time information you must use the java.sql.Timestamp class. Have a nice day, Ionel CONDOR. subramanian Athimoolam wrote: > hi > > in jsp some methode getMinutes, getHours its not working why? > > subu > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
using any crypt algorithms in JSP
Hi, For all that want to use some crypt algorithms in your Java applications (JSP) I have found an interesting site: http://www.cryptocd.net/cryptocd/ Hope it helps. Have a nice day, Ionel CONDOR. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: problem with msacess
MSAccess keeps its info in winnt\catroot directory. Open that database and in options select to show also the system tables. There is a table which contains accounts. The mdb is called lcatalog.mdb. Ciao, Ionel. Srinivas Rao Eadhara wrote: > I have a typical problem , I am using MS-acess as database in one of the > application. Some body set the password for the database, Now I am unable > to acess that database, please suggest me how to bipass or break that > password > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
JSP & DB2
Hi, If someone uses IBM DB2 as his DBMS for JSP here is a question: I have two databases, each with a few tables. Somewhere in a bean I write a query which must use a table from DB1 and a table from DB2 is a select statement. Does anyone know how to configure DB2 (grant statements I suppose) in order to succeed... I mean one of the DB to see also the tables from the other DB. I have done the same thing in Oracle by allowing rights on a scheme but I don't know how can be done in DB2. Please give me an example. Thanks, Ionel Condor. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can I read a text file thru a bean
You may use a format as follows: file.ini --- driver=namedriver db=namedb . this is the classical format of a properties file. Than you just open a stream to that file and use the load function of a java.util. Propeties object to load the whole file. than do something like: name=prop.getProperty("db"); driver=prop.getProperty("driver"); Example: java.io.FileInputStream is = null; java.util.Properties p = new java.util.Properties(); String propertiesFilename = "settings.ini"; try { is = new java.io.FileInputStream(propertiesFilename); p.clear(); // not realy necessary p.load(is); //System.out.println("pr:" + Prop.properties.toString()); } catch (java.io.IOException ioex) { System.out.println("Can't read the settings file"); } catch (Exception ex) { ex.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (java.io.IOException ioex1) { ioex1.printStackTrace(); } is = null; } } than even you use an: Enumeration e = p.keys(); or simply get a value of a property as I have shown you above. Ciao, Ionel Condor. Xing guohong wrote: > Hi, > You can creat a jsp file, and define the url, username, password > variables in it. In the JSP or other files need to connect to DB include it. > I think it is faster than reding files to get the string before connect to > DB. > For example: > 1.db.jsp > <%! > String m_url = "jdbc:oracle:thin:@hostname:1521:servicename" > String m_username = "scott"; > String m_password = "tiger"; > %> > 2.a.jsp includes db.jsp > <%@ page language="java" %> > <%@ include file="db.jsp"%> > xgh > - Original Message - > From: "Ritu Kama" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, July 28, 2000 3:19 PM > Subject: Can I read a text file thru a bean > > > Hi all, > > > > My requirement is as follows: > > > > I have a initialization file containing the database name. > > Thru my bean I want to read the DB name and establish connection with that > > particular database. I don't want to hardcode the db name. > > > > Please suggest how to achieve this. > > > > Thanks > > Ritu > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
A design tool (Visio 5)
Hi, Have anyone used Visio 5 for Web page design and for other diagrams. Does anyone know a website from where I may download an evaluation copy of Visio 5, I as not able to find any correct link. Sorry if it's a little bit out of the topic. Many thanks, Ionel. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: This is very ***important*** for me ..please help.
Just a suplementary note, not a solution to your problem: You forgot to close the connection; take care that this is a serious problem for a web site using jdbc as after a time all the objects will be alocated by the DBMS and you will get an error. Always close the connection after a comit or rollback... (and other jdbc objects) or better use a connection pool. Ionel Condor. Pradeep Roy wrote: > Hi All > > I am enclosing a complete code for database accessing. It would help > beginners to know how to access the database from JSP. > But I don't want the JSP to access the database. I want Beans to Access the > database and send ResultSet accross to JSP. It is not working whenever I am > trying to use the Beans to access it. > > Any other suggestion with details will be highly appreciated. > > Thanks & Regards > Pradeep > > Could anyone suggest me what is wrong in my Bean which is expected to > return a result set in the JSP file. > > package dbAccess; > > import java.util.*; > import java.sql.*; > import java.lang.*; > import java.io.*; > > public class jspDbAccess { > > Vector names; > Vector data; > String firmcode; > String workid; > String job; > String costcode; > ResultSet resultSet=null; > > // > public jspDbAccess() > { > ; > } > > // > public void setFirmcode(String firm) > { > if (firm != null ) > { > firmcode=firm; > } > } > > // > public void setWorkid(String id) > { > if (id != null ) > { > workid=id; > } > } > > // > public void setJob(String Jobname) > { > if (Jobname != null ) > { > job=Jobname; > } > } > > // > public void setCostcode(String code) > { > if (code != null ) > { > costcode=code; > } > } > > // > public void setSql(String sqlStr) > { > Connection connect=null; > Statement statement=null; > > String driverName="com.ibm.as400.access.AS400JDBCDriver"; > String url="jdbc:as400://saturn" ; > String user=""; > String passwd=""; > >Connection connection=null; > > // Data to connect to database > > try > { > //loading the driver > Class.forName(driverName); > connection = DriverManager.getConnection(url, user, passwd); > > } > // Error if fail to load the driver > catch (Exception exp) > { > connection=null; > System.out.println("Error occured at loading the Driver: " > +exp); > } > >try > { > statement=connection.createStatement(); > resultSet=statement.executeQuery(sqlStr); > } > catch (Exception exp) > { > System.out.println("Error occured at loading the Driver: " > +exp); > } > > } > > public ResultSet getResultset() > { > return resultSet; > } > > public void reset() > { > > } > } > > My JSP is as follows: > > <%@ page import="java.sql.*,java.io.*, java.lang.*, javax.servlet. > *,javax.servlet.http.*" %> > > > > > > > > bgcolor="#00" > leftmargin=0 > topmargin=0 > marginwidth=0 > marginheight=0> > > > > > > > > alt="Logo"> > > > > > > > ="Jobpac Logo"> > > <% if ((request.getParameter( "Workid" ) != null) && > (request.getParameter( "Job" ) != null) && > (request.getParameter( "Costcode" ) != null) && > (request.getParameter( "Sql" ) != null)) { %> > > <% > String firm = request.getParameter( "Workid" ); > String jobname = request.getParameter( "Job" ); > String cstcode = request.getParameter( "Costcode" ); > String sqlStr = request.getParameter( "Sql" ); > > String costcodeName=""; >
JRun233 vs JRun3
Hi, Does anyone know what version of Servlet's API does know JRun233 ? Shall I upgrade to version 3 ? Has version 3 significant improvements? Many thanks, Ionel Condor. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Prob of Servlet objects in JSP functions
Hi, I am using Visual Age for Java integrated with Tomcat and the debugging process works very vell. I think that any IDE support jsp/servlets. (for example Visual Cafe works very well with Dynamo App Server, so i think that it must works also with servlets (for sure) and also with a jsp engine. Ionel Condor. "Rath, Dipak (Dipak)" wrote: > Hi: > I'm new to the world of JSP/Servlet. I'm about to be a part of a project and > we intend to use jsp and servlet. We ordered Visual Cafe (expert edition) > and realized that it does not support jsp and servlet development. I would > like to know if some of you use visual cafe for jsp/servlet development and > how do you go about it. > Also I would like to know what are few good books on jsp? > Thanks in advance! > DR > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Prob of Servlet objects in JSP functions
Hi, the code from declarations is inserted in the body of the servlet class, outside of the service(...) method (for which the request/response objects are defined). Gerard Menezes wrote: > Hi all, > > I have a problem while defining JSP functions in the > Declarative tag <%! %>. > I cannot access the pre-defined servlet objects, > like request,response,session,application etc. > It gives errors such as : > *** Error: "request" is either a misplaced package name or a non-existent > entity. > > It becomes very difficult to include all code in the scriptlets without > using > functions. Please Help ! > > Thanx a lot > > Gerard.M/.. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
sending via POST
Hi, I have a form which sends some data via POST. I want to know a modality to see what is realy sent to the server without changing the post to get. I have no access to the server all the time, so I can't assume that I read these values on server... I need a way to intercept the communication, something like C raw sokets I think... Do you know such a method or a utility program that does such a job of showing the query as it was send by a get method? (I don't need a sniffer application for reading pwd and so on). Many thanks, Ionel Condor. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: how to detect a browser closing
Hi, many thanks for all the sugestions. Using JavaScript I was able to write the code, but it works only on IE. Seems that Netscape does not react to the unload event... is it true ? Any suggestions for Netscape ? Thanks, Ionel. "M. Simms" wrote: > You could place a Javascript function reference that calls a servlet in > every page's "onunload" event handler. > > The trick would be to be sure to keep track of the number of open browser > windows the user has. > if there is only 1 and the "onunload" is triggered, then the session with > that site has effectively ended. > > > -Original Message- > > From: A mailing list about Java Server Pages specification and reference > > [mailto:[EMAIL PROTECTED]]On Behalf Of Shane Duan > > Sent: Monday, July 10, 2000 12:19 PM > > To: [EMAIL PROTECTED] > > Subject: Re: how to detect a browser closing > > > > > > Since a server is a program that takes request and send response, and > > that the Internet connection is stateless, I don't think you can use the > > server to detect when the browser is closed. > > > > The only way I know would be to set a time out on the session and do the > > logic when the session time out occurs. > > > > Hope that helps. > > > > Shane Duan > > [EMAIL PROTECTED] > > > > -Original Message- > > From: Ionel Condor [mailto:[EMAIL PROTECTED]] > > Sent: Monday, July 10, 2000 7:22 AM > > To: [EMAIL PROTECTED] > > Subject:how to detect a browser closing > > > > Hi, > > I have the following problem: > > I want to detect on the server side when a user (which has an open > > session on the server) has closed his browser by pressing the "X" close > > button of the window. > > I know that using http sessions is probably the unique way, but I don't > > know how, as I > > don't know if the server can't initiate by itself such a check ? > > > > Many thanks for any suggestions, > > Ionel C. > > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > == > > = > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
how to detect a browser closing
Hi, I have the following problem: I want to detect on the server side when a user (which has an open session on the server) has closed his browser by pressing the "X" close button of the window. I know that using http sessions is probably the unique way, but I don't know how, as I don't know if the server can't initiate by itself such a check ? Many thanks for any suggestions, Ionel C. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets