Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call login.jsp in eclipse

 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using eclipse to develop an web application. Using eclipse when i try running the tomcat server, i want it to call the login.jsp which i have kwt it under WebContent folder. So, i have included that in the web.xml as

But when i start the server, i am getting the belopw error message. Could someone helpme please.
HTTP Status 404 - Servlet jsp is not available

--------------------------------------------------------------------------------

type Status report

message Servlet jsp is not available

description The requested resource (Servlet jsp is not available) is not available.

And in the console ,

Nov 6, 2008 4:37:15 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1437 ms
Nov 6, 2008 4:37:15 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
Nov 6, 2008 4:45:02 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable

Many Thanks!!
 
udaykumar javangula
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check the location of login.jsp whether it is in ROOT or not.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. It is under webcontent folder
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Below is what i could see in the console logs.

Nov 6, 2008 6:01:01 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Documents and Settings\198669\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Trans\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Nov 6, 2008 6:01:01 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Documents and Settings\198669\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Trans\WEB-INF\lib\weblogic.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Nov 6, 2008 6:01:01 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet jsp as unavailable
Nov 6, 2008 6:01:01 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /Trans threw load() exception
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.jasper.servlet.JspServlet.<init>(JspServlet.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1115)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Nov 6, 2008 6:01:01 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/Trans,J2EEApplication=none,J2EEServer=none
Nov 6, 2008 6:01:01 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Nov 6, 2008 6:01:02 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Nov 6, 2008 6:01:02 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47 config=null
Nov 6, 2008 6:01:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1496 ms
Nov 6, 2008 6:01:03 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
Nov 6, 2008 6:01:20 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
Nov 6, 2008 6:01:36 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
Nov 6, 2008 6:01:44 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
Nov 6, 2008 6:01:47 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
Nov 6, 2008 6:01:49 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: Servlet jsp is currently unavailable
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you have multiple copies of the Servlet library.

Did you specifically add the weblogic.jar in your classpath? (From your stacktrace, I noticed that it is included.)

You will need to remove all the other JARs which contain different implementations of the Servlet API in order for Tomcat to work properly.
 
renu richard
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
After removing the above three jar file's, when i run my application i am getting the below error,
log4j:WARN No appenders could be found for logger (com.tcs.trans.Connection.DBPool).
log4j:WARN Please initialize the log4j system properly.
I have placed log4j.jar and log4j-1.2.8.jar files under the lib folder.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic