Why this logic:present can't work?

Hi everyone:
I am writing a registe jsp page.I want to use the struts validator.I had written a registeform extends ActionForm.I want to display a picture if user don't fill the password field,so I use the taglib : <logic:present and <html:img
I add all the error in my registeform.In actionform I use the method:
if(password1==null){
ActionErrors errors=new ActionErrors();
errors.add("password1",new ActionError("user.password1.required"));
In jsp page:
<logic:present name="password1"> /* or use name="<%=Action.ERROR_KEY%>"*/
<html:img page="/jsp/images/error.gif"/>
<html:errors property="password1"/>
</logic:present>
But failed.It can't display anything even there are error in the ActionErrors.
If I change the code to:
<html:errors property="password1"/>
It works well.But it can't display the picture that I want.
someone has good idea to do this?
thks!

Hi:
I used the <html:errors tag but it can't work also.The main problem is: there is any tag that can store the error according to the field's property?For example:If the name field isn't be filled, only the name's error will be stored in name's property tag.
What I want to see is only the name field's picture display if user don't fill the name field.
As is: <table>
1.name text field (not filled) display images
2.email text field (filled ) don't display!
3.password text field (not filled) display images
4.work text field (filled) don't display
What I want to get is above.Can the logic and html taglib do this? Have you some good idea?

Similar Messages

  • Why this removeChile function can not work

    Dear All
    can any one help me fix this problem? i can not delete one job record from XML file, and there is no any error message, don't know why can not remove the node from XML file. Thanks!
    XML File:
    <Job_ad>
    <job>
    <title>ABC
    <detail>123
    </job>
    </job_ad>
    the Java code
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder parser = factory.newDocumentBuilder();
    File fn = new File(fileName);
    Document doc = parser.parse(fn);
    NodeList ReportDate = doc.getElementsByTagName("job_ad");
    NodeList job = doc.getElementsByTagName("job");
    for (int i = 0; i < job.getLength(); i++) {
    Element jobDetail = (Element)job.item(i);
    String jobTitle = jobDetail.getElementsByTagName("title").item(0).getFirstChild().getNodeValue();
    if (jobTitle.equals("ABC")) {
    System.out.println("record found");
    Node deadElement = (Node)jobDetail.getParentNode().removeChild(jobDetail);
    catch (Exception e) {
    System.out.println(e);

    if (jobTitle.equals("ABC"))The actual value of jobTitle is "ABC\n", if your posted XML is accurate. You forgot to account for the new-line character after the text.
    A little debugging (such as System.out.println(jobTitle)) might have told you that.

  • Why this character \ it is not working in action scrip?

    Hi...
    Why this character \ it is not working in action scrip? And
    how can I solve it?
    on (release) {
    text.text = text.text + "l"
    Please your help ASAP
    thank you

    yea, that's true, but I don't think that is the problem.. I
    use it every once in a while, and it doesn't break the script.
    "I’m trying to make bush button if i press it, the
    action script it well write the text in text area and I’m
    using Flash MX 2004"
    This statement makes
    zero sense.. please clean it up and make it understandable,
    and tell what version of Actionscript you are publishing to.

  • Why the multiple selection can't work in sub screen

    hi experts:
         when i try to use the sub-screen in the report,why the multiple selection function(SO_BCTXT) can't work normally in screen 1095:
    the coding as below.will reward points if solve this issue
    the main program in Subscreen:
    PROCESS BEFORE OUTPUT.
    module status_1005.
      CALL SUBSCREEN area INCLUDING sy-repid lv_tab_number.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      CALL SUBSCREEN area.
      MODULE user_command_1005.
    module user_command_1005 input.
      my_ok = ok_code.
      clear ok_code.
      case my_ok.
        when 'TAB1'.
          mytabstrip-activetab = my_ok .
          lv_tab_number = 1095.
        when 'TAB2'.
          mytabstrip-activetab = my_ok .
          lv_tab_number = 1096.
        when 'CRET' or 'ONLI'.
          perform get_bc_set
                 using
                    so_chanb[]
                 changing
                    <fs_bcsetfield> .
          leave to screen 0.
      endcase.
    endmodule. 
    in the screen 1095:
    PROCESS BEFORE OUTPUT.
    MODULE %_INIT_PBO_J.
    MODULE %_PBO_REPORT.
    MODULE %_PF_STATUS.
    MODULE %_SO_BCTXT.
    MODULE %_END_OF_PBO.
    PROCESS AFTER INPUT.
    MODULE %_INIT_PAI_J.
    CHAIN.
      FIELD  SO_BCTXT-LOW.
      FIELD  SO_BCTXT-HIGH.
      MODULE %_SO_BCTXT.
    ENDCHAIN.
    FIELD !INCBCTY1 MODULE %_INCBCTY1 .
    FIELD !INCBCTY2 MODULE %_INCBCTY2 .
    FIELD !INCBCTY3 MODULE %_INCBCTY3 .
    FIELD !INCBACT MODULE %_INCBACT .
    FIELD !INCBINAC MODULE %_INCBINAC .
    FIELD !INCLMAND MODULE %_INCLMAND .
    FIELD !INCLOPTI MODULE %_INCLOPTI .
    CHAIN.
      FIELD  SO_BCTXT-LOW.
      FIELD  SO_BCTXT-HIGH.
      FIELD INCBCTY1 .
      FIELD INCBCTY2 .
      FIELD INCBCTY3 .
      FIELD INCBACT .
      FIELD INCBINAC .
      FIELD INCLMAND .
      FIELD INCLOPTI .
      MODULE %_BLOCK_1095001.
    ENDCHAIN.
    CHAIN.
      FIELD  SO_BCTXT-LOW.
      FIELD  SO_BCTXT-HIGH.
      FIELD INCBCTY1 .
      FIELD INCBCTY2 .
      FIELD INCBCTY3 .
      FIELD INCBACT .
      FIELD INCBINAC .
      FIELD INCLMAND .
      FIELD INCLOPTI .
      MODULE %_END_OF_SCREEN.
      MODULE %_OK_CODE_1000.
    ENDCHAIN.
    in the main report
    selection-screen begin of screen 1095 as subscreen.
    enquire Data
    data l_text       type as4text.
    selection-screen begin of block b1 with frame title text-024.
    select-options :
      so_bctxt     for l_text .
    selection-screen skip 1 .
    parameters:
      incbcty1    type c as checkbox default abap_true ,
      incbcty2    type c as checkbox default abap_true ,
      incbcty3    type c as checkbox default abap_true .
    selection-screen skip 1 .
    parameters:
      incbact      type c as checkbox default abap_true ,
      incbinac     type c as checkbox default abap_true .
    selection-screen skip 1 .
    parameters:
      inclmand     type c as checkbox default abap_true ,
      inclopti     type c as checkbox default abap_true .
    selection-screen end of block b1.
    selection-screen end of screen 1095 .

    Hiii
        In main program you have dclared subscreen area.
    now First of all you have to declare a selection screen in your main program
    selection-screen begin of screen 1005 as subscreen.
    SELECT-OPTIONS s_bukrs1 for  v_bukrs.   "whatever you want in selection screen
    selection-screen end of screen 1005.
    IN PBO of your main screen (not in 1005) write
    call subscreen SUB1 including sy-repid '1005'.
    where SUB1 is your subscreen area name. And remember don't touch PBO or PAI of your 1005 screen, otherwise it will give you error. Yuo can just put text in layout of 1005 screen. but don't disturb other things.

  • Why browser link dashboard can't work on enable SSL in localhost ?

    Hi there developer
    I need to wrok on local host with enable SSL
    but when I enable SSL browser link can't working and I don't have it's option like as inspect mode and design mode any more .
    Help me if it has a way to fix it on enable SSL mode in localhost ?
    Thanks 
    Great Regards :
    Raha
    whit the best regard : Raha

    Unfortunately your post is off topic here, in the MSDN Subscriptions feedback forum, because it is not feedback regarding the MSDN Subscription. This is a standard response I’ve written up in advance to help many people (thousands, really.) who
    happen to post their question in my forum, but please don’t ignore it.  The links provided below I’ve collected to help with many issues we’ve seen.
    For technical issues with Microsoft products that you would run into as an end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products.   Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an IT professional (like more technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the MSDN Subscription, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots of the issue
    (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really have no idea where to post this question, then you shouldn’t have posted here, because we have a forum just for you!  It’s called the ‘Where is the forum for…?’ forum and its here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Please review the topic of the forum you’re posting in before posting your question.  Moving your post to the off topic forum.
    Thanks, Mike
    MSDN and TechNet Subscriptions Support <br/> Read the Subscriptions <a href="http://blogs.msdn.com/msdnsubscriptions">Blog! </a>

  • Came home yesterday to find my time capsule has an orange light blinking and my wifi network is no longer working. Not sure how/why this happened and can't get it working. Do i just reset it and will this lose my backups? Or can I create a new wifi n/w?

    Its an  802.11n (4th Gen) model
    I looked at the diagnostics screen (next to the blinking orange icon on the Airport Utility and it says there are four issues:
    the software (currently V 7.6.1) has an update available. If I click update I get the error message "There was an error connecting to the update server. Check your network settings and try again". However, nothing's been changed settings-wise
    The other 3 status issues are:
    Internet Connection - but the router is working fine and I can connect to the router via wifi on my MacBook Pro
    No DNS Servers - I have no idea what this means
    Ethernet Unplugged - it's not and I also replaced the ethernet cable which has no effect
    Do I just cut my losses and hit the reset button - if so will I need to back everything up again (i.e. I will no longer be able to access my backups) or do I just set up a new wifi network - again, will this impact on my backups?
    Any help/advice would be appreciated - thanks

    Do a factory reset .. nothing will be deleted from your backups and you will be able to get access to them again.
    The Factory Reset Gen1-4.
    Unplug your TC. Hold in reset. and power the TC back on.. without releasing reset for about 10sec. When the status light flashes rapidly; release it.
    Be Gentle! Feel the switch click on. It has a positive feel..  add no more pressure after that.
    TC will reboot after a couple of minutes with default factory settings and will wipe out previous configurations.
    No files are deleted on the hard disk.. No reset of the TC deletes files.. to do that you use erase from the airport utility.

  • Can any one please tell me why this e-class is not working

    Hi
    I want to listen the following e-class. But its not running. Can any one please tell me why its not working
    I have windows media player 11 in my system
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/34b9359e-0701-0010-f59d-ee014d5079b3?prtmode=navigate"></a>
    Best Regards
    Ravi Shankar B

    Hi
    I want to listen the following e-class. But its not running. Can any one please tell me why its not working
    I have windows media player 11 in my system
    <a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/34b9359e-0701-0010-f59d-ee014d5079b3?prtmode=navigate"></a>
    Best Regards
    Ravi Shankar B

  • Simple? can anyone tell why this simple btn doesn't work?

    Trying to write my own simple disabling button class (with
    some help from friend - thanks LuigiL)
    So, why does my button not turn off when clicked? it runs the
    deinitializeBehavior function but the removeEventListeners are not
    actually being removed...
    I don't know why but could this possibly be a graphics issue?
    Thanks in advance

    HAH! OK - I am starting to get this a little.
    Thank you St. LuigiL. You are my Obie-wan: the force is
    strong with you.
    I made a Main.as document class and now the whole thing works
    like a charm! I was wondering if it was necessary to do so - and it
    was.
    In my OCD I am constantly striving to keep my classes to a
    bare minimum (if I could write everything on one page I would.)
    I very much appreciate your incredible help and support.
    BAM

  • Can someone help me why this quick sort doesn't work

    public class QuickSortII {
         static void sort(int a[], int lo0, int hi0) {
            int lo = lo0;
            int hi = hi0;
            if (lo >= hi) {
                return;
            int mid = a[(lo + hi) / 2];
            while (lo < hi) {
                while (lo<hi && a[lo] < mid) {
                    lo++;
                while (lo<hi && a[hi] >= mid) {
                    hi--;
                if (lo < hi) {
                    int T = a[lo];
                    a[lo] = a[hi];
                    a[hi] = T;
            if (hi < lo) {
                int T = hi;
                hi = lo;
                lo = T;
            sort(a, lo0, lo);
            sort(a, lo == lo0 ? lo+1 : lo, hi0);
        static void sort(int a[]) {
            sort(a, 0, a.length-1);
         static public void main(String[] args) {
              int a[] = new int[20];
              a[0] = 18;
              a[1] = 11;
              a[2] = 12;
              a[3] = 4;
              a[4] = 20;
              a[5] = 5;
              a[6] = 1;
              a[7] = 3;
              a[8] = 16;
              a[9] = 8;
              a[10] = 7;
              a[11] = 17;
              a[12] = 9;
              a[13] = 6;
              a[14] = 19;
              a[15] = 2;
              a[16] = 13;
              a[17] = 15;
              a[18] = 10;
              a[19] = 14;
              sort(a);
              for (int j = 0; j < 20; j++) {
                   System.out.print(a[j] + " ");
    }it doesn't sort the list

    it doesn't sort the list Please explain why you think it should. Doing so will help you understand the code.
    ~

  • Can _you_ see why this HTTP POST doesn't work?

                URL url = new URL(SOAPurl);
             URLConnection connection = url.openConnection();
                httpConn = (HttpURLConnection)connection;          
             httpConn.setRequestProperty( "Content-Length", String.valueOf( byteArray.length ));                  httpConn.setRequestProperty("Content-Type","text/xml;charset=ISO-8859-1");
                httpConn.setRequestMethod( "POST" );
                httpConn.setDoOutput(true);
                httpConn.setDoInput(true);
                // Everything's set up; send the XML that was read in to b.
                OutputStream out = httpConn.getOutputStream();
                out.write( b );
                out.close();The code above will activate my servlet's doGet() method, not doPost()
    shouldn't the setRequestMethod("POST") be enough to indicate that this is a POST not a GET?
    - bjorn

    Using the code found here: http://www.javaworld.com/javaworld/jw-03-2001/jw-0323-traps.html
    I am able to invoke the doPost() method in my servlet, but the POST data is empty, here is what my servlet prints to standard out:
    Post Recieved
    Header Namer: content_length -- Value : 35
    Header Namer: user-agent -- Value : Java/1.4.1_01
    Header Namer: host -- Value : 127.0.0.1:8080
    Header Namer: accept -- Value : text/html
    Header Namer: accept -- Value : image/gif
    Header Namer: accept -- Value : image/jpeg
    Header Namer: accept -- Value : *; q=.2
    Header Namer: accept -- Value : */*; q=.2
    Header Namer: connection -- Value : keep-alive
    Header Namer: content-type -- Value : application/x-www-form-urlencoded
    Header Namer: content-length -- Value : 35
    InputStream.isavailable()=0
    What we recieved: (0)
    Servlet doPost() method:
        public void doPost( HttpServletRequest req, HttpServletResponse resp ) {
            System.out.println("Post Recieved");
            MimeHeaders headers = getHeaders(req);
            Iterator it = headers.getAllHeaders();
            while(it.hasNext()) {
                MimeHeader header = (MimeHeader)it.next();
                System.out.print("Header Namer: " + header.getName());
                System.out.println(" -- Value : " + header.getValue().toString());
            try {
                InputStream is = req.getInputStream();
                byte[] b = new byte[]{};
                System.out.println("InputStream.isavailable()=" + is.available());
                int numbytesread = is.read(b,0,is.available());
                System.out.println("What we recieved: (" + numbytesread + ")\n" + b.toString());
                PrintWriter out = resp.getWriter();
                System.out.println("Running runQuery() - "+queries.get(dbQueryNum));
                String xml = dbconn.runQuery(queries.get(dbQueryNum).toString());
                //System.out.println("returned from runQuery()\n"+xml);
                System.out.println("size of returned XML: "+xml.length());
                out.write(xml);
            } catch (IOException ioe ) { // throwed by getInputStream()
                ioe.printStackTrace();
        }

  • Any ideas why this "if" statement is not working?

    I have this code inside a click command. The first part works, will change variable to 5. But if variable = 5 animation does not play: 
    if (position != "5"){
                                  sym.setVariable("position", "5");
                                  var position = sym.getVariable("position");
                                            sym.$("Text3").html(""+position);
    else if(position==5)
    sym.play("animation")
    Thanks

    Hi there, can you put a console log before the if statement to confirm that you have a valid value for the "position" variable, at that click scope?
    console.log('position = '+position);
    Run it in your browser and open the JS console to check the log output of the above test.

  • Why the Adobe Flash can't work.

    my computer's system is Win 7. I have installed the Adobe flash, but i can't see any flash modules on website.
    I need work on my website so i need to update the banner on my [spam link removed] website. My system is re-installed 3 days ago. Adobe flash installed fail first, after that i re-installed it again and succeed. But i can't see any banner on website. I use the Adobe Flash and Adobe reader some years. I like it, i don't want to replace it to others. Who can help me, thanks so much!

    I'm assuming you are using Internet Explorer 9 as your browser, if so can you follow the instructions on these two pages?
    Enabling Flash Player in Internet Explorer 9
    ActiveX Filtering in Internet Explorer 9
    Thanks,
    Chris

  • Why this WLST script does not work from ant a task

    Hi,
              The following is my lovely WLST script to disable managed server hostname verification in a cluster environment.
              It works perfect if I run it from the OS command line,
              java -cp $WL_HOME/server/lib/weblogic.jar sslSetting.py weblogic weblogic t3://localhost:7001
              But if I run it from ant task, it never works. Nothing happens, not even any messages. Any idea?
              ------ sslSetting.py -----------
              # Disable HostnameVerification on managed servers
              # This is a ONLINE script. The admin server must be running
              # @param $1 BEA_USER_NAME
              # @param $2 BEA_USER_PWD
              # @param $3 admin server URL
              if (len(sys.argv) != 4):
              print "usage: " + sys.argv[0] + " domain-home "
              sys.exit()
              beaUserName=sys.argv[1]
              beaUserPwd=sys.argv[2]
              adminServerUrl=sys.argv[3]
              def handleServer(server):
              SSLPath="/Servers/" + server.getName() + "/SSL/" + server.getName()
              print("handleServer(1): " + SSLPath)
              try:
              cd (SSLPath)
              print("handleServer(2): " + SSLPath)
              set("HostnameVerificationIgnored", "true")
              except Exception, inst:
              dumpStack()
              print ("FAILED handleServer(): " + SSLPath)
              else:
              print ("DONE handleServer(): " + SSLPath)
              #===============================================================================
              # Main
              #===============================================================================
              try:
              connect(beaUserName, beaUserPwd, adminServerUrl)
              edit()
              startEdit()
              adminServerName=cmo.getAdminServerName()
              for server in cmo.getServers():
              if adminServerName != server.getName():
              handleServer(server)
              save()
              activate()
              except Exception:
              dumpStack()
              else:
              print ("=== DONE ===")

    OK, when I run the WLST script from command java, I only need the weblogic.jar in the classpath. But I'll need a couple other jar file for it to work inside an ant target, as showing below.
              <target name="run-wlst">
              <java classname="weblogic.WLST" fork="true">
              <classpath>
              <pathelement path="${props.JAVA_HOME}/lib/tools.jar"/>
              <pathelement path="${props.WL_HOME}/server/lib/weblogic_sp.jar"/>
              <pathelement path="${props.WL_HOME}/server/lib/weblogic.jar"/>
              <pathelement path="${props.WL_HOME}/server/lib/webservices.jar"/>
              </classpath>
              <sysproperty key="weblogic.Home" value="${props.WL_HOME}" />
              <arg line="sslSetting.py weblogic weblogic t3://localhost:7001"/>
              </java>
              </target>

  • Why invoice verification output can't work

    I have set up the config for iv.But it cant't work.
    The message is "requested function is not availabe here".
    Who can help me to solve it.
    Thanks.

    Hi,
    Refer to the following link
    http://help.sap.com/erp2005_ehp_02/helpdata/en/a8/b99f58452b11d189430000e829fbbd/frameset.htm
    BR
    Diwakar
    reward if useful

  • WHY this DB view is not working

    REPORT  ZMYTESTPRG24                            .
    DATA : IVIEW LIKE ZMYDBVIEW OCCURS 0 WITH HEADER LINE.
           SELECT * FROM ZMYDBVIEW INTO TABLE IVIEW.
           LOOP AT IVIEW.
             WRITE: / IVIEW-MATNR, IVIEW-BISMT, iview-saiso,
             IVIEW-VARIANTE, IVIEW-CKMACHAR, IVIEW-REPORT.
           ENDLOOP.

    What exactly is the problem? Syntax error?
    The view must be defined as either a projection view or a database view. Is it?
    Rob
    Message was edited by:
            Rob Burbank

Maybe you are looking for

  • 9.0.3.5 to 10g upgrade exception

    I'm having a similiar problem to post#397238 reported in Oct. Does anyone know the fix? I'm using the 10g Workbench Build 031022 on the Windows platform and trying to upgrade a workbench file created in 9.0.3.5. - Matt Exception Description: The meth

  • Extra spaces in TEXT format report

    hi i have a report with in the text format, when i generate this report it is generating a space (as end of page) between the pages, and when i save the file as text file these spaces are still their. how can we remove these spaces before generating

  • Word 2007 document presented without editing notes in wors 2013 pro plus

    hi, A word 2007 edited document which contains editing notes such as specific words in a sentance that are crossed and then the editor inserted his or her words to replace the words that were crossed. when trying to open the document in word 2007 all

  • Trying to converst 2 page pdf to excell

    first page is fine second page as iformation but aligned with left margin not in columns

  • App Idea - Battery

    I'm not an app developer, but I thought this might be a good idea for an app: As you all know by now, there are a lot of phone settings on the 3G than can drain the battery life quickly. Some of these settings (Wi-Fi, Fetch New Data & Brightness) are