我心飞翔的专栏

U make it happen

mistake

I make a mistake:(9/13/2007 3:48:00 PM )

on jsp page: IN a javascript function, I invoke a java function in this page.   Then I get an error: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    when my colleague told to me that: java code has been execute when jsp page loading, where U want to execute java code after jsp page loading, that's wrong!

I study a function in javascript, that's eval(), like this:

function copyme(i){
     if(i==10) return;
     var myname = eval('formdata.score'+i);
     var toname = eval('document.all.score_left'+(i+1));
     var mytr = eval('document.all.rowscore'+(i+1));
     if(myname.value!=null && myname.value!=''){
      mytr.style.display='';
      mytr.disabled=false;
      toname.innerHTML=myname.value;
     }
   }

2: today I make another mistake:(2007-09-18)

xxx.java--1--> xxx.jsp              xxx.jsp---2--->xxx.java

过程1中可以传递request, if there are request.setAttribute(key, value) in xxx.java, when it forward xxx.jsp, we can get the just value

过程2中不可传递request 到xxx.java,前台到后台只能传递表单数据,要不就放到 hidden input 里。

阅读更多
个人分类: java
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

mistake

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭