Which is better?
Hi, I have these following code: BeanOne { dbCon(); getX(); getY(); close(); } BeanX { dbCon(); getX(); close(); } BeanY { dbCon(); getY(); close(); } - - In BeanOne, is that mean there's only one connection to DB regardless of howmany times bean called (using get property in jsp)? - Which is better, using one bean or two? - When is the right time we need to cleanup connection (ie. using st.close() )? - Thanks! --Gading === 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
Container automaticaly rewite links.
Hi, I have "strange" problem here. In jsp page i only using standard href link, but when i run in container, in browser it says something like "/index.jsp;jsessionid=qweutyqwte?par=value" which means the container was rewrite *all* url. in fact, im not using any response.encodeURL("index.jsp") and my browser was accept cookies. What could be wrong? 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
Re: Container automaticaly rewite links.
At 03:02 PM 4/30/2002 -0300, you wrote: >Oopss... Which web container you use? I'm using orion 1.54. But it happens only when first time opening page, the subsequence (or even just refreshing current page) the jsessionid will gone. Just wondering, when browse to www.netsol.com, it always shows jsessionid even browser accept cookie, how to enable it? >Angel "Java" Lopez === 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
portable pager
Hi, Is it possible to write pager(scrolling resultset) application which will portable accross databases? 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
Converting date to int
I have jsp page wich shows select item for day , month , year. I need to have current date is selected by default, how to obtain that? Im trying to use SimpleDateFormat df = new SimpleDateFormat("d"); but it return string and can not convert to int. === 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: Files upload without form
At 06:37 PM 5/4/2002 -0400, you wrote: >Hi All, >Is there any way to upload a bunch of files at one shot. This is not like >uploading a single file which we use "multipart/form-data" >for that. That's a group of files sitting on a NT server and should be >uploaded to a Sun server without any form submission Using ftp?? >Thank you, >Alireza. === 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: How can I show some results at a time?
At 11:00 AM 5/9/2002 -0400, you wrote: >On Thu, 9 May 2002, Luca Ventura wrote: > > > I think that the other search engines stores the results of the first > > search in some data structure: so they scan this data structure when > > the must show a particular page of the results to a user. Am I right? > > > > Do you have any idea on how I can implement this search engine in a > > jsp-page? > >There are a handful of tag libraries available publicly that will help you >solve this issue. If you need more control, it's relatively easy to >implement this functionality using the 'begin', 'end', and 'step' >attributes of the JSP Standard Tag Library's tag. (I have a >thorough example of this in my upcoming book on JSTL.) Typically, you'd >want to keep the data around in session scope and choose which pieces of >it you want to display for each request. > >Alternatively, if you're retrieving data from an RDBMS, you can leave the >data there and limit your query using JSTL's tag's 'maxRows' >and 'startRow' attribute. To do this, your query should be ordered (e.g., >it should use an "ORDER BY" clause) because otherwise, the ordering of >rows in the result isn't guaranteed; if successive queries return results >in a different order, then "row 10 through row 20" means something >different each time. I haven't look this 'paging' seriously, but soon i'll facing this problem anyway. I have a question, when using taglib solution, is it depends on the Database (ie. support for limit or max rows) and JDBC drive (ie. support caching ang client side cursor)? In other word, will these taglib will work with all Database (even when DB doesn't support above requirements?) 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
Re: How can I show some results at a time?
At 12:12 AM 5/10/2002 -0400, you wrote: >On Fri, 10 May 2002, Gading wrote: > > > I haven't look this 'paging' seriously, but soon i'll facing this > > problem anyway. > > > > I have a question, when using taglib solution, is it depends on the > > Database (ie. support for limit or max rows) and JDBC drive (ie. > > support caching ang client side cursor)? In other word, will these > > taglib will work with all Database (even when DB doesn't support above > > requirements?) Thanks. > >Yes. This is one of the major advantages of using JSTL's (or DBTags's) >database support. The "LIMIT" and "OFFSET" keywords aren't standard SQL, >so using them can limit the portability of your application (and simply >won't work if your database doesn't support them). On the other hand, >when you use JSTL's to page through results, or even using >JSTL's with its 'startRow' and 'maxRows' attributes, JSTL >takes care of the problem for you, and it is possible to write pages >that are portable across different databases. Will it scalable and efficient to handle thousands of records? Thanks for your reply. Btw, books from manning is not very common in here (indonesia, but wrox does), is it "good" ? :-) >-- >Shawn Bayern >"JSP Standard Tag Library" http://www.jstlbook.com >(coming this summer from Manning Publications) === 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
get both Date and Time
Hi all, In MS SQL server, theres smalldatetime data type, which contains date and time, ie. "2002-05-14 16:30:45". When i'm using getDate(), it only return date part, when using getTime() it only return time part only. What i want is to retrive both date and time, should i store date and time in different column? 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
Re: get both Date and Time
Thanks a lot! At 06:49 PM 5/14/2002 +0800, you wrote: >use getTimestamp() === 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
Error page
Hi all, I have 2 page one is main and one is for error page. main.jsp <%@ page errorPage="errorpage.jsp" %> errorpage.jsp <%@ page isErrorPage="true" %> When there is error in main, it doesnt redirect to errorpage.js, but shows internel server error (500). I'm using Orion 1.54 Am i missing something? 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
Re: Error page
At 11:02 AM 5/16/2002 +0530, you wrote: >I think you need to specify the full virtual path of errorpage.jsp while >defining the errorPage attribute in main.jsp It's on the same directory, if so its hould give 404 instead of 500. I thinks it because of "error scoping", for eaxample it work when i try to getString("not_valid_colum"), but not other "serious" error. Anyone knows the "scope"? === 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 - offtopic but urgent
At 03:41 AM 5/16/2002 -0500, you wrote: >Hi all, > > when i try to send an email to me itself i get the following exception > >javax.mail.MessagingException: Could not connect to SMTP host: , >port: 25; > >Properties prop = new Properties(); >prop.put("mail.smtp.host", hostName); > >where hostName is from command prompt : telnet 25 hello test 220 some.smtp.com ESMTP mail from: <[EMAIL PROTECTED]> 250 ok rcpt to: <[EMAIL PROTECTED]> 250 ok data 354 go ahead testing . 250 ok 1021539873 qp 1 quit 221 some.smtp.com >i know this is offtopic but if someone can let me know where i am wrong , i >would appreciate it. > > >Regards > >Ramesh Kesavanarayanan >[EMAIL PROTECTED] >Off: 91-44-8113801 ext 2333 >Res:91-44-2265360 >Mob : 91-98412-73573 === 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: Connection Pooling Implementation
At 04:44 PM 5/16/2002 +0530, you wrote: >earlier poolman used to be there but after tomcat 4.0 poolman is stopped, >becuase tomcat has inbuilt connection pooling. you can try tomcat 4.0 >www.codestudio.com > >if you use oracles thin drivers like classes12.zip it has inbuilt connection >pooling which you can download from www.technet.oracle.com. > >or u can check this link >http://www.webdevelopersjournal.com/columns/connection_pool.html a very good >article by Hans Bergsten with source code. 1. In light load, will it improve perfomance? 2. If driver already provide con pooling, should we consider user another pool manager? 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
How much scriptlets?
Hi, How much scriptlets is acceptable to conforms the good design program? I've seems too many scriptlets in one page is seems very hard to maintains in future and also no benefits from asp, even after trying to put bussiness logic in bean. Some task are (imho) very eficient if handle by scriptlets rather than bean. Thanks. -gading === 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
Store int to session
Hi, Is it possible to store int to session? I'm trying to store int but it can not covert int object. Explicit casting also did not work. Tks. === 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
2 parameter at one form
Hi, Is it possible to upload file using but it also pass other "normal" input form (ie. ? 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
Re: 2 parameter at one form
At 01:25 AM 5/24/2002 -0500, you wrote: >Hi, > >When you post a form, all input is sent to the server (including hidden >fields and all other field data). The problem is, it's not in the form of >regular request parameters. And you usually need to parse the byte stream >sent by the browser yourself. Fortunately, you have several libraries that >allow you to do that. I believe there's one with an O'Reilly book on JSP, >can't recall correctly which one, and there are also several commercial >ones. I use a GUI library for JSPs called TICL (from >http://www.kobrix.com) that handles all that and you don't event notice >that there's some special processing going one. I think Struts from >jakarta has some classes to do the multipart/form-data parsing as well. Thanks, but now i'm using session to pass this parameter, then remove it again. it works :) >John === 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
Date and time parser
Hi, I have a timestamp object, obtain from DB using getTimestamp("date_time"). output is something like "2002-05-27 14:17:00". How to get year, month, date, hour and minute in string (or int is also ok)? === 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: auto run
Try robocopy from Nt4 reskit. It will mirror foledr A to B At 04:02 AM 5/27/2002 -0500, you wrote: >Hi all, > > pardon me if it is out of topic. But i need this urgently. > I have 2 folders say A and B. i need to copy the contents of A and its >subdirectories into B. > The copying should take care of the following things. > > 1) if the copied contents is the same as that of the already existing one >then the file in B should not get overwriten. > for this i need to capture the date and time of the file in A. > > 2) also the folder A can reside in any of the geographical locations say >for ex in USA. i need to track the modified date and time of the file in A >and compare with that of the > file in B. > > if it has changed then i should overwrite it else i should not. > > i need to create this as a batch file and then run it thru java program as >a scheduled task. > > i tried to use XCOPY but in vain. > > any open source for this will be highly helpful to me. > > >Regards >Ramesh Kesavanarayanan >[EMAIL PROTECTED] > >=== >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: Date and time parser
At 05:21 PM 5/27/2002 +0530, you wrote: >Try like this:- > >Timestamp objTimestamp = getTimestamp("date_time") >Calendar objCalendar = Calendar.getInstance(); >objCalendar.setTime(objTimestamp.getDate()); >int year = objCalendar.get(Calendar.YEAR); >int month = objCalendar.get(Calendar.MONTH); >int date = objCalendar.get(Calendar.DATE); >int hour = objCalendar.get(Calendar.HOUR_OF_DAY); >int minute = objCalendar.get(Calendar.MINUTE); > >and so on you check the API of Calendar class. Thanks. I've found another way to get this, didn't know which is "better". SimpleDateFormat y = new SimpleDateFormat(""); SimpleDateFormat m = new SimpleDateFormat("M"); SimpleDateFormat d = new SimpleDateFormat("d"); int year= 0, mon = 0, day= 0; try { Date theDate= auc.getDateCol("dlv_date_1"); year= Integer.parseInt(y.format(theDate)); mon= Integer.parseInt(m.format(theDate)); day= Integer.parseInt(d.format(theDate)); } catch (Exception ignore){ } === 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