web.xml

Servlet web.xml filter — Class not found exception

笑着哭i 提交于 2019-12-11 03:07:28
问题 I am having a problem setting up the filter - the filter I have defined in web.xml looks like this <filter> <filter-name>Log</filter-name> <filter-class>test.log</filter-class> </filter> <filter-mapping> <filter-name>Log</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> But I am getting the following error - SEVERE: Exception starting filter Log java.lang.ClassNotFoundException: test.log at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711) at org

Changing app.servlet.version does not affect web.xml

99封情书 提交于 2019-12-11 02:43:08
问题 Is there an issue to set the app.servlet.version to 3.0 in the application.properties for grails 2.0? I created a new app, added the line app.servlet.version=3.0 to the application.properties and executed grails war (even tried clean before). However the web.xml still starts with: <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema

How to remove JSP's native request URL?

只谈情不闲聊 提交于 2019-12-11 02:33:34
问题 I have a webpage page called page.jsp , and I only want it to have 2 URLs: /page-url-1 /page-url-2 In the web.xml I wrote: <servlet> <servlet-name>Page</servlet-name> <jsp-file>page.jsp</jsp-file> </servlet> <servlet-mapping> <servlet-name>Page</servlet-name> <url-pattern>/page-url-1</url-pattern> <url-pattern>/page-url-2</url-pattern> </servlet-mapping> But now, it has 3 URLs: /page.jsp <== Not wanted /page-url-1 /page-url-2 Question: How do I remove the JSP's native URL, and assign it

web.xml filter-mapping not forwarding to struts

你。 提交于 2019-12-11 02:31:42
问题 I am trying to do something trivial and can't see what I'm missing. I have the following web.xml... <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> And when I use a URL like "http://localhost:8080/gallery

HTTP status 405 - HTTP method POST is not supported by this URL

给你一囗甜甜゛ 提交于 2019-12-11 01:20:01
问题 I am getting this "HTTP method POST is not supported by this URL" error when I run my project. The funny thing is, it was running perfectly fine two days ago. After I made a few changes to my code but then restored my original code and its giving me this error. Could you please help me? Here is my index.html: <form method="post" action="login.do"> <div> <table> <tr><td>Username: </td><td><input type="text" name="e_name"/> </td> </tr> <tr><td> Password: </td><td><input type="password" name="e

blocking access to static content folders

左心房为你撑大大i 提交于 2019-12-10 20:47:13
问题 I want to know how to block access to the static content folders in my web-app. right the folders are in inside the web-root folder in the war. like so: myapp/ -css/ -js/ -swf/ : WEB-INF/ I want the content to be visible only from the application when user is in a session. The content should be blocked if someone hits the url outside his/her session (after it has expired). Its a groovy-grails app with spring and we are using tomcat server. 回答1: Normally, files under /WEB-INF are not

Redirect every HTTP request to HTTPS

只谈情不闲聊 提交于 2019-12-10 20:18:35
问题 I know, the answer is the following: <security-constraint> <web-resource-collection> <web-resource-name>All resources</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> and it works pretty good, but only if it is the only one security-constraint in the web.xml. As soon as I add a second security-constraint, something like this: <security

Eclipse Deployment Assembly - Creates .war of dependency project inside main project WEB-INF/lib?

﹥>﹥吖頭↗ 提交于 2019-12-10 19:39:05
问题 I have a main web project that contains all the things required to deploy and hit the page via a browser. Then I have several "functions" each as a separate project that can be included into the main project. To take an example, I have MainApp and functions.reportsApp . When building these with ant the following happens: - MainApp.war - mainApp/jsf/Pages.faces, etc - reportsApp/jsf/Reports.faces, etc - WEB-INF/web.xml, mainapp-faces-config.xml, reportsApp-faces.config.xml, etc - WEB-INF/lib -

security-role-ref not working properly

做~自己de王妃 提交于 2019-12-10 17:38:31
问题 these are the contents of my web.xml <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <servlet> <security-role-ref> <role-name>MY_GROUP_NAME</role-name> <role-link>REGISTERED_USER</role-link> </security-role-ref> </servlet> <servlet> <servlet-name

adding jasig CAS authentication for OBIEE (Oracle Business Inteligence)11g

雨燕双飞 提交于 2019-12-10 16:35:29
问题 I'm trying to add CAS as an authentication provider for OBIEE 11g. up until now I've added the cas-client-core-3.2.1.jar jar to $MW_HOME/wlserver_10.3/server/lib/consoleapp/webapp/WEB-INF/lib/ and configure $MW_HOME/wlserver_10.3/server/lib/consoleapp/webapp/WEB-INF/web.xml with the the flowing elements: <filter> <filter-name>CAS Authentication Filter</filter-name> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> <init-param> <param-name>casServerLoginUrl<