diff --git a/jee7/src/main/java/com/baeldung/javaeeannotations/JavaEEAnnotationsSample/pom.xml b/jee7/src/main/java/com/baeldung/javaeeannotations/JavaEEAnnotationsSample/pom.xml
new file mode 100644
index 0000000000..b4bb243559
--- /dev/null
+++ b/jee7/src/main/java/com/baeldung/javaeeannotations/JavaEEAnnotationsSample/pom.xml
@@ -0,0 +1,57 @@
+
+ 4.0.0
+ com.baeldung.javaeeannotations
+ JavaEEAnnotationsSample
+ 0.0.1-SNAPSHOT
+ war
+ JavaEEAnnotationsSample
+ JavaEEAnnotationsSample
+
+
+
+
+ javax.annotation
+ javax.annotation-api
+ 1.3
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+
+
+
+ javax.servlet.jsp
+ jsp-api
+ 2.1
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.2
+
+ 1.7
+ 1.7
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ 2.4
+
+ src/main/webapp
+ SpringFieldConstructorInjection
+ false
+
+
+
+
+ JavaEEAnnotationsSample
+
+
\ No newline at end of file
diff --git a/jee7/src/main/java/com/baeldung/javaeeannotations/AccountServlet.java b/jee7/src/main/java/com/baeldung/javaeeannotations/JavaEEAnnotationsSample/src/main/java/com/baeldung/javaeeannotations/AccountServlet.java
similarity index 85%
rename from jee7/src/main/java/com/baeldung/javaeeannotations/AccountServlet.java
rename to jee7/src/main/java/com/baeldung/javaeeannotations/JavaEEAnnotationsSample/src/main/java/com/baeldung/javaeeannotations/AccountServlet.java
index e3f1667595..e24eb307bb 100644
--- a/jee7/src/main/java/com/baeldung/javaeeannotations/AccountServlet.java
+++ b/jee7/src/main/java/com/baeldung/javaeeannotations/JavaEEAnnotationsSample/src/main/java/com/baeldung/javaeeannotations/AccountServlet.java
@@ -5,9 +5,6 @@ import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
-import javax.servlet.annotation.HttpConstraint;
-import javax.servlet.annotation.HttpMethodConstraint;
-import javax.servlet.annotation.ServletSecurity;
import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
@@ -19,20 +16,20 @@ import javax.servlet.http.HttpServletResponse;
urlPatterns = {"/account", "/bankAccount" },
initParams = { @WebInitParam(name = "type", value = "savings") }
)
-@ServletSecurity(
+/*@ServletSecurity(
value = @HttpConstraint(rolesAllowed = {"admin"}),
httpMethodConstraints = {@HttpMethodConstraint(value = "POST", rolesAllowed = {"admin"})}
- )
+ )*/
public class AccountServlet extends javax.servlet.http.HttpServlet {
String accountType = null;
- @Override
public void init(ServletConfig config) throws ServletException {
accountType = config.getInitParameter("type");
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+
PrintWriter writer = response.getWriter();
writer.println("Hello, I am an AccountServlet!");
writer.flush();
@@ -49,8 +46,8 @@ public class AccountServlet extends javax.servlet.http.HttpServlet {
PrintWriter writer = response.getWriter();
writer.println(" Balance of " + accountType + " account is: " +
- accountBalance + "
This account bares an interest rate of " + interestRate +
- " % ");
+ accountBalance + "
This account bares an interest rate of " + interestRate +
+ " %