T
tiewknvc9
Man this question makes me feel like an ass.
I created a servlet, "test.class"
and I would like to deploy it onto my tomcat server. I know that I
need to create a war file, and I have created war files and attempted
to deploy the servlet, however all have failed to make the website
recognize the servlet.
I have restarted tomcat numerous times, and it still does not show up
(my other html and jsp files show up, but not the servlet output).
So I suppose I have a few newb questions...
1. If I wanted to manually place the file in a location where it
should be able to be recognized, where should I put it? --
C:\Tomcat\apache-tomcat-5.5.17\webapps\ROOT\WEB-INF\classes\
???
2. Do I NEED a web.xml file? how can I create a simple on that works
(mine is problematic I think it looks like this)
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app (View Source for full doctype...)>
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <web-app>
- <servlet>
<servlet-name>test</servlet-name>
<servlet-class>test</servlet-class>
</servlet>
- <servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
</web-app>
3. How do I create a war file properly, so that it can deploy into the
right locations, and register with tomcat appropriately??? jar -cvf
my.war %path%\test.class???
any advice will be appreciated (as long as Im not being badmouthed)
thanks
I created a servlet, "test.class"
and I would like to deploy it onto my tomcat server. I know that I
need to create a war file, and I have created war files and attempted
to deploy the servlet, however all have failed to make the website
recognize the servlet.
I have restarted tomcat numerous times, and it still does not show up
(my other html and jsp files show up, but not the servlet output).
So I suppose I have a few newb questions...
1. If I wanted to manually place the file in a location where it
should be able to be recognized, where should I put it? --
C:\Tomcat\apache-tomcat-5.5.17\webapps\ROOT\WEB-INF\classes\
???
2. Do I NEED a web.xml file? how can I create a simple on that works
(mine is problematic I think it looks like this)
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app (View Source for full doctype...)>
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <web-app>
- <servlet>
<servlet-name>test</servlet-name>
<servlet-class>test</servlet-class>
</servlet>
- <servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
</web-app>
3. How do I create a war file properly, so that it can deploy into the
right locations, and register with tomcat appropriately??? jar -cvf
my.war %path%\test.class???
any advice will be appreciated (as long as Im not being badmouthed)
thanks