当前位置: 首页>>代码示例>>Java>>正文


Java WebArchive.addAsWebResource方法代码示例

本文整理汇总了Java中org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebResource方法的典型用法代码示例。如果您正苦于以下问题:Java WebArchive.addAsWebResource方法的具体用法?Java WebArchive.addAsWebResource怎么用?Java WebArchive.addAsWebResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.shrinkwrap.api.spec.WebArchive的用法示例。


在下文中一共展示了WebArchive.addAsWebResource方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createWebDeployment

import org.jboss.shrinkwrap.api.spec.WebArchive; //导入方法依赖的package包/类
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "news-test.war");
	war.addPackage(Param.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebResource(new FileAsset(new File("src/test/resources/index.html")), "index.html");
	war.addAsWebResource(new FileAsset(new File("src/test/resources/form.html")), "form.html");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/web.xml")), "web.xml");
	return war;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:11,代码来源:NewsTestCase.java

示例2: deploy

import org.jboss.shrinkwrap.api.spec.WebArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static WebArchive deploy() throws URISyntaxException {
	final WebArchive war = create(WebArchive.class, "fileupload-test.war");
	war.addPackage(FileUploadServlet.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/fileupload.jsp")), "view/fileupload.jsp");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/web.xml")), "web.xml");
	return war;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:10,代码来源:FileUploadTestCase.java

示例3: createWebDeployment

import org.jboss.shrinkwrap.api.spec.WebArchive; //导入方法依赖的package包/类
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "cookies-test.war");
	war.addPackage(CookiesServlet.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/cookies.jsp")), "view/cookies.jsp");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/index-cookies.jsp")),
			"view/index-cookies.jsp");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/web.xml")), "web.xml");
	return war;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:12,代码来源:CookiesTestCase.java

示例4: createWebDeployment

import org.jboss.shrinkwrap.api.spec.WebArchive; //导入方法依赖的package包/类
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "nonblocking-test.war");
	war.addPackage(ReadingServlet.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/nonblocking.jsp")), "view/nonblocking.jsp");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/web.xml")), "web.xml");
	return war;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:10,代码来源:NonBlockingTestCase.java

示例5: createWebDeployment

import org.jboss.shrinkwrap.api.spec.WebArchive; //导入方法依赖的package包/类
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "errormappings-test.war");
	war.addPackage(ErrorMappingServlet.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/errormapping.jsp")), "view/errormapping.jsp");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/error-404.jsp")), "view/error-404.jsp");
	war.addAsWebResource(new FileAsset(new File("src/main/webapp/view/error-exception.jsp")),
			"view/error-exception.jsp");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/web-errormapping.xml")), "web.xml");
	return war;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:13,代码来源:ErrorMappingTestCase.java

示例6: createWebDeployment

import org.jboss.shrinkwrap.api.spec.WebArchive; //导入方法依赖的package包/类
@Deployment
public static WebArchive createWebDeployment() {
	final WebArchive war = create(WebArchive.class, "secure-test.war");
	war.addPackage(SessionSocketServer.class.getPackage());
	war.addAsWebInfResource(INSTANCE, "beans.xml");
	war.addAsWebInfResource(new FileAsset(new File("src/test/resources/secure-web.xml")), "web.xml");
	war.addAsWebResource(new FileAsset(new File("src/test/resources/index.html")), "index.html");
	return war;
}
 
开发者ID:PacktPublishing,项目名称:Mastering-Java-EE-Development-with-WildFly,代码行数:10,代码来源:SessionSecureTestCase.java


注:本文中的org.jboss.shrinkwrap.api.spec.WebArchive.addAsWebResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。