How to use a servlet filter in Java to change an incoming servlet request url?

How can I use a servlet filter to change an incoming servlet request url from to ? Update: according to BalusC’s steps below, I came up with the following code: public class UrlRewriteFilter implements Filter { @Override public void init(FilterConfig config) throws ServletException { // } @Override public void doFilter(ServletRequest req, ServletResponse res, … Read more

What is WEB-INF used for in a Java EE web application?

I’m working on a Java EE web application with the following source code directory structure: src/main/java <– multiple packages containing Java classes src/test/java <– multiple packages containing JUnit tests src/main/resources <– includes properties files for textual messages src/main/webapp/resources <– includes CSS, images and all Javascript files src/main/webapp/WEB-INF src/main/webapp/WEB-INF/tags src/main/webapp/WEB-INF/views The folder I’m interested in is … Read more

Java / Jakarta EE web development, where do I start and what skills do I need? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Where to place and how to read configuration resource files in servlet based application?

In my web application I have to send email to set of predefined users like [email protected], so I wish to add that to a .properties file and access it when required. Is this a correct procedure, if so then where should I place this file? I am using Netbeans IDE which is having two separate … Read more

Maven dependency for Servlet 3.0 API?

How can I tell Maven 2 to load the Servlet 3.0 API? I tried: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>3.0</version> <scope>provided</scope> </dependency> I use but what repository would be correct? Addendum: It works with a dependency for the entire Java EE 6 API and the following settings: <repository> <id></id> <url></url> </repository> <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> … Read more