Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP 403, Strut2  RSS feed

Amador Yranon
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

I am trying to learn Struts and I am using Budi Kurniawan as my references. However, in chapter 2 alone, I am already stuck and felt I can't go on onward unless I can make this sample program run.

Can any one help me. It was almost the same issue of J. Ellis which he posted in 2009. I tried to follow the suggestions in the post but I am getting this error:

HTTP Status 403 - Access to the requested resource has been denied
type Status report
message Access to the requested resource has been denied
description Access to the specified resource has been forbidden.

I am using eclipse Juno Service Release 2 and using Tomcat 7.0.35

and here is the structure:

-Java Resource
- src
app02a (package)

css (folder)
jsp (folder)

Here is the struts.xml and web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//APache Software Foundation//DTD Struts Configuration 2.0//EN" "">


<!-- Un-comment to disable dynamic method invocation -->
<constant name="struts.enable.DynamicMethodInvoication" value="false"/>

<constant name="struts.devMode" value="true"/>

<package name="app02a" namespace="/" extends="struts-default">

<!-- The Product_input action does not have an action class;
it simply forwards control to the ProductForm.jsp page -->
<action name="Product_input">

<!-- The Product_save action has a non-default action class (app02.Product);
since no method attribute is present in the action declaration,
the execute method in the Product class will be invoked -->
<action name="Product_save" class="app02a.Product">


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="" xmlns="" xmlns:web="" xsi:schemaLocation="" version="3.0">





<title>Save Product</title>
<style type="text/css">@import url(css/main.css);</style>
<div id="global">
<h4>The product has been saved.</h4>
Product Name: ${productName}<br/>
Description: ${description}<br/>
Price: $${price}

<title>Add Product Form</title>
<style type="text/css">@import url(css/main.css);</style>
<div id="global">
<h3>Add a product</h3>
<form method="post" action="Product_save.action">
<td>Product Name:</td>
<td><input type="text" name="productName"/></td>
<td><input type="text" name="description"/></td>
<td><input type="text" name="price"/></td>
<td><input type="reset"/></td>
<td><input type="submit" value="Add Product"/></td>
package app02a;


public class Product implements Serializable {
private String productName;

private String description;

private String price;

public String getProductName() {
return productName;

public void setProductName(String productName) {
this.productName = productName;

public String getDescription() {
return description;

public void setDescription(String description) {
this.description = description;

public String getPrice() {
return price;

public void setPrice(String price) {
this.price = price;

public String execute() {
return "success";

Thanks in advance,

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!