下午花了3小时来解决一个stupid问题:
tomcat自带的例子运行良好,我自己写的一个servlet无论如何就是报下面的错误:
Error allocating a servlet instance ...
--root cause: java.lang.NoClassDefFoundError...
网上找了很多帖子,说各种问题的都有,什么path ,classpath路径配置有错了,类名写错了,jdk版本不
对,web.xml没有配置,etc,看得头都大了,按他们说的一个个试,就是没效果,火大!
就是不怀疑自己的web.xml没有配置对!觉得自己就是没错,太想当然了!
我的目录结构如下:
webapps
|
beer-v1
| |
WEB-INF index.html
| |
classes web.xml
|
com
|
controller
|
SelectBeer.class (注意此处的类中要加入包名:package com.controller,如果不加,命令行编译 也通过,但就是在运行的时候也会出现上面的错误信息)
那么我在web.xml中<servlet-class>是com.controller.SelectBeer,而不是
com/controller/SelectBeer,就是这斜杠让我整整好了3小时,就是想不到这。
分享到:
相关推荐
- **Root Filesystem** (`/`): This is the top-level directory and contains everything else. - **Etc Directory** (`/etc`): Contains configuration files for various services and applications. - **Dev ...
file from Disk 6 to your root directory. 2. Name the files DMDRVR.BIN and XBIOS.OVL. 3. Run Setup with the /u switch, as follows: setup /u 2.5 SpeedStor and Volume Expansion --------------------...
var i={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",MUX_ERROR:"muxError",OTHER_ERROR:"otherError"},a={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",...
2.3.4 Read the Right Error Message . . . . . . 9 2.3.5 Check the Plug . . . . . . . . . 9 2.3.6 Separate Facts from Interpretation . . . . . 10 2.3.7 Divide and Conquer . . . . . . . . 10 2.3.8 Match ...
Scheduler, queues and slots SGE includes both a scheduler for allocating resources (CPUs) to computational jobs and a queuing mechanism. Each queue is associated with a number of slots: one ...
* C51 FATAL-ERROR –ACTION <current action> LINE : <line in which the error is detected> ERROR : <corresponding error message> * C51 FATAL-ERROR –ACTION <current action> FILE : <file in which the ...
1.4.1 HardwareOrganization of aSystem . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4.2 Running the helloProgram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 CachesMatter ...
This library provides the basic routines for allocating memory, searching directories, opening and closing files, reading and writing files, string handling, pattern matching, arithmetic, and so on.
- **Assembler**: Manages sections by allocating space for uninitialized data and storing initialized data. It also supports directives for defining named sections and subsections. - **Linker**: ...
- **Improved Latency**: By allocating smaller chunks of bandwidth (subcarriers) to devices, OFDMA helps reduce latency, which is particularly beneficial for applications requiring real-time ...
Memory Layout and Access 4.0 - Chapter Overview 4.1 - The 80x86 CPUs:A Programmer's View 4.1.1 - 8086 General Purpose Registers 4.1.2 - 8086 Segment Registers 4.1.3 - 8086 Special ...
Adding ESX hosts & Allocating Volumes to Them .................................................... 78 Configuring the ESX Software iSCSI .................................................................
PART I: VXBUS FUNDAMENTALS 1 Getting Started with Device Driver Development .................................... 3 1.1 About Device Drivers ...............................................................
3-2 Allocating a portion of the LBP size to LOCKLIST 3-3 Avoid lock escalation with GLM Size 3-4 PAGE_AGE_TRGT_GCR – Improve Performance but also Increases Recovery time 3-5 Setting the correct ...
electric fence是Linux下的C语言内存越界访问检测工具,可检测如下两种情况:1、内存访问越界 2、使用释放后续的内存 ...1、make编译得到libefence.a静态库 2、在gcc编译时增加 -L . -lefence的选项
Based on the provided information from "iOS 5 Programming Cookbook" by Vandad Nahavandipoor, we can derive a comprehensive set of knowledge points related to iOS development using Objective-C....
4. **1.2 Allocating and Initializing Objects(分配和初始化对象)** - **知识点**: - 内存管理基础; - 使用`alloc`和`init`方法; - 初始化过程中的注意事项。 - **重要性**:正确的内存管理能够提高应用...
- **1.1 创建一个简单的iOS应用 (Creating a Simple iOS App in Xcode)** - **内容概述**:本节介绍如何使用Xcode创建一个新的iOS项目,并构建一个基本的应用程序界面。 - **关键技术点**: - 使用Xcode新建项目...
Fig01_11.cpp: Dynamically allocating an IntCell object (lame) BuggyIntCell.cpp: Buggy IntCell class implementation (Figs 1.16 and 1.17) Fig01_18.cpp: IntCell class with pointers and Big Five ...