When the ActionForm class will be instantiate in struts

Hi all,
I am new to this group.
I've one doubt in struts.If any one know please help me.
when the ActionForm class will be instantiate in struts ?
Thanks
Srilue

Hi harsha,
here is my emp.jsp code
<%@ page language="java"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<html>
     <head>
          <title>JSP for empform form</title>
     </head>
     <body>
          <html:form action="/emp">
               edept : <html:text property="edept"/><html:errors property="edept"/><br/>
               eid : <html:text property="eid"/><html:errors property="eid"/><br/>
               ename : <html:text property="ename"/><html:errors property="ename"/><br/>
               <html:submit/><html:cancel/>
          </html:form>
     </body>
</html>in struts-config.xml code for this empbean is
<form-beans >
<form-bean name="empform" type="Emp.EmpForm" />
   </form-beans>
<action-mappings >
      validate="false" />
      <action
         attribute="empform"
         input="emp.jsp"
         name="empform"
         path="/emp"
         scope="request"
         type="Emp.EmpAction"
         validate="false" />
   </action-mappings>and code for EmpForm.java is
package Emp;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
public class EmpForm extends ActionForm {
     private Integer edept;
     private String ename;
     private Integer eid;
     public void reset(ActionMapping mapping, HttpServletRequest request) {
          System.out.println("in emp reset");
     public Integer getEdept() {
          return edept;
     public void setEdept(Integer edept) {
          this.edept = edept;
     public String getEname() {
          return ename;
     public void setEname(String ename) {
          this.ename = ename;
     public Integer getEid() {
          return eid;
     public void setEid(Integer eid) {
          this.eid = eid;
}and the code for EmpAction.java is
package Emp;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class EmpAction extends Action {
     public ActionForward execute(
          ActionMapping mapping,
          ActionForm form,
          HttpServletRequest request,
          HttpServletResponse response) {
          EmpForm empform = (EmpForm) form;
          throw new UnsupportedOperationException(
               "Generated method 'execute(...)' not implemented.");
}this is my total application.
Here after starting the tomcat server when we click onto the emp.jsp,
automatically the statement will be displayed , i had written in the System.out.println() in reset() method.
Thanks
Srilue

Similar Messages

  • Does anyone know when the next upadate will be?

    does anyone know when the next upadate will be?

    No. Only Apple knows that. We are just users like you.

  • Does anyone know when the iphone 5 will be out?

    does anyone know when the iphone 5 will be out?

    Sorry for the practical joke, but really, there are dozens if not hundreds of threads asking this question and the answer is always the same: No one knows exactly, and that's the way Apple wants it. Apple hasn't even announced that there is going to be an iPhone 5; it's all speculation and rumor for now.
    My best guess is that you'll see a new iPhone at the same time iOS 5 is released, which should be late September or early October. (Or not... Apple will only say, "Fall 2011 – nothing more specific.) But it might not be an iPhone 5; it could be a slightly modified iPhone 4, or nothing at all.

  • Any idea as to when the Apple Store will start selling refurbished iPad 4?

    Any idea as to when the Apple Store will start selling refurbished iPad 4?

    As of now, they have some:
    http://store.apple.com/us/browse/home/specialdeals/ipad/ipad4gen

  • Any ideas for when the ipod touch will come out? Thanks!:)

    Any ideas for when the ipod touch will come out? Thanks!:)

    From the terms of use of this forum:
    do not add Submissions about nontechnical topics, including:
    Speculations or rumors about unannounced products."

  • Has anyone got any idea as to when the iPhone 4S will come to India?

    Has anyone got any idea as to when the iPhone 4S will come to India?

    Anyone here knows as much as you do and has access to the same info as you. Check Apple's India website for announcements. 

  • When the arp cache will get flushed?

    I am using cent os 6.4 machine.. I want to when the arp table will get flushed. Is there anyway to check the flushing mechanism. Kindly let me know.

    The default arp-timeout for Cisco is 4 hours

  • When the new version will correct the error 10.0.0? program constantly hangs. will not start!

    when the new version will correct the error 10.0.0? program constantly hangs. will not start!

    Are you using any VST plug-ins or audio units? Then check, if they are still compatible. You may need to uninstall them.
    See this support document: 
    Unexpected behavior with Audio Unit plug-ins http://support.apple.com/kb/TS5249

  • Kindly clarify when the iphone 6 will be available in egypt

    Kindly clarify when the iphone 6 will be available in egypt

    You are not writing Apple.  This is a user to user forum, so we can not kindly clarify anything for you.  We don't work for Apple, thus we don't know their plans for selling their products in other countries.  You should contact Apple in your country who may know the answer to your question.

  • There is no longer a "close tab" under the file menu, so how do I go back to a previous page when the back button will not work?

    Often the back button will not work. I can find no "close tab" under the menus, which I think used to be there, and which is used with Internet Explorer to go to the previous page. How can I go back to the previous page with Firefox when the back button will not work?

    No you can't. Apple don't support downgrading of iOS.

  • When the iphone 5 will be unlock??

    When the iPhone 5 will be unlock?

    wooooooowwwwww thanksssssssssssss, here in Argentina is too dificult to get one because some goverment laws..... that do not permit to enter merchandising from outside, just accept samsung, because they manufacture here, and i dont like it, so im going to do it.
    Thanks again!!!!!!!!

  • I recently just bought a iphone 4 im happy with the product and it didnt cost an arm and a leg but i was wondering when the iphone 4 will become obsolete as in not receaving updates anymore etc

    I recently just bought a iphone 4 im happy with the product and it didnt cost an arm and a leg but i was wondering when the iphone 4 will become obsolete as in not receaving updates anymore etc

    Keep in mind that just because a device may not be upgradeable to the latest iOS release does not mean it cannot continue to work just fine on the last update it did get.  There will be many devices that were incompatible with iOS 7 that will continuing to work just fine on iOS 6 for a long time yet.  There are many people still using their iPad 1 despite the fact it stopped getting iOS updates after iOS 5.1.1.
    One way to safeguard your apps against future incompatible versions is to keep a backup of all your apps in iTunes on your computer.  That way, if an update to the app comes out that is not backwards compatible with your iOS, you still have a copy of the last version of the app that was compatible with your device and your iOS release.

  • When the iphone 4s will be sold in Russia?

    When the iphone 4s will be sold in Russia? And why, in Russia all the products from Appleare beginning to Sell, later than in other countries?

    Thank you for your reply. Just a shame that our country is later than in others.

  • When the iphone 4s will be sold unlocked

    when the iphone 4s will be sold unlocked

    deggie wrote:
    No one knows, including the person who posted that date. And AT&T will not sell unlocked iPhones.
    Yes he was wrong about the date since they became available through the Apple website November 11th. And I have heard of many cases where people paid full price at the Apple retail stores and got their phones unlocked. I would just order online to be safe.

  • When the Dreamweaver 9 will be released?

    When the Dreamweaver 9 will be released?

    I'll give you the .Net functionality. Its PHP support is much
    poorer,
    though. 8)
    And what editing capability exactly are you thinking of when
    you say this?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "xtra" <[email protected]> wrote in message
    news:ekms2n$sfc$[email protected]..
    > Yes, Microsoft Web Expressions will definately be at the
    top of my "to
    > get" list. The .NET functionality and it's editing
    capabilities are much
    > better.
    >
    >
    >
    >
    > "DaViD.R" <[email protected]> wrote in
    message
    > news:ekmd9u$boq$[email protected]..
    >> it does not matter when they goanna release it as
    log it will kick the
    >> new
    >> microsoft developer tool called Microsoft Expression
    - and frankly this
    >> tool
    >> has everything that .net developer can dream about
    about it .
    >> waht do you think guys ..?
    >>
    >
    >

Maybe you are looking for

  • Help to access a JTextArea created in another method ?

    Hello, first I am a new to java although i am a very experienced PHP programmer ... i am having trouble figuring out why i cannot access the JTextArea created inside BuildContainer() in my program below from another method NewFile(). I am sure its ju

  • A copy of Firefox is already open.

    I used Spotlight and removed (⌘ + Del and then "Empty Trash") all instances (files and folders) of Mozilla from my Mac to reinstall Firefox. Every time I reopen keep getting this error "A copy of Firefox is already open." I've done some Google search

  • No time code overlay media encoder cc 2014

    activating time code overlay in export settings/effects and the overlay is not visible.  All other settings in effects are working.  Applications manager tells me the app is up-to-date. encoding an mov file to h.264.

  • Artwork not showing up in Apple TV(2)

    For some reason, not all of the artwork for my movies is showing up on Apple TV (2). They show up fine in iTunes. Is there a simple fix for this? Thanks, Derek

  • Problem reading ' from XML uisng SAX Parser

    Hi All, I have a XML which contains the following element <DataText>This is simple ' Text</DataText>I have included & apos ; in the element called DataText. When parsing the element, am getting only the text that appears before & apos ; When Not incl