紧急求救-------高分想送!!!!!!!!!!!!
我整合了apache和tomcat,现在根目录设为g:\webroot\lunwen,可以正常显示index.html。现在我想运行自己的JSP文件,如下:
在这个目录下有一个example.jsp网页,需要调用JavaBeans源文件hello.java
JavaBeans源文件为
package example_h;
public class Hello{
public String name="Every one!";
public String output()
{
return "Hello" +name;
}
}
已经编译形成了hello.class
example.jsp网页源代码为:
<html>
<head>
<title>JavaBeans 示例</title>
</head>
<body>
<jsp:useBean id="HelloBeans" scope="session" class="example_h.Hello"/>
<%= HelloBeans.output() %>
<hr>
<%
HelloBeans.name="World";
out.print(HelloBeans.output());
%>
</body>
</html>
请问我应该把这个hello.class放在G:\webroot\lunwen目录下的什么文件夹里,具体怎么设置才能够让我在输入http://127.0.0.1/example.jsp的时候能够得到正确的结果!
请各位大侠不吝赐教!最好说详细一点!或者给出个别的详细例子!问题解决立即给分!