jsp页面中引入:
<%@page import="com.funmobile.wap.iwap.id.thematic.beans.*"%>在页面当中
<%
Thematic(是import包当中beans下的一个类) thematic
%>这里报错 编译不过来因为在webapplication中 src下边的default有一个Thematic 和 此处引用的 类 是同名 ,我在jsp中 点击类名 系统找的是 src下default的Thematic 而不是我想要引入的类 所以报错 请各位讲讲这事怎么了呢?顺便讲下 import 和 include的区别, THX!
<%@page import="com.funmobile.wap.iwap.id.thematic.beans.*"%>在页面当中
<%
Thematic(是import包当中beans下的一个类) thematic
%>这里报错 编译不过来因为在webapplication中 src下边的default有一个Thematic 和 此处引用的 类 是同名 ,我在jsp中 点击类名 系统找的是 src下default的Thematic 而不是我想要引入的类 所以报错 请各位讲讲这事怎么了呢?顺便讲下 import 和 include的区别, THX!
解决方案 »
- org.hibernate.HibernateException: No Session found for current thread
- 请各位帮我看看这个程序
- java 通信问题
- 需求一个BBS 论坛的源代码
- j2ee项目上传到空间上遇到的问题,请高手进来帮忙!
- hibernate3.0+spring2的配置问题
- 关于在jdeveloper发布的webservice在Jboss中运行的问题。
- java新手 遇到个小问题 求各位大神解答一下!!感激不尽~
- weblogic中找不到Home接口的问题
- 初学者请教......急急急
- 谁能给个公司出勤管理系统代码哈
- 求助!web项目:如何得到客户端电脑中文件的详细信息
include: 包含另一个页面
<%
com.funmobile.wap.iwap.id.thematic.beans.Thematic thematic...
%>好了
实在不行就:<%
com.funmobile.wap.iwap.id.thematic.beans.Thematic thematic...
%>吧。
所以 你要用Thematic 这个类的话 要么 就不引人<%@page import="com.funmobile.wap.iwap.id.thematic.beans.*"%>指令
或者最好的方法是 在新加一个包 这样 就不会出现这个问题import 导入类所在的包 include 包含另一个页面
include:有指令和动作
指令:(将另外一个页面内容包含进来,是两个Java文件)
动作:(是在将jsp转为Java代码时,将include所包含的jsp文件与当前jsp文件合并在一起生成一个Java文件)
我现在在学习期间老师给我们讲的就是一下我写的:import="com.funmobile.wap.iwap.id.beans.thematic";
写入方式:import="包名.文件名";即可.
include: 包含另一个页面