Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 64000 invoked from network); 6 Feb 2008 09:58:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Feb 2008 09:58:39 -0000 Received: (qmail 47788 invoked by uid 500); 6 Feb 2008 09:58:28 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 47772 invoked by uid 500); 6 Feb 2008 09:58:28 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 47761 invoked by uid 99); 6 Feb 2008 09:58:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2008 01:58:28 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2008 09:57:58 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JMh2c-0006MM-8U for user-java@ibatis.apache.org; Wed, 06 Feb 2008 01:58:06 -0800 Message-ID: <15306350.post@talk.nabble.com> Date: Wed, 6 Feb 2008 01:58:06 -0800 (PST) From: satya_08 To: user-java@ibatis.apache.org Subject: iBATIS+Sprites problem !!!!! MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sb.majumder@rediffmail.com X-Virus-Checked: Checked by ClamAV on apache.org Hi all , I am a beginer in iBATIS and sprites . I am trying to develop a small web application , Here is the structure of my app-------------> C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\TestStripes There is a jsp file , under C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\TestStripes directory . The content of the jsp is ******************************************************************************* <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%> LOGIN PAGE

UserID and LOGIN

User ID:
Password:
Result: ${actionBean.result}
******************************************************************************* Under WEB-INF , there are two sub directory 1)lib 2)classes Under lib I have included all the necessary jars , such as :commons-logging.jar,cos.jar,ibatis-3.0.677.jar, jstl.jar,log4j-1.2.9.jar,mysql-connector-java-5.0.4-bin.jar,standard.jar & stripes.jar Under classes directory there is my UserPassActionBean.java file and SqlMapConfig.xml and SqlMap.xml files The UserPassActionBean.java is -----------> ******************************************************************************* package net.sourceforge.stripes.user_validation; import net.sourceforge.stripes.action.ActionBean; import net.sourceforge.stripes.action.ActionBeanContext; import net.sourceforge.stripes.action.DefaultHandler; import net.sourceforge.stripes.action.Resolution; import net.sourceforge.stripes.action.StreamingResolution; // import net.sourceforge.stripes.validation.Validatable; import net.sourceforge.stripes.validation.ValidationError; import net.sourceforge.stripes.validation.ValidationErrorHandler; import net.sourceforge.stripes.validation.ValidationErrors; import net.sourceforge.stripes.action.ForwardResolution; import com.ibatis.sqlmap.client.*; import com.ibatis.common.resources.Resources; import com.ibatis.common.logging.*; import java.io.StringReader; import java.util.List; import java.io.*; import java.util.*; public class UserPassActionBean implements ActionBean, ValidationErrorHandler { private ActionBeanContext context; /* @Validate(required=true) */private String user_id; /* @Validate(required=true) */private String password; private String result; public ActionBeanContext getContext() { return context; } public void setContext(ActionBeanContext context) { this.context = context; } public Resolution handleValidationErrors(ValidationErrors errors) throws Exception { StringBuilder message = new StringBuilder(); for (List fieldErrors : errors.values()) { for (ValidationError error : fieldErrors) { message.append("
"); message.append(error.getMessage(getContext().getLocale())); message.append("
"); } } return new StreamingResolution("text/html", new StringReader(message.toString())); } /** Handles the 'submit' event, check the validation and returns the result. */ /* @DefaultHandler public Resolution submit() { String result = String.valueOf(user_id + password); return new StreamingResolution("text", new StringReader(result)); } */ // Standard getter and setter methods public String getUser_id() { return user_id; } public void setUser_id(String user_id) { this.user_id = user_id; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getResult() { return result; } public void setResult(String result) { this.result = result; } /** An event handler method that adds number one to number two. */ @DefaultHandler public Resolution submit() { try { String resources = "SqlMapConfig.xml"; Reader reader = Resources.getResourceAsReader(resources); SqlMapClient sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader); Map m = new HashMap(1); m.put("a",user_id); password = (String)sqlMapper.queryForObject("out_example",m); result = user_id + password; } catch(IOException ex) { // System.out.println(ex.getMessage()); ex.printStackTrace(); } catch(Exception ex) { // System.out.println(ex.getMessage()); ex.printStackTrace(); } return new ForwardResolution("/index.jsp"); } } ******************************************************************************* The content of the sqlMap.xml is ******************************************************************************* {call usp_sel_ggl_users_passwd(?)} ******************************************************************************* & the content of the SqlMapConfig.xml is ******************************************************************************* ******************************************************************************* Now when I upload my entire application into web & when I am invoking the jsp its ok , but when I give some values into the text field , & pressing the submit button the jsp does not give any output . Please help me out from this problem Thanks Satya -- View this message in context: http://www.nabble.com/iBATIS%2BSprites-problem-%21%21%21%21%21-tp15306350p15306350.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.