web.xml

cvc-id.3 error in web.xml

I'm getting this error message while editing web.xml file in eclipse for SpringMVC web-app: cvc-id.3: A field of identity constraint 'web-app-servlet-name-uniqueness' matched element 'web-app', but this element does not have a simple type. here is part of my web.xml: <?xml version="1.0" encoding="UTF-8" ?> <web-app xmlns:...

Web.xml - url pattern mapped twice

A web.xml of ours contains following excerpt.. <servlet> <servlet-name>testServlet</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>testServlet</servlet-name> <url-pattern>*.ht...

Tomcat unable to find jsp in war file

I recently switched one of my static html files to a Spring controller that uses a JSP to render its view. I use jetty to test locally and local testing shows the page rendering fine. Upon deploying to our test server, which uses Tomcat 6.0.26, I get the following exception: javax.servlet.ServletException: Could not get RequestDispatche...

ContextLoadListener and DispatcherServlet

Is it ok to define both the ContextLoadListener and DispatcherServlet in the web.xml or are they mutually exclusive? ...

How to configure Jetty programmatically to execute JSP pages?

I found some hints on Stackoverflow how to enable JSP support in Jetty by editing web.xml. But can this be done programmatically, without any web.xml? (Preferable without writing an own servlet for that) Even REST services support with Jersey can be enabled programmatically in Jetty. I can't beleave that it's so hard for such wide-spre...

How to set value in web.xml using property file

Hi all, I would like to know if there is possibility to set an attribute in web.xml by using property file. For example the web.xml: <context-param> <param-name>Map.MyJNDI</param-name> <param-value>java:comp/env/jdbc/${my.computer}</param-value> </context-param> and application.properties would be : # My computer...

Set path in web.xml relative to WEB-INF

Hi, I want to set a path in my web.xml which is relative to the WEB-INF or the WEB-INF/classes. However, the following code (repository.home) seems to pick up a path relative to c: root drive path on my windows machine here. <servlet> <servlet-name>ContentRepository</servlet-name> <servlet-class>org.apache.jackrabbit.servlet.j...

Spring's ContentLoaderListener not found in the web-app but was found on the system classpath

I am building a GWT app with Spring. I am having some issues to inject a dependency to one of my Servlets, so I am trying to narrow down what can be wrong. First, when my app starts I get: [WARN] Server class 'org.springframework.web.context.ContextLoaderListener' could not be found in the web app, but was found on the system ...

Spring XML files outside WEB-INF

I'm working in a multi-module maven2 project using Spring and GWT. Let's say I have two subprojects: service and presentation. "service" contains the actual implementations of the services and "presentation" is in charge of wrapping them for GWT. I have successfully loaded the Spring XML files that are in the WEB-INF directory (the same...

How to make spring4gwt export more than 1 service ?

I successfully follow GWT and spring4gwt's tutorials and transform the StockWatcher's demo into a Spring(3.0) enabled service , by the following configurations : web.xml : <servlet-mapping> <servlet-name>springGwtRemoteServiceServlet</servlet-name> <!-- stockWatcher module is rename-to="stock" --> <url-pattern>/stock/spri...

load-on-startup Tomcat

How can i load a class on at startup in Tomcat ? I saw "load-on-startup" tag for web.xml file, but can i use it and how should I write my class ? EDIT: ok, but how can i implements this class and xml is it right ? < servlet-name>??< /servlet-name> < servlet-class>??< /servlet-class> < load-on-startup>10< /load-on-startup> ...

Get IP address for request into web.xml

Hi Guys, The server machine has a internal IP address of x.x.x.x and external IP address of y.y.y.y If the form action in JSP has the value x.x.x.x:9080 my code works properly But when it has the value y.y.y.y I am getting a bug. The code requires an internal IP address. Is there a way that I can intercept all requests made using exte...

Maven: Customize web.xml of web-app project

Hi all, I have a web application Maven project, and I want to customize the web.xml file depending on the Profile that is running. I am using the Maven-War-plugin, which allows me to define a "resources" directory, where the files may be filtered. However, filtering alone is not sufficient for me. In more detail, I want to include (or ...

Problems with deploying GWT with RPC to tomcat (web.xml problem probably)

Hello! My gwt app that uses mysql database runs normaly in eclipse when debugging. When i run it on tomcat, it displays correctly but when i click on a button that makes a RPC (executes servlet and contacts the database) i get an error. I checked my tomcat log and i see 404 error when clicking on a button: 0:0:0:0:0:0:0:1 - - [22/Jul/2...

j2ee webapp A using authentication facility of web app B

Any user that tries to access some secure resources on my webapp A needs to be authenticated with a webapp B. B has access to the user credentials password etc., I am wondering about the right way to go about this. One alternative would be to have a filter protecting my secure pages. If a user that is unauthenticated access A secure res...

URL mapping not working for servlet

I have what I think is a bizarre problem. With the same mapping to a servlet, one url works, and the other doesn't: <servlet-mapping> <servlet-name>UL_Admin</servlet-name> <url-pattern>/universal_listings_administration/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Create_New_Site</ser...

call servlet from html form without web.xml deployment descriptor

How can I call a servlet from the form's action without using the web.xml deployment descriptor? ...

Preferred way to set up a JSF start page ?

Hi, I'm using JSF 2.0 to build a website. Eclipse generated the following web.xml file ... <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> ... So to view my application i have to visit "localhost/myApp/faces/index.xhtml". I would prefer to view it directl...

Filter mapping url-pattern that excludes subdirectories

Is there any way to make a filtermapping not include subdirectories? For example. I have .xhtml files in my context root, and I also have a subfolder named "test" with files with the same extension. Is there any may to map a filter to the files in context root and not to the files in the "test" directory? ...

How to run multiple instances of a single GWT application with different web.xml files on different subdomains ?

I've a GWT application, I run my application on tomcat server. My application only uses MySQL database to save & retrieve all needed data & has no side effect on file system (I mean it does not change any file on it's deployment path). Now I want to run multiple instances of my application on different subdomains, the only different betw...