上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 43 下一页
摘要: OGNL表达式<s:debug>标签可以在jsp页面中查看CompoundRoot和OGNL Context map中的信息。如果不经过struts2的过滤器拦截就直接访问jsp页面,那么其中使用的<s:debug>,<s:text>,<s:property value="%{getText()}">等struts2标签都会报告TagUtil.getStack方法抛出的异常。1 访问值栈中的action的普通属性: <s:property value="属性名"/>2 访问值栈中对象的普通属性( 阅读全文
posted @ 2012-09-09 10:43 retacn_yue 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 动态方法调用 语法格式如下:http://ip:port/AppPath/<PackageNamespace>/<ActionName>!<MethodName>.<extension>举例:http://localhost:8080/struts2demo/user/admin/view1Action!sayHello1.action可以通过常量struts.enable.DynamicMethodInvocation关闭动态方法调用。*通配符方式1:<action name="view6*" class=" 阅读全文
posted @ 2012-09-09 10:41 retacn_yue 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 准备struts2的学习和开发环境1 导包2 参照开发包自带的例子在web.xml文件中配置3 参照开发包自带的例子编写Action类和配置struts.xml文件<struts> <package name="demo" namespace="/hello/word"> <action name="test" class="cn.yue.struts2Demo.web.action.TestAction" method="sayHello"> </ac 阅读全文
posted @ 2012-09-09 10:35 retacn_yue 阅读(121) 评论(0) 推荐(0) 编辑
摘要: JSP常用标签<jsp:include>标签 动态引入 include指令是静态引入 编译成一个jsp<jsp:include page="relativeURL | <%=expression%>" flush="true|false" />page属性用于指定被引入资源的相对路径,它也可以通过执行一个表达式来获得。flush属性指定在插入其他资源的输出内容时,是否先将当前JSP页面的已输出的内容刷新到客户端。 <jsp:forward>标签 <jsp:forward page="rela 阅读全文
posted @ 2012-09-09 10:31 retacn_yue 阅读(129) 评论(0) 推荐(0) 编辑
摘要: JSP脚本表达式(expression)语法:<%= 变量或表达式 %> 表达式后面不能有分号(;)。Jsp声明中的java代码被翻译到_jspService方法的外面。<%!java代码%>JSP注释的格式:<%-- 注释信息 --%>JSP隐式对象的作用范围仅限于Servlet的_jspService方法JSP指令page指令Include指令taglib指令<%@ 指令 属性名="值" %>例如:<%@ page contentType="text/html;charset=gb2312"%&g 阅读全文
posted @ 2012-09-09 10:31 retacn_yue 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 定义colud computing is a model for enabling convenient,ondemand network access to a shared pool of configurablecomputing resources(e.g.,networks,servers,storage,applications,andservices)that can be rapidly provisioned and released with minimalmanagement effort ofservice provider interzction.三种服务模式saas 阅读全文
posted @ 2012-09-08 23:04 retacn_yue 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 保证在java程序中,一个class类只有一个实例存在节省内存,有利于垃圾回收第一种形式:示例代码public class Singleton{//私有的构造器private Singleton(){}private static Singleton instance=new Singleton();//提供外部访问的方法:public static Singleton getInstance(){return instance;}}第二种形式:示例代码public class Singleton{private static Singleton instance=null;public st 阅读全文
posted @ 2012-09-08 18:47 retacn_yue 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 动态操作地图服务1.动态添加一个地图服务String url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer";ArcGISDynamicMapServiceLayer arcGISDynamicMapServiceLayer=new ArcGISDynamicMapServiceLayer(HelloWorld.this,HelloWorld.this.url);map.addLayer(arcGISDynam 阅读全文
posted @ 2012-09-08 18:18 retacn_yue 阅读(224) 评论(0) 推荐(0) 编辑
摘要: public class ClassLoaderTest{public static void main(String[] args){ClassLoader c1=System.class.getClassLoader();System.out.println(c1==null?"null":c1.getClass().getName());c1=javax.swing.Box.class.getClassLoader();System.out.println(c1==null?"null":c1.getClass().getName());c1=su 阅读全文
posted @ 2012-09-08 18:12 retacn_yue 阅读(96) 评论(0) 推荐(0) 编辑
摘要: public class UdpSend {public static void main(String[] args) throws Exception {// TODO: Add your code hereDatagramSocket ds=new DatagramSocket();String strInfo="hello你好";ds.send(new DatagramPacket("hello你好".getBytes(),"hello你好".getBytes().length,InetAddress.getByName(&q 阅读全文
posted @ 2012-09-08 18:04 retacn_yue 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 43 下一页