Amar Naik

Ranch Hand
+ Follow
since Sep 26, 2003
Merit badge: grant badges
For More
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 Amar Naik

Hi guys,

I am trying to do a pagination for data that is retrived from Oracle tables. The data that is retrieved is huge.
i was thinking if i can read all the data and dump it to a file. then display the results from file lets say 10 records at a time .

Is this a write approach? Is there some other approach which might be better. Please advise.
16 years ago
JSP
I am getting the following exception

I am using apache-tomcat-6.0.10
Please advise.
16 years ago
thanks. It solved the problem
16 years ago
the output of SQL query is around 19254 rows. But my below code writes only 18700 lines to o/p file. Sometimes the o/p file as 18900 rows. No idea why the file write is having error. It does not even throw any exception
16 years ago
Well on researching more, i found that i have SEVERE: Error listenerStart. not sure why?

H:\apps\xp\desktop\apache-tomcat-6.0.10\bin>startup.bat
Using CATALINA_BASE: H:\apps\xp\desktop\apache-tomcat-6.0.10
Using CATALINA_HOME: H:\apps\xp\desktop\apache-tomcat-6.0.10
Using CATALINA_TMPDIR: H:\apps\xp\desktop\apache-tomcat-6.0.10\temp
Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_11
May 17, 2007 10:47:23 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in produ
ction environments was not found on the java.library.path: C:\Program Files\Java
\jdk1.5.0_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;.;C:\CA\DCS\DMS\;C:\CA\DCS\CAW
IN\;C:\Program Files\Sybase\OLEDB;C:\Program Files\Sybase\odbc;C:\Program Files\
Sybase\ocs-12_5\dll;C:\Program Files\Sybase\OCS-12_5\lib3p;C:\Program Files\Syba
se\ocs-12_5\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\MLTOO
LS\;C:\SERVICES\TOOLS\;C:\Program Files\Oracle\ora92\bin;C:\Program Files\Oracle
\jre\1.3.1\bin\;C:\Program Files\Oracle\jre\1.1.8\bin;C:\CA\USD\BIN;C:\Program F
iles\Oracle\ora92\NET80\BIN;C:\Program Files\Attachmate\E!E2K\;C:\Sun\AppServer\
jdk\bin;C:\PROGRA~1\Oracle\ora92\jdbc;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM
\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\Hummingbir
d\Connectivity\11.00\Accessories\;;C:\Program Files\Softricity\SoftGrid for Wind
ows Desktops;C:\Program Files\Java\jdk1.5.0_11\bin
May 17, 2007 10:47:27 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 17, 2007 10:47:27 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 28092 ms
May 17, 2007 10:47:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 17, 2007 10:47:34 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
May 17, 2007 10:49:38 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 17, 2007 10:49:38 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/test] startup failed due to previous errors
May 17, 2007 10:53:26 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 17, 2007 10:53:29 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 17, 2007 10:53:31 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/2921 config=null
May 17, 2007 10:53:31 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 363448 ms
16 years ago
I have started TOMCAT server. When i test http://172.23.28.40:8080/ the Tomcat home page is displayed. i have created a new directory in webapps called test. In server.xml i have added <Context path="/test" docBase="test" debug="1" reloadable="true"/>
and restarted the server.

but when i put in URL http://172.23.28.40:8080/test/test.html it mentions that "The requested resource (/test/ml.html) is not available"

Please advise..
16 years ago
Hi,

My program compiler with below command

C:\Sun\AppServer\jdk\bin>javac -classpath .;db2jcc_license_cisuz.jar H:\apps\xp\
Desktop\apache-tomcat-6.0.10\webapps\test\WEB-INF\classes\GOOG\MLRCurrentDate.ja
va

When i try to run my program i get the below error
C:\Sun\AppServer\jdk\bin>java -classpath .;db2jcc_license_cisuz.jar H:\apps\xp\D
esktop\apache-tomcat-6.0.10\webapps\test\WEB-INF\classes\GOOG\MLRCurrentDate
Exception in thread "main" java.lang.NoClassDefFoundError: H:\apps\xp\Desktop\ap
ache-tomcat-6/0/10\webapps\test\WEB-INF\classes\GOOG\MLRCurrentDate

16 years ago
i restarted the server and got my application running
I did create a new folder called a in classes directory, added the package details in java code, recompiled , restarted the server

it works now

thanks for the help
16 years ago
I am sorry, i am getting confused

My java file is in apache-tomcat-6.0.10\webapps\test\WEB-INF\classes
and jsp file is in apache-tomcat-6.0.10\webapps\test

do i still need a package? If yes what should be the package details
16 years ago
i removed the package details from java code. I recompiled the code and i get the following error now

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:600)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:142)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803
16 years ago
yeah i realized it

I put my class file in apache-tomcat-6.0.10\webapps\test\WEB-INF\classes

In JSP i changed the below details

<%@ page import = "NumberGuessBean" %>

<jsp:useBean id="numguess" class="NumberGuessBean" scope="session"/>

But i still get the same error. did i do it properly now?
16 years ago
Hi,

I am trying to develop a simple JSP+Bean application. I am using Tomcat application.

I have placed my JSP in apache-tomcat-6.0.10\webapps\test.
Added <Context path="/test" docBase="star" debug="1" reloadable="true"/>
in server.xml

Here is my JSP code


here is my JAVA code


i compiled the java code and placed the class file in apache-tomcat-6.0.10\webapps\ROOT\WEB-INF\classes\com\stardeveloper\bean\test.

when i try to run the JSP page , i get an error which mentions "The value for the useBean class attribute com.stardeveloper.bean.test.NumberGuessBean is invalid."

Please advise
16 years ago
i fixed the problem. initially i was pointing to jdk1.4*. I changed it to jdk1.5*.
It works fine now.
Thnaks for the help
16 years ago
i got the error now. here it is

Using CATALINA_BASE: H:\apps\xp\desktop\apache-tomcat-6.0.10
Using CATALINA_HOME: H:\apps\xp\desktop\apache-tomcat-6.0.10
Using CATALINA_TMPDIR: H:\apps\xp\desktop\apache-tomcat-6.0.10\temp
Using JRE_HOME: C:\Program Files\Java\j2sdk1.4.2_13
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ca
talina/startup/Bootstrap (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

Please advise
16 years ago
When i try to execute the startup.bat file i get the below
Using CATALINA_BASE: H:\apps\xp\desktop\apache-tomcat-6.0.10
Using CATALINA_HOME: H:\apps\xp\desktop\apache-tomcat-6.0.10
Using CATALINA_TMPDIR: H:\apps\xp\desktop\apache-tomcat-6.0.10\temp
Using JRE_HOME: C:\Program Files\Java\j2sdk1.4.2_13

. then another window opens and it closes.

In IE when i type http://localhost:8080/, it displays page not found
Please advise.
16 years ago