• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 904
  • Last Modified:

struts custom tags

I am trying to run following JSP with Struts custom tags. I am getting exception as in attachment

message An exception occurred processing JSP page /jsps/struts/BeanTagsDemo.jsp at line 7 4: <P> 5: <h2> Accessing the Account bean properties from the session </h2></BR> 6: <bean:define id="ssn" value="324324" /> 7: <bean:write name="account" property="accountDetail.accountType" 8: scope="session"/> 9: <bean:write name="account" property="accountDetail.accountBalance" 10: scope="session"/> Stacktrace:

description The server encountered

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<h2> Accessing the Account bean properties from the session </h2></BR>
<bean:define id="ssn" value="324324" />
<bean:write name="account" property="accountDetail.accountType"
<bean:write name="account" property="accountDetail.accountBalance"
Chapter 16 JSP development using Struts Tags
<bean:write name="account" property="address.addressLine1" scope="session"/>
<bean:write name="account" property="address.city" scope="session"/>
<bean:write name="account" property="address.state" scope="session"/>
<bean:write name="account" property="address.country" scope="session"/>
<bean:write name="account" property="creditCards[0].name" scope="session"/>
<bean:write name="account" property="creditCards[0].number"
scope="session"/> </br>
<bean:write name="account" property="creditCards[1].name" scope="session"/>
<bean:write name="account" property="creditCards[1].number"
<bean:write name="ssn" />
<h2>Messages from property files</h2><br/>
<bean:message key="title" /><br/>
<bean:message key="error.username" /><br/>
<bean:message key="error.password" />


package beans;
public class CreditCard {
      String name;
      String number;
      public String getName() {
            return name;
      public void setName(String name) {
            this.name = name;
      public String getNumber() {
            return number;
      public void setNumber(String number) {
            this.number = number;


package beans;
public class Address {
      String addressLine1;
      String city;
      String state;
      String country;
      public String getAddressLine1() {
            return addressLine1;
      public void setAddressLine1(String addressLine1) {
            this.addressLine1 = addressLine1;
      public String getCity() {
            return city;
      public void setCity(String city) {
            this.city = city;
      public String getCountry() {
            return country;
      public void setCountry(String country) {
            this.country = country;
      public String getState() {
            return state;
      public void setState(String state) {
            this.state = state;

package beans;
public class AccountDetail {
      String accountType;
      String accountBalance;
      public String getAccountBalance() {
            return accountBalance;
      public void setAccountBalance(String accountBalance) {
            this.accountBalance = accountBalance;
      public String getAccountType() {
            return accountType;
      public void setAccountType(String accountType) {
            this.accountType = accountType;


package beans;
import java.util.List;
public class Account {
      AccountDetail accountDetail;
      Address address;
      List creditCards;
      String bankName;
      public String getBankName() {
            return bankName;
      public void setBankName(String bankName) {
            this.bankName = bankName;
      public AccountDetail getAccountDetail() {
            return accountDetail;
      public void setAccountDetail(AccountDetail accountDetail) {
            this.accountDetail = accountDetail;
      public Address getAddress() {
            return address;
      public void setAddress(Address address) {
            this.address = address;
      public List getCreditCards() {
            return creditCards;
      public void setCreditCards(List creditCards) {
            this.creditCards = creditCards;
      public CreditCard getCreditCards(int pos) {
            return (CreditCard) creditCards.get(pos);
      public void setCreditCards(int pos, CreditCard card) {
            this.creditCards.add(pos, card);

Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
  • 3
1 Solution
gudii9Author Commented:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.1//EN"
      <!-- Data Sources -->
      <!-- Form Beans -->
            <form-bean name="loginForm" type="formbeans.LoginForm">
      <!-- Global Exceptions -->
      <!-- Global Forwards -->
      <!-- Action Mappings -->
            <action path="/welcome" forward="/jsps/struts/Welcome.jsp" />
            <action path="/maintenance" type="actions.MaintenanceAction">
                  <forward name="sales" path="/jsps/struts/Sales.jsp" />
                  <forward name="inventory" path="/jsps/struts/Inventory.jsp" />
            <action path="/login" name="loginForm" type="actions.LoginAction">
                  <forward name="success" path="/jsps/struts/Main.jsp" />
            <action path="/customTags" type="actions.BeanAction">
                  <forward name="bean" path="/jsps/struts/BeanTagsDemo.jsp" />
      <!-- Message Resources -->
      <message-resources parameter="myprops.MyStruts"/>

struts config looks above

getting erros like

HTTP Status 500 - org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.


type Exception report

message org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.

description The server encountered an internal error (org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.) that prevented it from fulfilling this request.


javax.servlet.ServletException: org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.

root cause

org.apache.struts.chain.commands.InvalidPathException: No action config found for the specified url.

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.29 logs.

please advise
gudii9Author Commented:
gudii9Author Commented:
Is it case sensitive. With capital T it worked fine

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now