哪位高手知道如何在servlet中连接到一个html页面?

zuoxiaoqin 2001-09-11 04:57:06
我有一程序需实现用户登录,如果用户是系统认证的直接登录到某一页面。
...全文
127 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
cds123 2001-09-11
上面的ok
回复
Athene 2001-09-11
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
....

res.sendRedirect("/myHtml/jsp/Approve.jsp");
}
maybe it works!
回复
top1 2001-09-11
RequestDispatcher dis = getServletContext().getRequestDispatcher("/com/result.jsp");
dis.forward(req, res);

I think it will help for you.
回复
vdragon 2001-09-11
Interface javax.servlet.http.HttpServletResponse

sendRedirect
public abstract void sendRedirect(String location) throws IOException

Sends a temporary redirect response to the client using the specified redirect location URL. The URL must be absolute (for example, https://hostname/path/file.html). Relative URLs are not permitted here.

Parameters:
location - the redirect location URL
Throws: IOException
If an I/O error has occurred.

不知道是不是你想要的
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-09-11 04:57
社区公告
暂无公告