jsp页面不能resolve 红色部分不能resolve
<%
String ip = null;
String port = null;
String database = null;
String loginName = null;
String password = null;
String authenticationIP = null;
try{
String filename = "";
filename = getServletConfig().getServletContext().getRealPath("page\\ipconfig.xml");
//out.println(filename);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder=factory.newDocumentBuilder();
Document doc=builder.parse(new File( filename ));
NodeList nl =doc.getElementsByTagName("level");
for (int i=0;i<nl.getLength();i++){
Element node=(Element) nl.item(i);
ip = node.getElementsByTagName("ip").item(0).getFirstChild().getNodeValue();
port = node.getElementsByTagName("port").item(0).getFirstChild().getNodeValue();
database = node.getElementsByTagName("database").item(0).getFirstChild().getNodeValue();
loginName = node.getElementsByTagName("loginName").item(0).getFirstChild().getNodeValue();
password = node.getElementsByTagName("password").item(0).getFirstChild().getNodeValue();
authenticationIP = node.getElementsByTagName("authenticationIP").item(0).getFirstChild().getNodeValue();
}
}catch(Exception e){
e.printStackTrace();
}
%>
------解决方案--------------------
是不是包没有导入啊?