File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes unable to run  webapplications in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "unable to run  webapplications in tomcat" Watch "unable to run  webapplications in tomcat" New topic
Author

unable to run webapplications in tomcat

sree charan
Greenhorn

Joined: Mar 03, 2010
Posts: 6
the following is the error i get every time i try to run my web application in tomcat 6. im using ubuntu 9.04. i have placed my application in /tomcat/webapps folder correctly but still im unable to run it from the tomcat manager.. any one please help im stuck up i am my college project.

HTTP Status 404 - /SearchDoctors/

type Status report

message /SearchDoctors/

description The requested resource (/SearchDoctors/) is not available.
Apache Tomcat/5.5.28
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

sree charan wrote: i have placed my application in /tomcat/webapps folder correctly

Apparently not.

Without further information, how can we help?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sree charan
Greenhorn

Joined: Mar 03, 2010
Posts: 6
Bear Bibeault wrote:
sree charan wrote: i have placed my application in /tomcat/webapps folder correctly

Apparently not.

Without further information, how can we help?


ill also post the contents of /web-inf/web.xml of my application as i have searched they say problem is with this can anyone please help.the college project still needs a long way to go

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<display-name>Forms</display-name>
<servlet>
<servlet-name>Validation</servlet-name>
<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Validation</servlet-name>
<url-pattern>/app</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<display-name>DWR Servlet</display-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>

</web-app>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

Please UseCodeTags
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

sree charan wrote:ill also post the contents of /web-inf/web.xml of my application

There's the problem! It must be WEB-INF, not web-inf. Case counts.
sree charan
Greenhorn

Joined: Mar 03, 2010
Posts: 6
since i am new to this. i had not posted the details correctly. i am correcting my post and posting it correctly now.


the following is the error i get every time i try to run my web application in tomcat 6. im using ubuntu 9.04. i have placed my application in webapps folder correctly but still im unable to run it from the tomcat manager.. any one please help im stuck up i am my college project.

HTTP Status 404 - /SearchDoctors/

type Status report

message /SearchDoctors/

description The requested resource (/SearchDoctors/) is not available.
Apache Tomcat/5.5.28

i have placed my application in /usr/local/tomcat/webapps/SearchDoctors/WEB-INF folder correctly


ill also post the contents of /usr/local/tomcat/webapps/SearchDoctors/WEB-INF/web.xml of my application as i have searched they say problem is with this can anyone please help.the college project still needs a long way to go
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Its very difficult to analyse these issues remotely. I have also faced such issues in my early days with tomcat & my first webapp.

Suggestions
1) Check the log files in Tomcat @ ${CATALINA_HOME}/logs/ This will surely have information why is your webapp is not deployed or if there are other problems while accessing the page.
2) Also, check the complete URL that you are using to access the servlet. It better match the one defined in <url-pattern>/dwr/*</url-pattern>.
3) Make sure the servlet class <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>s is present in classes or in lib as jar.


SCJP, SCWCD, SCBCD
sree charan
Greenhorn

Joined: Mar 03, 2010
Posts: 6
Deepak Jain wrote:Its very difficult to analyse these issues remotely. I have also faced such issues in my early days with tomcat & my first webapp.

Suggestions
1) Check the log files in Tomcat @ ${CATALINA_HOME}/logs/ This will surely have information why is your webapp is not deployed or if there are other problems while accessing the page.
2) Also, check the complete URL that you are using to access the servlet. It better match the one defined in <url-pattern>/dwr/*</url-pattern>.
3) Make sure the servlet class <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>s is present in classes or in lib as jar.


this the error what i got when i run the application using http://localhost:8080/SearchDoctors/dwr

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
So where is that class? It must be either in a jar file that's in WEB-INF/lib, or exist as a loose class file in the proper directory inside of WEB-INF/classes.


Ping & DNS - updated with new look and Ping home screen widget
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Wrapper cannot find servlet class org.directwebremoting.servlet.DwrServlet or a class it depends on


There you go, web container is not able to find the sevlet class that you defined in the deployment descriptor (web.xml) <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> Make sure

As i said earlier make sure
a) The .class file is present in WEB-INF/classes folder.
or
b) The .class file is present in jar file under WEB-INF/lib

And then restart tomcat and keep an eye on logs in case of trouble.
sree charan
Greenhorn

Joined: Mar 03, 2010
Posts: 6
i have got dwr.jar file along with other .jar files and it inturn has org.directwebremoting.servlet.DwrServlet class file.. so i think the problem i think is i am not properly organising my WEB-INF/lib file.. i dont know how to organise it. i have placed all the library files in a single file named lib.tar.gz in WEB-INF/lib which in turn contains all the .jar library files.i hope i am near to the solution someone can help me now...
i also need help in organising my other files WEB-INF

i tried extracting all the jar files in lib.tar.gz mentioned above into WEB-INF/lib
and when i run my application using
http://localhost:8080/SearchDoctors/dwr

the uml changes to

http://localhost:8080/SearchDoctors/dwr/index.html
and i get this on the screen

Classes known to DWR:


this application is an already run application by my friend so no problem with the code just some reorganising of file is required..can some one help me now i think i am close
sree charan
Greenhorn

Joined: Mar 03, 2010
Posts: 6
i got the problem solved the files needed a little organisation as given in tomcat documentation. all your suggestions helped me a lot.. thanks a lot for helping.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to run webapplications in tomcat
 
Similar Threads
Deploying WebApplication in tomcat
Im get this error is Jboss
Tomcat restarting again and again automatically
tomcat4.0 and Jbuilder 6.0
netbeans cant run the project on tomcat MacOS