![]() ![]() The following are paths to all the files/folders involved in this discussion:Ĭ:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes -> I created the "classes" folder, per book guide.Ĭ:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\HTMLBank.class -> I placed the. >This file was edited to enable servlet reloading, also as per book guide. The web.xml file was modified per book guide to allow locating anonymous servlets in the default directory. See the License for the specific language governing permissions and limitations under the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Here is the code of the HTMLBank.java servlet file: Now, I might mention that I did succeed in launching a servlet once before, but that was only if I used a package, say com.example and mapped it in the web.xml file, but as stated before, this deviates from the textbook and I need to get it to work using the default package and ROOT directory. After doing this, the following error results:ĭescription The requested resource (/servlet/HTMLBank) is not available. Yes, the textbook uses the default package for this and the ROOT directory of Tomcat.Ģ) Run the Tomcat service - it is running (shown as a green "play" arrow in right-bottom of the screen).ģ) In the browser, type URL: and enter it. ![]() class file into C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes folder. Now, according to the textbook:ġ) Place the. I have a Java servlet, called HTMLBank.java which I successfully compiled with no compilation errors. I seek help with doing it in THIS method. I am aware of the advice given here to other people with this/similar problems, that servlets should preferably be written under a package, and not packageless, but I am following the textbook's guidance with this, and of course being a textbook, its method must work. Java Programming: Comprehensive Concepts and Techniques, Shelly Cashman Series, ISBN: 9781418859855. I am trying to launch a simple Java servlet in the browser, following instructions from the textbook: Unfortunately, having tried all this advice I still cannot resolve this problem. I am well aware there have been many, many related questions asked already about this, as well as even more answers. ![]() Hey, everyone! I truly hope you can help. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |