web.xml

Taglib inside Maven dependency jar. How do I configure this taglib inside the web.xml?

蹲街弑〆低调 提交于 2019-12-06 14:18:11
So I used to configure my taglib like that: <jsp-config> <taglib> <taglib-uri>myTags</taglib-uri> <taglib-location>/WEB-INF/lib/mylib-2.0.1.jar</taglib-location> </taglib> </jsp-config> But now mylib-2.0.1.jar is a maven dependency, so of course it is NOT on /WEB-INF/lib. How do I do to configure my taglib so I can do that in my JSPs: <%@ taglib uri="myTags" prefix="mt" %> EDIT1: To clafiry, the taglib.tld is inside the META-INF inside the jar so you can access the tld by referencing the jar itself. That's a convenient way to distribute your taglib along with the web application framework jar.

com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException

a 夏天 提交于 2019-12-06 13:38:35
While deploying my war file I am getting the below exception: SEVERE: Exception starting filter struts2 com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory(com.opensymphony.xwork2.ObjectFactory). - Class: com.opensymphony.xwork2.inject.ContainerImpl File: ContainerImpl.java Method: addInjectorsForMembers Line: 144 - com/opensymphony/xwork2/inject/ContainerImpl.java:144:-1 at org.apache

Glassfish jdbc/database lookup failed

≯℡__Kan透↙ 提交于 2019-12-06 11:41:16
I hope I am not asking a duplicate question just because I was unable to find an answer. I am getting this error: javax.naming.NamingException: Lookup failed for 'jdbc/osclassDB' in SerialContext This is what I did: I set up a JDBC Connection Pool and a JDBC Resource pointing to that pool (both in Glassfish). Then I told my web.xml that there is a JDBC Resource: <resource-ref> <res-ref-name>jdbc/osclassDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> And then I tried using that resource

Getting rid of web.xml in Vaadin 7 with VaadinServlet

会有一股神秘感。 提交于 2019-12-06 11:12:49
问题 I'm new to Java and Vaadin. A basic Vaadin project is using web.xml for all the mappings. If I want to use the @WebServlet annotation I need to create an inner class which somewhere inherits from HttpServlet . @SuppressWarnings("serial") public class VaadinplaygroundUI extends UI { @WebServlet(urlPatterns="/Helo") public static class Servlet extends VaadinServlet { } @Override protected void init(VaadinRequest request) { final VerticalLayout layout = new VerticalLayout(); I know, I'm missing

Role vs RoleGroup in JBoss DataBaseServerLoginModule

坚强是说给别人听的谎言 提交于 2019-12-06 10:45:41
问题 Part A: Role vs RoleGroup Can someone explain the difference between a Role and a RoleGroup in the jboss DatabaseServerLoginModule ? I'm confused after looking at the examples in the JBoss 6 documentation One area of confusion is when they describe the logical tables the user to role mapping table has three columns: Table Principals(PrincipalID text, Password text) Table Roles(PrincipalID text, Role text, RoleGroup text) But the example they offer only uses two columns: CREATE TABLE Users

Tomcat 7 Datasource injection mechanism

你说的曾经没有我的故事 提交于 2019-12-06 07:34:51
问题 I am trying to create simple web-app. And stuck on datasource injection. There seems to be several problems. So I will start from my confusion. As I understand there's 2( at least) ways to inject the DataSource into Servlet: web.xml @Resource web.xml sample <resource-ref> <res-ref-name>jdbc/MyDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <injection-target> <injection-target-class>ua.test.TestServlet</injection-target-class> <injection-target-name

freemarker cannot handle request for '/' on google app engine

允我心安 提交于 2019-12-06 06:55:47
问题 I'm trying to get freemarker working under Google App Engine. I've gotten simple ftl template files working when requested directly however I'd like to have index.ftl work if available otherwise index.html -- or vice versa. If I request /index.html , it renders fine as HTML. If I request /index.ftl , it renders fine as a FreeMarker template. Variables are expanded. If, however, I request '/' it gives the following 404 message: Problem accessing /index.html/index.ftl. I have the following in

There is no Action mapped for namespace / and action name hello

那年仲夏 提交于 2019-12-06 06:14:51
package com.tutorialspoint.struts2; public class HelloWorldAction{ private String name; public String execute() throws Exception { return "success"; } public String getName() { return name; } public void setName(String name) { this.name = name; } } index.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Hello World</title> </head> <body> <h1>Hello World From Struts2</h1> <form

Spring-test and ServletContextListener in web.xml

感情迁移 提交于 2019-12-06 05:11:55
问题 i try to use spring-test(3.2.10) and integration tests with TestNG by this link. I created RootTest.java @WebAppConfiguration @ContextConfiguration("file:src/test/resources/root-context2.xml") public class ReferenceServiceTest extends AbstractTestNGSpringContextTests { ... spring context loaded success. But my global variables not instantiated because web.xml ignored. In web.xml i have my own "listener-class"(implementation of ServletContextListener) and "context-param". How i can load web

Spring Controller's URL request mapping not working as expected

自作多情 提交于 2019-12-06 03:22:00
问题 I have created a mapping in web.xml something like this: <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/about/*</url-pattern> </servlet-mapping> In my controller I have something like this: import org.springframework.stereotype.Controller; @Controller public class MyController{