Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

Ram Prasad

Greenhorn
+ Follow
since Feb 02, 2008
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 Ram Prasad

Hi Ranchers,

I am trying to write a function for factorial calculation. When i pass number more than 160 as input and trying to get the factorial, the return is Infinity

I am using a double literal to store the data and input is passed as integer n . I have taken the recursive approach

could someone suggest what data type i can use in order to get the factorial even for bigger numbers or correct me if i need to use other mechanism

My code looks like



Thank You
ARP
13 years ago
Bazilio is correct.
static methods cannot be overridden.

you can define the same static method in different classes and this mechanism is called redefining. The compiler accepts it and doesn't throw any error. But in run time you wont get the expected results of overriding since it is not actually a overriding.
i guess this should clarify your doubt tejahyd
It worked after removing the slash

Thank You,
Ram Alisam
14 years ago
hi

When you are running through the command prompt you should make sure the classes which you are referring are there in classpath. in you case it is demosql class file

When you run in IDE, IDE takes care of it by mentioning the classpath as a parameter while executing the program using java -d option available

Ram Prasad
I am using weblogic 81. I have the following web.xml
<servlet>
<servlet-name>MainServlet</servlet-name>
<display-name>HTML Client Front Controller</display-name>
<description>no description</description>
<servlet-class>
com.tlc.servlet.MainServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MainServlet</servlet-name>
<url-pattern>/process</url-pattern>
</servlet-mapping>

&

i have deployed it in the weblogic server

My start page is login.html which has the FORM with the method as post

<form name="loginForm" method="post" action="/process">

& submit button with the code

<input type="submit" name="Login" value="Login"/>


when i click on submit
it opens up the url http://localhost:7001/process
& throws the error Error 404 - Not Found


Can anyone tell me where i am doing the mistake
14 years ago
hi

These are the following things you need to check up in you server for any performance enhancements

1) no of threads configured - keep it to the default and try some combinations
2) JVM Memeory Arguments - put it to maximum possible
3) Connection Pool size - it depends on you application usage

these parameters will do.
14 years ago
hi

if you are trying to use this web.xml without internet connection available it may fail sometimes. You can safely remove the DTD & xsd url specified.

that should solve the problem
14 years ago
Hi Masoud,

It worked. Thank You for quick response

Ram Prasad
Can anyone tell me why i am getting the following exception while trying to connect to a oracle database;
Exception in thread "main" java.sql.SQLException: Invalid Oracle URL specified
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:384)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at LookUp.main(LookUp.java:15)

MY file name is Lookup.java
My code has the following lines to establish the connection

String dbUrl = "jdbc:oracle:thin@localhost:1521:PROJDB";
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection c = DriverManager.getConnection(dbUrl,"SYS","system");
[ February 02, 2008: Message edited by: Ram ]