Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: Re: simple (i think) directory question


Message #1 by "Kalyan Tej Musunuri" <wroxp2p@y...> on Sun, 13 May 2001 10:03:52
Hi Nick.

when you change the location to
"\webapps\greeting\WEB_INF\classes\com\mainprogram\greetingspart\GreetingsS
ervlet.class"
the class should be written such that it is in the 
package "com.mainprogram.greetingspart"
If the GreetingsServlet belongs to the above package the fullyclassified 
class name of the GreetingsServlet willbe 
"com.mainprogram.greetingspart.GreetingsServlet"

the Form commad to access this servlet should be 

"<FORM 
ACTION="/greeting/servlet/com.mainprogram.greetingspart.GreetingsServlet" 
METHOD="POST">"

The command should always contain the fully qualified class name of the 
servlet.

bye 

Kalyan Tej 



> Hi all,
>        Normally the structure of the tomcat webapps directory for a 
> program called, lets say greeting (Chap 7 in java server programming 
j2ee 
> edition), is as below
> -TOMCAT_HOME
>      -WebApps
>          -greeting
>             -WEB_INF
>                -Web.xml
>                -classes
>                   -GreetingsServlet.class
> 
> so the only class file is in
> %TOMCAT_HOME%\webapps\greeting\WEB_INF\classes\GreetingsServlet.class
> 
> So the html cammand
> .....
> <FORM ACTION="/greeting/servlet/GreetingServlet" METHOD="POST">
> .....
> will send the request to the greetings servlet and this works fine BUT
> if I change the place of the class file to 
> "%TOMCAT_HOME%
> 
\webapps\greeting\WEB_INF\classes\com\mainprogram\greetingspart\GreetingsSe
> rvlet.class"
> then what should the html command now look like?
> 
> Thanks for any help
> Nick

  Return to Index