java - can not run servlet in cpanel+ tomcat -


i use tomcat + cpanel . jsps , tags correct run can not run servlet .

my web.xml content :

 <servlet>         <servlet-name>servlet1</servlet-name>         <servlet-class>pack1.servlet1</servlet-class>     </servlet>     <servlet-mapping>         <servlet-name>servlet1</servlet-name>         <url-pattern>/servlet1</url-pattern>     </servlet-mapping> 

when request www.mydomain.com/servlet1 error (404) :

not found  requested url /servlet1 not found on server.  additionally, 404 not found error encountered while trying use errordocument handle request. 

please me.

the cpanel suggests you're using 3rd party host. lot of cheapass 3rd party hosts have due system limitations different rules deploying servlets. should reading developer guide/documentation/faq how deploy servlets on host. example, 3rd party hosts require specific folder or package structure, or require specific url structure.

godaddy, example, requires use url structure /servlet/yourservletclassname, /servlet prefix path, see their faq.

if want have full control on deployment or want follow standard java ee rules, you'd rather different host. example, openshift, free cloud hosting service using full fledged jboss 7 application server, including ejb , jpa support , on em , free choice between mysql , postgresql databases.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -