This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "MYCGISERVER.COM Question" Watch "MYCGISERVER.COM Question" New topic
Author

MYCGISERVER.COM Question

Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
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 www.mycgiserver.com:
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"?
Thanks


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="http://www.mycgiserver.com/servlet/<I rel="nofollow">username</I>.HelloWorld" TARGET=_blank>www.mycgiserver.com/servlet/username.HelloWorld
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="http://www.mycgiserver.com/servlet/<I rel="nofollow">username</I>.servlet.HelloWorld." TARGET=_blank>www.mycgiserver.com/servlet/username.servlet.HelloWorld.
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.

Cheers,
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: http://aspose.com/file-tools
 
subject: MYCGISERVER.COM Question
 
Similar Threads
File race condition
JAR file of bean
is imported servlet initialized too??
Spring Transaction
where should the servlet.jar file be?