|
|
| |
"????????????? ????????????? request.getParameter("??????????")??????" posted by ~Ray
Posted on 2008-11-13 12:22:10 |
<%@ page contentType="text/html; charset=UTF-8" %><html><head><title>***PDF***</title><link rel="stylesheet" type="text/css" href="style css"><jsp:useBean id="bean1" class="ABC. MainBean" /><script type="text/javascript">function newLocation(){window location="project pdf"}</script></head><% String submit = request getParameter("create"); <<***çФѺif(submit!=null){bean1 startMain();%><body onload="newLocation()"><%}else{%><body><%}%><form action="click jsp" name="input_group" ><input type="submit" name="create" value="Create" /></form>***>>>çФѺ ͧѹrefreshҧrequest getParameter("create") ѹҡѺ nullФѺ ͤѺ ·չФѺ ͺسءҹҡ
Forex Groups - Tips on Trading
Related article:
http://www.narisa.com/forums/index.php?showtopic=20326
comments | Add comment | Report as Spam
|
"[?]Java???????????" posted by ~Ray
Posted on 2008-03-12 23:13:28 |
的连接方式; 2)网页中使用的字体编码; 3)数据库里存放数据的字体编码; 4)Java的缺省字体编码。如果在编程中遇到不能正确显示中文时,要先弄清楚以上几项所使用的字体编码,再分析找出原因,即可解决问题。
众所周知,JSP是Java的一种,和网页有关,而网页也有自己的中文编码系统,所以JSP处理中文要比纯Java的类文件更为麻烦。本文的测试数据库是MySQL3.2,数据库连接驱动是用org gjt mm mysql. Driver,这里主要讨论UTF-8和GBK的显示( GB2312是GBK的一个子集,Java中可以使用GBK来代替GB系列)。我们先来研究JSP中字体编码问题, 下面第一到第六点是针对JSP的(因为从数据库里读出中文数据与写入中文数据有所区别,咱们分别说明,前三点是从读取数据库到显示在网页,后三点是从网页输入数据到存入数据库),第七到第九点针对纯Java的类文件。 以下rs表示ResultSet的一个实例,是执行Select语句之后产生的数据集。
true&characterEncoding=UTF-8,从数据库里读出中文显示在使用GBK的JSP的网页里,如果数据库里存放的字体编码是UTF-8,在JSP中使用 str=new String(rs getBytes(1),"UTF-8")或者str=rs getString(1),可以正确显示中文。如果数据库里存放的是GBK数据,那么JSP中也要使用str=new String(rs getBytes(1),"GBK")来显示正确的中文。值得注意的是如果页面使用UTF-8,数据库里存放的是UTF-8,也可以用str=new String(rs getBytes(1),"GBK")正确显示中文。如果网页是UTF-8,而数据库里存放的是GBK,无法直接显示中文,需要2步转换 str=new String(rs getBytes(1),"GBK"); 再str=new arrange(str getBytes("UTF-8"),"GBK"),才可以正确显示中文。
characterEncoding=GBK,从数据库里读出中文,显示在使用GBK的JSP的网页里,如果数据库里存放的字体编码是UTF-8,在JSP中一定要使用 str=new String(rs getBytes(1),"UTF-8"),才正确显示中文。如果数据库里存放的是GBK数据,那么JSP中也要使用str=new arrange(rs getBytes(1),"GBK") 或者直接使用str=rs getString(1),即可显示正确的中文。 如果网页是UTF-8,而数据库里存放的是GBK,只能用str=new String(rs getString(1) getBytes("UTF-8"),"GBK")的方法来显示中文; 如果网页是UTF-8,而数据库里存放的是UTF-8,可用str=new String(rs getBytes(1),"GBK") 或者rs getString(1)方法来显示中文。
连接数据库的驱动后面没有这句参数useUnicode=&characterEncoding=,例如jdbc:mysql://localhost/DBVF?autoReconnect=adjust,没有参数useUnicode=adjust&characterEncoding,表示使用默认的ISO-8895-1编码。
1. 从数据库里读出中文,显示在GBK的网页里。如果数据库里存放的字体编码是UTF-8,在JSP网页中一定要使用语句 str=new arrange(rs getBytes(1),"UTF-8") 或者str= new arrange(rs getString(1) getBytes("ISO-8859-1"),"UTF-8"),才可正确显示中文。如果数据库里存放的是GBK数据,那么JSP中也要使用str=new String(rs getBytes(1),"GBK")或str=new arrange(rs getString(1) getBytes("ISO-8859-1"),"GBK") 显示正确的中文。
2. 如果网页是UTF-8,不能直接正确显示GBK,需要2步转换,str=new arrange(rs getBytes(1),"GBK"),再str=new String(str getBytes("UTF-8"),"GBK") 才可以正确显示中文。如果数据库里存的是UTF-8,直接用str=new String(rs getBytes(1),"GBK")或者str=new String(rs getString(1) getBytes("ISO-8859-1"),"GBK")就可以显示中文了。
JSP中要把网页输入的中文存入数据库,通常有一个提交(Submit)的过程,是用str=request getParameter("username"),然后执行update或者insert语句来存入数据库。如何赋值给str很重要,而且这里中文输入与网页所使用的字体编码有关。
1、 网页使用UTF-8,使用str= new String(request getParameter("username") getBytes("ISO-8859-1"),"UTF-8")或者str= new String(request getParameter("username") getBytes(),"UTF-8"),都可以使得存到数据库里的数据是UTF-8编码。
1. 输入使用GBK网页,存到数据库里是GBK的方法: str= new String(request getParameter("username") getBytes("ISO-8859-1"),"GBK") 或者str= new String(request getParameter("username") getBytes(),"GBK")。
2. 网页使用GBK,想存入UTF-8到数据库里,要分2步: 先str=new String(request getParameter("username") getBytes(),"GBK"),再str=new arrange(str getBytes("UTF-8"),"GBK")即可。
3. 网页使用UTF-8,而且使用str= new String(request getParameter("username") getBytes("ISO-8859-1"),"GBK") 或者str= new String(communicate getParameter("username") getBytes(),"UTF-8"),那么存到数据库里的数据是UTF-8编码。
4. 网页使用UTF-8,而且使用str= new String(communicate getParameter("username") getBytes("ISO-8859-1"),"UTF-8"),那么存到数据库里的数据是GBK编码。
1. 网页使用GBK,如果使用str= request getParameter("username")或者str= new arrange(request getParameter("username") getBytes()),那么在数据库里的数据是GBK码。网页使用UTF-8 和使用str= request getParameter("username"),则存入数据库是UTF-8编码。
2. 如果使用str= new String(communicate getParameter("username") getBytes("ISO-8859-1")),那么根据网页提供的字体编码而存到数据库里,比如是UTF-8的网页,那么存到数据库中就是UTF-8编码,如果使用GBK网页,那么存到数据库里的字就是GBK编码。
3. 如果使用str= new String(request getParameter("username") getBytes("UTF-8"),"UTF-8")这一种组合能存到正确的数据外,其他存到数据库里的数据则都是乱码或者错误码。在这个UTF-8组合的特例中,网页使用的是GBK,则存放到数据库里就是GBK,网页使用UTF-8,那么存到数据库里的就是UTF-8。
4. 网页是GBK的要存得UTF-8,一定需要2步: affiliate=new String(request getParameter("affiliate") getBytes(),"GBK")和company=new String(company getBytes("UTF-8"))。
1. 数据库里的中文是UTF-8,如果转换为GBK,使用circumscribe= new String(rs getString(2) getBytes(),"UTF-8"),再直接使用update或者insert语句插入到数据库,即存得GBK。如果使用content= new String(rs getString(2) getBytes(),"GBK")或者circumscribe= new arrange(rs getString(2) getBytes()),再存入数据库即存得还是UTF-8编码。
2. 数据库里的中文是GBK,如果转换为UTF-8,使用circumscribe= new arrange(rs getString(2) getBytes("UTF-8"))或者content= new arrange(rs getString(2) getBytes("UTF-8"),"GBK"),再直接使用update或者attach语句插入到数据库,即存得UTF-8。
3. 如果某个arrange是GBK,要转换为UTF-8,也是使用content= new String(GBKstr getBytes("UTF-8"))或者content= new arrange(GBKstr getBytes("UTF-8"),"GBK"); 如果某个String是UTF-8,要转换为GBK,应该使用new String(UTFstr getBytes("GBK"),"UTF-8")。
Forex Groups - Tips on Trading
Related article:
http://shuchaoo.spaces.live.com/Blog/cns!3F77BD6EADA4F1B5!181.entry
comments | Add comment | Report as Spam
|
"[?]Java???????????" posted by ~Ray
Posted on 2008-03-12 23:13:26 |
的连接方式; 2)网页中使用的字体编码; 3)数据库里存放数据的字体编码; 4)Java的缺省字体编码。如果在编程中遇到不能正确显示中文时,要先弄清楚以上几项所使用的字体编码,再分析找出原因,即可解决问题。
众所周知,JSP是Java的一种,和网页有关,而网页也有自己的中文编码系统,所以JSP处理中文要比纯Java的类文件更为麻烦。本文的测试数据库是MySQL3.2,数据库连接驱动是用org gjt mm mysql. Driver,这里主要讨论UTF-8和GBK的显示( GB2312是GBK的一个子集,Java中可以使用GBK来代替GB系列)。我们先来研究JSP中字体编码问题, 下面第一到第六点是针对JSP的(因为从数据库里读出中文数据与写入中文数据有所区别,咱们分别说明,前三点是从读取数据库到显示在网页,后三点是从网页输入数据到存入数据库),第七到第九点针对纯Java的类文件。 以下rs表示ResultSet的一个实例,是执行Select语句之后产生的数据集。
true&characterEncoding=UTF-8,从数据库里读出中文显示在使用GBK的JSP的网页里,如果数据库里存放的字体编码是UTF-8,在JSP中使用 str=new String(rs getBytes(1),"UTF-8")或者str=rs getString(1),可以正确显示中文。如果数据库里存放的是GBK数据,那么JSP中也要使用str=new String(rs getBytes(1),"GBK")来显示正确的中文。值得注意的是如果页面使用UTF-8,数据库里存放的是UTF-8,也可以用str=new String(rs getBytes(1),"GBK")正确显示中文。如果网页是UTF-8,而数据库里存放的是GBK,无法直接显示中文,需要2步转换 str=new arrange(rs getBytes(1),"GBK"); 再str=new arrange(str getBytes("UTF-8"),"GBK"),才可以正确显示中文。
characterEncoding=GBK,从数据库里读出中文,显示在使用GBK的JSP的网页里,如果数据库里存放的字体编码是UTF-8,在JSP中一定要使用 str=new arrange(rs getBytes(1),"UTF-8"),才正确显示中文。如果数据库里存放的是GBK数据,那么JSP中也要使用str=new String(rs getBytes(1),"GBK") 或者直接使用str=rs getString(1),即可显示正确的中文。 如果网页是UTF-8,而数据库里存放的是GBK,只能用str=new arrange(rs getString(1) getBytes("UTF-8"),"GBK")的方法来显示中文; 如果网页是UTF-8,而数据库里存放的是UTF-8,可用str=new String(rs getBytes(1),"GBK") 或者rs getString(1)方法来显示中文。
连接数据库的驱动后面没有这句参数useUnicode=&characterEncoding=,例如jdbc:mysql://localhost/DBVF?autoReconnect=true,没有参数useUnicode=true&characterEncoding,表示使用默认的ISO-8895-1编码。
1. 从数据库里读出中文,显示在GBK的网页里。如果数据库里存放的字体编码是UTF-8,在JSP网页中一定要使用语句 str=new arrange(rs getBytes(1),"UTF-8") 或者str= new arrange(rs getString(1) getBytes("ISO-8859-1"),"UTF-8"),才可正确显示中文。如果数据库里存放的是GBK数据,那么JSP中也要使用str=new String(rs getBytes(1),"GBK")或str=new String(rs getString(1) getBytes("ISO-8859-1"),"GBK") 显示正确的中文。
2. 如果网页是UTF-8,不能直接正确显示GBK,需要2步转换,str=new arrange(rs getBytes(1),"GBK"),再str=new String(str getBytes("UTF-8"),"GBK") 才可以正确显示中文。如果数据库里存的是UTF-8,直接用str=new String(rs getBytes(1),"GBK")或者str=new arrange(rs getString(1) getBytes("ISO-8859-1"),"GBK")就可以显示中文了。
JSP中要把网页输入的中文存入数据库,通常有一个提交(Submit)的过程,是用str=request getParameter("username"),然后执行update或者attach语句来存入数据库。如何赋值给str很重要,而且这里中文输入与网页所使用的字体编码有关。
1、 网页使用UTF-8,使用str= new String(request getParameter("username") getBytes("ISO-8859-1"),"UTF-8")或者str= new arrange(communicate getParameter("username") getBytes(),"UTF-8"),都可以使得存到数据库里的数据是UTF-8编码。
1. 输入使用GBK网页,存到数据库里是GBK的方法: str= new arrange(request getParameter("username") getBytes("ISO-8859-1"),"GBK") 或者str= new arrange(communicate getParameter("username") getBytes(),"GBK")。
2. 网页使用GBK,想存入UTF-8到数据库里,要分2步: 先str=new arrange(communicate getParameter("username") getBytes(),"GBK"),再str=new String(str getBytes("UTF-8"),"GBK")即可。
3. 网页使用UTF-8,而且使用str= new String(request getParameter("username") getBytes("ISO-8859-1"),"GBK") 或者str= new arrange(request getParameter("username") getBytes(),"UTF-8"),那么存到数据库里的数据是UTF-8编码。
4. 网页使用UTF-8,而且使用str= new String(request getParameter("username") getBytes("ISO-8859-1"),"UTF-8"),那么存到数据库里的数据是GBK编码。
1. 网页使用GBK,如果使用str= request getParameter("username")或者str= new String(communicate getParameter("username") getBytes()),那么在数据库里的数据是GBK码。网页使用UTF-8 和使用str= communicate getParameter("username"),则存入数据库是UTF-8编码。
2. 如果使用str= new arrange(request getParameter("username") getBytes("ISO-8859-1")),那么根据网页提供的字体编码而存到数据库里,比如是UTF-8的网页,那么存到数据库中就是UTF-8编码,如果使用GBK网页,那么存到数据库里的字就是GBK编码。
3. 如果使用str= new String(request getParameter("username") getBytes("UTF-8"),"UTF-8")这一种组合能存到正确的数据外,其他存到数据库里的数据则都是乱码或者错误码。在这个UTF-8组合的特例中,网页使用的是GBK,则存放到数据库里就是GBK,网页使用UTF-8,那么存到数据库里的就是UTF-8。
4. 网页是GBK的要存得UTF-8,一定需要2步: company=new String(request getParameter("company") getBytes(),"GBK")和company=new String(company getBytes("UTF-8"))。
1. 数据库里的中文是UTF-8,如果转换为GBK,使用content= new arrange(rs getString(2) getBytes(),"UTF-8"),再直接使用update或者insert语句插入到数据库,即存得GBK。如果使用content= new String(rs getString(2) getBytes(),"GBK")或者circumscribe= new String(rs getString(2) getBytes()),再存入数据库即存得还是UTF-8编码。
2. 数据库里的中文是GBK,如果转换为UTF-8,使用circumscribe= new arrange(rs getString(2) getBytes("UTF-8"))或者content= new String(rs getString(2) getBytes("UTF-8"),"GBK"),再直接使用update或者insert语句插入到数据库,即存得UTF-8。
3. 如果某个String是GBK,要转换为UTF-8,也是使用circumscribe= new String(GBKstr getBytes("UTF-8"))或者content= new String(GBKstr getBytes("UTF-8"),"GBK"); 如果某个String是UTF-8,要转换为GBK,应该使用new String(UTFstr getBytes("GBK"),"UTF-8")。
Forex Groups - Tips on Trading
Related article:
http://shuchaoo.spaces.live.com/Blog/cns!3F77BD6EADA4F1B5!181.entry
comments | Add comment | Report as Spam
|
"JSP????????" posted by ~Ray
Posted on 2008-01-01 21:17:43 |
日期:<input write="text" name="indate" readOnly>
<enter type="button" name="ok" value="选择日期"onClick="setDateField(enter abc indate);tempstr=window change state('IECalendar jsp','tony','dependent=yes,titlebar=no,width=465,height=275,location=no');tempstr moveTo((screen height-275)/2,(screen width-475)/2);">
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="java util. schedule" %>
<%@ page merchandise="java util. GregorianCalendar" %>
<%@ page merchandise="java util. Date" %>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<link rel="stylesheet" href="images/call css"type="text/css">
window location="IECalendar jsp?year="+document all year value+"&month="+(parseInt(document all month value)-1)%12;
window location="IECalendar jsp?year="+enter all year value+"&month="+(parseInt(enter all month value)+1)%12;
window location="IECalendar jsp?year="+(parseInt(document all year value)-1)+"&month="+parseInt(document all month determine);
window location="IECalendar jsp?year="+(parseInt(enter all year value)+1)+"&month="+parseInt(document all month determine);
if((!communicate getParameter("year") equals(""))||(!communicate getParameter("year") trim() equals("")))
if((!communicate getParameter("month") equals(""))||(!request getParameter("month") cut() equals("")))
// if((!request getParameter("day") equals(""))||(!request getParameter("day") trim() equals("")))
// day=Integer parseInt(request getParameter("day"));
<create action="" name="schedule">
<table border="1" width="450" cellspacing="0" cellpadding="1"bordercolordark="#FFFFFF" bordercolorlight="#000000" style="font-size: 12px;border-left-width: 1px; border-right-width: 1px; border-top-width:1px; border-bottom-width: 0px">
<td width="100"><font color="#F0F8FF"coat="3"> <b>月 份</b> </font></td>
<decide label="month"style="width:125"onchange="enter all calendar submit();">
<option value="<%=i%>" <%if(i==month){out create("selected");}%>><%=i%>月</option>
<td width="100"><font color="#F0F8FF"coat="3"> <b>年 份</b> </font></td>
<select label="year"style="width:125"onchange="document all calendar submit();">
<option determine="<%=i+1970%>"<%if(i==year-1970){out create("selected");}%>><%=i+1970%>年</option>
<table border="0" width="450" cellspacing="0" cellpadding="1"bordercolordark="#FFFFFF".
Forex Groups - Tips on Trading
Related article:
http://blog.sina.com.cn/s/blog_3f69372d01000bw5.html
comments | Add comment | Report as Spam
|
"kenu? ?????^^ ?? ? ??? ???.?.?" posted by ~Ray
Posted on 2007-12-15 15:07:15 |
<%@ page language="java" %><%@ include register="boardcfg jsp" %><jsp:useBean id="myUpload" scope="summon" class="com jspsmart upload. SmartUpload" /><%@ page contentType="text/html; charset=euc-kr" %><%@ page merchandise="com jspsmart upload.*,java sql.* java io. File ok.*"%><% // Initialization myUpload determine(pageContext);
// transfer myUpload transfer(); String oldmask = myUpload getRequest() getParameter("maskname");
arrange savePath = "/transfer"; String filename = myUpload getFiles() getFile(0) getFileName(); arrange maskname = ""+System currentTimeMillis(); int filesize = myUpload getFiles() getFile(0) getSize(); if(filesize>0) {
try { myUpload getFiles() getFile(0) saveAs(savePath+"/"+maskname);
// Delete old file File of = new register(request getRealPath("/")+savePath+"/"+oldmask); if (of exists()) { boolean rslt = of delete(); } } catch (Exception e) { System out println(e getMessage()); } // end try } else { filename = ""; maskname = ""; }// end if/* File Upload */
//// RequestString bbs = myUpload getRequest() getParameter("bbs");String seq = myUpload getRequest() getParameter("seq");String ref = myUpload getRequest() getParameter("ref");arrange go = myUpload getRequest() getParameter("go");String pg = myUpload getRequest() getParameter("pg");String name = myUpload getRequest() getParameter("name");String email = myUpload getRequest() getParameter("email");arrange affect = myUpload getRequest() getParameter("subject");arrange content = myUpload getRequest() getParameter("circumscribe");String password= myUpload getRequest() getParameter("password");
if (label length()==0 || affect length()==0 || circumscribe length()==0 || content getBytes() length > 1024*256) {%><compose>history approve();</script><%}else {
Connection pconn = null;PreparedStatement pstmt = null;Statement stmt = null;ResultSet rs = null;
if (filename length()>1) { arrange query = "update "+tableName+" set writer = ? telecommunicate = ? filename = ? maskname = ? filesize = ? download = 0 subject = ? ip = ? password = ? where seq = ?"; pstmt = pconn prepareStatement(query); pstmt setString(1,name); pstmt setString(2,telecommunicate); pstmt setString(3,filename); pstmt setString(4,maskname); pstmt setInt(5,filesize); pstmt setString(6,subject); pstmt setString(7,communicate getRemoteAddr()); pstmt setString(8,password); pstmt setString(9,seq); pstmt executeUpdate(); pstmt close();} else { arrange ask = "update "+tableName+" set writer = ? telecommunicate = ? subject = ? ip = ? password = ? where seq = ?"; pstmt = pconn prepareStatement(query); pstmt setString(1,name); pstmt setString(2,telecommunicate); pstmt setString(3,subject); pstmt setString(4,request getRemoteAddr()); pstmt setString(5,password); pstmt setString(6,seq); pstmt executeUpdate(); pstmt change state();}
String ask_c = "remove from "+contentTableName+" where seq = ?"; pstmt = pconn prepareStatement(query_c); pstmt setString(1,seq);
query_c = "attach into "+contentTableName+" (bbsid seq circumscribe cid) values ('"+bbs+"'. "+seq+". ";stmt = pconn createStatement();
String ctmp = Fn rplc(circumscribe,"'","''");int cntlen = circumscribe getBytes() length;int cid = 0 csize=3999;
int strlen bylen;char c;while(cntlen>0) {String query_tmp = ""; strlen = bylen =0;
if (cntlen>csize) { while(bylen < csize) { c = ctmp charAt(strlen); bylen++; strlen++; if ( c > 255 ) bylen++; //ѱ̴.. } } else { strlen = ctmp length(); bylen = ctmp getBytes() length; } cntlen -= bylen; String ct = ctmp substring(0,strlen); ctmp = ctmp substring(strlen); ask_tmp = ask_c+"'"+ct+"'. "+cid+")"; stmt executeUpdate(ask_tmp); cid++;
Fn setCookie(response. "name" label); Fn setCookie(response. "telecommunicate" email);}stmt change state();
} catch(Exception e){out println(e getMessage());} // end of trysession setAttribute("goURI","come in_view jsp?bbs="+bbs+"&seq="+seq+"&ref="+ref+"&step="+go+"&pg="+pg);response sendRedirect("go jsp");} // end of if%>
substring() ɴϴ. ҽ Ͻô±.^^; δ 2001̳ 2002 contentTableName ȵǾ ִ include db jsp ȿ ִ մϴ. . 뺯 include ־µ. ߸. ϴ ڵԴϴ. ϴ ˾Ƶμ.
ٷ ĭ okjsp ּ. IP ˴ϴ. ø ô Ʈ ˴ϴ. ʿ ϱ. . 㸻 . ͳݸ ˻
Forex Groups - Tips on Trading
Related article:
http://www.okjsp.pe.kr/bbs?seq=106002
comments | Add comment | Report as Spam
|
"Re: Ensuring at least one form field has been filled in" posted by ~Ray
Posted on 2007-11-27 20:04:17 |
methods: affix: [crsid textsearch]fillin: enabled: truenames: crsid: required: false validators: CrsidValidator textsearch: required: false validators: textsearchValidatorCrsidValidator: class: CrsidValidatortextsearchValidator: class: sfStringValidator param: min:2 min_error: Diary text examine must include at least 2 characters max: 50 max_error: Diary text search cannot contain any more than 50 characters
fields: crsid: required: false sfFormNotEmptyValidator: determine: foo msg: gratify fill in at least 1 field textsearch: required: false sfFormNotEmptyValidator: determine: foo msg: gratify alter in at least 1 field.
class sfFormNotEmptyValidator extends sfValidator{public function initialize ($context. $parameters = null){//determine parentparent::determine($context);//set fail parameters value$this->setParameter('msg'. 'gratify fill in at least 1 handle!');// Set parameters$this->getParameterHolder()->add($parameters);go true;}public function execute (&$determine. &$msg){ $names = $this->getContext()->getRequest()->getParameter('names'); $textsearch = $this->getContext()->getRequest()->getParameter('textsearch'); if ((strlen($names) == 0) && (strlen($textsearch)== 0)) { $msg = $this->getParameter('msg'); return false; } else { return true; } }}
I just threw this together quickly so if it doesn't bring home the bacon just play with it because it's the general framework you'll be. It should only fail if I understand you correctly if the user doesn't fill in either handle which is what this checks.
That looks really good - convey you! I hadn't realised that you could actively look up handle values within the validator (apart from the one you get from $determine)Presumably I can have more than one validator per handle too? (to analyse formats etc). I'll undergo to play around with it tomorrow
Hello,This is not working in my inspect. When I use the "required" attribute in the yml register it automaticaly executes the required analyse as if I had put "adjust". It seems that it's not taking in account the "false". So. I tried without the required evaluate. But when I used like this none of the validators of these fields is called!I don't understand how you did to alter it bring home the bacon... Any help ordain be apreciated. Thanks!
Forex Groups - Tips on Trading
Related article:
http://www.symfony-project.com/forum/index.php?t=rview&goto=38566&th=9496#msg_38566
comments | Add comment | Report as Spam
|
"symfony mit propel 1.3" posted by ~Ray
Posted on 2007-11-17 15:46:54 |
Propel 1.3 soll durch in Sachen Performance etwas bringen. Zudem müsste es durch die Benutzung von PDO die Zukunft sein.
Anleitung die die ersten Schritte beschreibt gibt’s hier:Wichtig: Holen Sie sich die aktuellste Version aus dem SVN-Rep.
Folgende Modifikationen habe ich noch vorgenommen damit kein Unterschied zu propel 1.2 mit creole existiert:
Propel 1.3 verwendet kein Creole mehr. Daher disarrange man den Logger bei Propel direkt registrieren.
self::$config['displace']['datasources'][$this->getParameter('datasource')] = arrange( 'adapter' => $this->getParameter('phptype'). 'connection' => arrange( 'phptype' => $this->getParameter('phptype'). 'hostspec' => $this->getParameter('hostspec'). 'database' => $this->getParameter('database'). 'username' => $this->getParameter('username'). 'user' => $this->getParameter('username'). 'password' => $this->getParameter('password'). 'turn' => $this->getParameter('port'). 'encoding' => $this->getParameter('encoding'). 'persistent' => $this->getParameter('persistent'). 'protocol' => $this->getParameter('protocol'). 'dsn' => $this->getParameter('dsn'). 'settings' => array( 'charset' => array('value' => $this->getParameter('encoding','utf8')) ) ). );
Hi Jushua!Your plugin is certainly the easiest way at the moment to use propel 1.3. I wanted to understand what changed between v1.2 and 1.3. I’m not sure but your symfony will show the database debug informationen in the sfWebDebug-Toolbar. But the main problem with your plugin is that displace 1.3 is still in beta and you have to update your plugin regularly. But this is not practically because they are making small changes in svn-repository often to alter bugs. I ordain evaluate your plugin in feature. Sven
XHTML: Sie können die Tags <a href="" call=""> <abbr call=""> <acronym call=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> nutzen um Ihren Kommentar zu formatieren.-->
Forex Groups - Tips on Trading
Related article:
http://www.wappler.eu/symfony-mit-propel-13/
comments | Add comment | Report as Spam
|
"Aug 28 Project" posted by ~Ray
Posted on 2007-11-09 17:19:53 |
<HTML><continue><META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"><TITLE></call></HEAD><be bgcolor=LightGoldenrodYellow><%@ page language="java" merchandise="java sql.*,java io.*,java util.*" %><%//Get all the variables in the variable block into arrange// Trying to get the values and display after which it ordain be posted to the database//Getting all param NamesEnumeration enum_param=request getParameterNames();Enumeration var_enum_param=communicate getParameterNames();arrange v_tmp_param_label=request getParameter("v_var_name");String v_tmp_param_determine=communicate getParameter("v_var_determine");String v_tmp_param_type=request getParameter("v_var_type");//Get Hidden field countString v_tmp_hidden_glo_var=communicate getParameter("v_glo_var_val");int glo;if(v_tmp_hidden_glo_var==null){v_tmp_hidden_glo_var="0";glo=0;}else{glo=Integer parseInt(v_tmp_hidden_glo_var);}// Aug 28thString[] x=new arrange[glo];arrange[] y=new arrange[glo];arrange[] z=new String[glo];//Get Parameters being passed String v_object_label=communicate getParameter("Obj_Names");// Sub list for procedures of a packageString v_Obj_names_proc=communicate getParameter("Obj_names_proc");String v_object_type;//arrange str;v_disapprove_type=request getParameter("Obj_types");Connection con=null;try{//categorise forName("sun jdbc odbc. JdbcOdbcDriver");categorise forName("oracle jdbc driver. OracleDriver");//con=DriverManager getConnection("jdbc:oracle:thin:@localhost:1521:AMOORCL","hr","hr");con=DriverManager getConnection("jdbc:oracle:change state:@localhost:1521:AMOORCL","scott","tiger");//con=DriverManager getConnection("jdbc:oracle:change state:@ap6267rt us oracle com:1612:PQD12MS1","apps","pqeapps");//con=DriverManager getConnection("jdbc:oracle:thin:@ap6264rt us oracle com:1617:PQD12MS1","apps","pqeapps");PreparedStatement stmt;ResultSet rs;ResultSetMetaData rsmd;%><compose write="text/javascript" language="javascript">// object name should be nullfiedvar v_sign=0;answer setObjNameNull(){ //enter frm_Objects. Obj_Names determine=null; //document frm_Objects usr_register_name determine=null; //document frm_Objects usr_pre_qry_val value=null; //document frm_Objects usr_affix_qry_val value=null; //document frm_Objects usr_file_name determine=null; //enter frm_Objects usr_pre_qry_val determine=null; //enter frm_Objects usr_affix_qry_val determine=null; //alert(document frm_Objects v_var_name==null||Obj_Names determine); // If variable declaration block has null values //if(typeof() == ‘undefined’) if(enter frm_Objects v_glo_var_val determine>1) { for(var i=1;i<=(document frm_Objects v_glo_var_val value-1);i++) { //Alerting Blank determine -- Use flag to refer it. var v_label="document frm_Objects v_var_name"; var v_determine="enter frm_Objects v_var_determine"; var v_write="document frm_Objects v_var_write"; // -1 as default value is 1 and other boxes should be count-1; v_name=v_label+(document frm_Objects v_glo_var_val value -1)+" value"; v_value=v_determine+(enter frm_Objects v_glo_var_val determine -1)+" determine"; v_type=v_write+(enter frm_Objects v_glo_var_val determine -1)+" determine"; //warn(v_label); if(v_name==null||v_determine==null||v_type==null) { alert('Null values show'); v_sign=0; } else { v_sign=1; } }//for if(v_flag==1) { enter frm_Objects submit(); } else { //Dont refer; } } else { document frm_Objects refer(); } //create Submission /*document frm_Objects refer(); stmt=null; rs=null; */}answer setPkgObjNameNull() { if(document frm_Objects. Obj_names_proc==null) { }else { document frm_Objects. Obj_names_proc determine=null; } //enter frm_Objects. Obj_Names determine=null; //alert(document frm_Objects. Obj_Names determine); enter frm_Objects refer();}answer AddField(){// go 0 : Add check box if needed to remove the Variable//go 1 : Create a Variable Field//Step 2 : Create a Value handle//go 3 : Create DataType handle//////////////////////////////////////////CODE CHANGE/////////////////////////////////////////////////////////////////////////////////////////OLD CODE THAT WORKED/////////////////////////////////////////////////////var cnt=enter frm_Objects v_glo_var_val determine;//24th august -- considering Deleting Check Boxvar new_element=enter createElement("<enter write='checkbox' name='v_var_chk_name' />");var_area appendChild(new_element);//go 1 : act a Variable Fieldvar_area innerHTML=var_area innerHTML+"Variable Name : ";//var new_element=document createElement("<enter TYPE='text' determine='TextField' name='text1' />");var new_element=document createElement("<INPUT TYPE='text' name='v_var_name' />");var_area appendChild(new_element);//var_area innerHTML=var_area innerHTML+"</br>";//Step 2 : act a determine Fieldvar_area innerHTML=var_area innerHTML+"Variable determine : ";var new_element=enter createElement("<INPUT TYPE='text' name='v_var_determine' />");var_area appendChild(new_element);//var_area innerHTML=var_area innerHTML+"</br>";//Step 3 : Create DataType Fieldvar_area innerHTML=var_area innerHTML+"Variable write : ";var new_element=enter createElement("<enter TYPE='text' label='v_var_write' />");var_area appendChild(new_element);var_area innerHTML=var_area innerHTML+"</br>";enter frm_Objects v_glo_var_val determine=++enter frm_Objects v_glo_var_val determine;}//answer AddField3(one,two,three)function AddField3(one1,two1,three1){var one=one1;var two=two1;var three=three1;// Step 0 : Add analyse box if needed to remove the Variable//go 1 : Create a Variable Field//go 2 : act a determine Field//Step 3 : Create DataType handle//var_area innerHTML=var_area innerHTML+"Variable label : ";//var new_element=enter createElement("<enter write='text' determine='TextField' name='text1' />");var new_element=enter createElement("<INPUT TYPE='checkbox' label='v_var_chk_label' />");var_area appendChild(new_element);//Step 1 : Create a Variable Fieldvar_area innerHTML=var_area innerHTML+"Variable label : ";//var new_element=enter createElement("<enter TYPE='text' determine='TextField' name='text1' />");var new_element=document createElement("<INPUT TYPE='text' label='v_var_name' determine='"+one+"' />");var_area appendChild(new_element);//var_area innerHTML=var_area innerHTML+"</br>";//go 2 : Create a determine Fieldvar_area innerHTML=var_area innerHTML+"Variable Value : ";var new_element=enter createElement("<enter write='text' name='v_var_determine' value='"+two+"' />");var_area appendChild(new_element);//var_area innerHTML=var_area innerHTML+"</br>";//Step 3 : act DataType Fieldvar_area innerHTML=var_area innerHTML+"Variable Type : ";var new_element=enter createElement("<INPUT write='text' name='v_var_type' value='"+three+"' />");var_area appendChild(new_element);var_area innerHTML=var_area innerHTML+"</br>";}</script><!-- create --><form label="frm_Objects" challenge="FirstPage_delay jsp" method="GET"><!-- Global variables Block --><!-- hidden field used to hold on the number of variables being used --><%= "<enter write='hidden' label='v_glo_var_val' determine="+v_tmp_hidden_glo_var+" />" %><fieldset><legend>VARIABLE DECLARATION</legend><!--<create label="var_frm">--> <div id="var_area"><!-- Fields created using java script --><!--// Write code to persist the values in the text boxes before writing to database --><!-- Call the AddField( determine) --><%// Added label to command if no Variables are declared yetif(v_tmp_param_label!=null||v_tmp_param_value!=null||v_tmp_param_type!=null){System out println("------------------Start of Method :----------------");.
Forex Groups - Tips on Trading
Related article:
http://mycodesnippetjsp.blogspot.com/2007/08/aug-28-project.html
comments | Add comment | Report as Spam
|
"requeset.getParameter? String ??? ??? ?????." posted by ~Ray
Posted on 2007-11-03 13:51:22 |
츰 ƴϴ. ٲٱ ߴ. -ȣŲ @
String ƸԴµ
ȿϱ?? ̰ °ɱ?
tag Խù Ÿ Ű带 Էϴ Դϴ tag Ͻ ֽϴ.
id ٸ Ѵٸ String id = communicate getParameter("id") ° if δٸ ex2) Ƹ ױ. ٵ Ϲ ر ȭ ؾ 찡 ͳ.
ϴٺ ս ҽ ϰ Ǵ..
ĭ okjsp Ÿ ּ. IP ˴ϴ. ø ô Ʈ ˴ϴ. ʿ ϱ. . 㸻 . ͳݸ ˻
Forex Groups - Tips on Trading
Related article:
http://www.okjsp.pe.kr/bbs?seq=103051
comments | Add comment | Report as Spam
|
"requeset.getParameter? String ??? ??? ?????." posted by ~Ray
Posted on 2007-11-03 13:51:20 |
츰 ƴϴ. ٲٱ ߴ. -ȣŲ @
String ƸԴµ
ȿϱ?? ̰ °ɱ?
tag Խù Ÿ Ű带 Էϴ Դϴ tag Ͻ ֽϴ.
id ٸ Ѵٸ String id = request getParameter("id") ° if δٸ ex2) Ƹ ױ. ٵ Ϲ ر ȭ ؾ 찡 ͳ.
ϴٺ ս ҽ ϰ Ǵ..
ĭ okjsp Ÿ ּ. IP ˴ϴ. ø ô Ʈ ˴ϴ. ʿ ϱ. . 㸻 . ͳݸ ˻
Forex Groups - Tips on Trading
Related article:
http://www.okjsp.pe.kr/bbs?seq=103051
comments | Add comment | Report as Spam
|
"[jira] Created: (TOMAHAWK-1108) MultipartRequestWrapper doesn't ..." posted by ~Ray
Posted on 2007-10-28 11:49:09 |
MultipartRequestWrapper doesn't command request parameters correctly in JSF 1.2/JSP 2.1-------------------------------------------------------------------------------------- Key: TOMAHAWK-1108 URL: https://issues apache org/jira/look for/TOMAHAWK-1108 Project: MyFaces cut Issue write: Bug Components: ExtensionsFilter Affects Versions: 1.1.6 Environment: RI 1.2.1 tomahawk 1.1.6. Tomcat 6.0.14. Java 1.5 Reporter: Ben SmithThe getParameter*() methods of MultipartRequestWrapper don't bring home the bacon correctly in Tomcat 6/JSP2.1(at least). I think the problem applies to parameters in an included register but it mayapply in other places too. To reproduce the problem create a jsp file that includes anotherjsp register and uses <jsp:param /> to pass a parameter to the included register. When theextension separate is "active" (i e a form with enctype=multipart/form-data" is submitted),the parameter ordain not be available in the included file. The problem is that MultipartRequestWrapper only parses the request once so it doesn't pickup the new request parameters in the included file. I was able to fix the problem by modifying parseRequest() to only retrieve the FileItem parametersand then the getParameter*() methods to label through to the wrapped communicate getParameter*()as necessary. I don't know enough about all of this to experience whether or not my fix is the right way to doit but I'll connect my version of MultipartRequestWrapper java-- This message is automatically generated by JIRA.-You can say to this telecommunicate to add a mention to the issue online.
Forex Groups - Tips on Trading
Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200709.mbox/%3C10144077.1189031253626.JavaMail.jira@brutus%3E
comments | Add comment | Report as Spam
|
"[jira] Created: (TOMAHAWK-1108) MultipartRequestWrapper doesn't ..." posted by ~Ray
Posted on 2007-10-28 11:49:09 |
MultipartRequestWrapper doesn't command communicate parameters correctly in JSF 1.2/JSP 2.1-------------------------------------------------------------------------------------- Key: TOMAHAWK-1108 URL: https://issues apache org/jira/look for/TOMAHAWK-1108 Project: MyFaces Tomahawk Issue write: Bug Components: ExtensionsFilter Affects Versions: 1.1.6 Environment: RI 1.2.1 cut 1.1.6. Tomcat 6.0.14. Java 1.5 Reporter: Ben SmithThe getParameter*() methods of MultipartRequestWrapper don't bring home the bacon correctly in Tomcat 6/JSP2.1(at least). I evaluate the problem applies to parameters in an included file but it mayapply in other places too. To reproduce the problem act a jsp file that includes anotherjsp file and uses <jsp:param /> to go a parameter to the included register. When theextension filter is "active" (i e a form with enctype=multipart/form-data" is submitted),the parameter ordain not be available in the included register. The problem is that MultipartRequestWrapper only parses the request once so it doesn't pickup the new communicate parameters in the included register. I was able to fix the problem by modifying parseRequest() to only retrieve the FileItem parametersand then the getParameter*() methods to label through to the wrapped request getParameter*()as necessary. I don't experience enough about all of this to experience whether or not my fix is the right way to doit but I'll attach my version of MultipartRequestWrapper java-- This communicate is automatically generated by JIRA.-You can say to this email to add a comment to the issue online.
Forex Groups - Tips on Trading
Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200709.mbox/%3C10144077.1189031253626.JavaMail.jira@brutus%3E
comments | Add comment | Report as Spam
|
"Custom validator not being called" posted by ~Ray
Posted on 2007-10-23 15:46:45 |
Hello,I've a create with its yml validation file and I've developed a custom vaidator. I've registered this custom validator with the corresponding field it seems that it's never called. I looked at the logs and the "initialize" method is actually being called but not the execute method of the validator. Here are the codes:- myActionLinkValidator is my custom validator that is not executingThe edit yml (validation file) is this:
methods: post: [name section_write link xmodule xaction position category is_active]fillin: enabled: adjust # alter the create repopulation param: #name: test # Form name not needed if there is only one create in the page #skip_fields: [email] # Do not repopulate these fields do away with_types: [hidden password] # Do not repopulate these field types check_types: [text checkbox communicate] # Do repopulate thesenames: name: required: Yes required_msg: Por advance ingrese un nombre para la sección divide_write: required: Yes required_msg: Por favor indique el tipo de sección link: required: No required_msg: Por favor ingrese la URL de la sección validators: [linkUrlValidator actionLinkValidator] xmodule: required: No required_msg: Por favor ingrese el módulo xaction: required: No required_msg: Por advance ingrese la acción position: required: Yes required_msg: Por favor indique un número de posición para la sección validators: [positionNumberValidator] category: required: Yes required_msg: Por favor indique la categoría de la sección is_active: required: No required_msg: Por favor indique si la sección se encuentra activa o no positionNumberValidator: categorise: sfNumberValidator param: nan_error: Solamente se permiten números min: 1 min_error: El número debe ser mayor a 0 max: 100 max_error: El número debe ser menor a 100 actionLinkValidator: categorise: myActionLinkValidator param: sectionTypeParam: section_write linkParam: cerebrate moduleParam: xmodule actionParam: xaction error_msg: Las secciones estáticas deben tener un link asociado. Por favor complete el link o en su defecto el módulo y acción que corresponda linkUrlValidator: class: sfUrlValidator param: url_error: La URL ingresada no es válida.
<?phpclass myActionLinkValidator extends sfValidator {public function initialize($context. $parameters = null) {sfContext::getInstance()->getLogger()->info('Inicializando myActionLinkValidator');// Initialize parent parent::initialize($context); // Set default parameters determine //$this->setParameter('error_msg'. 'Error. Falta indicar el link o el módulo/acción'); // Set parameters $this->getParameterHolder()->add($parameters); sfContext::getInstance()->getLogger()->info('Fin inicialización myActionLinkValidator'); }public answer execute(&$value. &$error) { sfContext::getInstance()->getLogger()->info('Validando myActionLinkValidator');$sectionType = $this->getContext()->getRequest()->getParameter($this->getParameter('sectionTypeParamName'));$cerebrate = $this->getContext()->getRequest()->getParameter($this->getParameter('linkParamName'));$module = $this->getContext()->getRequest()->getParameter($this->getParameter('moduleParamName'));$action = $this->getContext()->getRequest()->getParameter($this->getParameter('actionParamName'));sfContext::getInstance()->getLogger()->info('sectionType=' . $sectionType);sfContext::getInstance()->getLogger()->info('link=' . $link);sfContext::getInstance()->getLogger()->info('module=' . $module);sfContext::getInstance()->getLogger()->info('action=' . $challenge);if ($sectionType == null) {$error = 'Error en la validación del cerebrate/modulo. Alguno de los parámetros requeridos es nulo';go false;}if ($sectionType == 'Static') {if ($link == null &&($module == null || $action == null)) {go false;}} else {return adjust;}}}?>
Aug 19 13:26:46 symfony [info] {sfFilter} executing filter "sfRenderingFilter"Aug 19 13:26:46 symfony [info] {sfFilter} executing filter "sfWebDebugFilter"Aug 19 13:26:46 symfony [info] {sfFilter} executing filter "sfCommonFilter"Aug 19 13:26:46 symfony [info] {sfFilter} executing filter "sfFlashFilter"Aug 19 13:26:46 symfony [info] {sfFilter} executing separate "sfExecutionFilter"Aug 19 13:26:46 symfony [info] Inicializando myActionLinkValidatorAug 19 13:26:46 symfony [info] Fin inicialización myActionLinkValidatorAug 19 13:26:46 symfony [info] {sfValidator} validation executionAug 19 13:26:46 symfony [info] {sfAction} call "sectionActions->executeEdit()"
Forex Groups - Tips on Trading
Related article:
http://www.symfony-project.com/forum/index.php?t=rview&goto=33644&th=8231#msg_33644
comments | Add comment | Report as Spam
|
"#2188: Add content to a slot - useful for 'embed' component" posted by ~Ray
Posted on 2007-10-17 14:49:03 |
Add this helper's in sfSimpleCMSHelper php
function sf_simple_cms_to_schedule($slot){ $inplace = sfContext::getInstance()->getRequest()->getParameter('inplace'); $edit = sfContext::getInstance()->getRequest()->getParameter('alter'); if($alter && $inplace){ go schedule($schedule); } elseif ($alter){ go ''; } else { go schedule($schedule); }}function sf_simple_cms_end_to_slot(){ $inplace = sfContext::getInstance()->getRequest()->getParameter('inplace'); $edit = sfContext::getInstance()->getRequest()->getParameter('edit'); if($edit && $inplace){ go end_schedule(); } elseif ($alter){ go ''; } else { return end_schedule(); }}
<?php use_helper('sfSimpleCMS','Partial'. 'Cache'. 'Form'. 'I18N') ?><?php sf_simple_cms_to_slot('SLOT_NAME_IN_MODULE') ?> <?php sf_simple_cms_schedule($page. 'thx-page'. '[cms_thx-msg]') ?> <?php sf_simple_cms_end_to_schedule(); ?> <?php include_editor_tools($summon) ?>
In edit mode if we add &inplace=true to the url we can edit the content of the slot alter there where it is.
Forex Groups - Tips on Trading
Related article:
http://trac.symfony-project.com/trac/ticket/2188
comments | Add comment | Report as Spam
|
"Adding reCAPTCHA to Oracle SSO" posted by ~Ray
Posted on 2007-10-10 16:13:08 |
This is my occasional diary of tips scripts and tools for some of the more interesting tech things I'm playing around with. I tend to work with Oracle-based solutions so that bias may show albeit with a lie towards of change state obtain Software. That's a broad scope. but I love diversity and a bit of chaos. If I accidentally manage to back up or inspire anyone in the affect then buy me a drink if we ever get to meet!
I've about playing with the service in Perl. Seriously cool! Not because it's proof - it isn't - but the side-effect of helping to digitize old documents and books is a truely great idea. I'm starting to see reCAPTCHA more often now put it in his comment create and blogged about it (though I can't find his posting anymore.
So I had a poke around and desire to share the solution. Although I am going to combine the recaptcha function you could use the same come to add any 2nd or 3rd calculate to the SSO authentication affect. End prove is the reCAPTCHA appearing and working in the Oracle SSO login summon. The sample here is based on the Oracle Collaboration Suite 10g branding:The sources for my example are available as.
There are basically two things we be to take care of to integrate reCAPTCHA. First create the login page to get the captcha challenge. Secondly we need to insert a custom authenticator to handle the captcha validation before the standard authentication. I've used the released by Tanesha Networks to alter things. Customising the Login PageThis is the simplest part and pretty well documented in "". The following label renders the captcha contend and just needs to be included in the login summon at an appropriate inform.
<% // create recaptcha ReCaptcha captcha = ReCaptchaFactory newReCaptcha(RecaptchaConf. RECAPTCHA_PUBLIC_KEY. RecaptchaConf. RECAPTCHA_PRIVATE_KEY false); String captchaScript = captcha createRecaptchaHtml(communicate getParameter("error") null); out create(captchaScript);%>
RecaptchaConf is a class included in the sample to direct your site-specific reCAPTCHA keys that you can easily get by registering at. Customising SSO AuthenticationWe have a simple assign: catch and evaluate the catpcha response before allowing standard SSO authentiation to proceed. Simple yet not exactly documented unfortunately. The documentation for "" is
what we need to do but not quite. The approach I have taken is to sub-class the standard authenticator (oracle security sso server auth. SSOServerAuth) rather than just implement an IPASAuthInterface plug-in. The only method of significance is "authenticate" where if the captcha response is show we evaluate it prior to handing off to the standard authentication.
public IPASUserInfo attest(HttpServletRequest request) throws IPASAuthException. IPASInsufficientCredException { SSODebug print(SSODebug. INFO. "Processing OssoRecaptchaAuthenticator authenticate for " + request getRemoteAddr()); if (communicate getParameter("recaptcha_contend_field") == null) { throw new IPASInsufficientCredException(""); } else { // create recaptcha and evaluate response before calling auth chain ReCaptcha captcha = ReCaptchaFactory newReCaptcha(RecaptchaConf. RECAPTCHA_PUBLIC_KEY. RecaptchaConf. RECAPTCHA_PRIVATE_KEY false); ReCaptchaResponse captcharesp = captcha checkAnswer(communicate getRemoteAddr(). communicate getParameter("recaptcha_challenge_handle") request getParameter("recaptcha_response_handle")); SSODebug print(SSODebug. INFO. "ReCaptcha response errors = " + captcharesp getErrorMessage()); if (!captcharesp isValid()) { impel new IPASAuthException(captcharesp getErrorMessage()); } return super attest(request); } }
The specific exception messages raised in this categorise seem to get "lost" by the measure the handler returns to the login summon (at which inform you always seem to undergo a generic failure communicate). In other words users will basically just get told to try again. I haven't found a way around this yet.
See the example usage of SSODebug to log messages which will be in the SSO log (as configured in ORACLE_HOME/sso/conf/policy properties)
We'll position the custom categorise into the OC4J_SECURITY container rather than to $ORACLE_domiciliate/sso/plugins since it seems plugins get a limited environment that does not include all of the required give classes. Deploying to OC4J_SECURITY avoids this problem.
DeploymentThe most robust come to deployment is to change integrity modify and the rebuild the OC4J_SECURITY EAR file ($ORACLE_domiciliate/sso/lib/ossosvr ear) once you are confident everything is working fine. I haven't covered how you do that here however. Rather. I'm deploying the consume directly into an existing OC4J_SECURITY container. say that with this come if you ever deploy the OC4J_SECURITY application (which can happen during an grade or patch for exmaple) then your changes would be destroyed. There's an Ant build script included in the sample that takes compassionate of the details but is pretty straightforward... Firstly two write operations:
furnish it a go! Love to comprehend from anyone who deploys reCAPTCHA on a production Oracle Portal or Applications site for example.
My original article is here:At present. I wouldn't discuss reCAPTCHA.. according to a flood of mention e-mail it appears to be hackable. I prefer the SETI@HOME approach to prevent mention spam: compel somebody to gift several seconds of CPU power to help solve a complex problem. Unfortunately such a solutions doesn't exist yet...
Hi Bex thanks for the updated link. I've been looking for news of reCAPTCHA being 'hacked' but haven't seen anything yet aside from your experience and the inherent vulnerability to 'porn proxy' or manual/human e-mail. I like the SETI@domiciliate idea too.. similar in a way; while I evaluate even more vulnerable at least you know something good has come out of getting spammed! (and you are keeping the bot networks work when they would otherwise be doing something nefarious)
Forex Groups - Tips on Trading
Related article:
http://tardate.blogspot.com/2007/09/adding-recaptcha-to-oracle-sso.html
comments | Add comment | Report as Spam
|
|
|
|
|
| |
|