• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with deployment

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have installed tomcat v5.5 but when i deployed my application by putting it under tomcat\webapp dir and try to run it from browser , it is showing error (resource not found)
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Check your configuration in web.xml file, if its a servlet then check that it maps properly to <servlet-name> <servlet-class> locations.

Could you post your web.xml file contents here ? Also check that the project type selected is a web application at the time of development.

Cheers!!!

Ujjwal B Soni

<baroda, gujarat, india>
<919998971048>
 
Ranjan Pwar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my web.xml:========


<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<servlet>
<servlet-name>Ch Submit</servlet-name>
<servlet-class>Submit</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Ch Submit</servlet-name>
<url-pattern>/Submit.do</url-pattern>
</servlet-mapping>


<context-param>
<param-name>mainEmail</param-name>
<param-value>likewecare@wickedlysmart.com</param-value>
</context-param>

</web-app>

====
when i deployed my another application by placing it under tomcat/webapps/ dir , i am getting same exception when trying to run it from /manager
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Use below xml file & try.

<?xml version="1.0">

<servlet>
<servlet-name>Ch Submit</servlet-name>
<servlet-class>Submit</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Ch Submit</servlet-name>
<url-pattern>/Submit.do</url-pattern>
</servlet-mapping>


<context-param>
<param-name>mainEmail</param-name>
<param-value>likewecare@wickedlysmart.com</param-value>
</context-param>

</web-app>


Many times, the encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4"
line creates a problem. Try removing it & redeploy your servlet on the container.

Cheers!!!

Ujjwal B Soni
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


<?xml version="1.0" encoding="UTF-8"?>
<web-app>

<servlet>
<servlet-name>Ch Submit</servlet-name>
<servlet-class>Submit</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Ch Submit</servlet-name>
<url-pattern>/Submit.do</url-pattern>
</servlet-mapping>


<context-param>
<param-name>mainEmail</param-name>
<param-value>likewecare@wickedlysmart.com</param-value>
</context-param>

</web-app>



Try using this web.xml file



Cheers!!!

Ujjwal B Soni
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would try to put the 'Submit' class in a package, and edit the <servlet-class> to the right 'package.to.add.Submit'
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rene is correct. ALL classes used in servlets should be in a package.

The reason is that the JVM looks in the "current directory" when trying to load a class in the default package and you have NO control over what the current directory is.

Any example you see that doesnt use a package is depending on the "invoker" servlet - see this ranch FAQ on the invoker.

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic