applet 嵌入jsp 等传参数问题
小弟最近公司做一个编辑器,最后选择用applet小程序嵌入jsp 中
相当于一个控制,总结分享一下:
主要碰到以下问题:
1,传参数问题:
applet-->jsp:
<applet code="rubikApp.class" archive="rubik.jar" width="300" height="300">
<param name="beta" value=a> </applet>
applet-->js //定义JS事件方法; (用这个还要用到jdk的一个jar包jre\lib\jaws.jar )
public void getText(String type,String str1,String str2,String str3){
try{
JSObject jsobject = JSObject.getWindow(this);
jsobject.eval("Event(\""+type+"\",\""+str1+"\",\""+str2+"\",\""+str3+"\")");
}catch(Exception e){
e.printStackTrace();
}
}
在JS中;
function Event(type,str1,str2,str3){
//alert("type="+type+",,str="+str1);
if(type=="delete"){//说明是要执行删除文件;
//alert("准备要删除文件");
parent.delFrame.location = "delfile.asp?filename="+str1;
}
2:换行问问题,还没解决!
相关文档:
I used Eclipse to try the google app engine demo project: guestbook.
when i create a *.jsp file in the WAR directory,the error information appear:
"Your Web Application Project must be configured to use a JDK in order to use JSPs."
solution:
It is because Eclipse put the JRE to the JRE directory ......
今天总算把
response.setHeader("progma", "no-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires" ......
HTML:
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<META HTTP-EQUIV="expires" CONTENT="0">
PHP:
header("Expires: Mon, 26 Jul 1997 ......
jsp:useBean标签用于指定在当前Jsp页面中要用到的JavaBean
格式:<jsp:Bean id=? scope=? class=? />
id:自定义一个在当前页面中要引用的JavaBean(即Java类)的一个对象名(该对象在后面的代码中就可以调用其所属的JavaBean中的属性和方法)
scope:用于指定该JavaBean的作用范围,取值如下
&nbs ......