Re: Accessing self created packages in Tomcat3.3
Yaa you are right in assuming that Tomcat refrences all the WEB-INF\lib dorectories. You don't need to add those in classpath explicitly. -Original Message- From: Gare, Tref [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 12:42 PM To: [EMAIL PROTECTED] Subject: Re: Accessing self created packages in Tomcat3.3 I take your point Adrian, it's probably more a local system issue as we seem to be having a few of them. However I'm getting increasingly confused about "correct" usage of the classpath. I was running under the assumption that Tomcat would be referencing all the web-inf\lib directories automatically. I'd heard that it's not recomended to be adding every single reference into the system classpath.. apart from the fact that it would grow huge there's the portability issue. Have you any thoughts in this area? cheers Tref > -Original Message- > From: Adrian Janssen [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday,15 May 2002 5:03 > To: [EMAIL PROTECTED] > Subject: Re: Accessing self created packages in Tomcat3.3 > > if your problems are at compile time then I suspect that it has very > little > to do with TOMCAT, are you sure that the > TOMCAT_HOME\webapps\ourTest\WEB-INF\classes\com\ue\ueUtils directory is in > your classpath? try something like: > > javac -classpath > %classpath%;TOMCAT_HOME\webapps\ourTest\WEB-INF\classes\com\ue\ueUtils > someBean.java > > does that help? > > Cheers > > > -Original Message- > > From: Gare, Tref [SMTP:[EMAIL PROTECTED]] > > Sent: 15 May 2002 07:11 > > To: [EMAIL PROTECTED] > > Subject: Re: Accessing self created packages in Tomcat3.3 > > > > Thanks for the response. > > > > Unfortunately that's exactly what we've been trying and to date no > > success. > > Also Tomcat 3.3 doesn't have a TOMCAT_HOME\classes directory in it's > > native > > state. We seem to be having some very strange caching issues with > classes > > refusing to compile due to not recognising other classes within their > > package. We're using Forte CE which may have something to do with it, > but > > exactly what remains a mystery. > > > > Tref > > > > > -Original Message- > > > From: Bhushan_Bhangale [SMTP:[EMAIL PROTECTED]] > > > Sent: Wednesday,15 May 2002 2:21 > > > To: [EMAIL PROTECTED] > > > Subject: Re: Accessing self created packages in Tomcat3.3 > > > > > > I didn't understood your question fully as it is not clear. > > > > > > What I understood is that you have some classes which are generic and > > you > > > want to use them across the Web Apps deployed in tomcat. If what I > > > understood is right then put your this generic class structure under > > > TOMCAT_HOME/classes folder or make a jar file and put under > > > TOMCAT_HOME/lib. Restart Tomcat and it will work fine. > > > > > > -Original Message- > > > From: Gare, Tref [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, May 15, 2002 4:38 AM > > > To: [EMAIL PROTECTED] > > > Subject: Accessing self created packages in Tomcat3.3 > > > > > > > > > Hi all, > > > > > > Another question that is threatening my remaining follicles. > > > > > > We've created a bunch of javabeans for one app which are all working > > fine. > > > However we've decided that 4 of them should be made more generally > > > available > > > for other apps we're building. To that end I've created a package > > called > > > com.ue.ueUtils and altered each of the beans such that the are now > > > referencing that package. > > > > > > I've created the relevant folder structure ie > > > TOMCAT_HOME\webapps\ourTest\WEB-INF\classes\com\ue\ueUtils , and > placed > > > the > > > four beans in question in there, then attempted to recompile them. > > Three > > > of > > > them work fine but the fourth, which references 2 of the others in the > > > package, fails saying the package does not exist. > > > > > > The other beans in the original packages (com.ue.fai & > com.ue.servlets) > > > can't see the ueUtils package either. > > > > > > I've tried jarring the package and putting that jar in the lib folder > of > > > the > > > relevant app ie: TOMCAT_HOME\webapps\ourTest\WEB-INF\lib but this > hasn't > > > solved the problem either. > > > > > > The final resorts of reboots and restarts have failed to shift > anything. > > > > > > Any advice will be gratefully recieved, > > > > > > Thanks > > > > > > Tref > > > > > > > -- > ** > The Truworths e-mail facility may not be used for the distribution of > chain letters or offensive email. Truworths hereby distances itself > from and accepts no liability for 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. > > == > = > To unsubscrib
Re: Accessing self created packages in Tomcat3.3
Hi Tref, To be honest I don't often concern myself anymore with the nitty-gritty details of the classpath since it seems to be used for compilation more than anything else - in fact I don't think Tomcat uses it all. I use an IDE that I have pointed to the jar librararies I use and it obviously also knows my class output directory, when compiling it always manually specifies the classpath for the compile with a flag to javac (or in my case ojc.exe thew Oracle Java compiler), this will inlcuse all specified jar files and my class out put directory. In fact my system classpath (i just checked by typing echo %classpath%) is set to "." ha-ha! So if you do not have a decent IDE, then make a batch file that that runs javac for you specifying the classpth to use for that compile only - see my original mail for the syntax. Cheers Adrian PS: I assumed that you are on a wintel platform - apologies if I am wrong. but discussion is same, syntax might differ. > -Original Message- > From: Gare, Tref [SMTP:[EMAIL PROTECTED]] > Sent: 15 May 2002 09:12 > To: [EMAIL PROTECTED] > Subject: Re: Accessing self created packages in Tomcat3.3 > > I take your point Adrian, > > it's probably more a local system issue as we seem to be having a few of > them. However I'm getting increasingly confused about "correct" usage of > the classpath. I was running under the assumption that Tomcat would be > referencing all the web-inf\lib directories automatically. I'd heard that > it's not recomended to be adding every single reference into the system > classpath.. apart from the fact that it would grow huge there's the > portability issue. Have you any thoughts in this area? > > cheers > > Tref > > > -Original Message- > > From: Adrian Janssen [SMTP:[EMAIL PROTECTED]] > > Sent: Wednesday,15 May 2002 5:03 > > To: [EMAIL PROTECTED] > > Subject: Re: Accessing self created packages in Tomcat3.3 > > > > if your problems are at compile time then I suspect that it has very > > little > > to do with TOMCAT, are you sure that the > > TOMCAT_HOME\webapps\ourTest\WEB-INF\classes\com\ue\ueUtils directory is > in > > your classpath? try something like: > > > > javac -classpath > > %classpath%;TOMCAT_HOME\webapps\ourTest\WEB-INF\classes\com\ue\ueUtils > > someBean.java > > > > does that help? > > > > Cheers -- ** The Truworths e-mail facility may not be used for the distribution of chain letters or offensive email. Truworths hereby distances itself from and accepts no liability for 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. === 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
problems with JSP in iPlanet
Hello everyone, We have a little problem to deploy legacy JSPs located in any folder in our box server (SPARC). - iPlanet 6.0 WebServer Sp2 - Solaris 8 - JSDK 1.3.1 We have a Server Manager called 'web2' and N Virtual Server Classes (default + our custom VServers - one for each portal site). Problem: We want to share our JSP & Servlets among all our portal sites (VS Classes), for instance we want to use a User Register Web Service among everyone. we configure our servlets like a legacy servlets option and it works fine but when we try to access to a JSP page we have a compilation error returned by jasper: FileNotFoundException although the path seems to be correct it is not where iPlanet goes to get the JSP page. it seems that iPLanet is getting the Default Virtual Server docroot. is it an iPlanet bug? is it fixed? are we needing extra configuration settings?. In summary, we need to use the Virtual Server Classes docroot (no default) 'cose we need to separate our JSP pages location among our portal sites. For example: We have two portals called 'portal1' and 'portal2' our docroots are: /www/portal1 and /www/portal2 and the default is /www our JSP are located in /www/jsp and inside they are separated by portal folders, it is /jsp/portal1 and /jsp/portal2 In addition, we have a symbolic link inside our /www/portal1/jsp -> /www/jsp/portal1 and the same for portal2. That's not work if we try to access to our JSP from portal1 or portal2. Thanks 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
date service
Hi guys, Hope this helps to solve many problems using dates. Expect your esteemed suggestions and comments for my improvement. i could not send more than 100 lines. so i am sending the file as 2 parts. import java.util.Date; import java.util.Calendar; import java.text.SimpleDateFormat; public class DateService { public final static SimpleDateFormat dateFormatter = new SimpleDateFormat("-M-d"); public final static SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm"); public final static SimpleDateFormat dateTimeFormatter = new SimpleDateFormat("-M-d HH:mm"); public static Date addDays(Date date, int days){ Calendar cal = Calendar.getInstance();cal.setTime(date);cal.add(cal.DATE, days);return cal.getTime(); } public static Date addMonths(Date date, int months){ Calendar cal = Calendar.getInstance();cal.setTime(date); cal.add(cal.MONTH, months); return cal.getTime(); } public static Date addYears(Date date, int years){ Calendar cal = Calendar.getInstance();cal.setTime(date);cal.add(cal.YEAR, years); return cal.getTime(); } public static Date convertFromSqlDate(java.sql.Date date){ return new Date(date.getTime()); } public static java.sql.Date convertToSqlDate(Date date){ if (date == null) return null; return new java.sql.Date(date.getTime()); } public static String format(Date date, String simpleFormat) throws InvalidDateException{ try{ return new SimpleDateFormat(simpleFormat).format(date); } catch (Exception e){ } } public final static Date getCurrentTime() { return Calendar.getInstance().getTime(); } public static Date getDate(int yy, int mm, int dd) throws InvalidDateException{ if (yy < 100) yy += 1900; try { Calendar cal = Calendar.getInstance();cal.clear();cal.set(Calendar.DATE, dd); cal.set(Calendar.MONTH, mm - 1);cal.set(Calendar.YEAR, yy); return cal.getTime(); }catch (Exception e){ StringBuffer msg = new StringBuffer(10); msg.append(yy);msg.append('/');msg.append(mm);msg.append('/');msg.append(dd) ; } } public static Date getDate(String date) throws InvalidDateException { try { return dateFormatter.parse(date); } catch (java.text.ParseException pe) { throw new InvalidDateException(pe.getMessage(),pe); } } public static Date getDate(String yy, String mm, String dd) throws InvalidDateException{ try { int y = Integer.parseInt(yy); int m = Integer.parseInt(mm); int d = Integer.parseInt(dd); return getDate(y,m,d); } catch (NumberFormatException e) { StringBuffer msg = new StringBuffer(10); msg.append(yy);msg.append('/');msg.append(mm);msg.append('/');msg.append(dd) ; } } public static int getDay(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);return cal.get(Calendar.DATE); } catch (Exception e) {} } public static int getHour(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance(); cal.clear(); cal.setTime(date);return cal.get(Calendar.HOUR_OF_DAY); } catch (Exception e) { } } public static int getMinutes(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);return cal.get(Calendar.MINUTE); } catch (Exception e) { } } public static int getMonth(Date date) throws InvalidDateException { try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);return cal.get(Calendar.MONTH) + 1; } catch (Exception e){} } 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
date service contd
public final static java.util.Date getTime(int hours, int min, int sec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); java.util.Date today = cal.getTime(); int year = getYear(today); int month = getMonth(today) - 1; int date = getDay(today); cal.clear(); cal.set(year, month, date, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':'+ sec; } } } public final static java.util.Date getTime(int year,int month,int day,int hours,int min,intsec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year, month-1, day, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':' + sec; } } } public static String getXML(Date date) throws InvalidDateException{ return getXML(date, "Year", "Month", "Day"); } public static String getXML(Date date, String yearTag, String monthTag, String dayTag) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);StringBuffer buffer = new StringBuffer(41); buffer.append("<"); buffer.append(yearTag);buffer.append(">"); buffer.append(cal.get(cal.YEAR));buffer.append("");buffer.append("<");buffer.append(monthTag); buffer.append(">");buffer.append(cal.get(cal.MONTH) + 1);buffer.append("");buffer.append("<");buffer.append( dayTag); buffer.append(">");buffer.append(cal.get(cal.DATE));buffer.append("");return buffer.toString(); } catch (Exception e) {} } public static int getYear(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);int yy = cal.get(Calendar.YEAR); if (yy < 100) yy += 1900; return yy; } catch (Exception e) { } } public static boolean isSameDay(Date date1, Date date2) { if ( date1 == null && date2 == null ){ return true; } if ( date1 == null || date2 == null ){ return false; } Calendar cal1 = Calendar.getInstance(); cal1.setTime(date1); Calendar cal2 = Calendar.getInstance(); cal2.setTime(date2); return (cal1.get(Calendar.DAY_OF_MONTH) == cal2.get(Calendar.DAY_OF_MONTH) && cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH) && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)); } public static Date parse( String date, String simpleFormat ) throws InvalidDateException { try { return new SimpleDateFormat(simpleFormat).parse(date); } catch ( Exception e ) { } } public static Date toStandardDate(String date) throws InvalidDateException{ try{ return dateFormatter.parse(date); } catch (Exception e){} } public static Date toStandardDateTime(String date) throws InvalidDateException{ try{ return dateTimeFormatter.parse(date); } catch (Exception e){ } } public static String toStandardString(Date date) throws InvalidDateException{ try{ return dateFormatter.format(date); } catch (Exception e){} } public static String toStandardTimeString(Date date) throws InvalidDateException{ try{ return dateTimeFormatter.format(date); } catch (Exception e){} } } 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
Amazing script
hai, try this and give an explanation why this happens (JAVASCRIPT) var a,b,c,d,e a=1.1 b=1.1 c=1.1 d=a+b(answer is 2.2) e=a+b+c(answer is 3.32) alert(e); ==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: Amazing script
That's normal to happen with floating point numbers. Nothing amazing to me... to understand it: study how floating point numbers work. I'm sure if you make a web search on the matter you should find something explaining it. []'s, Rodrigo. > -Original Message- > From: subbu [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 01, 2002 9:58 AM > To: [EMAIL PROTECTED] > Subject: Amazing script > > > hai, > try this and give an explanation why this happens > (JAVASCRIPT) > > var a,b,c,d,e > a=1.1 > b=1.1 > c=1.1 > d=a+b(answer is 2.2) > > e=a+b+c(answer is 3.32) > alert(e); > > == > 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: Amazing script
Subbu It's because floating point numbers are only completely accurate for numbers that are powers of 2 (e.g 1,2,4,8 going up,0.5,0.25,0.125 going down etc) and numbers that are combinations of these, e.g. 3 (2 + 1), 1.75 (1 + 0.5 + 0.25) etc. 1.1 isn't one of these numbers, so internally it will be 1.10+a bit extra. Add enough 1.1's together and the little bits add up until they are significant. Having said that, it's odd that the last digit is a 2, i.e. if x is the little bit, then x + x + x rounds to 2 means x >= 0.5, so x + x might be expected to round to 1. regards Mark -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of subbu Sent: 01 May 2002 13:58 To: [EMAIL PROTECTED] Subject: Amazing script hai, try this and give an explanation why this happens (JAVASCRIPT) var a,b,c,d,e a=1.1 b=1.1 c=1.1 d=a+b(answer is 2.2) e=a+b+c(answer is 3.32) alert(e); = 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 * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * === 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: download popup
Okay, 1. Open Windows Exploer 2. Select Options 3. Select tab for "File Types" 4. Find Entry for "Microsoft Excel Worksheet" from the registered file types 5. Select "Edit" 6. Select "Open" from Actions 7. Check "Confirm Open After Download". Lemme know the results -pkk > -- > From: subbu[SMTP:[EMAIL PROTECTED]] > Reply To: A mailing list about Java Server Pages specification and > reference > Sent: Tuesday, May 14, 2002 6:34 PM > To: [EMAIL PROTECTED] > Subject: Re: download popup > > Hai,iam pointing the URL to an excelfile (test.xls)(NOTE : iam usins > tomcat > 4.01.) > > Url is like this > > http://localhost/iontest/test.xls > > > > but iam not getiing the download popup .the content is displayed in plain > text in the browser itself. > Can some body help me out in this... > > regads > s.subramanian. > > > > > - Original Message - > From: "Bhushan_Bhangale" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, May 14, 2002 5:32 PM > Subject: Re: download popup > > > It automatically comes when to show the requested mime type, browser needs > a > third party plugin to show. > > -Original Message- > From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 14, 2002 5:29 PM > To: [EMAIL PROTECTED] > Subject: download popup > > > Hi all, > > when you start to download from websites you see a popup window asking > you > to open from the same location / save it to disk. > can anybody let me know how to do this. > > 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 > > == > = > 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: download popup-SOLVED
Thank U.Bhushan.After setting MIME type in my tomcat it wors fine... ThankU for all for your responses. - Original Message - From: "Bhushan_Bhangale" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 8:53 AM Subject: Re: download popup I think the Tomcat mime type doesn't have a setting for xls type. If not present specify it and restart. -Original Message- From: subbu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 6:34 PM To: [EMAIL PROTECTED] Subject: Re: download popup Hai,iam pointing the URL to an excelfile (test.xls)(NOTE : iam usins tomcat 4.01.) Url is like this http://localhost/iontest/test.xls but iam not getiing the download popup .the content is displayed in plain text in the browser itself. Can some body help me out in this... regads s.subramanian. - Original Message - From: "Bhushan_Bhangale" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 14, 2002 5:32 PM Subject: Re: download popup It automatically comes when to show the requested mime type, browser needs a third party plugin to show. -Original Message- From: Kesav, Ramesh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 5:29 PM To: [EMAIL PROTECTED] Subject: download popup Hi all, when you start to download from websites you see a popup window asking you to open from the same location / save it to disk. can anybody let me know how to do this. 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 === 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
DBtaglib quotes problem ?
Hi, I am using DBtaglib from Apache, but whenever I try to display data that has a single quote or double quotes , the display of data in the other fields of the row is a massy : could you please help. thanks _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx === 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 (javascript :var from main to popup window)
I have main.jsp window that has a link : history And I want to popup a window history.jsp when clicking in the link. How to do it ? How to pass the variable name to history.jsp. thanks, your help is appreciated. _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.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 (javascript :var from main to popup window)
The most simple way is by defining a target in the href tag like this:- history Other way is by using javascript window.open method: history -Original Message- From: sufi malak [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 1:05 AM To: [EMAIL PROTECTED] Subject: off topic (javascript :var from main to popup window) I have main.jsp window that has a link : history And I want to popup a window history.jsp when clicking in the link. How to do it ? How to pass the variable name to history.jsp. thanks, your help is appreciated. _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.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
how to make login.jsp default?
my path is //vaishali/*.jsp i have to many jsp and html files in my folder when i give url /../vaishali/ it gives me list of all files well i know updating server.xml i can bypass it but i want that when i give this path the login.jsp should execute which is there in vaishali. how to do? ThankX Vaishali RIL Ahm'd === 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 to make login.jsp default?
in ur context, in the web.xml add this line login.jsp Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -Original Message- From: [Vaishali S. Pandya] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:29 PM To: [EMAIL PROTECTED] Subject: how to make login.jsp default? my path is //vaishali/*.jsp i have to many jsp and html files in my folder when i give url /../vaishali/ it gives me list of all files well i know updating server.xml i can bypass it but i want that when i give this path the login.jsp should execute which is there in vaishali. how to do? ThankX Vaishali RIL Ahm'd === 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: how to make login.jsp default?
Define the welcome file list in your web.xml of the Web App whose context name is vaishali. In the welcome file list give the file as login.jsp. -Original Message- From: [Vaishali S. Pandya] [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 9:59 AM To: [EMAIL PROTECTED] Subject: how to make login.jsp default? my path is //vaishali/*.jsp i have to many jsp and html files in my folder when i give url /../vaishali/ it gives me list of all files well i know updating server.xml i can bypass it but i want that when i give this path the login.jsp should execute which is there in vaishali. how to do? ThankX Vaishali RIL Ahm'd === 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: how to make login.jsp default?
Thank you all it's working Vaishali RIL Ahm'd Vikramjit Singh cc: Sent by: A Subject: Re: how to make login.jsp default? mailing list about Java Server Pages specification and reference 05/16/02 10:16 AM Please respond to A mailing list about Java Server Pages specification and reference in ur context, in the web.xml add this line login.jsp Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -Original Message- From: [Vaishali S. Pandya] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 9:29 PM To: [EMAIL PROTECTED] Subject: how to make login.jsp default? my path is //vaishali/*.jsp i have to many jsp and html files in my folder when i give url /../vaishali/ it gives me list of all files well i know updating server.xml i can bypass it but i want that when i give this path the login.jsp should execute which is there in vaishali. how to do? ThankX Vaishali RIL Ahm'd === 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
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
I think you need to specify the full virtual path of errorpage.jsp while defining the errorPage attribute in main.jsp -Original Message- From: Gading [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: 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 ==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 service contd
hi, i tried to compile the program.. but iam getting the following error.. D:\TestJavaPrograms\DateService.java:47: cannot resolve symbol symbol : class InvalidDateException location: class DateService public static String format(Date date, String simpleFormat) throws InvalidDateException ^ 1 error thanks & regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: "Kesav, Ramesh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 4:39 PM Subject: date service contd public final static java.util.Date getTime(int hours, int min, int sec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); java.util.Date today = cal.getTime(); int year = getYear(today); int month = getMonth(today) - 1; int date = getDay(today); cal.clear(); cal.set(year, month, date, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':'+ sec; } } } public final static java.util.Date getTime(int year,int month,int day,int hours,int min,intsec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year, month-1, day, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':' + sec; } } } public static String getXML(Date date) throws InvalidDateException{ return getXML(date, "Year", "Month", "Day"); } public static String getXML(Date date, String yearTag, String monthTag, String dayTag) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);StringBuffer buffer = new StringBuffer(41); buffer.append("<"); buffer.append(yearTag);buffer.append(">"); buffer.append(cal.get(cal.YEAR));buffer.append("");buffer.append("<");buffer.append(monthTag); buffer.append(">");buffer.append(cal.get(cal.MONTH) + 1);buffer.append("");buffer.append("<");buffer.append( dayTag); buffer.append(">");buffer.append(cal.get(cal.DATE));buffer.append("");return buffer.toString(); } catch (Exception e) {} } public static int getYear(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);int yy = cal.get(Calendar.YEAR); if (yy < 100) yy += 1900; return yy; } catch (Exception e) { } } public static boolean isSameDay(Date date1, Date date2) { if ( date1 == null && date2 == null ){ return true; } if ( date1 == null || date2 == null ){ return false; } Calendar cal1 = Calendar.getInstance(); cal1.setTime(date1); Calendar cal2 = Calendar.getInstance(); cal2.setTime(date2); return (cal1.get(Calendar.DAY_OF_MONTH) == cal2.get(Calendar.DAY_OF_MONTH) && cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH) && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)); } public static Date parse( String date, String simpleFormat ) throws InvalidDateException { try { return new SimpleDateFormat(simpleFormat).parse(date); } catch ( Exception e ) { } } public static Date toStandardDate(String date) throws InvalidDateException{ try{ return dateFormatter.parse(date); } catch (Exception e){} } public static Date toStandardDateTime(String date) throws InvalidDateException{ try{ return dateTimeFormatter.parse(date); } catch (Exception e){ } } public static String toStandardString(Date date) throws InvalidDateException{ try{ return dateFormatter.format(date); } catch (Exception e){} } public static String toStandardTimeString(Date date) throws InvalidDateException{ try{ return dateTimeFormatter.format(date); } catch (Exception e){} } } 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.j
Re: date service contd
Hi, you need to create a class InvalidateException that extends from Exception with some constructors. > -Original Message- > From: vijay [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, May 16, 2002 11:14 AM > To: [EMAIL PROTECTED] > Subject: Re: date service contd > > hi, > > i tried to compile the program.. but iam getting the following error.. > > D:\TestJavaPrograms\DateService.java:47: cannot resolve symbol > symbol : class InvalidDateException > location: class DateService > public static String format(Date date, String simpleFormat) throws > InvalidDateException > > ^ > 1 error > > thanks & regards > vijayanand.R > > (),,,() >( (. .) .-''-. > (o ) ) ('o' ) > =(,,)=(,,)=(,,)==(,,)= > - Original Message - > From: "Kesav, Ramesh" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, May 15, 2002 4:39 PM > Subject: date service contd > > > public final static java.util.Date getTime(int hours, int min, int sec) > throws InvalidDateException { > try { > Calendar cal = Calendar.getInstance(); java.util.Date today = > cal.getTime(); > int year = getYear(today); int month = getMonth(today) - 1; > int date = getDay(today); cal.clear(); > cal.set(year, month, date, hours, min, sec); > return cal.getTime(); > } catch (Exception e) { > if (e instanceof InvalidDateException) > throw (InvalidDateException) e; > else { > String input = "" + hours + ':' + min + ':'+ sec; > } > } > } > public final static java.util.Date getTime(int year,int month,int day,int > hours,int min,intsec) > throws InvalidDateException { > try { > Calendar cal = Calendar.getInstance(); cal.clear(); > cal.set(year, month-1, day, hours, min, sec); return > cal.getTime(); > } catch (Exception e) { > if (e instanceof InvalidDateException) > throw (InvalidDateException) e; > else { > String input = "" + hours + ':' + min + ':' + sec; > } > } > > } > public static String getXML(Date date) throws InvalidDateException{ > return getXML(date, "Year", "Month", "Day"); > } > public static String getXML(Date date, String yearTag, String monthTag, > String dayTag) throws InvalidDateException{ > try { > Calendar cal = Calendar.getInstance();cal.clear(); > cal.setTime(date);StringBuffer buffer = new > StringBuffer(41); > buffer.append("<"); > buffer.append(yearTag);buffer.append(">"); > > buffer.append(cal.get(cal.YEAR));buffer.append(" ); > > buffer.append(">");buffer.append("<");buffer.append(monthTag); > buffer.append(">");buffer.append(cal.get(cal.MONTH) + > 1);buffer.append(" > buffer.append(monthTag);buffer.append(">");buffer.append("<");buffer.appen > d( > dayTag); > > buffer.append(">");buffer.append(cal.get(cal.DATE));buffer.append(" buffer.append(dayTag);buffer.append(">");return > buffer.toString(); > } catch (Exception e) {} > } > public static int getYear(Date date) throws InvalidDateException{ > try { > Calendar cal = Calendar.getInstance();cal.clear(); > cal.setTime(date);int yy = cal.get(Calendar.YEAR); > if (yy < 100) > yy += 1900; > return yy; > } catch (Exception e) { } > } > public static boolean isSameDay(Date date1, Date date2) { > if ( date1 == null && date2 == null ){ > return true; > } > if ( date1 == null || date2 == null ){ > return false; > } > Calendar cal1 = Calendar.getInstance(); cal1.setTime(date1); > Calendar cal2 = Calendar.getInstance(); cal2.setTime(date2); > return (cal1.get(Calendar.DAY_OF_MONTH) == > cal2.get(Calendar.DAY_OF_MONTH) > && cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH) > && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)); > } >public static Date parse( String date, String simpleFormat ) throws > InvalidDateException >{ > try > { > return new SimpleDateFormat(simpleFormat).parse(date); > } > catch ( Exception e ) > { } >} > public static Date toStandardDate(String date) throws > InvalidDateException{ > try{ > return dateFormatter.parse(date); > } catch (Exception e){} > } > public static Date toStandardDateTime(String date) throws > InvalidDateException{ > try{ > return dateTimeFormatter.parse(date); > } catch (Exception e){ } > } > public static String toStandardString(Date date) throws > InvalidDateException{ > try{ > return dateFormatter.format(date); > } catch (Exception e){} > } > public static String toStandardTimeString(Date date) throws > InvalidDateException{ > try{ >
Finding number of days between two dates - offtopic
Can anyone say how to find the number of days between two dates .. Thanks in advance Ravi kumar vtr èº{.nÇ+·¦j)m¢X¬¶Ç«¾6¯j˧r°Ø[¡Ü¬è}òR<SLZ+v(²Ù[h+-±êï«Ú²éÜ¢l"¶èw+´ ÔÄDD I4¨êÞëÚÑ@BÊ'%#ÿIêïëlq©Ûyú.ÖÛiÿö«r¯zÈÚ½«.Ê&þ;){^ë-Ù¥ÛiÿøÚ½«.Ê&þèvç-³øì§÷Úªfm§ÿðì¥êÚÚ(® óþ;)þ;)}ª£²m¶ÿÃ#êîr¿}ª¿w^Æ;)Ûiÿü0Â;){"uêÜ¢
Re: date service contd
Vijay, There is nothing like InvalidDateException in Java. Kesav might have created his own exception. You need to define that or just remove it from the code. -Original Message- From: vijay [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 11:14 AM To: [EMAIL PROTECTED] Subject: Re: date service contd hi, i tried to compile the program.. but iam getting the following error.. D:\TestJavaPrograms\DateService.java:47: cannot resolve symbol symbol : class InvalidDateException location: class DateService public static String format(Date date, String simpleFormat) throws InvalidDateException ^ 1 error thanks & regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: "Kesav, Ramesh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 4:39 PM Subject: date service contd public final static java.util.Date getTime(int hours, int min, int sec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); java.util.Date today = cal.getTime(); int year = getYear(today); int month = getMonth(today) - 1; int date = getDay(today); cal.clear(); cal.set(year, month, date, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':'+ sec; } } } public final static java.util.Date getTime(int year,int month,int day,int hours,int min,intsec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year, month-1, day, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':' + sec; } } } public static String getXML(Date date) throws InvalidDateException{ return getXML(date, "Year", "Month", "Day"); } public static String getXML(Date date, String yearTag, String monthTag, String dayTag) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);StringBuffer buffer = new StringBuffer(41); buffer.append("<"); buffer.append(yearTag);buffer.append(">"); buffer.append(cal.get(cal.YEAR));buffer.append("");buffer.append("<");buffer.append(monthTag); buffer.append(">");buffer.append(cal.get(cal.MONTH) + 1);buffer.append("");buffer.append("<");buffer.append( dayTag); buffer.append(">");buffer.append(cal.get(cal.DATE));buffer.append("");return buffer.toString(); } catch (Exception e) {} } public static int getYear(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);int yy = cal.get(Calendar.YEAR); if (yy < 100) yy += 1900; return yy; } catch (Exception e) { } } public static boolean isSameDay(Date date1, Date date2) { if ( date1 == null && date2 == null ){ return true; } if ( date1 == null || date2 == null ){ return false; } Calendar cal1 = Calendar.getInstance(); cal1.setTime(date1); Calendar cal2 = Calendar.getInstance(); cal2.setTime(date2); return (cal1.get(Calendar.DAY_OF_MONTH) == cal2.get(Calendar.DAY_OF_MONTH) && cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH) && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)); } public static Date parse( String date, String simpleFormat ) throws InvalidDateException { try { return new SimpleDateFormat(simpleFormat).parse(date); } catch ( Exception e ) { } } public static Date toStandardDate(String date) throws InvalidDateException{ try{ return dateFormatter.parse(date); } catch (Exception e){} } public static Date toStandardDateTime(String date) throws InvalidDateException{ try{ return dateTimeFormatter.parse(date); } catch (Exception e){ } } public static String toStandardString(Date date) throws InvalidDateException{ try{ return dateFormatter.format(date); } catch (Exception e){} } public static String toStandardTimeString(Date date) throws InvalidDateException{ try{ return dateTimeFormatter.format(date); } catch (Exception e){} } } Regards Ramesh Kesavanarayanan [EMAIL PROTECTED] === To unsubscribe: mailto [EMAIL PROTECTED] with bod
Re: date service contd
ok thanks bhusan, iam trying that... thanks & regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: "Bhushan_Bhangale" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 16, 2002 11:37 AM Subject: Re: date service contd Vijay, There is nothing like InvalidDateException in Java. Kesav might have created his own exception. You need to define that or just remove it from the code. -Original Message- From: vijay [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002 11:14 AM To: [EMAIL PROTECTED] Subject: Re: date service contd hi, i tried to compile the program.. but iam getting the following error.. D:\TestJavaPrograms\DateService.java:47: cannot resolve symbol symbol : class InvalidDateException location: class DateService public static String format(Date date, String simpleFormat) throws InvalidDateException ^ 1 error thanks & regards vijayanand.R (),,,() ( (. .) .-''-. (o ) ) ('o' ) =(,,)=(,,)=(,,)==(,,)= - Original Message - From: "Kesav, Ramesh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 15, 2002 4:39 PM Subject: date service contd public final static java.util.Date getTime(int hours, int min, int sec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); java.util.Date today = cal.getTime(); int year = getYear(today); int month = getMonth(today) - 1; int date = getDay(today); cal.clear(); cal.set(year, month, date, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':'+ sec; } } } public final static java.util.Date getTime(int year,int month,int day,int hours,int min,intsec) throws InvalidDateException { try { Calendar cal = Calendar.getInstance(); cal.clear(); cal.set(year, month-1, day, hours, min, sec); return cal.getTime(); } catch (Exception e) { if (e instanceof InvalidDateException) throw (InvalidDateException) e; else { String input = "" + hours + ':' + min + ':' + sec; } } } public static String getXML(Date date) throws InvalidDateException{ return getXML(date, "Year", "Month", "Day"); } public static String getXML(Date date, String yearTag, String monthTag, String dayTag) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);StringBuffer buffer = new StringBuffer(41); buffer.append("<"); buffer.append(yearTag);buffer.append(">"); buffer.append(cal.get(cal.YEAR));buffer.append("");buffer.append("<");buffer.append(monthTag); buffer.append(">");buffer.append(cal.get(cal.MONTH) + 1);buffer.append("");buffer.append("<");buffer.append( dayTag); buffer.append(">");buffer.append(cal.get(cal.DATE));buffer.append("");return buffer.toString(); } catch (Exception e) {} } public static int getYear(Date date) throws InvalidDateException{ try { Calendar cal = Calendar.getInstance();cal.clear(); cal.setTime(date);int yy = cal.get(Calendar.YEAR); if (yy < 100) yy += 1900; return yy; } catch (Exception e) { } } public static boolean isSameDay(Date date1, Date date2) { if ( date1 == null && date2 == null ){ return true; } if ( date1 == null || date2 == null ){ return false; } Calendar cal1 = Calendar.getInstance(); cal1.setTime(date1); Calendar cal2 = Calendar.getInstance(); cal2.setTime(date2); return (cal1.get(Calendar.DAY_OF_MONTH) == cal2.get(Calendar.DAY_OF_MONTH) && cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH) && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR)); } public static Date parse( String date, String simpleFormat ) throws InvalidDateException { try { return new SimpleDateFormat(simpleFormat).parse(date); } catch ( Exception e ) { } } public static Date toStandardDate(String date) throws InvalidDateException{ try{ return dateFormatter.parse(date); } catch (Exception e){} } public static Date toStandardDateTime(String date) throws InvalidDateException{ try{ return dateTimeFormatter.parse(date); } catch (Exception e){ } } public static String toStandardString(Date date) throws InvalidDateException{ try{ return dateFormatter.format(date); } catch (Exception e){} } public static String toStandardTi
[ANNOUNCE] Commercial Support for Apache Jakarta projects
For more information see http://www.multitask.com.au/default.html?page=mtSOS "Open source software continues to expand, finding its way into corporate developer use and becoming the underlying foundation of commercial software. We expect this to continue, and organizations must establish specific policies to control how open source is utilized." Source: MetaGroup Feb 2002 Our clients have requested ongoing support for various elements of Open Source projects for which we have been providing support on an ad-hoc basis for some time. In response to this demand we have instituted a formal support program for corporate clients and individual developers looking to adopt these tools within their Java environments and development projects. Join up now and take advantage of this initiative! Public access to the knowledge base and resources are available from http://sos.multitask.com.au We are providing support services to clients in a variety of Open Source projects including various elements of the Apache Group's 'Jakarta' project: Struts Ant Tomcat Latka Maven Log4J We now provide telephone and on-line web based support and provide access to a knowledgebase of information and downloads in relation to these projects. SOS Support is provided in relation to the following areas: Getting Started 'How to' support for specific issues Configuration Deployment Integration with existing applications Code Problems For more information see http://www.multitask.com.au/default.html?page=mtSOS -- dIon Gillard, Multitask Consulting Work: http://www.multitask.com.au Developers: http://adslgateway.multitask.com.au/developers ==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