web.xml

How do you introspect web.xml from a servlet?

Is there a way for a servlet filter to get a list of all servlets and their mappings? ...

Setup Tomcat XML welcome-file-list to actually forward to a different page?

The problem is this: IE likes caching my rootsite/, which may be different from rootsite/Index.jsp depending on whether the user is logged in. So in effect, users will log out, go to the first site, and it will look like they are logged in. Without disabling caching completely, I need this to stop. My current idea is to use the tomcat ...

Modifying web.xml in weblogic 10.3

I have a web application that I am currently in the process of migrating from Oracle Application Server to Weblogic 10.3.1. The application uses a client-side filtering agent to validate a user before letting them enter their password. The agent would occasionally jam up and we would remove it by simply ripping its configuration out of t...

Problems Regarding j_security_check to authenticate Form

Hi, I am new to a programming world world. I have a query regarding deployment descriptor in jboss. In web.xml there is login config that authorizes the form. I want to know how the j_check_security validates the form and redirects it to homepage on successfull feeding of username and password. This was my first question. Secondly i...

Referencing Environment Variables in web.xml

I'm pre-packaging a JSP web-app that relies on some file path settings found within web.xml. These settings are unknown at packaging time, because they reference a path the customer will set when deploying the entire application (of which the web-app is a management interface). It seems that the easiest way to avoid tokens and file mod...

TomCat 6: can welcome page be inside WEB-INF?

I'm following this example to get Spring up & running: http://static.springsource.org/docs/Spring-MVC-step-by-step/part2.html What they do is move all .jsp files inside the WEB-INF, to stop users accessing them directly... so far so good. However the servlet has a welcome page of index.jsp, and when this is moved inside the WEB-INF dir ...

Exclusive url-patterns in Tomcat web.xml descriptor

I am trying to redirect erroneous page requests - 404 errors - to a custom error page. In order for my servlet, instead of the root servlet, to handle these requests, I entered the following url-pattern: <url-pattern>/</url-pattern> Unfortunately, this also catches embedded requests for files like *.js, *.css, *.png, *.jpg, and other...

Tomcat 6 - The requested resource ... is not available.

I am trying to start developing with Java and the Stripes Framework. I have the following in my web.xml file <?xml version="1.0" encoding="ISO-8859-1"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.su...

Mapping both static and dynamic files in Tomcat/Spring?

I was using the following in web.xml to configure a servlet to dynamically generate PDFs. <servlet-mapping> <servlet-name>pdfServlet</servlet-name> <url-pattern>*.pdf</url-pattern> </servlet-mapping> Now, I also have to serve a few static PDF files. What's the cleanest way to configure that? I'm currently only serving four o...

Jetty Filter Problem (ClassNotFoundException)

Hi! I have a groovy project running under jetty for development and under tomcat for production. I wrote a filter called URLFilter I've added the following lines in web.xml (actually I've added to myProj/src/templates/war/web.xml) <filter> <filter-name>URLAbarajeitor</filter-name> <filter-class>filters.URLFilter</filter-class>...

web.xml - Java Servlet Filters - Not being run before processing the JSP page (on Tomcat)

I am fairly new to Servlet Filters and have basically joined a project using them and added an additional filter to the web.xml file (deployed on Tomcat 5.5). I am 95% sure that at some point it was working correctly but now when debugging if I put breakpoints at the top of the JSP page I am trying to view (login.jsp), it's template pa...

web.xml filter-mapping not forwarding to struts

Hello, 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...

web.xml URL pattern matching question for Tomcat

I'd like to use this kind of a pattern for my Java web app: <url-pattern>/*/test.html</url-pattern> and then parse the URL in the servlet to get what the value of the star is, and use that value to query a different table in the database. However this seems to be an illegal pattern for Tomcat. Is there any way I can achieve this with...

How do I change the location of index.jsp in a war file

I have the following project structure: myproject - src - WebContent    - META-INF    - WEB-INF       - jsp         - index.jsp       - lib         - web.xml If my index.jsp comes under the WebContent directory then all is well, but I want it to be under WebContent/WEB-INF/jsp with all the other jsps. What do I have to add to do this. ...

How to register multiple servlets in web.xml in one Spring application

I want to define two servlets in my Spring web.xml - one for the application html/jsp pages, and one for a web service that will be called by an external application. Here is the web.xml: <servlet> <servlet-name>myservlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-star...

purpose of webAppRootKey ?

Can somebody explain this entry in web.xml ? When it has to be used and why ? <context-param> <param-name>webAppRootKey</param-name> <param-value>webapp.root</param-value> </context-param> Is this something related to Spring or general one? ...

web.xml - Java Servlet Filters and WebSphere - URL Pattern issues

Hi, So we are running a web application that has been tested on Tomcat, Glassfish, WebLogic and WebSphere. All run correctly except WebSphere. The issue is that filters are not processed for files under a certain directory. For example I have a filter that checks the user's lanuage from browser cookies and another that get the user's u...

Servlet web.xml authentication for welcome page

I have a web.xml which looks like: <web-app> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <security-constraint> <web-resource-collection> <web-resource-name>Default</web-resource-name> <url-pattern>/</url-pattern> </web-resource-collection> <auth-constraint/> </security-constraint> ...

Access environmental parameters in web.xml from Web Service application

I have to build two web service applications to be deployed to different servers (WebSphere 6.1). One of them is “linked” to another by calling its services, so the first web service application should be aware of the endpoint URL of the second one. Those applications are working in different environments: Dev, Test and Production. I h...

Eclipse auto republish does not seem to have any effect sometimes

Hi all, When developing a JSP web application in Eclipse, i'm using the built in J2EE Preview servlet container to host the application, with a browser open to localhost:8080/MyApp to preview things. Sometimes i make a change to the application and wait for the servers view in Eclipse to go from 'Republish' to 'Synchronized', but when ...