serlvet的代码:(其实servlet里面不作任何事情,也弹出这个窗口,我想有没有办法把respose转到a.jsp中?)
package oamodule.examine;import javax.servlet.*;public class QuestionSetOperator extends HttpServlet {
//Initialize global variables
public void init() throws ServletException {
}
public void doPost(HttpServletRequest request, ttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
QuestionSetManager QuestionSetM=(QuestionSetManager)(session.getAttribute("QuestionSetManager"));
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
}
//Clean up resources
public void destroy() {
}
}
package oamodule.examine;import javax.servlet.*;public class QuestionSetOperator extends HttpServlet {
//Initialize global variables
public void init() throws ServletException {
}
public void doPost(HttpServletRequest request, ttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
QuestionSetManager QuestionSetM=(QuestionSetManager)(session.getAttribute("QuestionSetManager"));
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
}
//Clean up resources
public void destroy() {
}
}
解决方案 »
- 关于DAO组件配置是属性hibernateTEmplate的问题)
- 运行tomcat的问题
- 如何设置不输入项目名也能访问项目下的页面?
- jsp读数据库记录写入文件如何换行,就差最后一步了
- filter问题
- 请教各位高手!在jsp上如何嵌入控件了?
- 用ProxyFactoryBean创建AOP代理
- 如何将一个NEW的对象,手工释放,而不是通过JAVA自动回收机制
- mybatis insert 同时返回自动增长的主键
- 入门问题
- 如何让我们的论坛系统全面的支持各种数据库?? 100分赠送
- 为什么我在jsp页面用 "/servlet/goto.servlet?setname=中文",如果就这样传过去,在servlet里面得到的将是setname=null,如果传其他则可
<html>
<title>试卷管理</title>
<body rightmargin="0" leftmargin="0" topmargin="0" scroll=no class=body>
<script LANGUAGE="javascript">
<!--
function add()
{
window.showModalDialog("b.html","","dialogHeight:105px;dialogWidth:245px;center:yes;edge:raised;scroll:no;status:no;unadorned:yes;");
parent.location="a.html";
}
//-->
</script>
<input type=button name=add value=add onclick=javascript:add()></body>
</html>
b.jsp代码:
<html>
<head>
<title>新增<%=showType%></title>
<link rel="STYLESHEET" type="text/css" href="../common/Css/Public.css">
<script LANGUAGE="javascript">
<!--
function CloseWindow(){
window.close();
}
function Action(){
window.addinfo.submit();
window.close();
}
//-->
</script>
</head><body leftmargin="0" topmargin="0" rightmargin="0" class=body>
<form method="POST" name=addinfo action="questionsetoperator">
<table width="100%">
<p align="right"><input type="button" value="确定" name="OK" onclick=javascript:Action()>
<input type="button" value="取消" name="cancel" onclick=javascript:CloseWindow()></p>
</td>
</tr>
</table>
</form>
</body>
这里questionsetoperator是指向servlet
<PARAM NAME="Command" VALUE="Close"></OBJECT>
<input type=button value=确定 onclick=hh3.Click()>
试试这个!
b.jsp中一个按钮链接一个servlet后window.close()
----------------------------------------------------------按钮怎么链接servelt的?如果是button按钮的onclick=open("..."),试试改成iframe1.location="...",如果是submit按钮则把form的target指向iframe1。其中iframe1是放在页面中的隐藏帧,不显示。参见:http://www.csdn.net/expert/topic/1061/1061875.xml?temp=.1173822这几天这个问题怎么老被问起呢?期中考的题目吗?