Set System Properties In Jboss

Firstly create a Dynamic Web Project (File->New->Dynamic Web Project) named "JBossTutorial" according to following screenshot

Set Properties in JBoss Set System Properties In Jboss

Here I am creating a filter and reading the uploaded folder from properties file as we set before. Here we are using JBoss 6.2, so we are adding properties file in standalone.xml

package com.test.filter;


import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;

public class PropertiesFilter implements Filter {

public void destroy() {


public void doFilter(ServletRequest request, ServletResponse response,
            FilterChain chain
) throws IOException, ServletException {
PrintWriter out = response.getWriter();

public void init(FilterConfig fConfig) throws ServletException {



Publishing JBoss Project

Run JBoss


JBoss Output

Previous 1 2

Your email address will not be published. Required fields are marked *