Results 1 to 3 of 3
  1. #1
    akashpandey is offline Member
    Join Date
    Jul 2013
    Rep Power

    Default calling action from web.xml file


    My application is in Struts2 . I want to know whether I can call action class from web.xml ?

    My point is like ..
    you can put servlet or jsp in first call of application (using <welcome-file-list>) .. can we call struts2 action class directly on giving url like..


    where abcdef is my application context name. So when i hit this URL , i should get something like (which is a struts2 action class) .

    Please help regarding this. Its very urgent.


  2. #2
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: calling action from web.xml file

    What happened when you tried it?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Pradip Yadav is offline Member
    Join Date
    Sep 2013
    Rep Power

    Default Re: calling action from web.xml file

    Hi Aakash,

    Good to see your question. But web.xml is deployment descriptor file. So basically when you specify any servlet class in it, make sure that this class follows servler execution life cycle.
    So the point is if you have to call struts action class directly from web.xml, it must have to implement GenerticServlet Class or HttpServlet class methods.

Similar Threads

  1. Replies: 0
    Last Post: 08-08-2011, 08:17 AM
  2. Calling a .dll file
    By kiros88 in forum New To Java
    Replies: 1
    Last Post: 07-16-2010, 09:43 PM
  3. Replies: 0
    Last Post: 08-10-2009, 01:25 PM
  4. calling action class multiple times
    By sindhu_shiva in forum Web Frameworks
    Replies: 0
    Last Post: 08-07-2009, 02:44 PM
  5. Replies: 3
    Last Post: 08-08-2008, 02:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts