随笔分类 -  java

 
request的url地址
摘要:假定你的web application 名称为news,你在浏览器中输入请求路径:http://localhost:8080/news/main/list.jsp则执行下面向行代码后打印出如下结果:1、 System.out.println(request.getContextPath());打印结 阅读全文
posted @ 2021-05-30 21:41 哈哈 阅读(479) 评论(0) 推荐(0)
c语言中调用java代码-本文来自网上
摘要:先上java代码 public class HelloWorld{ public static void main(String[] args){ System.out.println("Hello, World"); } public static int square(int input){ i 阅读全文
posted @ 2021-03-03 09:32 哈哈 阅读(203) 评论(0) 推荐(0)
按指定个数批量拆分字符串
摘要:按指定个数批量拆分字符串 比如“1,2,3,4,5,6,7,8,9,0” 每3个进行拆分 阅读全文
posted @ 2018-02-28 21:54 哈哈 阅读(1545) 评论(0) 推荐(0)
resin,hibernate中使用jta
摘要:啥也不说了,直接看代码:UserTransaction tran = (UserTransaction)((new InitialContext()).lookup("java:comp/UserTransaction"));Configuration config1 = new Configuration().configure("/hibernate1.cfg.xml");SessionFac... 阅读全文
posted @ 2010-03-04 16:28 哈哈 阅读(395) 评论(0) 推荐(0)