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

¹ØÓÚjavaÀ࣬ת·¢jspÒ³ÃæÎÊÌâ

package com;

import java.io.IOException;

import javax.servlet.jsp.PageContext;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

public class LoadClass extends ClassLoader {
private DocumentBuilderFactory dbf;
private DocumentBuilder bd;
private Document doc;

/**
* ¸ù¾Ý²ÎÊý,²éÕÒxml·µ»Ø½á¹û
*/
private String getStr(String str) {
try {
// ¼ÓÔØxml·½·¨
dbf = DocumentBuilderFactory.newInstance();
bd = dbf.newDocumentBuilder();
doc = bd.parse("struts-config.xml");
NodeList nl = doc.getElementsByTagName("action");
for (int i = 0; i < nl.getLength(); i++) {
Element ele = (Element) nl.item(i);
String tempname = ele.getAttribute("name");
if (str.equals(tempname)) {
return ele.getAttribute("class");
}
}
} catch (ParserConfigurationException e) {
e.printStackTrace();
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}


Ïà¹ØÎÊ´ð£º

jsp ÖÐÂÒÂëµÄ - Java / Web ¿ª·¢

ÎҵĿª·¢µÄƽ̨ÊÇMyeclipes6.0 + tomcat5.x + mysql
ÎÒËùÓеıàÂ뷽ʽ¶¼ÊÇÓõÄUTF-8 
ÎÒÖ»ÓÃÁËStrtus¿ò¼Ü
ÔÚÒ»¸öformÖÐÈçÏÂÓõÄÊÇpostµÄÌá½»·½Ê½£º
 <form class="form" action=&quo ......

jspÌøת

ÎÒµãºóÍËʱÊÇ¿Õ°×Ò³Ãæ
ÐèˢвÅÄÜÏÔʾ
Õâ¸öÔõô´¦Àí°¡
Çë´ó¼Ò°ï°ïæ
°ÑÎÊÌâ˵µÄÏêϸһЩ£¬ÕâÑùÓÐÖúÓÚÎÊÌâµÄ»Ø¸´£¬¼°´ð°¸µÄ׼ȷÐÔ£¡

ÎÒ¾õµÃÊÇÄãµÄä¯ÀÀÆ÷Æ÷µÄÎÊÌâ°É£¬ÎÒÒÔÇ°Óöµ½¹ýÕâÑùµÄÎÊÌ⣬°ÑIEµÄËùÓÐÊôÐÔÖ ......

jspÏà¹ØÎÊÌâ - Web ¿ª·¢ / JavaScript

ÎÒÏëµÇ¼ºó£¬Èç¹ûµÇ¼³É¹¦¾ÍÈ¥Ö´ÐÐij¸öÒ³Ãæ
ÎÒÏÖÔڵĴúÂëÊÇÕâÑùµÄ£º
if(rs.next()){
 session.setAttribute( "username" , user);
  <jsp:include page="login.jsp" />// ......

Unable to compile class for JSP - Java / Web ¿ª·¢

<%@page language="java" contentType="text/html;charset=gb2312" import="java.sql.*"%>
<jsp:useBean id="db" class="wang.connectDB"/>
< ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ