File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes MYCGISERVER.COM Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "MYCGISERVER.COM Question" Watch "MYCGISERVER.COM Question" New topic


Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
I could not find a FAQ on their site that had the simple answer to what could be probably the first question that everybody asks that has a new account on
Where in my DIR do the servlets go (I already have a /servlet DIR) and what would be the URL to invoke a servlet in my site, assuming that my username is "user"?

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Meadowlark Bradsher
Ranch Hand

Joined: Jan 23, 2001
Posts: 109
I'm guessing you already found out the answer but here goes anyway.
You need only place the servlet in what is your root directory. And you invoke it by using the URL of the form.. <A HREF="<I rel="nofollow">username</I>.HelloWorld" TARGET=_blank>
If you've placed your servlets in a subdirectory, I'm not sure. Also you have to place each servlet in a package based on your username (i.e. package username; ). I believe that the package name that you compile the servlet to be in will reflect the directory structure by default. So you could declare the package for your servlet to reflect the subdirectory you created "/servlet" (i.e. package username.servlet; ). As far as the URL to call the servlet. I'm not quite sure. I would guess something like <A HREF="<I rel="nofollow">username</I>.servlet.HelloWorld." TARGET=_blank>
This is probably an abandoned thread by now but if helps someone else with the same question then that's what I intended. However if you didn't get your answer sooner, better late than never.

Meadowlark Bradsher

[This message has been edited by Meadowlark Bradsher (edited May 05, 2001).]

Meadowlark Bradsher
SCJ2P, IBM XML V1, Series 7/63
I agree. Here's the link:
subject: MYCGISERVER.COM Question
jQuery in Action, 3rd edition