If condition statement not working in jsp scriptlet

<%
String hostName = java.net.InetAddress.getLocalHost().getCanonicalHostName();
if(hostName.endsWith("dinesh.com"))
System.out.println("it works");
else {
System.out.println("it doesn't work");
%>
I am getting output as it works & it doesn't work. It seems the If condition is not working. Pls help with this issue.
Thanks

Dinesh_Nala wrote:
Even the condition in if is returning true, the x value i am get as "/user2/"How did you knew that it returns true? Or did you just expect that? Do you trust yourself more than Java? Too bad.
Just debug it:
System.out.println("Actual hostname value: [" + hostName + "]");
System.out.println("Does it end with dinesh.com? " + hostName.endsWith("dinesh.com"));

Similar Messages

  • Workflow conditional statement not working

    I have 2 level approvals of objects in Documents list.
    The document first uploaded by user and then first need to get approval from HR Line Manager and then get approval from HR manager.
    the attach image shows shows workflow , the issue is either I select approve or reject in first approval the if statement is always true , it should not go inside if statement if first approval is rejected by HR Line Manager roles
    Tech Learner

    Hi,
    To make the condition work in the workflow, there are two more things need to be done:
    1. Enable content approval in the Documents library which the workflow is associated with.
    Go to the Library Settings page of the Documents library > click Versioning settings > select Yes under Require content approval for submitted items.
    If we do not enable this, the value of Approval Status column will always be Approved.
    2. Add a Set Workflow Variable step above the Start Approval Process step and set it to Yes in the workflow.
    After adding the Set Workflow Variable step, we can set the Approval Status column when we approve or reject the task process. Otherwise the Approval Status column will not change no matter how the task process works.
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • Javascript is not working in JSP

    Hi everybody,
    My javascript is not working in JSP.I m not able to fix this problem.Please tell where the problem in code.
    thx in advance.
    <%@page import="javax.servlet.http.*" %>
    <%@page import="java.sql.*" %>
    <html>
    <head>
    <script type="text/javascript" >
    funtion checkentries()
    if(document.LForm.uname.value==null || document.LForm.upassword.value==null)
    alert("Please fill all entries")
    else
    document.LForm.submit()
    </script>
    </head>
    <body>
    <table width=100% height=100% valign="center" align="center" border=0>
    <tr height=10% ><td>
    <%@ include file="Header.jsp" %>
    <hr>
    </td></tr>
    <tr height=1% width=100%>
    <td align=right>Register
    <hr>
    </td>
    </tr>
    <tr height=77% width=100% ><td>
    <table>
    <tr><td width=65%>
    </td>
    <td bgcolor="black" width="1" ></td>
    <td align="right" valign="top" >
    <form method="POST" action="/EIS/Home.do" name="LForm">
    User Name: <input type="text" align=right name="uname"><br>
    Password: &nbsp&nbsp&nbsp<input type="password" name="upassword"><br>
    <input type="submit" name="submit" value="Submit" onclick="checkentries()">
    </td>
    </tr>
    </table>
    </td></tr>
    <tr height=10% ><td>
    <hr>
    <%@ include file="Footer.jsp" %>
    </td></tr>
    </table>
    </body>
    </html>

    in this part:
    if(document.LForm.uname.value==null || document.LForm.upassword.value==null)should be:
    if(document.LForm.uname.value=="" || document.LForm.upassword.value=="")or
    if(document.LForm.uname.value.length==0 || document.LForm.upassword.value.length==0)

  • Why condition does not work.

    Hi Pros,
            in my bex query, there is a CKF OT hours, having a value 30.000, when I set a condition for 'OT hours = 30.000', but get no result out. could you please tell why condition does not work.

    HI,
    please check the "Characteristic Assignment" Tab in change condition window.
    In that tab default  selection as "All Characteristic in the drill down independently" change that selection  as "Individual characteristic and Char. combinations"  and choose the particular characteristic. for ex OT hours against employee means select employee alone.
    Regards
    Sureshkumar C

  • Guard Condition is not working

    Dear Friends,
    I have created a dashboard using BI queries. output of queries is displaying via charts.
    Now i have to display charts one by one in single layer. Here i triggered the Select Event on the output of CHART A and Guard Condition as well.
    Now guard condition is not working properly. i want display of CHART A first then after clicking on tab i want display of CHART B. But here i always get CHART B first, which is not the requirement.
    I am using VC 7.0 with flex2 compiler. EP patc level is SP17.
    Kindly hep me out to resolve this.
    Thanks & Regards
    Nivedita

    Drag an output from your table to a data store and add a field to the datastore (lets call it GUARDFIELD). Click the connector between the table and the data store. Make sure the event name is select and assign GUARDFIELD with the following value:
    STORE@GUARDFIELD+1
    Now add a guard condition to the select connector between the table and chart B and use following code:
    STORE@GUARDFIELD>0
    This is going to check that GUARDFIELD is greater than 0, which will only be true when you click the table for first time. If this doesn't make sense let me know and I'll try find the blog which explains this.

  • Servlet filters on Tomcat 6. Not working on JSPs?

    Hi there:
    First of all I want to apologize because I'm not sure if this is the best place to ask a question like this, as it may have more to do with the treatment which Tomcat gives to JSPs more than the servlet filter standard. Anyway, here I go...
    I'm new into the servlet filter's world (well, nor an expert in Java). To start from a point, I decided to try an example from Sing Li, on the IBM website. The code can be watched and downloaded here (the second one): [http://www.ibm.com/developerworks/java/library/j-tomcat/] .
    This filter basically replaces a certain string in the response output (if found) by the dessired one. I've tested this code "as is" (well, changing the package only) and works great for pure servlets. However, testing this with JSPs outputs a simple and plain blank. Doing some research, I've realized that the problem could be in the class which inherits from HttpServletResponseWrapper. Instead of building a new ServletOutputStream I decided to re-utilize exactly the same which comes from the original "request" object but the problem persisted.
    Another user, Giampaolo Tomassoni, faced a similar a problem. A message from him can be found here . He solved this overriding the "flushBuffer ()" method on the class which inherits from HttpServletResponseWrapper. I've tryed to the same, forcing the flush of the ServletOutputStream and the PrintWritter without any luck.
    By the way, I've made sure that filters work on JSPs. Indeed, I've tested others and have done ok. This seems to be related to HttpServletResponseWrapper.
    Do you have any idea about what could be the reason? Many thanks in advance :) .

    I have the same issue.  My 3-month-old Iphone 6 128 GB model (60 GB free) was working fine yesterday.  I did not install any new apps, although typically 5-10 apps update automatically every night.  Today, out of the blue, about 80% of my apps will not load -- the app window opens then immediately crashes to home page (a double press shows the app is still in memory, but when I select it, it pops up for an instant, then goes back to home icon screen.  Example apps (CNN, CBS News, ABC News, NBC News, Scrabble, many others). I tried turning phone off and back on (three times) - no change. Then tried a hard reset (hold power button and home button down simultaneously for 10 seconds) - on reboot still no change.  Then I tried a Restore from backup on my PC - after restarting and clicking through all the welcome to ios 8 screeens - no change; most apps still crash immediately after starting.
    I took my phone to the Verizon store where I bought it.  The agent tried the power off - power on routine again with no success. I informed him that I also tried the restore from backup at home with no success.  He authorized a warranty replacement and my new replacement iPhone will be FEDEXed to my home Tuesday.  Hope this one works after a restore from backup and this isn't some colossal bug with the latest software update (IOS 8.1.3), which I installed about a week ago.  Internet searches reveal that a number of folks are having problems with their 128gb iphone6 devices - something about bad NAND memory.
    Stats on my iPhone 6, in case others have similar problems, so we can possibly identify a trend:  4,831 songs; 1 video, 3,912 photos, 392 applications, 114 gb capacity, 59.8 gb free, version 8.1.3, carrier Verizon 18.1, Model MG602LL/A.
    Has anyone else started having problems with apps suddenly refusing to work on their 128 gb iPhone6?

  • IF - Else condition is not working properly in Bex Query Designer

    Hi All,
    I have a KF called KPI Value. Based on the KPI Value, my report display has to show by using the if-else condition.  If the KPI value is '999999' then that particular KPI value has to display as 'X' against to that KPI No. Thats all my requirement. To achieve this I have created a formula based on the KF.
    (KPI Value == 999999)*(1/0)+(KPI Value <> 999999)*(KPI Value)*1
    Unfortunately, the above expression is shwoing the entire colmn as 'X' irrespective of the KPI value. i.e., logic is not working Could any one please suggest how to achieve this requirement. Your assistance is highly appreciable and very helpful. Thank you in advance!!!
    Best Regards
    Venkat...

    AL,
    I can visualize how condition should give results. The problem here is reality, I tired in my system with your formula and I got like as I mentioned.
    If you observe closely your If..else formula, (KPI Value == 999999)*0+(KPI Value <> 999999)*KPI Value
    If KPI Value == 999999 Result is 0, Else(Assuming) KPI Value <> 999999 Result is other nos like 1111, 2222 etc.
    Actually it is not If..else, it is IF..ENDIF. Both conditions should get satisfied to give below:--
    KPI value  Formula
    9999          X
    1111         1111
    2222          2222
    9999          X
    3333          3333
    4444          4444
    9999           X
    In the course of adding both conditions results, system is not able to add 0+ Other Values in single column. So it is giving mixed values * like below:--
    KPI value  Formula
    9999          X
    1111           *
    2222           *
    9999          X
    3333           *
    4444           *
    9999           X
    Note: Once again I want to say it is not to prove you wrong. Let's get some clarity on the issue. I might be also wrong. But I want to know the actual result. If you can test it tomorrow and let me know..it would be great.
    Regards,
    Suman

  • Filter does not work with *.jsp URL pattern???

    Hi All,
    I am, by no means, very good at JSF or Java. I have looked at various forum posts on here for ways to implement a security filter to intercept requests to pages that first require one to be logged in, and if not, redirect them to the login page. Yes, I know a lot of you have heard this many times before, and I'm sorry to bring it up again.
    BUT, from the guidance of other posts, I have got a filter that works fine when the url pattern is set to "/faces/*" or "/<anything>/*", however it won't work for "*.jsp" or "*.<anything>"
    My filter is as follows:
    package test.security;
    import javax.faces.context.FacesContext;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.http.HttpSession;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class SecurityFilter implements Filter{
        /** Creates a new instance of SecurityFilter */
        private final static String FILTER_APPLIED = "_security_filter_applied";
        public SecurityFilter() {
        public void init(FilterConfig filterConfig) {
        public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException{
            HttpServletRequest req = (HttpServletRequest)request;
            HttpServletResponse res = (HttpServletResponse)response;
            HttpSession session = req.getSession();
            String requestedPage = req.getPathTranslated();
            String user=null;
            if(request.getAttribute(FILTER_APPLIED) == null) {
                //check if the page requested is the login page or register page
                if((!requestedPage.endsWith("Page1.jsp")) /* This is the login page */
                    //set the FILTER_APPLIED attribute to true
                    request.setAttribute(FILTER_APPLIED, Boolean.TRUE);
                    //Check that the session bean is not null and get the session bean property username.
                    if(((test.SessionBean1)session.getAttribute("SessionBean1"))!=null) {
                        user = ((test.SessionBean1)session.getAttribute("SessionBean1")).getUsername();
                    if((user==null)||(user.equals(""))) {
                       // try {
                     //       FacesContext.getCurrentInstance().getExternalContext().redirect("Page1.jsp");
                      //  } catch (ServletException ex) {
                      //      log("Error Description", ex);
                        res.sendRedirect("../Page1.jsp");
                        return;
            //deliver request to next filter
            chain.doFilter(request, response);
        public void destroy(){
    }My web.xml declaration for the filter is:
    <filter>
      <description>Filter to check whether user is logged in.</description>
      <filter-name>SecurityFilter</filter-name>
      <filter-class>test.security</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>SecurityFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    Note: I have also tried this with <url-pattern>*.jsp</url-pattern> for the filter mapping in place of the Faces Servlet
    My web.xml declaration for the url pattern is:
    <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsp</url-pattern>
    </servlet-mapping>Which JSC/NetbeansVWP automatically creates a "JSCreator_index.jsp" which has:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root  version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page">
      <jsp:forward page="Page1.jsp"/>
    </jsp:root>When run, this causes an Error 500 in the browser and a NullPointerException in SecurityFilter.java on the line:
    if((!requestedPage.endsWith("Page1.jsp")) /* This is the login page */I think I'm missing something that would be obvious to anyone who knows better than me. Any ideas?

    Dear Ginger and Boris,
    thanks for the information - the problem seems to ocur in EP7 as well, Boris told me it is fixed in SP15. We are on SP14 now, so there is hope !
    actually the information in the oss note stated above is also true, as we have an Oracle DB. On a similar demo system (only difference is SQL DB) the hyphen search works !
    best regards, thank you !
    Johannes

  • Why is Runtime.getRuntime().exec() not working in JSP?

    Hi all,
    I need to execute a command file from a JSP. I am using Tomcat 4.0.3.
    Here is the code :
    I just wanted to test if this will work, so tried to do run notepad.exe. But in my actual project, i need to run some other commands from a bat file or cmd file.
    <%@ page import="java.util.*,java.io.*,java.net.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="tryexec" %>
    //tryexec is a class which has the same java statements as in this jsp
    <%     
    Runtime r = Runtime.getRuntime();
    String s3 = "C:\\WINNT\\explorer.exe";
    String s4 = "C:\\bin\\open.cmd"; //inside open.cmd file , i have "notepad.exe"
    r.exec(s3);
    r.exec(s4);
    /*     tryexec c = new tryexec();
         c.execTo(); // doesn't work
    %>
    I have a html page , when i click a button there , it will call the above jsp , and this jsp will execute the command file.
    If i run the above java statements using a simple java program, it works fine, it opens a notepad and explorer window. but if i do the same thing in jsp, why doesn't it work? Is there any security problem? no exception is shown . Is it a problem with tomcat?
    I also tried to import the java class in jsp and call the function, but still didnt work.
    Please let me know whats the problem, and how to execute command files from jsp.
    Thanks
    Priyha

    It would work with Java coz u r working on the same machine as the java class file.
    While in case of JSP, it is like connecting to a different machine (even if the server is running on the same machine). If you do something like "net send user message" command in JSP or something other executable (just to test), you would see it to work.
    I hope you understand my point here.
    Write back if you have any issues.
    Regards
    Aruneesh

  • Urgent: SAX parser bean is not working in JSP page

    Hi All,
    I have created a bean "ReadAtts" and included into a jsp file using
    "useBean", It is not working. I tried all possibilities. But Failed Plz Help me.
    Below are the details:
    Java Bean: ReadAtts.java
    package sax;
    import java.io.*;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import java.util.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.ParserConfigurationException;
    public class ReadAtts extends DefaultHandler implements java.io.Serializable
         private Vector attNames = new Vector(); //Stores all the att names from the XML
         private Vector attValues = new Vector();
         private Vector att = new Vector();
         private Locator locator;
         private static String start="",end="",QueryString="",QString1="",QString2="";
    private static boolean start_collecting=false;
         public ReadAtts()
         public Vector parse(String filename,String xpath) throws Exception
    QueryString=xpath;
         StringTokenizer QueryString_ST = new StringTokenizer(QueryString,"/");
         int stLen = QueryString_ST.countTokens();
         while(QueryString_ST.hasMoreTokens())
              if((QueryString_ST.countTokens())>1)
              QString1 = QueryString_ST.nextToken();
    else if((QueryString_ST.countTokens())>0)
                   QString2 = QueryString_ST.nextToken();
         SAXParserFactory spf =
    SAXParserFactory.newInstance();
    spf.setValidating(false);
    SAXParser saxParser = spf.newSAXParser();
    // create an XML reader
    XMLReader reader = saxParser.getXMLReader();
    FileReader file = new FileReader(filename);
    // set handler
    reader.setContentHandler(this);
    // call parse on an input source
    reader.parse(new InputSource(file));
         att.add("This is now added");
         //return attNames;
    return att;
    public void setDocumentLocator(Locator locator)
    this.locator = locator;
    public void startDocument() {   }
    public void endDocument() {  }
    public void startPrefixMapping(String prefix, String uri) { }
    public void endPrefixMapping(String prefix) {  }
    /** The opening tag of an element. */
    public void startElement(String namespaceURI, String localName,String qName, Attributes atts)
    start=localName;
    if(start.equals(QString2))
    start_collecting=true; //start collecting nodes
    if(start_collecting)
    if((atts.getLength())>0)
    for(int i=0;i<=(atts.getLength()-1);i++)
    attNames.add((String)atts.getLocalName(i));
    attValues.add((String)atts.getValue(i));
    /** The closing tag of an element. */
    public void endElement(String namespaceURI, String localName, String qName)
    end = localName;
    if(end.equals(QString2))
         start_collecting=false; //stop colelcting nodes
    /** Character data. */
    public void characters(char[] ch, int start, int length) { }
    /** Ignorable whitespace character data. */
    public void ignorableWhitespace(char[] ch, int start, int length){ }
    /** Processing Instruction */
    public void processingInstruction(String target, String data) { }
    /** A skipped entity. */
    public void skippedEntity(String name) { }
    public static void main(String[] args)
    String fname=args[0];
    String Xpath=args[1];
    System.out.println("\n from main() "+(new ReadAtts().parse(fname,Xpath)));
    //System.out.println("\n from main() "+new ReadAtts().attNames());
    //System.out.println("\n from main() "+new ReadAtts().attValues());
    JSP File:
    <%@ page import="sax.*,java.io.*,java.util.*,java.lang.*,java.text.*;" %>
    <jsp:useBean id="p" class="sax.ReadAtts"/>
    Data after Parsing is.....
    <%=p.parse"E:/Log.xml","/acq/service/metrics/system/stackUsage")%>
    Expected Output:
    The jsp file should print all the vector objects from the "ReadAtts" bean
    Actual Output:
    Data after Parsing.......[]
    Thanks for your time.....
    Newton
    Bangalore. INDIA

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • HTML multipart form is not working in jsp page

    Hi
    i have jsp page, has a HTML from with file upload field , when i click the send button , nothing happened as if the button did not submit the form. ie the message at line 12 is not printed out.
    can any one help please.
    <%@ page errorPage="..\error\error.jsp" %>
    <%@ page pageEncoding="windows-1256" %>
    <%@ page language="java" import="javazoom.upload.*,java.util.*,java.sql.ResultSet" %>
    <jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
      <jsp:setProperty name="upBean" property="folderstore" value="<%=request.getRealPath("thuraya//uploads")%>"  />
    </jsp:useBean>
    <jsp:useBean id="dbc" class="mypackage.DBConnection" scope="session" />
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.println("addbtn");
            //do upload file + insert in database
             if (MultipartFormDataRequest.isMultipartFormData(request))
             // Uses MultipartFormDataRequest to parse the HTTP request.
             MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
             String todo = null;
             if (mrequest != null) todo = mrequest.getParameter("todo");
                 if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
                    Hashtable files = mrequest.getFiles();
                    if ( (files != null) && (!files.isEmpty()) )
                        UploadFile file = (UploadFile) files.get("filename");
                        if (file != null)
                                            out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : "+file.getFileName()+" ("+file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
                                            String fileName=file.getFileName();
                                            String ran=System.currentTimeMillis()+"";
                                            String ext=fileName.substring(   ( fileName.length()-4),fileName.length() );
                                            file.setFileName(ran+ext);
                        // Uses the bean now to store specified by jsp:setProperty at the top.
                        upBean.store(mrequest, "filename");
                                            String title=request.getParameter("title");
                                            String content=request.getParameter("elm1");
                                            int x=dbc.addNews(title,content,file.getFileName(),2,1);
                                            if(x==1)
                                                     out.print("New Vedio has been addedd Successfully");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                                                     else{
                                                      out.print("An Error Occured while adding new Vedio");
                                                      response.setHeader("Refresh","1;URL=uploadVedio.jsp");
                    else
                      out.println("<li>No uploaded files");
             else out.println("<BR> todo="+todo);
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input onClick="submit()" name="addBTN" type="button" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

    the problem is not because of java code insdie jsp page
    I have removed all things but the form and it is still not working
    here is the modified code:
    <!-- add news-->
    <%
    if(request.getParameter("addBTN") != null){
            out.print("addBTN");
    %>
    <!-- end of add news-->
    <form action="" method="post" enctype="multipart/form-data" name="upform" >
      <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
        <tr>
          <td colspan="2" align="right" bgcolor="#EAEAEA" class="borderdTable"><p>'6'A) .(1 ,/J/</p></td>
        </tr>
        <tr>
          <td width="87%" align="right"><label>
            <input name="title" type="text" class="rightText" id="title">
          </label></td>
          <td width="13%" align="right">9FH'F 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><textarea name="elm1" cols="50" rows="10" id="elm1" style="direction:rtl" >
              </textarea></td>
          <td align="right">*A'5JD 'D.(1</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input type="file" name="filename" id="filename">
          </label></td>
          <td align="right">5H1)</td>
        </tr>
        <tr>
          <td align="right"><label>
            <input name="addBTN" type="submit" class="btn" id="addBTN" value="  '6'A) .(1 ">
          </label></td>
          <td align="right"> </td>
        </tr>
      </table>
    </form>
    <!-- TinyMCE -->
    <script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript">
            tinyMCE.init({
                    mode : "textareas",
                    theme : "simple",
                    directionality : "rtl"
    </script>
    <!--end of TinyMCE -->

  • Navigation button not working in JSP

    JDeveloper10g JSP:
    "NestSet", "PreviousSet" button not working after a search is done on a read-only table. Is this a know bug?
    Please help!!!

    Vishal,
    I dont think the Notification Create Button from line item is pretty much dependent on the Customization Settings or any sap note concerning this has not been as yet brought into my notice. In my system, this is working appropriately. The problem with this which i can think of is either an authorization issue or you should raise an oss for this.
    Regards,
    Usman

  • Case when statement not working

    hi there, I am trying to work out how to get my case statement to work.
    I have got the following code. 
    select pthproto.pthdbo.cnarole.tpkcnarole, pthproto.pthdbo.cnaidta.formataddr as formataddr, cnaidta.dateeffect as maxdate, isnull(cast (pthproto.pthdbo.cnaaddr.prefix1key as varchar (50)),'') + ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix2key
    as varchar (50)),'')+ ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix3key as varchar (50)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.houseidkey as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component1
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component2 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component3 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component4
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component5 as varchar (100)),'') as mailaddress, row_number() over(partition by pthproto.pthdbo.cnarole.tpkcnarole order by cnaidta.dateeffect desc) as rn into #address from pthproto.pthdbo.cnarole
    inner join pthproto.pthdbo.cnaidty on cnarole.tfkcnaidty =cnaidty.tpkcnaidty inner join pthproto.pthdbo.cnaidta on cnaidty.tpkcnaidty = cnaidta.tfkcnaidty inner join pthproto.pthdbo.cnaaddr on cnaidta.tfkcnaaddr = cnaaddr.tpkcnaaddr order by cnaidta.dateeffect
    select *, case when mailaddress is not null then mailaddress else formataddr end as test from #address where tpkcnarole = '18306695'
    The case when statement is struggling with how i have created the column mailaddress.  As it does seem to understand when it is null.  In the example I have got there is no value in any of the columns to create
    the mailaddress.  Hence why I am referencing it from elsewhere.  Due to having a way on the system where it picks up data from 2 different places.    The mailaddress is always correct if there is one, hence why
    trying to reference that one first.  So how do i change this case when statement to work ?            

    It's ok I have fixed my own problem
    when
    (mailaddress
    is
    null 
    or mailaddress

    then formataddr
    else mailaddress
    end
    as test
    case

  • FDM Conditional mapping not working

    I currently have the following #script as my map in FDM. The first part of the map is not working as all the 9* source accounts are mapping to "70111". The rule should be; with any source account of "9*", with a source profit center where the 3rd digit is "??1???", then account is "43905", else "70111".
    If Left(varValues(23),3) = "1" Then
    Result = "43905"
    Else
    Result = "70111"
    End if
    Not sure why the first result is not working...anyone have any suggestions?

    Hi
    I think I may have seen this question answered previously but in case....
    Your IF statement is comparing the first 3 characters to "1" so it will never match.
    Assuming that you want to compare the 3rd character then you want If Mid(varValues(23),3,1) = "1" Then
    Hope this helps
    Stuart

Maybe you are looking for

  • HT4623 I tried updating my iphone 5c, but it didn't have enough space and it disabled my iphone. What do I do?

    I didn't realize that my iphone has already been updated to that ios 7 thing. I tried to update it so that I could redo all my music selection to make more space for my TV shows on it, but it failed and my iphone 5c was disabled with only a picture o

  • Connecting bluetooth accessory to multiple devices

    Bought the XGPS150 to work with my wi-fi only iPad2. It would have been a bonus if it could talk to two iPad's/devices at the same time, but it cannot. Multiple devices can pair with it, but it can only communicate with one iPad/Phone/Touch at a time

  • 10g install on XP pro

    I am trying to install oracle 10g 10.2.0.1.0 on an XP pro, SP2. The installation goes well, until about 35% when nothing happens. I didn't touch the machine for many minutes. The last part of the logfile is not to any help either: Oracle Universal In

  • Color change between copy and paste

    Hi, when I draw a rectangle or any other shape in Pages and give that objet a color (RGB: 175,217,82) and I copy and paste that objet, the color of the copied object does change to (RGB: 188,219,108). Copying the copied object stays the same (RGB: 18

  • Cleaning VM Manager MySQL Database

    Hi, I am looking to clean a server pool completely and recreate it after some issues with heartbeating caused by a network fault caused all sorts of heartbeat / config problems. Have been working through a fix with Oracle support and have cleaned all