none oftheabove

Greenhorn
+ Follow
since Jul 17, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by none oftheabove

update:

i've got the "custom" URL mapping working, now - basically, uninstalled/reinstalled and started from scratch (it's tough to say what i goofed up trying to change random values in the XML files...)

once i had a clean slate, there's nothing more to it than the book says:
(1) make sure the server is stopped (in case it doesn't auto-absorb)
(2) copy your webapp into the [tomcat install dir]\webapps directory
(3) make your [tomcat install dir]\webapps\[your app]\WEB-INF\web.xml resemble the following:

<web-app>
<servlet>
<servlet-name>somename</servlet-name>
<servlet-class>package.servletclass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>somename</servlet-name>
<url-pattern>/othername</url-pattern>
</servlet-mapping>
</web-app>

*your web.xml looks fine aside from the extra /SkiClub in url-pattern

*verified that it does no harm to have servlet-name/pattern/class all the same (i.e. LoginServlet)

*there are NO changes necessary for [tomcat install dir]\conf\server.xml or web.xml (i.e. the tomcat-4-style Context element did not need to be present)

*i noticed that if you can get http:\\[host]\SkiClub to show a DIRECTORY LISTING then you're on the right track

the example from their documentation site just about sums up how simple this process is (click on "To a servlet"): http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/sample/web/
18 years ago
update:

i've got the "custom" URL mapping working, now - basically, uninstalled/reinstalled and started from scratch (it's tough to say what i goofed up trying to change random values in the XML files...)

once i had a clean slate, there's nothing more to it than the book says:
(1) make sure the server is stopped (in case it doesn't auto-absorb)
(2) copy your webapp into the [tomcat install dir]\webapps directory
(3) make your [tomcat install dir]\webapps\[your app]\WEB-INF\web.xml resemble the following:

<web-app>
<servlet>
<servlet-name>somename</servlet-name>
<servlet-class>package.servletclass</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>somename</servlet-name>
<url-pattern>/othername</url-pattern>
</servlet-mapping>
</web-app>

*your web.xml looks fine aside from the extra /SkiClub in url-pattern

*verified that it does no harm to have servlet-name/pattern/class all the same (i.e. LoginServlet)

*there are NO changes necessary for [tomcat install dir]\conf\server.xml or web.xml (i.e. the tomcat-4-style Context element did not need to be present)

*i noticed that if you can get http:\\[host]\SkiClub to show a DIRECTORY LISTING then you're on the right track

the example from their documentation site just about sums up how simple this process is (click on "To a servlet"): http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/sample/web/
18 years ago
OK, now we're even...i can see the servlets when placed within the ROOT deployment area

i understand your objective and i thought that i wanted to do the same thing (different webapps directory for each servlet) but it looks like that isn't advised for larger projects

it's the way i've been doing it for years but that's probably because it was the first way i could figure out ("if it's always been done that way, it's probably wrong" - Kettering)

it would appear that there is an additional servlet mapping necessary to accomplish the distinct directory...not sure which web.xml

i have the core servlets book at home - i'll let you know what it has to say
18 years ago


i'm in the same boat...i think being "out of the loop" is part of the punishment for not contributing to the project

i've been using Tomcat 4 for over three years and i think it's great - quite certain that version 5 is only an improvement

however, i recall the utter insanity of figuring out the servlet deployment the first time so i was reluctant to begin the frustration all over again

you've got me beat in that i can't see any servlet at all, ever (even within ROOT)

i'm doing some reading, though, and it looks like modifying your CLASSPATH variable might help (if your code uses packages); if this is the problem then you should probably see a loader exception in the Tomcat system window

i'm sure that you've seen this site by now: http://www.coreservlets.com/Apache-Tomcat-Tutorial/

any hints that you can provide would be appreciated
18 years ago
hello,

i'm back with a little more info this time...

The way i read the manual, it seems that the CATALINA_HOME/BASE issue is for multiple users having their own server on the same machine. If you're like me then you want a single user to have multiple instances of Tomcat on the same machine.

First, i eliminated the %CATALINA_HOME% and %JAVA_HOME% environment variables (System->Advanced->Environment). Next, i removed the references to those values from all of the files in [tomcat]\bin (where [tomcat] is the directory you choose to install the web server). Thank God for TextPad 'Find/Replace All' Finally, the ports in [tomcat]\conf\server.xml must be set so that they are dissimilar between installations (no overlap). Below are the specific values to look for (they can be any number up to 64000, i think, that isn't already used by your system):
one for the http connector (default 8080)
one for the ajp connector (8009)
one for the shutdown port (8005)

props = http://www.jguru.com/faq/view.jsp?EID=1060243

my values = http, ajp, shut: (1) 4445, 4005, 4009 (2) 7777, 5005, 5009

note: i'm skeptical about the stability of software that's been modified in this fashion since there may be some unforeseen conflict down the road. Use at your own risk...

havagood1,
D
18 years ago