你把这个类编译一下 如果你用的是tomcat的话 你把这个文件放在你的web应用程序下的WEB-INF下的classes下
解决方案 »
- hibernate 如何判定使用哪种id生成策略
- 一秒钟有多少个异常(Exception)抛出来?
- 怎么改站内搜索为站内外同时搜索
- 用IDEA的帮帮我吧,我的html页面部署不进去
- 困惑啊,为什么我的jsp页面总是提示404错误啊,大家帮忙看下啊
- weblogic问题,急!!!
- 乱码,很奇怪的乱码,存入mysql数据库出现乱码!!!
- 关于xml的操作,Java报xml文件不存在的错误 急!
- struts.xml中使用include文件时候,包含文件的位置
- 对于你简单对于我很困难的问题
- 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();