Calling an action class from a jar file

I have a struts application . I now add a jar file to the lib of the main struts application, the jar file  is another struts application.

Now from the main struts application I have a jsp which calls a form bean and an action class from the second jared struts application .

In my main strutsconfig .xml I have an action mapping for the second action class and the form bean definition .

When I deploy my application I get an error in my server console

<Servlet: "action" failed to preload on startup in Web application: "ABCSYSTEM".
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
      at org.apache.struts.action.ActionServlet.handleConfigException(
      at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
      at org.apache.struts.action.ActionServlet.initModuleConfig(
      at org.apache.struts.action.ActionServlet.init(
      at javax.servlet.GenericServlet.init(

Please Advice

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

the struts-config.xml is not parsed correctly.
Check the tag position, closing etc in the struts-config.xml file.

dreams4everAuthor Commented:
everythis is closed perfectly

when I add this to the form-beans definition I get this exception

<form-bean name="XYZStrutActionForm" type="" />  

when I remove this line I get no exception on my server .

dreams4everAuthor Commented:
>> everythis is closed perfectly
 everything is closed perfectly

Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

You need to make sure that the form-bean tag is located in the correct place in the xml file and that it is surrounded by the form-bean tag and also that the class file declared exists and is on the classpath, and that you haven't made a spelling mistake in the declaration of the type attribute, e.g.

          <form-bean name="XYZStrutActionForm" type="" />  

PS fargo, you really don't need to sign your name on every post! we know it's you by the title of the comment and it just adds redundant extra lines to the thread :-)
dreams4everAuthor Commented:
<form-beans >
  <form-bean name="XYZStrutActionForm" type=""/>  
    <form-bean name="loginForm" type="" />
</form-beans >

The below form bean is called from the jared file . Jar file is in the proper class path. which gives the exception

  <form-bean name="XYZStrutActionForm" type=""/>  

Okay. If  you are calling the form bean correctly it must mean that the bean cannot be loaded from the classpath. This could mean that the file is not present on the classpath or that there are conflicting versions on the classpath.

Please check that there are no other jars with that file in and that this file is not in the WEB-INF/classes folder either

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bloodredsun, you are keeping an eye on me -:)
dreams4everAuthor Commented:
I dont have any jar files  in my WEB-INF folder

And in your WEB-INF/lib folder?

So the bean file is found at WEB-INF/classes/com/xyz/simulator/actions/XYZStrutActionForm.class

and it extends ActionForm, correct?
dreams4everAuthor Commented:

  I created the action class and the form bean in my main struts application and called other classes from the jar file which works perfectly

Thanks for all the comments

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.