访问glashfish里面的servlet的时候一直提示404错误见解
来源:互联网 发布:windows桌面文件路径 编辑:程序博客网 时间:2024/05/01 15:35
1.我们首先在javaee里面简历一个动态网站,里面写一个StudentServlet
内容如下:
package com.wzq.servlet;import java.io.IOException;import javax.ejb.EJB;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import com.ejb.service.Student;/** * Servlet implementation class StudentServlet */@WebServlet(urlPatterns = {"/qwe"})public class StudentServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// TODO Auto-generated method stubresponse.getWriter().append("Served at: ").append(request.getContextPath());}public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// TODO Auto-generated method stub}}
这里注意一下红色字体的注释,就是因为这一段注释才使得我们的访问StudentServlet的时候一直返回404错误。
所以以后大家编程序的时候一定要记住,删除那些系统自动生成的注释,或者说完全没有必要的注释。
0 0
- 访问glashfish里面的servlet的时候一直提示404错误见解
- Myeclipse创建servlet的时候提示路径需求错误
- Servlet部署的时候出现404错误
- was发布的jsp(hibernate,spring)访问的时候界面提示403禁止访问错误
- eclipse中导入工程的时候,发现 import javax.servlet.http.HttpServletRequest 提示错误
- 初学servlet的时候的弱智错误。。。
- mybatis调用保存方法的时候一直报500错误
- Okhttp频繁访问网络时候的错误
- onethink的后台登录验证码突然一直提示错误
- scrapy安装后一直提示缺少vc++的错误
- 将数据放入到session域中,还是访问的时候一直使用request进行访问数据库
- 从tomcat到glashfish(glassfish的安装启动笔记)
- OpenProcess 返回拒绝访问的错误提示
- servlet里面的监听
- eclipse里面创建servlet出现错误的解决方法
- 今天访问数据库的时候出现提示信息
- 解决tortoiseSvn 访问版本库的时候一直初始化,或者无响应的问题
- 使用PEAR的Services_Twitter包的时候出现错误提示
- C#中Newtonsoft.Json(Json.NET)的使用
- python调用gnuplot
- ActivityManager的使用
- (一)虚拟环境
- Express中使用自定义视图模板引擎
- 访问glashfish里面的servlet的时候一直提示404错误见解
- 关于BIOS的故事
- Tensorflow一些常用基本概念与函数(1)
- java的加密与解密
- win10安装python3,tensorflow,numpy,scipy和matplotlib
- Docker run运行容器报错Error ruuning deviceCreate(createSnapDevice) dm_task_run failed
- opt.compute_gradients() 与 tf.gradients 与 tf.stop_gradient()
- Tensorflow一些常用基本概念与函数(2)
- Unity3D 利用FSM设计相机跟随实现