Faisal Farooqui

Greenhorn
+ Follow
since Jun 25, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Faisal Farooqui

hi guys!!
can any 1 of u help me? actually Im working on a web-site built at the free space provided by www.mycgiserver.com, I used HSQLDB(Hypersonic DB), when i tried at my own computer it worked, but when i uploaded it at mycgiserver its giving me error.
when i used fully URL of my DB, It showed the msg that "Connection is broken"
and when i used relative path to DB(:/~usedid/Dbname) it showed the msg that File Input/Output error.
guys its very very urgent. i hope you will try to help me.
thanks in advance
bye
FAF (Faisal Ahmed Farooqui)
IBM Certified Solution Developer(OOAD & SCJP)
Sun Certified Web Component Developer
<b> I m also new in servlets, I got these Exceptions</b>

A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot allocate servlet instance for path /examples/servlet/hello
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:406)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:219)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2251)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:984)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1074)
at java.lang.Thread.run(Thread.java:579)
Root Cause:
java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class hello with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:50)
at java.lang.Class.newInstance0(Class.java:284)
at java.lang.Class.newInstance(Class.java:249)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:825)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:387)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:219)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2251)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:984)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1074)
at java.lang.Thread.run(Thread.java:579)
20 years ago
sun.jdbc.odbc.JdbcOdbcDriver
is it included in JDK 1.3/ 1.4 (beta)? I got an error "class file not found". Would have i to download drivers for JDBC if so where can i find these drivers.
thanks every 1 for reply
===
FAF
hi
I'm new in JDBC can any 1 tell me how can i access data of ms access. pls write with sample code. my data base name is accounts. Thnx
===
FAF
if any constructor dont have any call to this()/super() (any constructor of its own class or super class) at line 1, then it will automatically call super() (no arg constructor).
Remember : ur super class must have no-arg constructor when u r not calling any contructor explicitly
===
FAF
2nd way to send a job to the printer:
Following is the discussion between me and William Brogden (Bill)
By Faisal Ahmed Farooqui (Faf) on Wednesday, July 11, 2001 - 02:46 pm: Edit
can any 1 pls tell me.
how can i send output to the printer using java.io classes
===
FAF
By William Brogden (Bill) on Wednesday, July 11, 2001 - 03:33 pm: Edit

If you just want to send a stream of characters to a printer, it would depend on how your operating system addresses the printer. On some systems you can open the printer like opening a file.
If you want to print a graphic page from a AWT or Swing application, look into the PrintJob class in the java.awt package.
By Faisal Ahmed Farooqui (Faf) on Wednesday, July 11, 2001 - 07:54 pm: Edit

thanks Mr. Bill
Im specifying following details of my printer and OS
OS : Windows 2000 server
Installed Printer : HP DeskJet
Specified printer name : HP
Port : LPT 1
can u tell me how can I use it as a file? I mean which location would I have to provide in constructors.
thanks again
===
FAF
By William Brogden (Bill) on Thursday, July 12, 2001 - 12:17 am: Edit

It has been a while since I have done this but I think you can open it as
FileOutputStream( "LPT1:");
By Faisal Ahmed Farooqui (Faf) on Thursday, July 12, 2001 - 08:27 am: Edit

I m very very thankful to u Mr. Bill
It's working perfectly
===
FAF
20 years ago
can any 1 pls tell me.
how can i send output to the printer using java.io classes
===
FAF
20 years ago
x=x++; ???
when u execute this statement u'll find no change in the value of (x), this is bcuz in this statement it will first execute (x=x) and then (x++). but there will be no change in the value of (x) bcuz final value of x is (x=x) that was assigned b4 (x++).
clear??? or need more explanation.......
===
FAF
use BufferedReader to make it fast.
I'll suggest u to read all the data in the file in the 1 time. and then perform sorting and then rewrite the whole file by writing the sorted data.
I think it should do
===
FAF
20 years ago
use BufferedReader to make it fast.
I'll suggest u to read all the data in the file in the 1 time. and then perform sorting and then rewrite the whole file by writing the sorted data.
I think it should do
===
FAF
20 years ago
class demo extends Thread {
public void run(){
for(int i=0;i<10;i++)
System.out.println(i);
}
}
class test{
public static void main(string arg[]){
demo dt = new demo();
dt.run();
System.out.println("main thread output");
}
}
select any 1

A) Code will give compilation error on line 10, since run can not be called directly.
B) Code will compile without error, but will not show any output.
C) Code will compile without errors, but will show output unsing current Thread only
D) Code will give compilation error on line 9.
====
Answer is C
Why???, any description pls.
I selected option A, if C is correct then why we call start() method, why dont directly run() method. is this call like any other method call, and it wont register it in Thread-sceduler?
-FAF