Hi everyone,

I got it, the problem was when I tried to compare with null, I don't know why Cocoon doesn't recongnize the condition if (Test !=null), could this be a bug ?, in other to make it works I change to:

<xsp:logic>
String Test;
 Test = request.getParameter("EMP_DEP");
      if (Test.length() !=0)
  {
       my_code
  }
</xsp:logic>
 

See you.

Gustavo
 

Gustavo Mejia wrote:

Hi Pal,

Thanks, I also tried this, with no good results, still passing to the code, that I need to skip.

:(

any other Idea is very wellcome !!

Thanks !!
 
 

Pal Wester wrote:

Why not just use request.getParameter("EMP_DEP") when ur in a javablock...<xsp:logic>
  if ( request.getParameter("EMP_DEP")  != null )
  {
        <esql:connection>
            <esql:driver>sun.jdbc.odbc.JdbcOdbcDriver</esql:driver>
            <esql:dburl>JDBC:ODBC:SQL</esql:dburl>
            <esql:username>user</esql:username>
            <esql:password>password</esql:password>
            <esql:execute-query>
              <esql:query>insert into Departamento values(
                   <esql:parameter type="string"><request:get-parameter name="EMP_CLVE"/></esql:parameter>,
                   <esql:parameter type="string"><request:get-parameter name="EMP_DEP"/></esql:parameter>
                   )
              </esql:query>

            </esql:execute-query>
       </esql:connection>
  }
</xsp:logic>
mvh: Pål Wester
høgskoleingenør/programmerer