Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÉú³Éxml¸ñʽÊý¾Ý

//»ñÈ¡Êý¾Ý¿âÊý¾Ý·µ»Ølist
public List queryAll(int fcateId) {
List list = new ArrayList();
String sql = "select * from g_Account where fCateID=? order by fCode";
Connection con = SqlHelp.getConn();//»ñµÃÁ¬½Ó£¬sqlhelp×Ô¼ºÐ´µÄ¹¤¾ßÀà
PreparedStatement pst = null;
ResultSet rs = null;
try {
pst = con.prepareStatement(sql);
pst.setInt(1, fcateId);
rs = pst.executeQuery();
while (rs.next()) {
GAccount ga=new GAccount();
ga.setFCode(rs.getString("fCode"));
ga.setFName(rs.getString("fName"));
ga.setFCateID(rs.getInt("fCateID"));
ga.setFLevel(rs.getInt("fLevel"));
ga.setFParent(rs.getString("fParent"));
ga.setFIsDetail(rs.getInt("fIsDetail"));
list.add(ga);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
SqlHelp.colseConn(con, pst, rs);
}
return list;
}
//´Ë·½·¨Êǹؼü£¨»ñÈ¡tree½á¹¹£©
public String getTree(int fcateId){
StringBuffer sb=new StringBuffer();
List gas=this.queryAll(fcateId);
String fparent="";
String fcode="";
int flevel=0;

//sb.append("<node>\r");
for (Iterator iterator = gas.iterator(); iterator.hasNext();) {
GAccount ga = (GAccount) iterator.next();

if (!ga.getFParent().equals(fparent)) {

if (!ga.getFParent().equals(fcode)) {
sb.append("\r"+getT("\t",ga.getFLevel())+"</node>\r");
for (int i = 1; i < flevel - ga.getFLevel(); i++) {
sb.append("\r\t</node>\r");
}
}
}

if(ga.getFLevel()==1){
sb.append("<node label=\"");
sb.append(ga.getFCode()+"-"+ga.getFName());
sb.append("\" id=\""+ga.getFCode()+"\">\r");

if(ga.getFIsDetail()==1){
sb.append("</node>\r");
}
}else{
if(ga.getFIsDetail()==1){
sb.append(""+getT("\t", ga.getFLevel())+"<node label=\"");
sb.append(ga.getFCode()+"-"+ga.getFName());
sb.append("\" id=\""+ga.getFCod


Ïà¹ØÎĵµ£º

WebService java µ÷ÓÃ .net·½·¨

package com.test.servlet;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.message.SOAPHeaderElement;
public class WebService {
&nbs ......

Java¼æÈÝÐÔÓ밲ȫÐÔÉèÖÃ


    ΪÁËʹ²Ù×÷ϵͳ֧³ÖJava£¬¿ÉÓÉSun¹«Ë¾µÄJavaÏÂÔØÍøÒ³, ¸ù¾Ý²Ù×÷ϵͳÀàÐÍÏÂÔغͰ²×°Ò»¸öÃâ·ÑJRE(Java Runtime Environment), ÀýÈç, JRE6¡£È»ºó, ½«±¾ÎļþÏÂÔر£´æ, ¿½±´, ²¢Õ³Ìùµ½JREËùÔÚµÄsecurityĿ¼, ÀýÈç, C:/Program Files/Java/jre6/lib/security/, Ìæ»»Ô­ÓеÄÎļþjava.policy, ÉèÖÃJREÍê³É¡£ ......

JavaÖÐÈçºÎÕýȷʹÓÃ×ÖÌå±àÂë

 
          ±ðÉùÃ÷£ºÕâÊÇһƪÀ´×ÔwudaleµÄ²©¿ÍµÄÎÄÕÂhttp://wudale.bokee.com/3594651.html
 JavaÊÇÄ¿Ç°×îÁ÷ÐеÄÃæÏò¶ÔÏóµÄ±ä³ÉÓïÑÔÖ®Ò»£¬JavaÖ§UTF£­8£¬ISO£­8859£­1¡¢GBKµÈ¸÷ÖÖ×ÖÌå±àÂ룬¿É±ÊÕß·¢ÏÖJavaÖÐ×ÖÌå±àÂëµÄÎÊÌâÈÔÀ§µ¹Á˲»ÉÙ³ÌÐòÔ±£¬ÍøÉÏËäÈ»Ò²Ó ......

¡¾¹ã¸æ¡¿°¢Àï°Í°ÍITBU¼±Æ¸×ÊÉîJava¿ª·¢¹¤³Ìʦ

ְλÃèÊö£º
1¡¢°´USECASE½øÐÐÒµÎñÐèÇó·ÖÎöºÍÈí¼þ¸ÅÒªÉè¼Æ£»
2¡¢½øÐÐÈí¼þÏêϸÉè¼ÆºÍ±àÂëʵÏÖ£¬È·±£ÐÔÄÜ¡¢ÖÊÁ¿ºÍ°²È«£»
3¡¢Î¬»¤ºÍÉý¼¶ÏÖÓÐÈí¼þ²úÆ·£¬¿ìËÙ¶¨Î»²¢ÐÞ¸´ÏÖÓÐÈí¼þȱÏÝ¡£
ְλҪÇó£º
1¡¢¾«Í¨Web±à³Ì£¬3ÄêÒÔÉÏʹÓÃJavaÓïÑÔ½øÐÐweb¿ª·¢µÄ¾­Ñ飬ÊìϤhtml£¬javascript¡£
2¡¢¾«Í¨jsp£¬servlet£¬java bean£¬JM ......

dzÎöJavaÐòÁл¯»úÖÆ

    Javaµ±ÖеÄÐòÁл¯£¬ÆäÖ÷ÒªµÄ×÷ÓÃÊǽ«ÀàµÄʵÀý½øÐÐÎÞËð´«Ê䣬»òÕß˵¾ÍÊÇͨ¹ýJavaµÄÐòÁл¯»úÖÆ£¬JavaÀàµÄʵÀý¿ÉÒÔͨ¹ýObjectÁ÷À´´«ÊäºÍÖØлñÈ¡£¬¶ø²»»áËð»µÀàµÄʵÀý¡£
    Ê×ÏÈ£¬ÎÒÃÇ¿´¿´Ê²Ã´ÑùµÄÀàÊÇÐòÁл¯À࣬
      1.AÀà×ÔÉíʵÏÖÁËSerializable½Ó¿ÚµÄÀࣻ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ