Get result from mouseloc

I have a variable call r
r = "207, 489"      -- this is a mouseloc that could be anyth... like for example r = "-6, 45" or   r = "1003, 1200"
My goal is to get only the numbers for example 204 and 489 or -6 and 45 or whatever and put them in variable
loc1 and loc2

r = "207, 489"
the itemDelimiter = ","
loc1 = value(r.item[1])
loc2 = value(r.item[2])

Similar Messages

  • Web services and ADF 11g- get Result from backing bean

    I'm executing an action from backing bean (call Web service that returns complex data types)
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("unesiPonudu");
    Object result = operationBinding.execute();
    result is instance of oracle.adf.model.adapter.dataformat.XMLHandler$DataCollection but DataCollection is not accessible.
    How to get results from method?
    Tnx,
    Andreja

    Hi,
    there should be a result iterator in the Executables section which cotnains the result. If not, create it from the WS result entry in the DC palette. Once this iterator gets updated, you get the data from this iterator as it would be the case of a table accesses the WS
    Frank

  • Get result from google by java

    after greeting
    i want to know how to make search and get result from google through jsp and display it in jsp
    if anyone has answer
    please send me it as soon as possible
    thanks

    Check what API's google provides and make use of it.
    Start here: [http://code.google.com].

  • Forgot icloud password, how to get it recover without any question and also alternative email becuase someone hacked my alternative email id. need password for using icloud hopefully i will get result from you as your earliest.

    forgot icloud password, how to get it recover without any question and also alternative email because someone hacked my alternative email id. need password for using icloud hopefully i will get result from you as your earliest.

    I'm sorry, but I know nothing about iCloud email. I stayed away from iCloud email and only use iCloud for limited purposes.
    But take a look at this discussion and read the response from randers4. He is one of the iCloud experts in the Apple Support Communities.
    https://discussions.apple.com/message/24358339#24358339
    If that doesn't help, you might be better off posting in here where there are other more knowledgable iCloud users.
    https://discussions.apple.com/community/icloud/icloud_on_my_ios_device

  • How to get result from another JSP file?

    I have to write a jsp (my.jsp) to get information from another jsp file (other.jsp).
    The other.jsp return integer value (0 / 1) so that user can tell if certain service is available or not. And in my.jsp I need to collect such result and other information from a text file to make up of a XML string.
    How can I call other.jsp to get the result? Thanks a lot.

    Hi, I think I didn't describe the problem clearly
    enough. In fact, there is a JSP file, and if our
    database is currently connected, the JSP will return
    value 1, otherwise, it will return 0. My java program
    need to get that result, and then form an XML string,
    and send the string back to the client. I'm just
    wonder how can I write such a program to read result
    from JSP file. Thanks a lot.Why is this function implemented as a JSP file? It should be implemented as a bean. It would be simple to get the information you require from that bean.

  • Two statements, get results from the first statement?

    Ok maybe I made it sound a little harder than it is, but this is what I am trying to do. I have a result set from from a database call when I pass in the username and password . In the 1st call I get the Users info: User_ID, first_name, lastname, etc...
    But I either need to get info from the first statement, and pass it to the 2nd statement or just do two statement calls calling the same info and passing it to my user object? I dont know which if any is faster, or better. The only thing I need from the first statement is the user_id. In the 2nd statement I need the user_id to find out the user permissions.
    Here is the original code when It was getting the user info and permissions from the same table. try
               dba = new DbAccess();
               java.sql.Connection con = dba.getConnection();          
    java.sql.DriverManager.getConnection("jdbc:oracle:thin:@kares:1523:appd","user","pass");  
               ps = con.prepareStatement("SELECT USER_ID, LAST_NAME, FIRST_NAME, LOGIN, PASSWORD," +
               "X, Y, Z FROM RD_USERS WHERE LOGIN=? and PASSWORD=?");
               ps.setString(1, user);
               ps.setString(2, pass);
               rs = ps.executeQuery();
               // set the user attributes
               if ( rs.next() )
                  loginValid = true;
                  setUserId(rs.getInt("USER_ID"));
                  setLastName(rs.getString("LAST_NAME"));
                  setFirstName(rs.getString("FIRST_NAME"));
                  setLoginName(rs.getString("LOGIN"));
                  setPassword(rs.getString("PASSWORD"));   
                  X = rs.getBoolean("X");
                  setX(X);
                  Y = rs.getBoolean("Y");
                  setY(Y);
                  Z = rs.getBoolean("Z");
                  setZ(Z);
               else
                  setLastName(null);
                  setFirstName(null);
                  setLoginName(null);
                  setPassword(null);
                  setX(false);
                  setY(false);
                  setZ(false);
               rs.close(); rs = null;
               ps.close(); ps = null;
               //dba.close(); dba = null;
            } The code above gets the info from one table, I now need to get the X, Y, and Z from a different table, but I need the USER_ID first. So, the first table is set up with the user_id and user info, and the 2nd table is set up with the user_id and user permissions

    Thanks DrClap I started on the the query and I did it a little differently, but it should hopefull do the same thing. my tables are constructed as so:
    USER
         USER_ID
         FIRST_NAME
         LAST_NAME
         USER_NAME
         PASSWORD
         ETC....
    USER_PERMISSIONS
         USER_ID
         PERMISSION X
         PERMISSION Y
         PERMISSION Z
         ETC....
    My Select looks something like this
    ps = con.prepareStatement("SELECT a.USER_ID, a.LAST_NAME, a.FIRST_NAME, a.USER_NAME, a.USER_PASSWORD," +
               "b.X, b.Y, b.Z FROM RD_USERS a, RD_PERMISSIONS b WHERE USER_NAME=? and USER_PASSWORD=?");
    This is where I come to a crossroads, Can I add on another AND to say "WHERE a.USER_ID = b.USER_ID
    and do I use the =, or is it ==, or .equals(). Thanks in advance.
    orozcom

  • Getting Result from multiple table using code table.

    I am having hard time getting data from different table not directly connected.
    

    The data model is not proper. Why should you store the game details in separate tables?
    IMO its just matter of putting them in same table with additional field gamename to indicate the game. That would have been much easier to query and retrieve results
    Anyways in the current way what you can do is this
    SELECT p.ID,p.Name,c.CategoryName AS [WinnerIn]
    FROM GameParticipants p
    INNER JOIN (SELECT ParticipantID, Value AS ParticipantName,'CGW Table' AS TableName
    FROM CGWTable
    UNION ALL
    SELECT ParticipantID, Value AS ParticipantName,'FW Table' AS TableName
    FROM FWTable
    SELECT ParticipantID, Value AS ParticipantName,'WC Winner' AS TableName
    FROM WCWinner
    ... all other winner tables
    )v
    ON v.ParticipantID = p.ID
    AND v.ParticipantName = p.Name
    INNER JOIN Category c
    ON c.TableName = v.TableName
    If you want you can also add a filter like
    WHERE p.Name = @Name
    to filter for particular player like Henry in your example
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Get Results From RemoteObject

    Not sure what's gotten into me today... feel like I'm loosing it.
    I'm getting a list of users back from a RemoteObject method call. I can't seem to remember how to parse them out. Is this the appropriate method?
    private function loadUsersByGroupHandler(event:ResultEvent):void
         try
              this._assignedUsers = event.result as ArrayCollection;
         catch (error:FaultEvent)
              this.parentDocument.faultHandle(event);
    The problem here is that when I do this, I am unable to inspect the resulting ArrayCollection for length or anything else, as the following fails (no error is thrown, but also no alert is shown):
    private function loadUsersByGroupHandler(event:ResultEvent):void
         try
                   Alert.show(ArrayCollection(event.result).length.toString());
              this._assignedUsers = event.result as ArrayCollection;
         catch (error:FaultEvent)
              this.parentDocument.faultHandle(event);

    Try this._myAC= new ArrayCollection( event.result as Array)
    Sincerely,
    Michael
    El 22/04/2009, a las 14:22, Miggl <[email protected]> escribió:
    >
    Not sure what's gotten into me today... feel like I'm loosing it.
    >
    I'm getting a list of users back from a RemoteObject method call. I 
    can't seem to remember how to parse them out. Is this the 
    appropriate method?
    private function loadUsersByGroupHandler(event:ResultEvent):void
         try
              this._assignedUsers = event.result as ArrayCollection;
         catch (error:FaultEvent)
              this.parentDocument .faultHandle(event);
    >
    >
    The problem here is that when I do this, I am unable to inspect the 
    resulting ArrayCollection for length or anything else, as the 
    following fails (no error is thrown, but also no alert is shown):
    private function loadUsersByGroupHandler(event:ResultEvent):void
         try
    Alert.show(ArrayCollection(event.result).length.toString());
              this._assignedUsers = event.result as ArrayCollection;
         catch (error:FaultEvent)
              this.parentDocument .faultHandle(event);
    >

  • Synchronized Send for getting results from the database

    I am new into XI. I have a scenario where id will be read from a file, a selection to be made from database and the results written to a file. I have created a BPM
    receiver -> synchroizedSend(JDBC) -> Send
    Please suggest me how to use Synchronized send to execute a query and getting the RsultSets.

    Hi
    Check this relative thread for the synchronous send step
    Synchronous Sending followed by Transformation
    were can i see synchronous send in the BPM editor
    Message was edited by:
            Anusha  Ramsiva

  • Get results from database for the last one week ?

    Hi All,
    I have to make a query for retrieving the data for the last one week from a table say "Orderdata".
    So can anybody please tell me how to retrieve date of last weak from the current date. I mean if current date is 12/08/2004 (mm/dd/yyyy) then I would be needing date as :--
    12/01/2004 (mm/dd/yyyy) to 12/07/2004 (mm/dd/yyyy).
    To more clear, here is the query that am using :
    select * from orderdata where orderdate between 12/01/2004 AND 12/07/2004
    I know I would be needing java.sql.timestamp class to set date . but it is the last thing to do .
    First I have to get date of last weak...........
    Here is the code----------that i have just start to write ..
    Calendar cal;
    TimeZone tz;
    String estTimezone="GMT-05:00";
    tz=TimeZone.getTimeZone(estTimezone);
    cal=new GregorianCalendar(tz);
    cal.setTimeZone(tz);
    String currentdate=String.valueOf(cal.get(Calendar.MONTH)+1);
    currentdate+="/"+String.valueOf(cal.get(Calendar.DAY_OF_MONTH)-1);
    currentdate+="/"+String.valueOf(cal.get(Calendar.YEAR));
    out.println(currentdate);And assume if current date is 12/1/2004 (mm/dd/yyyy) then subtracting -1 form the current date will give 12/00/2004 so not getting the correct result .
    Hope it is clear to all................
    Please Help !
    amitindia

    http://forum.java.sun.com/thread.jspa?threadID=577953&tstart=0

  • Two clicks required to get results from Search Input box on toolbar.

    I'm running version 8.02.208.
    I'm new at Webhelp and was hoping somebody might be able to give me some pointers.
    If I open my published webhelp on the Internet and try to search using the Search Input box on the toolbar the first time, two clicks are required in order to get search results.
    This problem only appears the first time, all other searches from the Search Input box on the toolbar work properly with only one click required.
    In addition, the Search tool opened from the Search button always works fine first and every time, but I did see the extra space that I've read about.
    This is what I don't understand...the problem I mentioned with the 2 clicks required on the toolbar, never happens when I Generate and View the results. Meaning that I am looking at the output but have not published it yet. It works fine first and every time.
    Why would the problem show up one way and not the other? Does anyone know what could be different?
    I just keep hoping that there is something that I can do to get rid of the problem. I keep getting Problem Reports opened and assigned to me and complaints from customer service from customers. They think the search isn't working and I keep having to explain.....arghhhh!
    Thanks!
    Deb

    Hi Sheryl and Peter,
    I have also tried the options as you have suggested without success. Everything works fine when the WebHelp is published to a local or network drive but when it is published to the server the issue occurs.
    I would point out too, that I find that the problem with the space only occurs on the intial attempt to search using the Search Box. Any subsequent attempts without closing the browser appear to work fine.
    Chris

  • Get result from PL/SQL function through XDBUri (10g)

    Hi!
    I have to call a PL/SQL function that takes two parameters and return one parameter. (I will do this from Oracle Service Bus).
    It is possible to get relational data as xml through an XDBUri type over http by using the XML DB functionality. But is it possible to get the result of a PL/SQL function as XML as well?
    I have tried to wrap the PL/SQL procedure inside a view, but cant get the variable to be bound into the sql.
    I have tried with stuff like this:
    create or replace view test (a, b)
    as
    select function(a, b) from dual
    But since I dont have a table returning the values i cant get it work.
    If I can make this view, I can call it through the XDMUri type.
    Sombody that can help me to manage this?
    /Helge
    Edited by: user3169245 on 03.apr.2009 12:06

    Here's a code snippet that may help
    package com.oracle.st.xmldb.pm.xfiles;
    import com.oracle.st.xmldb.pm.multipart.InputStreamProcessor;
    import com.oracle.st.xmldb.pm.multipart.MultipartInputStream;
    import java.io.IOException;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.OracleDriver;
    import oracle.jdbc.OracleCallableStatement;
    import com.oracle.st.xmldb.pm.multipart.MultipartProcessor;
    import com.oracle.st.xmldb.pm.multipart.MultipartProcessorImpl;
    import java.io.OutputStream;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.io.Reader;
    import java.io.StringReader;
    import java.io.StringWriter;
    import java.io.Writer;
    import java.sql.DatabaseMetaData;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Timestamp;
    import java.text.SimpleDateFormat;
    import java.util.Enumeration;
    import oracle.jdbc.OraclePreparedStatement;
    import oracle.jdbc.OracleResultSet;
    import oracle.jdbc.OracleTypes;
    import oracle.sql.BLOB;
    import oracle.sql.CLOB;
    import oracle.xdb.XMLType;
    import oracle.xml.parser.v2.XMLDocument;
    import org.w3c.dom.Attr;
    import org.w3c.dom.CDATASection;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Text;
    public class XFilesServlet extends HttpServlet implements InputStreamProcessor {
        public static String TARGET_PATH      = "target";
        public static String STYLESHEET_PATH      = "stylesheet"; 
        private static String CREATE_RESOURCE_SQL =
        "begin " +
        "  XFILES_SOAP_SERVICES.UPLOADRESOURCE" +
        "  ( " +
        "    P_RESOURCE_PATH => :1, " +
        "    P_CONTENT => :2, " +
        "    P_CONTENT_TYPE => :3," +
        "    P_DESCRIPTION => :4," +
        "    P_LANGUAGE => :5," +
        "    P_CHARACTER_SET => :6," +
        "    P_DUPLICATE_POLICY => :7" +
        "  );" +
        "end;";
        private static String GET_FOLDER_HTML_PAGE_SQL =
        "select xdburitype('/XFILES/lite/Folder.html').getClob() from dual";
        private static String WRITE_LOG_RECORD_SQL =
        "begin xfiles_logging.enqueue_log_record(:1); end;";
        private OracleConnection dbConnection;
        private OracleCallableStatement createResource;
        private OracleCallableStatement writeLogRecord;
        private DatabaseMetaData dbMetadata;
        private static final int FILE_UPLOAD = 1;
        private static final int PUBLISH_RSS = 2;
        private static final int DB_REST_SERVICE = 3;
        private static final int FORCE_AUTHENTICATION = 4;
        private static final int SET_PASSWORD = 5;
        private static final int DISPLAY_XML = 6;
        private static final int ENABLE_RSS = 7;
        public static final int XDB_ACCESS_DENIED = 31050;
        private static String SERVLET_ROOT = "/sys/servlets/XFILES";
        private static final String FILE_UPLOAD_PATH = "fileUpload";
        private static final String PUBLISH_RSS_PATH = "publishRSS";
        private static final String SET_PASSWORD_PATH = "setPassword";
        private static final String DB_REST_SERVICE_PATH = "dbRestService";
        private static final String FORCE_AUTHENTICATION_PATH = "doAuthentication";
        private static final String DISPLAY_XML_PATH = "displayXML";
        private static final String ENABLE_RSS_PATH = "enableRSS";
        public static String POST_UPLOAD_URL = "postUploadRedirect";
        public static String DULPLICATE_POLICY = "duplicatePolicy";
        public static String SOURCE_FILE_PATH = "sourceFilePath";
        public static String RESOURCE_FILENAME = "targetFileName";
        public static String RESOURCE_DESCRIPTION = "description";
        public static String UPLOAD_LANGUAGE = "UploadLanguage";
        public static String UPLOAD_CHARACTERSET = "UploadCharset";
        public static String PASSWORD = "password";
        public static String XML_DOCUMENT = "content";
        public static String XML_CHUNK = "chunk";
        public static String RESOURCE_ID = "resid";
        public static String DATABASE_SCHEMA = "DatabaseSchema";
        public static String PACKAGE  = "Package";
        public static String METHOD = "Method";
        public static String SQL_CALL = "SqlOperation";
        protected XMLDocument logRecord;
        protected Element parameterList;
        protected Element timings;
        protected int currentOperation;
        public String xmlContent;
        public static String XML_TIMESTAMP_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS000";
        public static String LOG_TIMESTAMP_FORMAT = "HH:mm:ss.SSS000";
        protected SimpleDateFormat xmlDateFormatter  = new SimpleDateFormat(XML_TIMESTAMP_FORMAT); 
        private String postUploadURL;
        private String targetFolder;
        private String onDuplicateAction;
        private String sourceFile;
        private BLOB   resourceContent;
        private String contentType;
        private String resourceName;
        private String resourceComment;
        private String uploadLanguage;
        private String uploadCharacterSet;
        public XFilesServlet() {
        private void logParameter(Document doc)
           this.parameterList.appendChild(logRecord.importNode(doc.getDocumentElement().cloneNode(true),true));
        private void logParameter(String parameterName, String[] values)
          Element e = this.logRecord.createElement(parameterName);
          this.parameterList.appendChild(e);
          if (values != null)
            Attr a = this.logRecord.createAttribute("Length");
            e.setAttributeNode(a);
            a.setValue(Integer.toString(values.length));
            for (int i = 0; i < values.length; i++)
              Element v = this.logRecord.createElement("parameterValue");
              e.appendChild(v);
              Text t = this.logRecord.createTextNode(values);
    v.appendChild(t);
    a = this.logRecord.createAttribute("Index");
    v.setAttributeNode(a);
    a.setValue(Integer.toString(i));
    public void logParameter(String parameterName,String value)
    Element e = this.logRecord.createElement(parameterName);
    this.parameterList.appendChild(e);
    if (value != null)
    Text t = this.logRecord.createTextNode(value);
    e.appendChild(t);
    private void logParameterCDATA(String parameterName,String value)
    Element e = this.logRecord.createElement(parameterName);
    this.parameterList.appendChild(e);
    if (value != null)
    CDATASection c = this.logRecord.createCDATASection(value);
    e.appendChild(c);
    private void logException(Exception e) {
    Element stackTrace = this.logRecord.createElement("StackTrace");
    this.logRecord.getDocumentElement().appendChild(stackTrace);
    this.appendException(stackTrace,e);
    private void appendException(Element stackTrace, Throwable error)
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    error.printStackTrace(pw);
    pw.flush();
    pw.close();
    Text t = this.logRecord.createCDATASection(sw.toString());
    stackTrace.appendChild(t);
    if (error.getCause() != null)
    Element causedBy = this.logRecord.createElement("CausedBy");
    stackTrace.appendChild(causedBy);
    appendException(causedBy,error.getCause());
    else {
    if (error instanceof ServletException) {
    ServletException se = (ServletException) error;
    if (se.getRootCause() != null) {
    Element causedBy = this.logRecord.createElement("CausedBy");
    stackTrace.appendChild(causedBy);
    appendException(causedBy,se.getRootCause());
    private void logTimestamp(String eventName)
    Timestamp ts = new Timestamp(System.currentTimeMillis());
    Element element = logRecord.createElement(eventName);
    this.timings.appendChild(element);
    Text text = logRecord.createTextNode(this.xmlDateFormatter.format(ts));
    element.appendChild(text);
    protected void initiateLogging(HttpServletRequest request)
    throws IOException
    this.logRecord = new XMLDocument();
    Element root = this.logRecord.createElement("XFilesLogRecord");
    this.logRecord.appendChild(root);
    Element e = this.logRecord.createElement("HttpRequest");
    root.appendChild(e);
    Element e1 = this.logRecord.createElement("ServletName");
    Text t = this.logRecord.createTextNode(this.getClass().getName());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("HttpMethod");
    t = this.logRecord.createTextNode(request.getMethod());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("RequestURI");
    t = this.logRecord.createTextNode(request.getRequestURI());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("PathTranslated");
    t = this.logRecord.createTextNode(request.getPathTranslated());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("RequestURL");
    t = this.logRecord.createTextNode(new String(request.getRequestURL()));
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("Protocol");
    t = this.logRecord.createTextNode(request.getProtocol());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("ServerName");
    t = this.logRecord.createTextNode(request.getServerName());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("ContentType");
    t = this.logRecord.createTextNode(request.getContentType());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("LocalAddr");
    t = this.logRecord.createTextNode(request.getLocalAddr());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("LocalName");
    t = this.logRecord.createTextNode(request.getLocalName());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("LocalPort");
    t = this.logRecord.createTextNode(Integer.toString(request.getLocalPort()));
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("Port");
    t = this.logRecord.createTextNode(Integer.toString(request.getServerPort()));
    e1.appendChild(t);
    e.appendChild(e1);
    this.timings = this.logRecord.createElement("Timestamps");
    root.appendChild(this.timings);
    logTimestamp("Init");
    e = this.logRecord.createElement("Remote");
    root.appendChild(e);
    e1 = this.logRecord.createElement("RemoteHost");
    t = this.logRecord.createTextNode(request.getRemoteHost());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("RemoteAddress");
    t = this.logRecord.createTextNode(request.getRemoteAddr());
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("RemotePort");
    t = this.logRecord.createTextNode(Integer.toString(request.getRemotePort()));
    e1.appendChild(t);
    e.appendChild(e1);
    e1 = this.logRecord.createElement("RemoteUser");
    t = this.logRecord.createTextNode(request.getRemoteUser());
    e1.appendChild(t);
    e.appendChild(e1);
    e = this.logRecord.createElement("RequestHeaders");
    root.appendChild(e);
    Enumeration headerNames = request.getHeaderNames();
    while (headerNames.hasMoreElements())
    String headerName = (String) headerNames.nextElement();
    e1 = this.logRecord.createElement(headerName);
    t = this.logRecord.createTextNode(request.getHeader(headerName));
    e1.appendChild(t);
    e.appendChild(e1);
    this.parameterList = this.logRecord.createElement("ServletParameters");
    root.appendChild(parameterList);
    public void writeLogRecord(XMLDocument logRecord) throws SQLException , IOException {
    XMLType xml = new XMLType(this.dbConnection, logRecord);
    this.writeLogRecord.setObject(1, xml);
    this.writeLogRecord.execute();
    this.dbConnection.commit();
    protected String readParameter(HttpServletRequest request,String parameterName,String defaultValue)
    String value = request.getParameter(parameterName);
    if (value != null)
    if (value.length() == 0) {
    value = null;
    if (value == null) {
    value = defaultValue;
    logParameter(parameterName,value);
    return value;
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException
    try {
    try {  
    initiateLogging(request);
    initializeDatabaseConnection();
    String requestURI = request.getRequestURI();
    this.currentOperation = getOperation(requestURI);
    switch (this.currentOperation) {
    case DB_REST_SERVICE:
    restResponse(request,response);
    break;
    default:
    response.sendError(HttpServletResponse.SC_NOT_FOUND);
    logTimestamp("Complete");
    writeLogRecord(this.logRecord);
    this.dbConnection.commit();
    catch (Exception e) {
    try {
    this.dbConnection.rollback();
    logTimestamp("Exception");
    logException(e);
    writeLogRecord(this.logRecord);
    catch (Exception wle) {
    System.out.println("XFilesServlet : Fatal error while logging Error : ");
    e.printStackTrace(System.out);
    System.out.flush();
    wle.printStackTrace(System.out);
    System.out.flush();
    response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    finally {
    try {
    this.createResource.close();
    this.writeLogRecord.close();
    catch (SQLException e) {
    System.out.println("XFilesServlet : Fatal error while closing statements : ");
    e.printStackTrace(System.out);
    response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    } catch (IOException ioe) {
    System.out.println("XFilesServlet : Fatal error while Sending Error Status : ");
    ioe.printStackTrace(System.out);
    System.out.flush();
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    doGet(req, res);
    private void initializeDatabaseConnection() throws SQLException {
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    OracleDriver ora = new OracleDriver();
    this.dbConnection = (OracleConnection) ora.defaultConnection();
    this.createResource = (OracleCallableStatement) this.dbConnection.prepareCall(this.CREATE_RESOURCE_SQL);
    this.writeLogRecord = (OracleCallableStatement) this.dbConnection.prepareCall(this.WRITE_LOG_RECORD_SQL);
    this.dbMetadata = this.dbConnection.getMetaData();
    private int getOperation(String requestURI) {
    String servletTarget = requestURI.substring(this.SERVLET_ROOT.length()+1);
    if (servletTarget.indexOf('/') > -1) {
    servletTarget = servletTarget.substring(0,servletTarget.indexOf("/"));
    if (servletTarget.equals(this.FILE_UPLOAD_PATH)) return FILE_UPLOAD;
    if (servletTarget.equals(this.FORCE_AUTHENTICATION_PATH)) return this.FORCE_AUTHENTICATION;
    if (servletTarget.equals(this.PUBLISH_RSS_PATH)) return this.PUBLISH_RSS;
    if (servletTarget.equals(this.DB_REST_SERVICE_PATH)) return this.DB_REST_SERVICE;
    if (servletTarget.equals(this.SET_PASSWORD_PATH)) return this.SET_PASSWORD;
    if (servletTarget.equals(this.DISPLAY_XML_PATH)) return this.DISPLAY_XML;
    if (servletTarget.equals(this.ENABLE_RSS_PATH)) return this.ENABLE_RSS;
    return 0;
    public void processParameter(String name, String value)
    throws SQLException {
    logParameter(name,value);
    if (name.equals(this.TARGET_PATH)) {
    this.targetFolder = value;
    if (name.equals(this.POST_UPLOAD_URL)) {
    this.postUploadURL = value;
    if (name.equals(this.UPLOAD_LANGUAGE)) {
    this.uploadLanguage = value;
    if (name.equals(this.UPLOAD_CHARACTERSET)) {
    this.uploadCharacterSet = value;
    if (name.equals(this.DULPLICATE_POLICY)) {
    this.onDuplicateAction = value;
    if (name.equals(this.SOURCE_FILE_PATH)) {
    this.sourceFile = value;
    if (name.equals(MultipartProcessor.MULTIPART_CONTENT_TYPE)) {
    this.contentType = value;
    if (name.equals(this.RESOURCE_FILENAME)) {
    this.resourceName = value;
    if (name.equals(this.RESOURCE_DESCRIPTION)) {
    this.resourceComment = value;
    createNewResource();
    private void restResponse(HttpServletRequest request, HttpServletResponse response)
    throws IOException, SQLException, ServletException {
    String requestURI = request.getRequestURI();
    String restTarget = requestURI.substring(this.SERVLET_ROOT.length() + this.DB_REST_SERVICE_PATH.length()+1);
    if (restTarget.contains("//")) {
    // Cannot have // in URL
    response.sendError(HttpServletResponse.SC_BAD_REQUEST);
    return;
    if (restTarget.length() < 4) {
    // URL is too short to be valid - Minumum is /A/B
    response.sendError(HttpServletResponse.SC_BAD_REQUEST);
    return;
    if (!restTarget.startsWith("/")) {
    // Invalid URL
    response.sendError(HttpServletResponse.SC_BAD_REQUEST);
    return;
    if (!restTarget.substring(1).contains("/")) {
    // URL must contain /Schema/Method, may Contain /Schema/Package/Method
    response.sendError(HttpServletResponse.SC_BAD_REQUEST);
    return;
    String schemaName = restTarget.substring(1,restTarget.substring(1).indexOf("/")+1);
    restTarget = restTarget.substring(schemaName.length()+1);
    logParameter(this.DATABASE_SCHEMA,schemaName);
    String packageName = null;
    if (restTarget.substring(1).contains("/")) {
    // URL contains /Schema/Package/Method
    packageName = restTarget.substring(1,restTarget.substring(1).indexOf("/")+1);
    restTarget = restTarget.substring(packageName.length()+1);
    logParameter(this.PACKAGE,packageName);
    if (restTarget.substring(1).contains("/")) {
    // URL must be /Schema/Method or /Schema/Package/Method, anything else is junk
    response.sendError(HttpServletResponse.SC_BAD_REQUEST);
    return;
    String methodName = restTarget.substring(1);
    logParameter(this.METHOD,methodName);
    int responseCode = verifyTarget(request,schemaName,packageName,methodName);
    if (responseCode != HttpServletResponse.SC_OK) {
    System.out.println("Status Code = " + responseCode);
    response.sendError(responseCode);
    return;
    String target = "\"" + schemaName + "\".";
    if (packageName != null) {
    target = target + "\"" + packageName + "\".";
    target = target + "\"" + methodName + "\"";
    int index;
    Enumeration parmNames;
    String sqlStatementText =
    "begin" + "\n" +
    " :1 := " + target + "(" + "\n";
    index = 1;
    parmNames = request.getParameterNames();
    while (parmNames.hasMoreElements()) {
    index++;
    sqlStatementText = sqlStatementText + "\"" + parmNames.nextElement() + "\" => :" + index + " ";
    if (parmNames.hasMoreElements()) {
    sqlStatementText = sqlStatementText + ",\n";
    sqlStatementText = sqlStatementText + ");\nend;";
    logParameterCDATA(this.SQL_CALL,sqlStatementText);
    OracleCallableStatement statement = (OracleCallableStatement) this.dbConnection.prepareCall(sqlStatementText);
    index = 1;
    parmNames = request.getParameterNames();
    while (parmNames.hasMoreElements()) {
    index++;
    String parameterName = (String) parmNames.nextElement();
    String parameterValue = (String) request.getParameter(parameterName);
    logParameter(parameterName,parameterValue);
    statement.setString(index,parameterValue);
    XMLType xml = null;
    try {
    statement.registerOutParameter(1,OracleTypes.OPAQUE,"SYS.XMLTYPE");
    statement.execute();
    xml = (XMLType) statement.getObject(1);
    statement.close();
    catch (SQLException sqle) {
    statement.close();
    if (xml != null) xml.close();
    if (sqle.getErrorCode() == this.XDB_ACCESS_DENIED) {
    logTimestamp("RequestAuthorization");
    response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
    return;
    ServletException se = new ServletException("Unexpected SQL Error",sqle);
    throw se;
    response.setContentLength(0);
    response.setContentType("text/xml");
    xml.writeToOutputStream(response.getOutputStream());
    xml.close();
    response.getOutputStream().flush();
    response.getOutputStream().write( new byte[] {'\r','\n'} );
    // response.getOutputStream().flush();
    response.getOutputStream().close();
    response.setStatus(HttpServletResponse.SC_OK);
    private int verifyTarget(HttpServletRequest request, String schemaName, String packageName, String methodName)
    throws SQLException {
    int response = HttpServletResponse.SC_NOT_FOUND;
    boolean parameterValid = false;
    ResultSet procedure = null;
    procedure = this.dbMetadata.getProcedures(packageName,schemaName,methodName);
    while (procedure.next()) {
    response = HttpServletResponse.SC_OK;
    response = verifyMandatoryParameters(request,schemaName,packageName,methodName);
    if (response == HttpServletResponse.SC_OK) {
    response = verifyOptionalParameters(request,schemaName,packageName,methodName);
    return response;
    private int verifyMandatoryParameters(HttpServletRequest request, String schemaName, String packageName, String methodName) throws SQLException {
    // Check Mandatory Parameters are present.
    ResultSet columns = null;
    columns = this.dbMetadata.getProcedureColumns(packageName,schemaName,methodName,"%");
    while (columns.next()) {
    short nullable = columns.getShort(12);
    String columnName = columns.getString(4);
    if (nullable == DatabaseMetaData.procedureNoNulls) {
    if (request.getParameter(columnName) == null) {
    columns.close();
    return HttpServletResponse.SC_BAD_REQUEST;
    return HttpServletResponse.SC_OK;
    private int verifyOptionalParameters(HttpServletRequest request, String schemaName, String packageName, String methodName) throws SQLException {
    // Check Optional Parameters are valid
    Enumeration parms = request.getParameterNames();
    ResultSet column = null;
    while (parms.hasMoreElements()) {
    String columnName = (String) parms.nextElement();
    column = this.dbMetadata.getProcedureColumns(packageName,schemaName,methodName,columnName);
    if (!column.next()) {
    column.close();
    return HttpServletResponse.SC_BAD_REQUEST;
    column.close();
    return HttpServletResponse.SC_OK;

  • My mcbook is not conecting to internet. I have some conection in Utorrent but pages are not being displayed in my browsers (chrome and firefox). If I reset the SMC i can get results from google but no other page loads. i get ERR_NAME_NOT_RESOLVED.

    My Mcbook cant find the host. I get some conection because my Utorrent has some donwload activity, but when I attempt to open any page i just get a time out and  ERR_NAME_NOT_RESOLVED. If i reset the SMC by removing the battery, google loads perfectly and it gives me search results without any problem. But when I click on any link, or attempt to enter a direct URL it gives me the error mentioned before.
    I restarted the modem, changed the DNS, deactivate the firewall, conect the macbook via ethernet, change the IP, and nothing seems to work. This issue happened the first time i tried to conect to internet in a different country. Internet works fine in any other laptop or mobile device.
    When using the assistant to run a diagnosis on the network, i get the first 4 items (wifi, wifi adjustments, network adjustments and internet provider) with a green light, and the other two (internet and server) with yelow lights (sometmes red light).
    When i tried to connect the first time, i had a OS X 6.8 but i upgraded it to Maverick 10.9, since i had already donwnloaded it, and the result was the same.
    anyone could help me please?

    We usually advice first to Reload web page(s) and bypass the cache in case of such problem and then do a check for extensions to see if any are causing the problem.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Other possible causes can be zooming a page or having increased the minimum font size.
    *http://kb.mozillazine.org/Websites_look_wrong

  • Getting results from LDB (Logical Database)

    Hi All,
    I have a requirement where i need to pass LDB results to external application. It can be any LDB. Like in SE36 we put the LDB name and execute and final results are shown in ALV. I dont need it to display in ALV but from my custom program, need that output table which stores these results.
    I tried using LDB_PROCESS but that need custom subroutine names to pass in that, i tried  passing the same and results also came but thing is every logical database will have different tables in that, it'll be impossible to create those many subroutine to handle each and every table. So i need a generalized solution like se36 processes the data for any LDB.
    Is anyone knows how can i achieve this?
    Regards
    Munish Garg
    9041793217

    Hello
    Generally any LDB will have a event which triggers the data to be populated in the tables/memory. Now these data retrieval is written in a sub-routine "Perform PUT_<eventnamt>". So any LDB will have the sub-routine named "PUT_<eventname>" in its main program. May be you can create the sub-routine name dynamically using this method.
    Regards
    Ranganath

  • How to get result from query for ssrs?

    DECLARE @meter_number int
    SET @meter_number=25112
    IF @meter_number IN (SELECT meter_number FROM ods.pmc.meter_registers)
    BEGIN
    SELECT 'LA' as [data_center]
    , t.request_time_gmt
    , aca.transaction_id
    , aca.meter_number
    , CONVERT(date, aca.ship_date_gmt) as ship_date
    , aca.user_name
    , p.confirmation_number
    , p.origin_zip
    , p.destination_zip
    , p.destination_zip_addon
    , p.base_postage_cost
    , p.mail_class_id
    , p.weight_ounces
    , p.delivery_confirmation
    , cil.ascending_register
    -- , ih.transaction_date_gmt
    , ih.from_name, ih.from_company, ih.from_address_line_1, ih.from_address_line_2, ih.from_city, ih.from_state, ih.from_zip
    , ih.to_name, ih.to_company, ih.to_address_line_1, ih.to_address_line_2, ih.to_city, ih.to_state, ih.to_zip
    FROM ods.sws.create_indicium_log aca --#USPS_Amazon_Cust_Activity aca
    JOIN ods.sws.prints p (NOLOCK)
    ON aca.transaction_id = p.transaction_id
    JOIN ods.sws.transactions t (NOLOCK)
    ON aca.transaction_id = t.transaction_id
    JOIN ods.sws.create_indicium_log cil (NOLOCK)
    ON aca.log_id = cil.log_id
    LEFT JOIN ods.pmc.indicium_history ih
    ON p.confirmation_number = ih.confirmation_number
    END
    ELSE IF @meter_number in (SELECT meter_number FROM ods.pmc_dr01.meter_registers)
    BEGIN
    SELECT 'PHX' as [data_center]
    , t.request_time_gmt
    , aca.transaction_id
    , aca.meter_number
    , CONVERT(date, aca.ship_date_gmt) as ship_date
    , aca.user_name
    , p.confirmation_number
    , p.origin_zip
    , p.destination_zip
    , p.destination_zip_addon
    , p.base_postage_cost
    , p.mail_class_id
    , p.weight_ounces
    , p.delivery_confirmation
    , cil.ascending_register
    , ih.from_name, ih.from_company, ih.from_address_line_1, ih.from_address_line_2, ih.from_city, ih.from_state, ih.from_zip
    , ih.to_name, ih.to_company, ih.to_address_line_1, ih.to_address_line_2, ih.to_city, ih.to_state, ih.to_zip
    FROM ods.sws.create_indicium_log aca--#USPS_Amazon_Cust_Activity aca
    JOIN ods.sws_dr01.prints p (NOLOCK)
    ON aca.transaction_id = p.transaction_id
    JOIN ods.sws_dr01.transactions t (NOLOCK)
    ON aca.transaction_id = t.transaction_id
    JOIN ods.sws_dr01.create_indicium_log cil (NOLOCK)
    ON aca.log_id = cil.log_id
    LEFT JOIN ods.pmc_dr01.indicium_history ih
    ON p.confirmation_number = ih.confirmation_number
    END
    I executed this query it says command completed successfully how can it return results?

    Hi,
    Create a procedure as shown below in the database and while creating the Dataset in SSRS , Select Stored procedure as a source and call this newly created procedure using command EXEC Usp_Meter_Number 25112.
    The columns will automatically generated and u can use the columns.
    CREATE PROCEDURE Usp_Meter_Number
    @meter_number int
    AS
    BEGIN
    IF @meter_number IN (SELECT meter_number FROM ods.pmc.meter_registers)
    BEGIN
    SELECT 'LA' as [data_center]
    , t.request_time_gmt
    , aca.transaction_id
    , aca.meter_number
    , CONVERT(date, aca.ship_date_gmt) as ship_date
    , aca.user_name
    , p.confirmation_number
    , p.origin_zip
    , p.destination_zip
    , p.destination_zip_addon
    , p.base_postage_cost
    , p.mail_class_id
    , p.weight_ounces
    , p.delivery_confirmation
    , cil.ascending_register
    -- , ih.transaction_date_gmt
    , ih.from_name, ih.from_company, ih.from_address_line_1, ih.from_address_line_2, ih.from_city, ih.from_state, ih.from_zip
    , ih.to_name, ih.to_company, ih.to_address_line_1, ih.to_address_line_2, ih.to_city, ih.to_state, ih.to_zip
    FROM ods.sws.create_indicium_log aca --#USPS_Amazon_Cust_Activity aca
    JOIN ods.sws.prints p (NOLOCK)
    ON aca.transaction_id = p.transaction_id
    JOIN ods.sws.transactions t (NOLOCK)
    ON aca.transaction_id = t.transaction_id
    JOIN ods.sws.create_indicium_log cil (NOLOCK)
    ON aca.log_id = cil.log_id
    LEFT JOIN ods.pmc.indicium_history ih
    ON p.confirmation_number = ih.confirmation_number
    END
    ELSE IF @meter_number in (SELECT meter_number FROM ods.pmc_dr01.meter_registers)
    BEGIN
    SELECT 'PHX' as [data_center]
    , t.request_time_gmt
    , aca.transaction_id
    , aca.meter_number
    , CONVERT(date, aca.ship_date_gmt) as ship_date
    , aca.user_name
    , p.confirmation_number
    , p.origin_zip
    , p.destination_zip
    , p.destination_zip_addon
    , p.base_postage_cost
    , p.mail_class_id
    , p.weight_ounces
    , p.delivery_confirmation
    , cil.ascending_register
    , ih.from_name, ih.from_company, ih.from_address_line_1, ih.from_address_line_2, ih.from_city, ih.from_state, ih.from_zip
    , ih.to_name, ih.to_company, ih.to_address_line_1, ih.to_address_line_2, ih.to_city, ih.to_state, ih.to_zip
    FROM ods.sws.create_indicium_log aca--#USPS_Amazon_Cust_Activity aca
    JOIN ods.sws_dr01.prints p (NOLOCK)
    ON aca.transaction_id = p.transaction_id
    JOIN ods.sws_dr01.transactions t (NOLOCK)
    ON aca.transaction_id = t.transaction_id
    JOIN ods.sws_dr01.create_indicium_log cil (NOLOCK)
    ON aca.log_id = cil.log_id
    LEFT JOIN ods.pmc_dr01.indicium_history ih
    ON p.confirmation_number = ih.confirmation_number
    END
    END
    Please have look on the comment

Maybe you are looking for

  • How can I export via QuickTime in iMovie '13 (10.0)?

    Prior versions of iMovie had an export via QuickTime option, which allowed me to select the file format, encoding settings, etc. After upgrading to the new iMovie, that appears to have gone away. The Share -> File option does not allow me that level

  • Can MDAC installation cause navigation problems within the portal?

    Hello, I have a client who having problems loading page links in our second level navigation.  Evertime time she clicks on node to expand the tree of links, she gets a "loading" message.  I see this all the time but this message doesn't go away. She

  • Inserting other project at the beginning

    I have created two separate iMovie projects on two separate computers. The first is all set to one song. The second has three separate songs, but is all one in one project. I want to insert the first project at the beginning of the second project, in

  • How do I recover my missing messages?

    when I start tbird to check messages all previous messages were missing and only those that immediately downloaded were displayed--- how to recover?

  • My macbook screen suddenly is all jittery!?

    All of a sudden the screen on my macbbook is going crazy! Repeated images and horizontal lines. It makes the computer unusable. However, when I restart the grey apple screen come up no problem. Then back to the same old problem. Soooo I'm inclined to