![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java_code
yql1986
这个作者很懒,什么都没留下…
展开
-
java code processDir
private static void processDir( Args theArgs ) throws Exception { String fileData = generateXML( theArgs.inputDir, theArgs.id ); File outDir = new File(theArgs.outputDir); if (转载 2012-07-27 15:24:06 · 432 阅读 · 0 评论 -
request.getContextPath()
public static String getApplicationName(HttpServletRequest request) { String appName = "root"; if (request.getContextPath().length() > 1) { appName = request.getContextPath转载 2012-12-14 20:53:25 · 906 阅读 · 0 评论 -
request.getPathInfo()
public static String getRequestUri(String path) { List pathInfo = StringUtil.split(path, "/"); if (pathInfo == null || pathInfo.size() == 0) { Debug.logWarning("Got nothing转载 2012-12-14 20:54:26 · 1585 阅读 · 0 评论 -
java同步代码范例
public static ControllerConfig getControllerConfig(URL url) { ControllerConfig controllerConfig = (ControllerConfig) controllerCache.get(url); if (controllerConfig == null) { // don't转载 2012-12-12 22:36:08 · 507 阅读 · 0 评论 -
ofbiz controller.xml 文件
public RequestManager(ServletContext context) { /** Loads the site configuration from servlet context parameter. */ try { configFileUrl = context.getResource("/WEB-INF/con转载 2012-12-23 14:28:03 · 1373 阅读 · 0 评论 -
泛型继承
T queryForPagination(String sqlId, T paginationDTO); T queryForPagination(String sqlId, T jqGridPageDTO); T queryForDatagridPage(String sqlId, T datagridPageDTO)转载 2012-09-22 09:22:35 · 394 阅读 · 0 评论 -
SpringMVC example
@RequestMapping(method=RequestMethod.POST)@ResponseBodypublic Map create(@RequestBody Account account, HttpServletResponse response) { Set> failures = validator.validate(account); if (!fail转载 2012-09-22 09:13:20 · 545 阅读 · 0 评论 -
java 反射
public class InvokeTester{ public int add(int param1 ,int param2) { return param1+param2; } public String echo(String message) { return "hello: "+message; } public static void main(St转载 2012-08-27 15:14:28 · 406 阅读 · 0 评论 -
the java IllegalArgumentException code example
if (this.sqlMapClient == null) { throw new IllegalArgumentException("Property 'sqlMapClient' is required");}转载 2012-08-01 16:35:31 · 556 阅读 · 0 评论 -
Determining If a Filename Path Is a File or a Directory
File dir = new File("directoryName");boolean isDir = dir.isDirectory();if (isDir) { // dir is a directory} else { // dir is a file}转载 2012-07-31 16:13:16 · 465 阅读 · 0 评论 -
HashMap枚举
Set set=map.keySet();for(Iterator iter=set.iterator();iter.hasNext();){ String key=(String)iter.next(); Integer value=(Integer)map.get(key); System.out.println(key+":"+value);}////////////转载 2012-08-27 21:06:37 · 1328 阅读 · 0 评论