package com.seaskysoft.servlets;import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;/**
* This class contains utility methods used by the Action objects
* in the Project Billboard application.
*
* @author Hans Bergsten, Gefion software <[email protected]>
* @version 1.0
*/
public class ActionUtils {
public String getShowPageURL(HttpServletRequest request, String page) {
return request.getContextPath() + request.getServletPath() +
"?action=showPage&page=" + page;
}
public void forward(String url, HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
RequestDispatcher rd = request.getRequestDispatcher(url);
rd.forward(request, response);
}
}这是其中一个,RequestDispatcher rd = request.getRequestDispatcher(url);出错,request.getContextPath()也出错,说unresolved symbol.包应该没问题了吧。我可是全都包含近来了。
import javax.servlet.*;
import javax.servlet.http.*;/**
* This class contains utility methods used by the Action objects
* in the Project Billboard application.
*
* @author Hans Bergsten, Gefion software <[email protected]>
* @version 1.0
*/
public class ActionUtils {
public String getShowPageURL(HttpServletRequest request, String page) {
return request.getContextPath() + request.getServletPath() +
"?action=showPage&page=" + page;
}
public void forward(String url, HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
RequestDispatcher rd = request.getRequestDispatcher(url);
rd.forward(request, response);
}
}这是其中一个,RequestDispatcher rd = request.getRequestDispatcher(url);出错,request.getContextPath()也出错,说unresolved symbol.包应该没问题了吧。我可是全都包含近来了。
解决方案 »
- JSP入门选择什么书籍(教程)好?请推荐和建议!
- 奇怪的系统有时可登陆,有时候登陆不了的问题求高手。
- 如何向struts-config传递参数
- 求救:java.lang.OutOfMemoryError: PermGen space
- 【浙江海宁】急招程序开发工程师,开发B/S政府办公系统
- 菜鸟100分求救一个简单问题!
- Properties 读取配置文件的问题?
- 急:找不到 msvcr71.dll
- 大家帮我看看,是代码错在哪 里了?急在线等待?
- 在servlet中可以不可以读到session,application的值
- 为什么执行的时候只是显示了2、3条记录。而1没有显示出来。如何才能把一也显示出来呢。
- 200分求没有license的jive(jive的早期版本可以免费使用的)(kkhui(jacky) 请近来)
我用的是jdk1.4,tomcat3.2。怎么回事啊,实在是搞不懂!
classpath 不对吧, 没有include 相应的包。