Easiest way to validate with Struts?..

Hello,
I have a problem with validating a simple form with javascript via Struts validator. It inserts the whole javascript instead <html:javascript formName="whatever"/> and as a result half of the html code that follows gets cut off. I don't know why this happens, maybe because the javascript is so big (although that sounds like nonsense).
Is there a better, simpler way to validate with Struts? I just want something to start working..
Thanks.

Make sure you have validator-rules.xml file in WEB-INF/ folder
Make sure you have validation.xml file in WEB-INF/ folder
Modifty validation.xml file to match your form name (as defined in struts-config.xml)
i think this should be enough

Similar Messages

  • What's the easiest way to validate the 2nd date is after the 1st date?

    Hi,
    I have 2 items, say, date1 and date2.
    What is the easiest way to validate that the date2 is after date1? For example, date1 is "07/31/2009", thus date2 must be after "07/31/2009".
    Thanks much :)
    Helen

    Helen:
    For the example provided you can create a validation of type 'PL/SQL->pl/sql expression' and provide the expression below
    to_date(:p_date2,'mm/dd/yyyy') > to_date(:p_date1,'mm/dd/yyyy');
    Varad

  • Best way to validate and xml file against a schema?

    As the subject states, I want to validate my xml file against a given schema....
    Currently my code looks like this:
    InputSource ipSource = new InputSource(new ByteArrayInputStream(bytesData)); // my xml file
    DOMParser parser = new DOMParser();
    parser.parse(ipSource);
    Document doc = parser.getDocument();
    I see that there is a setFeature method on DomParser.... but from what I read that doesnt support
    xml schema's, just DTD's. So what is the best way to validate with schema's?
    Any help would be appreciated

    This is the other way I tried doing it.... the problem with this way is I am building my xml file through DOM
    operations... and I haven't figured out how to add the schema line to the xml file through DOM manipulations.
    Has anyone done this bofore?
    try
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(false);
         factory.setValidating(true);
         InputSource ipSource = new InputSource(new ByteArrayInputStream(bytesData));
         DocumentBuilder builder = factory.newDocumentBuilder();
         doc      = builder.parse(ipSource);
         return doc;
    catch(Throwable t)
         System.out.println("parse error: " +t);
    return doc;
    }

  • Hello everyone. As a new Mac user, I would really like to know the easiest way to move my music files from my old PC to my MacBook? Do I move only the files, the entire iTunes and how? I have a lot of music so it is not a solution with iPod/iPhone.

    Hello everyone. As a new Mac user, I would really like to know the easiest way to move my music files from my old PC to my MacBook? Do I move only the files, the entire iTunes and how? I have a lot of music so it is not a solution with iPod/iPhone.

    Your best option is to post this in the iTunes forum.
    Ciao.

  • I own a MacBook Pro. Can someone advise me the easiest way to make a movie with existing photos on my laptop?

    I own a MacBook Pro. Can someone advise me the easiest way to make a movie with existing photos on my laptop? I have made some movies on this laptop but find it too cumbersome. Thanks.

    Hi sato gato,
    The page linked below serves as a good starting point for creating slideshows in iPhoto.
    iPhoto Help - Make a slideshow
    http://help.apple.com/iphoto/mac/9.6/#/pht5470fe9b
    Regards,
    Allen

  • What is the easiest way to download a document from SAP DMS with C#?

    Hi,
    I've been sifting through this forum and looked at various posts and sample code, but so far my quest hasn't been fruitful.
    What is the easiest way to download a physical document file from SAP DMS using C#? I'm using the NCo 3 (SAP .NET
    Connector 3).
    Requirements
    - As few dependencies as possible (not adding or changing functionality in SAP)
    - C# code (MS Visual Studio 2012)
    - SAP Environment: NetWeaver 7.4.0
    Thanks for all help.
    Regards,
    Frank

    We've been using BAPI_DOCUMENT_CHECKOUT2, but there seems to be a limitation. From what I've found on Google, you must enable the use of the SAPGUI through the flag UseSAPGUI when connecting to SAP.  It works, but my issue is that when I use it on a web server, I end up with some error when trying to start the GUI.  There is very little recent information for this out there right now.

  • What is the easiest way to convert a jpeg into a watermark with CC 2014?

    What is the easiest way to convert a jpeg into a watermark with CC 2014?
    I signed a paper and uploaded the image to the computer as a jpeg to be turned into a watermark.  I'd done it before for a different kind of photography, but have not done it in so long that I cannot remember the steps nor can I find the tutorial video I had watched that taught me how to do it.
    Any help would be greatly appreciated

    Adding to what others have said, if you want to repeat the watermark across the image, it's relatively easy:
    As JJ said, you want to create an image with a transparent background. You can even use his script. Once you've done all that, click Image > Trim with the "transparent pixels" option and leave all the "trim away" options checked.
    Click Edit > Define Pattern to name the pattern.
    Open the image you want to apply the watermark to. Create a new blank layer. (ON EDIT: Select the blank layer.)
    Click Edit > Fill and use the Pattern option under Contents. Choose the pattern you made earlier. Click OK.
    At this point, you can leave it as is or use blending modes and layer opacity to taste. Example:

  • What is the easiest way to make a slide presentation DVD with music that can be played on PC or DVD player using MacBook Pro?

    What is the easiest way to make a slide presentation DVD with music that can be played on a PC or DVD player?  I'm using a MacBook Pro since that's the computer that has all the photos (in an album) and music.  Thanks.

    I would suggest that you post this to the Adobe Encore>Menus & Buttons forum. What you want to do, if I read correctly, is pretty simple. There will probalby be links available to step you though it. I'll look for this there, and start gathering some links.
    Good luck,
    Hunt

  • I have a camcorder (JVC Everio with hard disk internal drive) and it records file as MOD. When I dowload thru I movie it ceates a .mov file. What is best and easiest way just to convert to MPEG filesZ?

    I have a camcorder (JVC Everio with hard disk internal drive) and it records file as MOD. When I dowload thru I movie it ceates a .mov file. What is best and easiest way just to convert to MPEG files?

    I have a camcorder (JVC Everio with hard disk internal drive) and it records file as MOD. When I dowload thru I movie it ceates a .mov file. What is best and easiest way just to convert to MPEG files?

  • TS1463 What is the easiest way to restore my ipod back to factory specs. It has a red circle with a red x in the middle,please help me to fix my ipod, until now i can't use my ipod..i tried all the procedures in Restore ipod from disk mode but still not w

    What is the easiest way to restore my ipod back to factory specs. It has a red circle with a red x in the middle,please help me to fix my ipod, until now i can't use my ipod..i tried all the procedures in Restore ipod from disk mode but still not working, please help me...

    If you are unable to get the iPod into Disk Mode to try and restore it, it's a very good indication, as mentioned in the article, that the iPod's hard drive is damaged and in need of replacement either by Apple or a third party repair company.
    B-rock

  • Easiest way to access shared album with Lion only

    one of my friends is still using Lion only and she's want to make a photobook on her Mac with the pictures from a shared album (not photo stream) that I created. She also has an iPhone and iPad that have iOS6 (she's willing to update to iOS7 if that helps) and thus can view the shared album.
    under this situation, what's the easiest way for her to get the pictures over to her Mac? There are over 100 photos so email is something she wants to avoid. Apps that are not very expensive (<$10) is ok if they can do the job quickly. and high resolution preferred (doesn't have to be the full resolution)
    and she's using aperture to create the photobook, not that i think it's too relevant to the question
    thanks much in advance.

    You might be thinking of Crossover. Not sure if Windows Media Player works under it, but their website has info on requested and working apps.
    Best of luck.

  • What is the easiest way to wrap photos with text in ps CS4?

    What is the easiest way to wrap photos with text in ps CS4?

    InDesign handles text much better that either Illustrator or Photoshop.
    In InDesign there is more than one way to put a frame around a paragraph:
    Select the text frame, go to Object menu - Text Frame Options and set the Inset Spacing to keep the text away from the frame edge.
    Then select the text frame with the selection tool (black arrow) check the Fill/Stroke icon at the bottom or the tool box and make sure the Stroke is selected, and choose a Stroke width from the tool bar at the top of the screen.
    Or you can do it a quick and dirty way by just drawing another frame and place it on top of the text frame. Give this frame a Stroke and make sure the Fill is set to None.
    I selected both frames in this example simply to show that they are two separate frames. The first method (above) only produces one frame.
    Your original question was regarding text wrap, the third example shows text wrapping around the photo.
    Place or type your text. Place your image and go to the Window menu - Text Wrap. You can set the Offset margins individually to keep the text away from the edge of the image.
    For things like this InDesign is definitely the best way to go.

  • Easiest way to use one bt device with mac and iPhone?

    What's the easiest way to use one bluetooth device with both Mac and iPhone? (Not a the same time.) I have it working with a voip phone on my mac (x-lite), or with the Bria voip app and the ATT line on my iphone.  What I want is step by step how to accomplish the transition with the fewest clicks. I understand that I can't use it with both the Mac and the iPhone at the same time, and that's acceptable.
    But it's tedious, and I would like to switch it back and forth several times a day. 

    You might be thinking of Crossover. Not sure if Windows Media Player works under it, but their website has info on requested and working apps.
    Best of luck.

  • Easiest Way to make scrolling text with color

    What is the easiest way to make scrollable text that I can
    set to whatever font I want (embeded of course)
    have it look very well anti-aliased; like most Flash text, not like it's being read out of a regular system or browser window. (the text will be big so no probs)
    have different portions of the text be different colors so I can highlight certain words and leave others alone
    use actionscript to load text content into it
    maybe make (all) the text semi transparent for design purposes
    I'm going to use some action script to load some XML content into the text areas or whatever. Any of you know of any easy ways of accomplishing this? or have a link to any type of tutorial? (at least for Flash CS3 and above of course, along with ActionScript 3)

    Go to Lee Brimlow's website. It has some great tutorials, including one on loading an XML file.
    <url>http://www.gotoandlearn.com/</url>
    Another good site is Kirupa.com
    <url>http://www.kirupa.com/developer/flash/index.htm</url>

  • Easiest way to make a box with curved corners?

    I currently have a table with border 1 but i want do curved
    corners.
    see bottom left of ths page.
    What would be the easiest way to do this?. which softwares
    would i need

    Hi Mike,
    > I currently have a table with border 1 but i want do
    curved corners.
    >
    > see bottom left of ths page.
    Looks very square to me :)
    >
    > What would be the easiest way to do this?. which
    softwares would i need
    Try google "rounded corners"
    >
    >
    Kim
    http://www.geekministry.com

Maybe you are looking for

  • Hi Gurus I want to represent hierarchical information coumnwise Please guid

    Hi i have one table which consist of the skill name and other table which containns all the group name .Each group has certain skill in it .. and each group has parent group Now i want to display like as below Skill --- Group name---- higher group na

  • Highlight color in OSX

    How can I change it? I am in a Excel 2004 file and I want the color of the thing that indicates what cell I am in to be a brighter color as I can barley see it. I did change this in the appearance panel and nothing has been changed in Excel. I did th

  • Sametime activation on collaboration launch pad

    Hi All, I have installed LDS-D component on sametime server, and set parameters in servlets.properties file and lotus.ini javaUsers.classes parameter has been updated. What are the settings within portal for the sametime to come up on collaboration l

  • EKKO - EKPO - EKET

    Hi, I was writing a report that selects data EKKO (Purchase Order), EKPO (Purchase Order Items) and EKET (Purchase Order Delivery Schedule). I needed to get BANFN field (Purchase Requisition) number which is related to the PO. Both EKPO and EKET tabl

  • Issue with Dying Light pre order points.

    I pre ordered Dying Light for the PS4 and my account shows that I have gotten the 500 points for the $10 credit, but it shows that the total of the order was $0 and that I recieved no points for the actual purchase.I used my store card to pay for the