📄 arithexpsrcservlet.java
字号:
// servlet Xml2DBS, which sets up commands for the
// Xml2DBTables class
import javax.servlet.*; // communicate with client
import javax.servlet.http.*;
import MyNa.utils.Logger; // saves admin/debug info to file
import MyNa.utils.Env; // basic package
import MyNa.utils.EnvServlet; // for setStr.
import MyNa.utils.MiscFile; // basic package
import MyNa.utils.HtmlWrapper; // sends HTML to client.
import java.io.IOException; // thrown by HtmlWrapper
import MyNa.utils.MiscDate; // for logging.
import MyNa.xml.XmlArithEval;
public class ArithExpSrcServlet extends EnvServlet {
String filePath = "MyNa/Xml2DBS/"; // C:\JRun\jsm-default\MyNa\Xml2DBS
String topFileName = "top.htm"; // these are not used now, but may be
String ctlFileName = "ctl.htm"; // future template/session controls.
Logger lg;
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException{
doPost(req,res);
}
public void doPost (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException{
res.setContentType("text/html");
HtmlWrapper W=new HtmlWrapper(res.getWriter());
lg=new Logger();
try{
XmlArithEval xae=new XmlArithEval(new Env(req));
xae.doIt();
String floatResult=xae.getFloatResult();
W.wrapPage("XmlArithEval ","produced "+floatResult);
}catch(Exception ex){
W.wrapPage("doPost failure",""+ex);}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -