你把这个类编译一下 如果你用的是tomcat的话 你把这个文件放在你的web应用程序下的WEB-INF下的classes下
解决方案 »
- 急。。。求教,j2ee里面的读数据库操作,得到的list,如何生成xml文件?
- Java Applet 网页无法登录的问题,请大家来指教1下 谢谢
- JSF 页面用到frameset 跳转问题?
- hibernate 查询的奇怪错误
- Java 垃圾回收问题:我如何知道某个对象的内存有没有被释放?
- tomcat 博客的二级域名是如何实现的?
- 一个很急的问题,哪位高手指导下菜鸟!!!谢谢
- 请教jsp中如何实现注销
- 如何配置jsp环境的虚拟站点而不是目录,tomcat行吗?
- struts2前台到后台参数组装失败
- struts标签<html:radio>设定默认的选项
- 求教!用struts实现动态文本框及输入的值如何获得?
<%@ page import="aa.bb.cc.TestNative"%>如果没有包结构 只是一个单独的class文件的话
在jsp用就需要用到jsp标签了
<jsp:userBean id="testnative" class="TestNative" scope="page">
然后是
int y=testnative.add(10,20);
out.print(y);就可以了
D:\Work\temptest\TestXML1\work\org\apache\jsp\counter_jsp.java文件是tomcat自己产生的.
我用的平台是eclipse+tomcat.
D:\Work\temptest\TestXML1\work\org\apache\jsp\counter_jsp.java:45: cannot resolve symbol
symbol : class TestNative
location: class org.apache.jsp.counter_jsp
TestNative testnative = null;^
An error occurred at line: 4 in the jsp file: /counter.jsp
Generated servlet error:
D:\Work\temptest\TestXML1\work\org\apache\jsp\counter_jsp.java:47: cannot resolve symbol
symbol : class TestNative
location: class org.apache.jsp.counter_jsp
testnative = (TestNative) _jspx_page_context.getAttribute("testnative", PageContext.PAGE_SCOPE);
^
An error occurred at line: 4 in the jsp file: /counter.jsp
Generated servlet error:
D:\Work\temptest\TestXML1\work\org\apache\jsp\counter_jsp.java:49: cannot resolve symbol
symbol : class TestNative
location: class org.apache.jsp.counter_jsp
testnative = new TestNative();