错误调试解析: An error occurred at line: XX in the jsp file: /XX.jsp XX cannot be resolved to a type 解决方法: 一. 检查是否导入相应的包,在页面开头引入相应的包 <%@ page import="xx.Xx" %> 二. 因为某些特殊原因,MyEclipse没能自动编译源代码到build/classes(或其他classes目录), 导致类型查找不到,可能是MyEclipse未编译自
Jsp中如何通过Jsp调用Java类中的方法 1.新建一个项目,在src文件夹下添加一个包:如:cn.tianaoweb.com; 2.再在包中添加一个类:如 package com; public class test { public String sd(){ return "sd"; } } 3.在默认的首页index.jsp(当然也可以自己新建一个jsp文件)的开头引入 <%@ page import="cn.tianaoweb.com.*"%>