If you have never used Java before, don't expect miracles - if this is your first Java project, I think you will be suprised at how much "plumbing" code and configuration you are doing just to get "hello world" from a database to a web page.
I would strongly suggest that you look at some of the tutorials on Rick Reumann's http://www.learntechnology.net/ site - those are pretty good starting points. Larry On 3/16/06, Driller, Jonathan (MSCIBARRA) <[EMAIL PROTECTED]> wrote: > > > Hi, I am completely new to Ibatis, beans and the whole rationale behind this > and am struggling a bit. > I can connect to my bean but get nothing from Ibatis....no db info gets > returned. > > Any clues as to what, likely very simple, thing I am doing incorrectly? > I have been reading the docs but can find no simple idiots guide... > > My Map file piece: > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" > "http://www.ibatis.com/dtd/sql-map-2.dtd"> > <sqlMap namespace="mbData"> > <resultMap id="test" class="com.mb.pubweb.infoCenter"> > <result property="title" column="title"/> > </resultMap> > <select id="setTitle" resultMap="test"> > select title from infoCenter > </select> > </sqlMap> > > My bean: > package com.mb.pubweb; > public class InfoCenter{ > private String title = "initial title"; > public String getTitle(){ > return(title); > } > public void setTitle(String title){ > this.title = title; > } > > My JSP: > <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> > <%@ include file="/common/includes/header/taglibsInc.jsp" %> > <html> > <%@ include file="/common/includes/header/headInc.jsp" %> > <body> > <jsp:useBean id="InfoCenter" class="com.mb.pubweb.InfoCenter" /> > <%--jsp:setProperty name="InfoCenter" property="title" value='any ol > thang'/--%><br> > > <jsp:getProperty name="InfoCenter" property="title" /> //resolves to > property that was set<br /> > <c:out value="${InfoCenter.title}"/>//JSTL resolves to property that was > set<br /> > <%= InfoCenter.getTitle() %>//SCRIPTLET resolves to property that was > set<br /> > ${InfoCenter.title}//JSTL resolves to property that was set<br /> > </body> > </html> > > > I also have an xml config file for the database connection info, and all are > put into my > \build\webapp\WEB-INF\ibatis\infocenter directory and ANT has all the stuff > needed (Jar files) to build. > > Any guidance *greatly* appreciated. > > JD > > ________________________________ > > > NOTICE: If received in error, please destroy and notify sender. Sender does > not waive confidentiality or privilege, and use is prohibited. >
