Re: Problem deleting a file using JSP
Ronald thank you again for your help. The problem is finally solved. I moved my application to Solaris, set up the policies and it worked. I really do not know yet what the problem was in Windows, but I guess it has to do something with the Windows settings. Maybe I needed to set up the properties inthe files somehow differently than the classic right-click... properties method. Thank you for your help and time. Panos 11/12/2001 12:16:56, Ronald Wildenberg <[EMAIL PROTECTED]> wrote: >Hi, > >OK, pity it does not work. Let's try some other things: >First check whether the problem is not the file itself. >- Maybe the file you are trying to delete is read-only (Windows) >or you do not have the right permissions to write the file (Linux). >- Can you _read_ the file? >- Can you delete (or move) the file manually? > >If this is not the case and I do not know of any other reason why >it should not work, then the problem has indeed something to do >with permissions in tomcat.policy. The default policy file is pretty >strict, allowing you only to read properties. I would suggest that >you remove one of the permissions (e.g.: read permission for 'os.name') >and then try to read this property from your code. If this does not >succeed, you at least know that you are editing the correct part >of the policy file. Then it is a matter of adding the correct >pemissions. It seems like you have already done this, but it is the >only solution I can offer. > >Ronald Wildenberg > > >Panagiotis Konstantinidis wrote: > >> Thank you for your reply Ronald... I have just tried it doing a file.exists() and >it returns true... The only thing I can think of is that somehow Ineed to give >permission to Tomcat to allow file deletion but I do not know how... Any more suggestions? >> >> Panos >> >> 11/12/2001 10:28:51, Ronald Wildenberg <[EMAIL PROTECTED]> wrote: >> >> >Hi Panos, >> > >> >I do not think you can say that a file exists if you can see its >> >absolute path. A file has a path, whether it exists or not. You >> >should try >> >file.exists() >> >for checking on the existence of a file. >> > >> > >> >Ronald Wildenberg. >> > >> >=== >> >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 can only be attributed to human error" >> 2001 A Space Odyssey >> >> === >> 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 can only be attributed to human error" 2001 A Space Odyssey === 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
Off Topic: Unicode
Dear All, I want to output a particular mathematical operator to a file. This operator looks like the '=' sign but has one more '-', underneath the other two. The unicode number seems to be 2261. How can I 1. show this character as it is using system.out.println() 2. output this to a file. regards Jagan === 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: Urgent !!!!!!!! Please help me
Hi, Try the following. function verifydate() { if (document.form1.txtbox.value == "") then { document.form1.txtbox.focus(); return false; }else return true; } . talk to you later, Will -Original Message- From: ShriKant Vashishtha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 11:27 PM To: [EMAIL PROTECTED] Subject: Urgent Please help me Hi, My JSP contains the following things A text box and a GO button which fetches the result based on the criteria entered in textbox. The GO button has a validation for a blank search criteria and displayes alert message if we press GO without entering anything. But the problem is, if I hit on ENTER, it fetches me the result even if I haven't entered anything in the text box. It does not go through the validation which executes on pressing on GO button. Please help... -ShriKant === 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: Usage of jsp:include versus file include
Title: RE: Usage of jsp:include versus file include Yeah I noticed that. I had to resave the .JSP file that used the included files so it knew to recompile it, hence, it pulls in the included files again. That is kinda annoying. - J a m e s B. S w a r t Agere Systems - Colorado Design Centers Unix/Windows Systems Administrator, WAN, LAN, Desktop, Voice, Printers, Security Focal Point, & Local CIO Service Delivery Manager Contact VOICE: 720-494-2330 ¿ FAX: 720-494-2331 -Original Message- From: ShriKant Vashishtha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 8:55 PM To: [EMAIL PROTECTED] Subject: Re: Usage of jsp:include versus file include When do we actually need to use the jsp:include instead of file include. As I think in all possible scenerio we can use file include. The problem is I never changed the included file. It just contains the code for no caching and I never needed to change it. Then why does it work using jsp:include but does not work with file include. Thanks, -ShriKant A mailing list about Java Server Pages specification and reference wrote: > From: Jaime Barnett <[EMAIL PROTECTED]>@JAVA.SUN.COM on 12/12/2001 08:22 > AM MST > > Please respond to A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > cc: > Subject: Re: Usage of jsp:include versus file include > > What is happening is that <@% include file=""> is included at translation > time vs. is included at request. If the included > file changes , using <@% include file="">, then the files that use the > include need to be resaved. Hopes this helps. > Jaime > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of ShriKant Vashishtha > Sent: Wednesday, December 12, 2001 7:52 AM > To: [EMAIL PROTECTED] > Subject: Re: Usage of jsp:include versus file include > > I am sorry if it troubles but I am forced to repeat my query. I used to > think > that it is always better to use static include in the JSP instead of using > jsp:include. But now this problem bothers me. > > Please advice.. > -ShriKant > > A mailing list about Java Server Pages specification and reference wrote: > > > From: ShriKant Vashishtha <[EMAIL PROTECTED]>@JAVA.SUN.COM on > > 12/12/2001 03:43 PM > > > > Please respond to A mailing list about Java Server Pages specification > and > > reference <[EMAIL PROTECTED]> > > > > To: [EMAIL PROTECTED] > > cc: > > Subject: Usage of jsp:include versus file include > > > > Hi All. > > > > For caching I am using the following code and am putting in a common JSP > > which > > could be included in different JSPs. > > > > response.setHeader("Cache-Control","no-cache"); //HTTP 1.1, > > response.setHeader("Pragma","no-cache"); //HTTP 1.0, > > response.setDateHeader ("Expires", 0); //prevents caching at the proxy > > server > > > > If I use <%@ include page file="sample.jsp"%> > > the purpose does not get solved and caching of the pages occurs but when > I > > use > > jsp:include directive it does work properly. > > > > What is the difference and why is it happening... > > > > Thanks, > > -ShriKant > > > > > === > > 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
Re: Usage of jsp:include versus file include
Title: RE: Usage of jsp:include versus file include I think "file include" is an HTML command that gets processed by the browser as opposed to jsp:include that gets eventualy compiled into the servlet. Also check this scenario: (it's kind of simmilar to this problem) Let's say you have a java bean MyBean.class that implements MyBeanInterface.class (Lets say that interface containes all your SQL queries) Try to change one query and recompile interface and republish it back onto the server. Unless you recompile the implementing class, it will use the old version of the interface... Alex -Original Message-From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Swart, James (Jim) ** CTR **Sent: Thursday, December 13, 2001 1:32 PMTo: [EMAIL PROTECTED]Subject: Re: Usage of jsp:include versus file include Yeah I noticed that. I had to resave the .JSP file that used the included files so it knew to recompile it, hence, it pulls in the included files again. That is kinda annoying. - J a m e s B. S w a r t Agere Systems - Colorado Design Centers Unix/Windows Systems Administrator, WAN, LAN, Desktop, Voice, Printers, Security Focal Point, & Local CIO Service Delivery Manager Contact VOICE: 720-494-2330 ¿ FAX: 720-494-2331 -Original Message- From: ShriKant Vashishtha [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 8:55 PM To: [EMAIL PROTECTED] Subject: Re: Usage of jsp:include versus file include When do we actually need to use the jsp:include instead of file include. As I think in all possible scenerio we can use file include. The problem is I never changed the included file. It just contains the code for no caching and I never needed to change it. Then why does it work using jsp:include but does not work with file include. Thanks, -ShriKant A mailing list about Java Server Pages specification and reference wrote: > From: Jaime Barnett <[EMAIL PROTECTED]>@JAVA.SUN.COM on 12/12/2001 08:22 > AM MST > > Please respond to A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > cc: > Subject: Re: Usage of jsp:include versus file include > > What is happening is that <@% include file=""> is included at translation > time vs. is included at request. If the included > file changes , using <@% include file="">, then the files that use the > include need to be resaved. Hopes this helps. > Jaime > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of ShriKant Vashishtha > Sent: Wednesday, December 12, 2001 7:52 AM > To: [EMAIL PROTECTED] > Subject: Re: Usage of jsp:include versus file include > > I am sorry if it troubles but I am forced to repeat my query. I used to > think > that it is always better to use static include in the JSP instead of using > jsp:include. But now this problem bothers me. > > Please advice.. > -ShriKant > > A mailing list about Java Server Pages specification and reference wrote: > > > From: ShriKant Vashishtha <[EMAIL PROTECTED]>@JAVA.SUN.COM on > > 12/12/2001 03:43 PM > > > > Please respond to A mailing list about Java Server Pages specification > and > > reference <[EMAIL PROTECTED]> > > > > To: [EMAIL PROTECTED] > > cc: > > Subject: Usage of jsp:include versus file include > > > > Hi All. > > > > For caching I am using the following code and am putting in a common JSP > > which > > could be included in different JSPs. > > > > response.setHeader("Cache-Control","no-cache"); //HTTP 1.1, > > response.setHeader("Pragma","no-cache"); //HTTP 1.0, > > response.setDateHeader ("Expires", 0); //prevents caching at the proxy > > server > > > > If I use <%@ include page file="sample.jsp"%> > > the purpose does not get solved and caching of the pages occurs but when > I > > use > > jsp:include directive it does work properly. > > > > What is the difference and why is it happening... > > > > Thanks, > > -ShriKant > > > > > === > > 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 > > ===
Oracle's jDeveloper
Title: Oracle's jDeveloper For anyone doing Java, jdbc and jsp work in this environment: I'm trying to avoid all the fancy menu choices in jDeveloper and simply write a DBConn.java file and untitled.jsp file. My jsp file says <% DBConn dbcon = new DBConn(); out.println(dbcon.egStatement());%> And my DBConn.java file says: DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver() ); con = DriverManager.getConnection("xxx:1521:zzz", "id", "pw"); (among other things) But then I compile and run (using jDeveloper), it errors: "JSP Files must reside in the HTML root directory" I know the error message is pretty straight forward. What I don't know is why JSP files "MUST" reside there and if that setting can be changed somewhere. tia [EMAIL PROTECTED]
Re: Oracle's jDeveloper
Title: Oracle's jDeveloper It's not just Oracle Any modern tool would give you simmilar error. It all comes down to dirrectory structure that basicaly looks at two things: 1. Document root (html, jsp, etc..) and classpath (java classes, java beans, jar files etc...) I would say it would be very difficult for us, the developers if that structure wouldn't be in place Alex -Original Message-From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Charles WilliamsSent: Thursday, December 13, 2001 2:44 PMTo: [EMAIL PROTECTED]Subject: Oracle's jDeveloper For anyone doing Java, jdbc and jsp work in this environment: I'm trying to avoid all the fancy menu choices in jDeveloper and simply write a DBConn.java file and untitled.jsp file. My jsp file says <% DBConn dbcon = new DBConn(); out.println(dbcon.egStatement());%> And my DBConn.java file says: DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver() ); con = DriverManager.getConnection("xxx:1521:zzz", "id", "pw"); (among other things) But then I compile and run (using jDeveloper), it errors: "JSP Files must reside in the HTML root directory" I know the error message is pretty straight forward. What I don't know is why JSP files "MUST" reside there and if that setting can be changed somewhere. tia [EMAIL PROTECTED]
Re: Package
I got javax.sql.DataSource from j2sdkee1.3. If you don't use the whole J2EE functionalities you can just extract what you need from j2ee.jar. javax.naming stuff is available with jdk1.3. david -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Dinesh, S. Sent: Wednesday, December 12, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: Package Hi All, Does anyone know where the following is contained in? import javax.sql.DataSource; import javax.naming.InitialContext; import javax.naming.Context; import javax.naming.NamingException; I opened the DBTagLib using JBuilder and it seems that JBuilder cannot find the packages. I assume I'm missing something in my ClassPath. Thank you and regards, Dinesh, S. === 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: Package
Dinesh, The packages are in the JDBC 2.0 Standard Extension API which can be downloaded from here: http://java.sun.com/products/jdk/1.2/docs/guide/jdbc/ or for a more direct URL: http://java.sun.com/products/jdbc/download.html It is easier to download just the jdbc2_0-stdext.jar file than extracting it from another jar. Regards, Richard At 10:13 AM 12/13/2001 +0700, Dinesh, S. wrote: >Hi All, > >Does anyone know where the following is contained in? > >import javax.sql.DataSource; >import javax.naming.InitialContext; >import javax.naming.Context; >import javax.naming.NamingException; > >I opened the DBTagLib using JBuilder and it seems that JBuilder cannot find >the packages. I assume I'm missing something in my ClassPath. > >Thank you and regards, >Dinesh, S. > >=== >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: Off Topic: Unicode
On Thu, 13 Dec 2001, Jagan K Samuel wrote: > Dear All, > I want to output a particular mathematical operator to a > file. This operator looks like the '=' sign but has one more '-', > underneath the other two. The unicode number seems to be 2261. How can > I > 1. show this character as it is using system.out.println() > 2. output this to a file. > > regards > Jagan > "System.out.println("\u2261");" Should work. Incidentally, your question got me wondering if I could do Unicode from servlets, and view the results in normal browsers. I have a test servlet for Unicode now. You have to install the language packs for Greek, Hebrew, Japanese etc. This is easily done from Internet Explorer->View->Encoding->More->Hebrew. It will then prompt for the Windows 2000 disc and install the language fonts. After the language packs are installed through Internet Explorer, the servlet works in Opera 6 and Netscape 6 as well. Clearly this could be translated to JSP easily. Incidentally, you can do one extra language at a time if you set the charset to ISO-8859-1 or ISO-8859-7, etc depending of course on which language you want, and if the language fonts are on your computer. Michael Akerman import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class UnicodeServlet extends HttpServlet { public void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html; charset=UTF-8"); PrintWriter out = res.getWriter(); out.println(""); out.println(""); out.println(""); out.println(""); for(int i=0x0030; i<=0x00ff; i++) { if ( i % 16 == 0 ) out.println(""); out.print(""); out.write(i); } for(int i=0x0370; i<=0x03ff; i++) { if ( i % 16 == 0 ) out.println(""); out.print(""); out.write(i); } for(int i=0x3040; i<=0x30ff; i++) { if ( i % 16 == 0 ) out.println(""); out.print(""); out.write(i); } for(int i=0x0590; i<=0x05ff; i++) { if ( i % 16 == 0 ) out.println(""); out.print(""); out.write(i); } out.println(""); out.println(""); out.println(""); } } === 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
JSPs : concept of single-use token
Can someone explain the concept of single-use tokens? Any examples. By single-use tokens I mean something which prevents multiple submissions in the event when systems are slow and lets assume to press the "Finish" button many times.. Abhi _ Send and receive Hotmail on your mobile device: http://mobile.msn.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
date difference
Does someone have an example of how to calculate the date difference in java. For example I have these two dates date #1 [12/01/2001] date #2 [12/31/2002] How do I calculate the # of days apart from date #1 to date #2 Need some guidiance~ === 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 difference
This series of articles in JavaWorld helped me with a similar question http://www.javaworld.com/jw-12-2000/jw-1229-dates.html (*Chris*) - Original Message - From: "King Maurice" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 2:44 PM Subject: [JSP-INTEREST] date difference > Does someone have an example of how to calculate the date difference in java. > > For example I have these two dates > date #1 [12/01/2001] > date #2 [12/31/2002] > > How do I calculate the # of days apart from date #1 to date #2 > > Need some guidiance~ > > === > 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 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.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
Re: date difference
You can first parse the strings using the DateFormat.parse() method to get a Date object and then use the Date.getTime() method to return the # of milliseconds from the epoch for each date. Subtract the values returned by getTime(). Divide the result by (60 * 60 * 24 * 1000) = (8640) to get the # of days difference. Regards, Richard At 03:44 PM 12/13/2001 -0700, you wrote: >Does someone have an example of how to calculate the date difference in java. > >For example I have these two dates >date #1 [12/01/2001] >date #2 [12/31/2002] > >How do I calculate the # of days apart from date #1 to date #2 > >Need some guidiance~ > >=== >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 difference
Actually, this is probably the most useful: http://www.javaworld.com/javaworld/jw-03-2001/jw-0330-time.html (*Chris*) - Original Message - From: "Chris Pratt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 3:06 PM Subject: Re: [JSP-INTEREST] date difference > This series of articles in JavaWorld helped me with a similar question > http://www.javaworld.com/jw-12-2000/jw-1229-dates.html > (*Chris*) > > - Original Message - > From: "King Maurice" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, December 13, 2001 2:44 PM > Subject: [JSP-INTEREST] date difference > > > > Does someone have an example of how to calculate the date difference in > java. > > > > For example I have these two dates > > date #1 [12/01/2001] > > date #2 [12/31/2002] > > > > How do I calculate the # of days apart from date #1 to date #2 > > > > Need some guidiance~ > > > > > === > > 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 > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.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 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.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
Re: date difference
Is there any way to get the difference in year, month, day format? - Original Message - From: "Richard Yee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 4:18 PM Subject: Re: date difference > You can first parse the strings using the DateFormat.parse() method to get > a Date object and then use the Date.getTime() method to return the # of > milliseconds from the epoch for each date. > Subtract the values returned by getTime(). > Divide the result by (60 * 60 * 24 * 1000) = (8640) to get the # of > days difference. > > Regards, > > Richard > > > At 03:44 PM 12/13/2001 -0700, you wrote: > >Does someone have an example of how to calculate the date difference in java. > > > >For example I have these two dates > >date #1 [12/01/2001] > >date #2 [12/31/2002] > > > >How do I calculate the # of days apart from date #1 to date #2 > > > >Need some guidiance~ > > > >=== > >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: date difference
I would think that the results of such a calculation would not be very accurate since months and years have varying lengths. For instance, what would be the result of taking the difference of 11/30/2001 and 2/28/2001 ? is it 9 months or 9 months and two days? Regards, Richard At 04:28 PM 12/13/2001 -0700, you wrote: >Is there any way to get the difference in year, month, day format? > >- Original Message - >From: "Richard Yee" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Thursday, December 13, 2001 4:18 PM >Subject: Re: date difference > > > > You can first parse the strings using the DateFormat.parse() method to get > > a Date object and then use the Date.getTime() method to return the # of > > milliseconds from the epoch for each date. > > Subtract the values returned by getTime(). > > Divide the result by (60 * 60 * 24 * 1000) = (8640) to get the # of > > days difference. > > > > Regards, > > > > Richard > > > > > > At 03:44 PM 12/13/2001 -0700, you wrote: > > >Does someone have an example of how to calculate the date difference in >java. > > > > > >For example I have these two dates > > >date #1 [12/01/2001] > > >date #2 [12/31/2002] > > > > > >How do I calculate the # of days apart from date #1 to date #2 > > > > > >Need some guidiance~ > > > > > > >=== > > >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: date difference
Take a look at the javadocs on java.util.Date and java.util.Calendar. Chances are you'll also want to work with java.util.GregorianCalendar (the Gregorian calendar being the one the western world lives on). -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of syed huda Sent: Thursday, December 13, 2001 3:29 PM To: [EMAIL PROTECTED] Subject: Re: date difference Is there any way to get the difference in year, month, day format? - Original Message - From: "Richard Yee" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 4:18 PM Subject: Re: date difference > You can first parse the strings using the DateFormat.parse() method to get > a Date object and then use the Date.getTime() method to return the # of > milliseconds from the epoch for each date. > Subtract the values returned by getTime(). > Divide the result by (60 * 60 * 24 * 1000) = (8640) to get the # of > days difference. > > Regards, > > Richard > > > At 03:44 PM 12/13/2001 -0700, you wrote: > >Does someone have an example of how to calculate the date difference in java. > > > >For example I have these two dates > >date #1 [12/01/2001] > >date #2 [12/31/2002] > > > >How do I calculate the # of days apart from date #1 to date #2 > > > >Need some guidiance~ > > > >=== > >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
newbie: how tell html form where to find servlet
I posted earlier to ask how to pass data from a servlet to a jsp, and appreciate the help I received. My problem is more fundamental though. I am working with jswdk 1.0, and got a basic servlet to be invoked from an html form. I would like use a jsp to display a table that the servlet accesses, but despite several hours of putting a simple jsp into various directories and calling various paths from my html form, I consistently get HANDLER THREAD PROBLEM socket closed exception when the servlet engine cannot find the jsp. All the documentation I have describes Tomcat, which I manged to load successfully, but it's jswdk I am charged to work with. Also, my example jsp's that came with the jswdk do not work correctly, so I can't just try to reverse engineer how they work. The jsp directory structure in the "examples" directory does not mirror the one for servlets. I just want to make a servlet send data to a jsp and then have the jsp draw a page, repeated for a few separate servlets and jsp's in the same application. I've spent many hours simply trying to discern directory paths, and it is very frustrating. === 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
Newbie: Using session variables and creating cart interface.
I am new to this group and would appreciate any help. I need to modify my JSP to create a shopping cart interface. I have a form which contains: 1)Checkbox: Is checked if record ID is to be added to shopping cart; Checked value is record ID from the ID column. 2)Button: Submits form (or other method) to add ID to cart variable. 3)Variable: String variable that accepts record ID's. 4)Button: To go to shopping cart display page, to show cart contents in repeating table. Code snippets: CHECKBOX, CHECKED IF RECORD IS TO BE SENT TO CART "> ADD BUTTON: PRESS TO ADD CHECKED RECORDS TO CART COLLECTS ID'S FROM CHECKBOX TO BE SENT TO CART String school_varCheckbox = null;// Is null value the same as unchecked? if (request.getParameter ("checkboxID") !=null) {school_varCheckbox = (String)request.getParameter ("checkboxID") ;} GO TO CART What is the most preferable way to do this? === 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
wrinitng into a blob field in oracle
Hi , i need to write into a blob field in oracle from a servlet , but facing lot of priblems . please help me with some scriplet which does it thanks in advance sachin shetty __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.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
Multilingual in jsp's
Can any one suggest a location /information on how to use Multilinguals in jsp's other than embedding them with font Regards Sree Hari === 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: OnKeyPress
hope u dont know that jsp will serve HTML as its output, so its not that it works in html and doesn't wrk in JSP,probably umight have made mistake in generating html from jsp - Original Message - From: "Vibha Jindal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 02, 2001 2:06 PM Subject: OnKeyPress > Hi, > > I'm facing a problem in Netscape 4.7. > > Normally, in an HTML page, onkeypress event for a text-area would work... > But in a JSP, it's bahaviour is arbitrary. In most of the JSPs, it is not > working. In one JSP, it happened to work, but , when I put some java tags > around teh text area, it stopped working. OnChange, however, is working. > OnKeyPress and onKeyUp are not working. > Is this a known problem or am I missing something? > > Regards, > Vibha > > === > 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 --- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records.
Iplanet 6 Problem
Hello, I am facing problem with iplanet web server 6.0. The server stops working after some time having the message in the error log as "Error receiving connection (No process is on the other end of the pipe.)". I am not able to trace the reason of the problem. Could anyone help me on that. I also could not find any documentation wrt same. regards, Piyush. ==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