How to work on Struts

Do Struts have patterns? How to work on Struts. ITs new.
Kiran

Kiran,
::Do Struts have patterns?
From the book 'Struts in Action'
Patterns implemented by Struts classes
Patterns(s)-------------------->Struts Component(s)
Service to worker-------------->ActionServlet, Action
Command, Command and Controller,
Front controller, Singleton,
Service Location--------------->ActionServlet, Action
Dispatcher, Navigator---------->ActionMapping, ActionServlet, Action, ActionForward
View Helper, Session Facade,
Singleton---------------------->Action
Transfer Object(Value Object),
Value Object Assembler--------->ActionForm, ActionErrors, ActionMessages
View Helper-------------------->ActionForm, ContextHelper, tag extensions
Composite View, Value Object
Assembler---------------------->Template taglib, Tiles taglib
Synchronized Token------------->Action
Decorator---------------------->ActionMapping::How to work on Struts
http://jakarta.apache.org/struts/
Download Struts
http://jakarta.apache.org/site/binindex.cgi
see section Struts KEYS
Download any Servlet/JSP container like Tomcat or any that you like.
http://jakarta.apache.org/tomcat/
http://jakarta.apache.org/site/binindex.cgi
see section Tomcat 5.0.18 KEYS
Also, use Google to search for keyword struts. You'll see a lot of notes on it.

Similar Messages

  • How Ajax works with Struts framework

    How Ajax works with Struts framework .
    Thanks
    Ramki

    So we must write file name(like abc.do), If am using struts <html:link > tag like <html:like action="abc" >Click</html:link>, so with ajax we must call like <a href ="abc.do">Click</a> .
    But there is a problem, if am using ,
    <servlet-mapping>
    <servlet-name>MainServlet</servlet-name>
    <url-pattern>/r/*</url-pattern>
    </servlet-mapping>
    or
    <servlet-mapping>
    <servlet-name>MainServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    here i am changing web.xml file based on client interest. At those situation we must change all jsp pages for <a href ="/r/abc">Click</a> .like,.
    It's very difficult.
    Is any other way to use ajax with Struts (Only struts tags)
    Thanks
    Ramki

  • How to call a struts action from a JSF page

    I am working on a small POC that has to do with struts-faces. I need to know how to call a struts ".do" action from a JSF page..
    Sameer Jaffer

    is it not possible to call a action from the faces submit button and/or the navigation?
    This a simple POC using struts-faces exmaples.
    Here is my struts-config and faces-config file.
    <struts-config>
    <data-sources/>
    <form-beans>
      <form-bean name="GetNameForm" type="demo.GetNameForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards>
      <forward name="getName" path="/pages/inputname.jsp"/>
    </global-forwards>
    <action-mappings>
      <action name="GetNameForm" path="/greeting" scope="request" type="demo.GreetingAction">
       <forward name="sayhello" path="/pages/greeting.jsp"/>
      </action>
    </action-mappings>
    <controller>
        <set-property property="inputForward" value="true"/>
        <set-property property="processorClass"
                value="org.apache.struts.faces.application.FacesRequestProcessor"/>
    </controller>
    </struts-config>faces-config
    <faces-config>
    <managed-bean>
      <managed-bean-name>calculate</managed-bean-name>
      <managed-bean-class>com.jsftest.Calculate</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
      <managed-bean-name>GetNameForm</managed-bean-name>
      <managed-bean-class>demo.GetNameForm</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
      <from-view-id>/calculate.jsp</from-view-id>
      <navigation-case>
       <from-outcome>success</from-outcome>
       <to-view-id>/success.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
       <from-outcome>failure</from-outcome>
       <to-view-id>/failure.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    <navigation-rule>
      <from-view-id>/inputNameJSF.jsp</from-view-id>
      <navigation-case>
       <to-view-id>/pages/greeting.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    </faces-config>in my inputNameJSF.jsp (faces page)
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Say Hello!!</title>
    </head>
    <body>
    Input Name
    <f:view>
         <h:form >
              <h:inputText value="#{GetNameForm.name}" id = "name" />
              <br>
              <h:commandButton id="submit"  action="/greeting.do" value="   Say Hello!   " />
         </h:form>
    </f:view>
    </body>
    </html>I want to be able to call the struts action invoking the Action method in the that returns the name
    package demo;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class GreetingAction extends org.apache.struts.action.Action {
        // Global Forwards
        public static final String GLOBAL_FORWARD_getName = "getName";
        // Local Forwards
        private static final String FORWARD_sayhello = "sayhello";
        public GreetingAction() {
        public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
            String name = ((demo.GetNameForm)form).getName();
            String greeting = "Hello, "+name+"!";
            request.setAttribute("greeting", greeting);
            return mapping.findForward(FORWARD_sayhello);
    }Edited by: sijaffer on Aug 11, 2009 12:03 PM

  • How to to get Struts Action at very first loading

    Hi, All;
    I was working on Jsp with Struts framework, I do not know how to get the Struts action to run during the very first loading if it is no submit buttons.
    When first load of page, I'd like to retrieve data from Action class (or other class) with request, then drop it to request attributes or create a bean.
    Because, normally Action class will be invoked in submit on page form which predefined in config files, but my page should get data from class with request at very first loading (without button submit), so can anyone know the way to do this kind of things? Is there other thing need to do in strust-config.xml. I really appreciate your ideas or examples.

    Sure. In the url just call that Action's path (e.g /app/myAction.do) which will first fill the data and then send to the desired JSP.
    Click Here
    When the user clicks on the link the Action would be automatically called. And you can do whatever you need in the Action.

  • How to work with both desktop and Surface pro 3

    Hello,
    I have a desktop for my normal use of Adobe Creative Cloud for Photoshop and Lightroom.  I have my lightroom catalog on a separate external drive.  I just got Surface pro 3 to do Adobe on it.  I am now confused on how to work on Surface and how to access my Lightroom catalog.
    Thanks for your help.
    Mo

    Just install Lightroom on your Surface Pro, plug-in the external drive, and double-click the LR catalog file.

  • How to work with 360 video?

    I am new to AE and am trying to work with a 360 equirectangular video I shot with a Freedom 360 and 6 go pros.
    Are there any tutorials on how to work with 360 spherical videos? Do I need to download additional plugins?
    Thank you,
    Phil

    Phil,
    Of course, the image needs to be big for this, but the plugin you would use is CC Sphere.
    Drop your movie into a composition and apply CC Sphere to the video.
    Then set the Render option in the effect to "Inside".
    Under Shading set Ambient to 100% and Diffuse to 0%.
    Then scale inside the effect until the image fills the screen.
    Then you'll be able to use the Rotate Y controls in CC Sphere to spin around inside your video!
    You can also add Optics Compensation and Reverse the Lens Distortion to straighten out your image.
    Let me know if you have any questions!
    Trent

  • Hey Guys, from Germany. I want to connect my iMac 21" with my Tv just for fun. Does anyone know, how it works. With a Hdmi adapter?

    Hey guys! I want to connect my Imac 21 " with my Tv just for fun. Does anyone know , how it works?

    Selecting the correct adapter and cable depends on which year model iMac you have and what inputs the TV has?
    Check the User's Guide that came with your iMac or your Spec's at > Apple - Support - Technical Specifications
    to see if your iMac has a Mini-DVI or Mini DisplayPort and then select that adapter with the correct connection for the TV.
    Example: if you have a 2010 or 2011 iMac and an HDMI ready TV, then you would want the > Moshi Mini DP to HDMI Adapter with Audio Support - Apple Store (U.S.)

  • I was looking at the "Find my iPhone" app and I have a doubt regarding how it works for the macbook. In order to detect the location, the macbook should remain signed into iCloud. What if the thief logs out of iCloud. Would we able to locate the macbook?

    I was looking at the "Find my iPhone" app and I have a doubt regarding how it works for the macbook. In order to detect the location, the macbook should remain signed into iCloud. What if the person who has stolen my macbook logs out of iCloud.
    It should work fine for iPhone/iPad because we can enable "Restrictions" to prevent the user from signing out of iCloud. Do we have simialr settings for the macbook?
    Thanks,

    If it's not on the device list, it indicates that someone has gone to Find My iPhone on icloud.com and manually deleted it from the device list (as explained here: http://help.apple.com/icloud/#mmfc0eeddd), and it has not gone back online since (which would cause it to reappear on the device list; Find My iPhone has been turned of in settings on the device; the iClolud account has been deleted from the device; or the entire devices has been erased and restored.
    Unfortunately, there's no other way to track the phone other than through Find My iPhone.  You could call your carrier and see if they would blackliste it so at least the theif couldn't use it.

  • I need to change my apple ID because I'm changing my email address. I'm worried that when I do, I'll no longer be able to use my first generation apple tv unless I change the apple ID there as well.  Does anyone know how this works??

    I have to change my apple ID because I'm changing my email address. (I have a Comcast address and am switching to U-verse) I'm worried that when I do, I'll no longer be able to use my first generation apple tv unless I change the apple ID there as well. I'm also trying to find out if changing my apple ID is going to interfere with getting my itunes content on my computer and my iphone.  Does anyone know how this works??

    My iTunes appleID is an old defunct e-mail address - it does not have to be functional.
    Do what Winston says to ensure you keep getting correspondence related to that ID.
    AC

  • HT3209 how many times i can watch the show after i purchased on i tune and how this works

    I was just wondering if sombody can help me with this because i am new to itune  . I would like to know how it works after u purchase tv show , do i have to pay once and watch more time or i have to pay every time i watch . Thank you in advance .

    I was just wondering if sombody can help me with this because i am new to itune  . I would like to know how it works after u purchase tv show , do i have to pay once and watch more time or i have to pay every time i watch . Thank you in advance .

  • On my ipod touch I'm not too sure how I uploaded a album onto my ipod from my laptop. But, now there is no way to delete the album full of pictures. What do I do? I only gotten it a while ago and not fully sure how to work it. Help?

    On my ipod touch I'm not too sure how I uploaded a album onto my ipod from my laptop. But, now there is no way to delete the album full of pictures. What do I do? I only gotten it a while ago and not fully sure how to work it. Help?

    http://support.apple.com/kb/HT4236

  • I no longer have access to my icloud email and don't know the answers to my security questions. Does anyone know how to work around this to reset my icloud ID without losing my info? I haven't backed up in a year because of this.

    I no longer have access to my icloud email and don't know the answers to my security questions. Does anyone know how to work around this to reset my icloud ID without losing my info? I haven't backed up in a year because of this.

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (123381)

  • I pad 2 updated to iOS 6.1.3 and now wifi is greyed out. Apple support engineers say replace but my warranty exited 09/12. Funny how it worked perfectly fine before the update.

    I just updated to6.1.3 and now my wifi button is greyed out. Apple support said it is a hardware issue. Funny how it worked just fine on the previous iOS. Now apple wants me to buy a replace not because my warranty expired 09/12. Seems to me like ios6.1.3 was an update to sell more products. Tried all suggested fixes with no success. With all the noted issues with ios6 there may be another class action lawsuit coming. Apple tech senior advisor unwilling to help. First advisor told me just buy a new I pad. Second advisor wants me to pay for a replacement. Can someone explain to me how an apple approved software upgrade that damaged my i pad is classified as my fault. I've seen some shady selling techniques but this one takes the cake in my book. Anyone have the contact information to higher up executives in apple for me to speak with about my issues?

    Have you check the following?
    Verify that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings
    Ensure that your device is using the latest software.
    If your issue is still unresolved, perform a software restore in iTune

  • How IE works for  flat file

    Hi all:
         As we all know that, when IE gets a idoc's service name from SLD, then use it with idoc's message type and Idoc type to do receiver determniation, what about flat file ? how can we know its Service name and interface name  if there is only a flat file on FTP?  how IE works for Flat file ?
         Couldn't thank you more

    Hi,
    For any idoc scenarious, you would use business systems rather than business service which is stored in SLD. So the IE would fetch it from SLD at runtime.
    For file based scenarious also, you can create business system as type third party and use the same.
    Is that answer your question?
    Regards
    Krish

  • Better process for introducing new features and explaining how they work

    There are all kinds of new features being added to the Creative Cloud app but knowing what they are and learning about how they work isn't the most user friendly process. The current process is read the release notes after updating to a new version. The release notes should hyperlink to the related features in the product help. It would be great if there was a "What's New" section for the Creative Cloud app itself with new releases which included an introduction to new features just like there is for the desktop products.

    This is a poorly explained reason about why is so important having a loupe in Photoshop. I've not also, used the best example, but I will. This belongs to the ADDITIONAL FEATURES: Loupe/Magnificator View:. Also, I will try to make my english clrearer, but here it goes:

Maybe you are looking for

  • Urgent! Title in the center for ALV GRID

    Hi, I'm using FM REUSE_ALV_GRID_DISPLAY. I need to make a header like this: Reporting idocs (center of alv)        data time Material & batch (center of alv) Can anyone tell me how? Thanks!

  • Automatic Single Item multi-level planning on sales order creation

    Hi all, I am using strategy 50 and want planning for single item to be carried out at the time of sales order creation to avoid MRP run everytime sales order is created..In order to achieve it i checked Automatic Planning Indicator in "OVZG" for the

  • Deleting row with inputText components throws error:

    How delete a row in table with inputText components in it? I tried just deleting it from the model but then I get the following error: javax.faces.el.EvaluationException: java.lang.IndexOutOfBoundsException: Index: 3, Size: 2

  • Using iPod Mini with Mac and PC

    Has anyone had any experience switching back and forth between a Mac and a PC with the iPod? I've only used a Mac with my iPod Mini, but I will be taking a business trip and will be taking my PC laptop. I'd like to be able to recharge the iPod batter

  • How Do I Return Additional Data During j_security_check Authentication

    I am supporting an application that uses the j_security_check authentication. This works well. We have a request to allow for resetting the users password should they forget the one they were using. The concept is as follows: 1) Users attempts to log