Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Surya Bahadur

Ranch Hand
+ Follow
since Sep 28, 2000
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 Surya Bahadur

Hi Rob
Thanks a lot for the input it was really useful,but i think i need to indeed write some parser.Let's see how it works out.
Surya
18 years ago
Hi
Assume that i have two variables

int x1 = 5
int x2 = 10;
and i want to get the result of x1+x2 and store the value in one more int variable x3.So basically i would have
int x3 = x1+x2;
But the problem is the equation x1+x2 or x1*x2 or x1/x2 etc is known to the program only at run time that is the user enters that input.
How do i do this in java like change the equation of x3 based on the user input.Any kind of help would be greatly appreciated.Thanks.
Surya
18 years ago
Hi Bosun
Its not my program which is setting the status code,say my program just calls the method on some object which sets this status and there is no Get method provided on that object to get the status.The only way for me is to use the Response object,then how do i get the status.
Surya
18 years ago
Hi
The Java API provides the methods to set the status on the HttpServletResponse object.
res.setStatus(res.SC_NOT_FOUND)
res.sendError(res.SC_NOT_FOUND)
But my question is how do i get the status which i have set in some part of the code in the later sections of the code.
Say if the status is set based on some condition using an if statement like
if(something){
res.setStatus(res.SC_NOT_FOUND)
}else{
res.setStatus(res.SC_CONTINUE)
}
Say based on the status code from the response object the program behaviour changes
how to get the status which was set in the earlier part of the program because JavaAPI doesn't seem to provide a method to get the status.Please let me know how to do this....
Surya
18 years ago
Hi
Too Many mistakes
If you want to use thin driver the Jdbc Url should be of the form
jdbc racle:thin:@machineName:1521:sid
In the class.forName statement try putting
oracle.jdbc.odbc.OracleDriver instead of oracle.jdbc.driver.OracleDriver.
As far as possible try using thin drivers instead of the odbc drivers to access oracle.
Surya

[This message has been edited by Surya Bahadur (edited August 20, 2001).]
[This message has been edited by Surya Bahadur (edited August 20, 2001).]
[This message has been edited by Surya Bahadur (edited August 20, 2001).]
Hi
Try using SimpleDateFormat in the Java class so that your query works even when you switch the database from Oracle to Say DB2.If you are sure that you are going to use only oracle the previous answer by asnmurthy would be fine.
Surya
Hi
Have you tried using db2jstrt followed by the port number you specified in the JDBC Url.
Surya
Hi Julio
Thanks a lot,i really appreciate it,when i ran the usejdbc2 on both the client and the server,it worked fine.
Surya
Hi Guys
I am trying to test my program by using the JDBC 2.0 executeBatch method of the prepared statement on DB2(NT).I am using JDK 1.2.2 On WindowsNT.The problem is when i run the program it gives me the error message saying
java.sql.SQLException: [IBM][JDBC Driver] CLI0625E You specified JDBC 1.22 behavior; cannot use JDBC 2.0 functions.
So i went into the directory where DB2 is installed and under that ran the batch program useJdbc2.bat(After reading it from the IBM's site),but it didn't help the matters much.So can some one please tell me like where should i specify that use JDBC 2.0
instead of JDBC 1.22.Waiting for your answers.....
Surya
Hi
Don't quit your current job,right now the job market is so tight that its very difficult to get a job even for the experienced programmers and judging from your posting i think you are a newbie to the software field,so consider yourself very lucky that you do have a job.So my advice is don't make a disastrous move of quitting your current job,if at all you want to change jobs then first get other job in some stable company and then quit the current one.Best of luck.
Surya

[This message has been edited by Surya Bahadur (edited May 19, 2001).]
19 years ago
Hi
Try this and let me know whether this works,i assume that you are using Websphere 3.5.On the left hand side of the websphere administrative console click on the DefaultServer,on the RHS you will see the screen which has three tabs,under the General tab there is one field called command line arguments,in that field type in the path of your jar file,the whole path including the jar file.Restart the server and see whether it works or not,it worked for me when i had problem with JNDI jar files,so try your luck.
Surya
19 years ago
Hi
I will try to list what i remember.Maybe someone will continue the thread by adding more information,
Say you want your applet to read from a file and insert data into the database(the code being in some servlet),then there are limitations imposed by the browser and the applet can't read from the clients file system.With HTML it is not the case and also if you have firewall restrictions then it is not possible for applets to talk to servlets via HTTP.
Coming to the advantage basically the client side validation can be put into the applet which is not possible with the HTML and if you want to do something like that in HTML then you need to use java script to accomplish the task.
Correct me if i am wrong.
Surya
19 years ago
B2B
Hi
P2P-->Peer to Peer Networking(Napster).
How come the advanced forum is so silent today.
Surya
19 years ago
Hey Sanjay
If you want to really start working on LDAP then first of all you need to download a directory server and the one which is available for download is Netscape Directory Server,it is quite user friendly and there is a lot of documentation available for this particular directory server.You can download it from netscape site,if you are in US then its ok the download may be faster but if you are in india then its better to start the download during the night time so that it will be faster.The file size would be about 33MB.After getting used to the directory server then you can start using java programs to talk to it.Fortunately SUN provides the JNDI Tutorial free for download the link is http://java.sun.com/products/jndi/docs.html#TUTORIAL.
It is really an excellent resource and if you go through the whole book then i guarentee that i would be the one taking advice from you regarding LDAP and JNDI.All the best.
Surya
19 years ago
B2B
Hey
Can some one explain to me what is
B2C
CRM
P2P
and how can we leverage Java to drive the above technologies .
No offense intended,take it easy.
19 years ago