CookieCounter example not working.

I have installed CookieCounter servlet example on my weblogic server.
          The properties needed for cookies management are also set in
          weblogic.properties (by default its there).
          The servlet works fine but, the servlet is unable to send/set cookiesCounter
          on my browser (I 've set to cookies prompt/cookies enable on my browser).
          Code, properties file and browser settings seems to be ok, still its not
          working. Any clues...
          PLATFORM: Server - Solaris
          Client - Win98 / internet explorer
          Thanks,
          Rajesh
          

that was good....and fast....
I modified the code to be:
class Reader extends Thread
   Calculator c;
   public Reader(Calculator calc)
      c = calc;
   public void run()
      synchronized(c)
         try
            System.out.println("Waiting for calculation...");
            c.wait();
            System.out.println("I am just after the wait()");
         catch(InterruptedException e) {}
         System.out.println("Total is: " + c.total);
   public static void main(String[] args)
      Calculator calculator = new Calculator();
      calculator.start();
      new Reader(calculator).start();
      new Reader(calculator).start();
      new Reader(calculator).start();
class Calculator extends Thread
   int total;
   public void run()
      synchronized(this)
         try
            for(int i=0; i<100; i++)
               total += 1;
               Thread.sleep(50);
            notifyAll();
         catch(InterruptedException e)
            e.printStackTrace();
}and it worked just fine....thanks much

Similar Messages

  • WAR cookie example not working. Please help!

    Hi,
              The cookie example worked fine if I put everything unpackaged under the
              public_html/cookie directory. However, when I jarred this directory as
              cookie.war and registered it with WLS, I got this exception when trying
              to access CookieCounter servlet.
              javax.servlet.ServletException: Servlet class: servlets.CookieCounter
              could not
              be loaded - the requested class wasn't found in the classpath
              Also, I was able to get to the hello.html page (my welcome-file) when I
              put in this request
              http://127.0.0.1:7001/cookie
              That means the server was able to extract the cookie.war file and parse
              web.xml correctly.
              The structure of my cookie.war file is exactly the same as the cookie
              directory's.
              This is what my cookie.war file looks like
              error.jsp
              WEB-INF/classes/servlets/CookieCounter.class
              WEB-INF/classes/CookieCounter.class
              WEB-INF/CookieCounter.java
              WEB-INF/web.xml
              images/cookie.jpg
              hello.html
              This is the entry in weblogic.properties
              weblogic.httpd.webApp.cookie=c:/weblogic/myserver/public_html/cookie.war
              my web.xml is
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
              1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <!--
              <context-param>
              <param-name>weblogic.servlet.reloadCheckSecs</param-name>
              <param-value>0</param-value>
              </context-param>
              -->
              <servlet>
              <servlet-name>CookieCounter</servlet-name>
              <servlet-class>servlets.CookieCounter</servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>CookieCounter</servlet-name>
              <url-pattern>monster</url-pattern>
              </servlet-mapping>
              <welcome-file-list>
              <welcome-file>hello.html</welcome-file>
              </welcome-file-list>
              <error-page>
              <error-code>404</error-code>
              <location>/error.jsp</location>
              </error-page>
              </web-app>
              The problem seems to be that weblogic was able to find
              CookieCounter.class under the unpackaged cookie directory but not inside
              cookie.war
              Please help.
              Thanks a lot.
              By the way, if you have a war file that works, please send it to me at
              [email protected]
              I would greatly appreciate it.
              

    Try resetting it:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    Next try restoring via itunes.

  • JSF Getting Started Example not Working

    I've installed and configured JSF according to CoreJSF 1st Chapter example "A simple JSF Application" (available at http://horstmann.com/corejsf/). The only different thing i've done is to put the jsp pages in a separate folder within the root web application folder. The JSF seems to be properly configured, since i'm able to see the UI components in the login page. However, once I click login button, the application takes me once more to the login page (same page that put the request). I figure it is a problem with the navigation file, I've changed the faces-config.xml including "jsf/welcome.jsp" as target since "jsf" is the separate directory I created for JSP files. I does not work (not getting exceptions though). Any prompt help will be highly appreciated.
    These are the files:
    webapproot/jsf/index.jsp
    <html>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <head>
    <title>A Simple Java Server Faces Application</title>
    </head>
    <body>
    <h:form>
    <h3>Please enter your name and password.</h3>
    <table>
    <tr>
    <td>Name:</td>
    <td>
    <h:inputText value="#{user.name}"/>
    </td>
    </tr>
    <tr>
    <td>Password:</td>
    <td>
    <h:inputSecret value="#{user.password}"/>
    </td>
    </tr>
    </table>
    <p>
    <h:commandButton value="Login" action="login"/>
    </p>
    </h:form>
    </body>
    </f:view>
    </html>
    webapproot/jsf/welcome.jsp
    <html>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <f:view>
    <head>
    <title>A Simple Java Server Faces Application</title>
    </head>
    <body>
    <h:form>
    <h3>
    Welcome to Java Server Faces,
    <h:outputText value="#{user.name}"/>!
    </h3>
    </h:form>
    </body>
    </f:view>
    </html>
    webapproot/WEB-INF/faces-config.xml
    <faces-config>
         <navigation-rule>
         <from-view-id>jsf/index.jsp</from-view-id>
         <navigation-case>
         <from-outcome>login</from-outcome>
         <to-view-id>jsf/welcome.jsp</to-view-id>
         </navigation-case>
         </navigation-rule>
         <managed-bean>
         <managed-bean-name>user</managed-bean-name>
         <managed-bean-class>co.edu.unal.dnic.licapa.capa.UserBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>
    webapproot/WEB-INF/web.xml
    <web-app>
         <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.faces</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
         <welcome-file>/index.html</welcome-file>
         </welcome-file-list>
         <display-name>DNIC - Capacitaci�n 1.0.1</display-name>
         <description>
         DNIC - Capacitaci�n 1.0.1
    </description>
    </web-app>
    Since I'm not getting any java exceptions I figure the UserBean class is working properly.
    Thank you......
    Julian

    try to put / at the beginning of the from-view-id and to-view-id

  • Hans Javaserver 3 book example not working

    Hello,
    This is from Hans Javaserver Pages Third edition
    <%-- Verify that the user is logged in --%>
    <c:if test="${validUser == null}">
    <jsp:forward page="login.jsp">
    <jsp:param name="origURL" value="${pageContext.request.requestURL}" />
    <jsp:param name="errorMsg" value="log in first." />
    </jsp:forward>
    </c:if>
    The above example does not seem to work.
    The code below seems to work
    <%-- Verify that the user is logged in --%>
    <c:if test="${validUser.name == null}">
    <jsp:forward page="login.jsp">
    <jsp:param name="origURL" value="${pageContext.request.requestURL}" />
    <jsp:param name="errorMsg" value="log in first." />
    </jsp:forward>
    </c:if>
    Any ideas why his example is not working on Tomcat 5.0?
    Thanks
    Frank

    Hi I was trying the same thing and was wondering why it doesn't accept the origURL, well it never takes the value of it at all and just skips the page that was requested and goes to mail.jsp no matter what.
    <c:choose>
    <c:when test="${! empty param.origURL}" >
    <c:redirect url="${param.origURL}" />
    </c:when>
    <c:otherwise>
    <c:redirect url="main.jsp" />
    </c:otherwise>
    </c:choose>
    The value of origURL is never passed to this authentication page! I would also like to know the reason why?
    Also I have a question to your last piece of code that works: where is the name parameter taken from? Is it the same as userName that is passed as a parameter from the login page? or is it something else? I'd really appreciate your help...
    <c:if test="${validUser.name == null}">

  • SISO OFDM TDD Example not working

    I was trying to use SISO OFDM example.
    But to surprise Its not working in both the two cases:-
    1. Loopback over air (.GVI gives no error but VLC is not receiving ant stream)
    2 No loopback : An error is returned on turning on the Base station:-
    The mobile station parameters are as in below figure:
    Can somen one explain the source of inusoid wave? I am surprised at it!
     

    Have you ever get the SISO OFDM TDD Example work with two device?
    Currently, I am doing the SISO OFDM TDD Example like your work with two USRP-RIO 2953R. I can do streaming within one USRP-RIO with loop back selection in the example, but when it comes to two USRP-RIO streaming, one is base station and the other is UE,  but the demo seems to be not working.

  • Core/examples/sessions/Broker example not working

    Guys
    I am trying the example with Oracle database instead of the HSQL database. I replaced the driver & url strings and put the classes12.jar in the classpath
    But I continue to get the following error. Can someone please tell me what I am missing.
    D:\toplink\examples\core\examples\sessions\broker>D:\JDev9i\jdk\bin\java.exe -classpath ""D:\JDev9i\jdk\lib\tools.jar";"d:\to
    plink\ant\lib\jaxp.jar";"d:\toplink\ant\lib\jakarta-ant-1.4.1-optional.jar";"d:\toplink\ant\lib\crimson.jar";"d:\toplink\ant\
    lib\ant.jar";.;d:\toplink\core\lib\toplink.jar;D:\JDev9i\jdbc\lib\classes12.jar;d:\toplink\core\lib\toplink.
    jar;D:\JDev9i\jdbc\lib\classes12.jar" -Dant.home=d:\toplink\ant -Dtl.home=d:\toplink -Dwls61.home= -Dwls70.home= -Dwas.home=
    -Doracle.home=D:\JDev9i\OC4J903 -Dexamples.home=d:\toplink\examples -Dtoplink.dir=d:\toplink\core\lib -Dtoplink.library=topli
    nk.jar,xerces.jar -Dtoplink.weblogic.path=d:\toplink\wls_cmp\lib\tl_wlsx.jar -Dtoplink.was.path=d:\toplink\was_cmp\lib\tl_wa
    sx.jar -Dhsql.path=d:\toplink\HSQL\lib\hsqldb.jar -DDEBUG=on org.apache.tools.ant.Main runExample -DtestClass=examples.sessions.broker.Demo
    Buildfile: build.xml
    init:
    verify.build.done:
    runExample:
    [java] 2003.05.19 03:54:35.625--DatabaseSession(11)--Thread[main,5,main]--Connection(12)--TopLink, version:TopLink - 9.0
    .3 (Build 423)
    [java] 2003.05.19 03:54:35.685--DatabaseSession(11)--Thread[main,5,main]--Connection(12)--connecting(DatabaseLogin(
    [java] platform => OraclePlatform
    [java] user name => "asdfbf"
    [java] datasource URL => "jdbc:oracle:thin:@localhost:fims"
    [java] ))
    [java] 2003.05.19 03:54:35.705--DatabaseSession(11)--Thread[main,5,main]--EXCEPTION [TOPLINK-4003] (TopLink - 9.0.3 (Bui
    ld 423)): oracle.toplink.exceptions.DatabaseException
    [java] EXCEPTION DESCRIPTION: Configuration error. Class [oracle.jdbc.driver.OracleDriver] not found.LOCAL EXCEPTION ST
    ACK:

    One more thing to add:
    I am not able to get any of the examples to work with Oracle database. Again the only thing I suppose I need to change are the folloowing lines in the EmployeeProject.java
         login.usePlatform(new oracle.toplink.internal.databaseaccess.OraclePlatform());
         login.setDriverClassName("oracle.jdbc.driver.OracleDriver");
         login.setConnectionString("jdbc:oracle:thin:@localhost:1522:fims");
         login.setUserName("kumarv");
         login.setEncryptedPassword("7AD96CD575D1A7FCAA504BA7E4FC");
    Also one line change in the sessions.xml file to use the OraclePlatform instead of the HSQLPlatform.
    Has any one got these to work with Oracle, Any help is really appreciated.
    classes12.jar is in the classpath so I don;t understand why I get the execption that:
    [java] EXCEPTION DESCRIPTION: Configuration error. Class [oracle.jdbc.driver.OracleDriver] not found.
    [java] oracle.toplink.exceptions.DatabaseException oracle.toplink.exceptions.DatabaseException.configurationErrorCla
    ssNotFound(java.lang.String)
    Thanks

  • VideoPhoneLabs example not working

    Dear dev-team, could you also give more information about why
    the example-application (VideoPhoneLabs.swf) does not work, when I
    upload all the assets (not reg.cgi, while I want to use the
    Stratus-service) to a server (
    http://work.joeyvandijk.nl/stratus/VideoPhoneLabs.html).
    I am connected to the Stratus-webservice, but I get an
    idManagerError but does not know how I can solve this.
    I think it has to do with my id, but when I login to
    adobe.com and try to retrieve an ID I get the same which I am using
    at above example. So, I think my ID is not blocked or something.
    And I know that the Stratus-webservice is not down while your
    online version of the VideoPhoneLabs is working.
    I see in my error:
    Error #2048: Schending van beveiligingssandbox:
    http://work.joeyvandijk.nl/stratus/VideoPhoneLabs.swf
    kan geen gegevens laden van
    rtmfp://stratus.adobe.com/bc25bb58c9cf187e4178b40e-c16df88ec798/?identity=80b46c214f4c830 f28186fa40febc0a4a8c323393958ea99a0075b228d870e50&username=joeyvandijk
    which says that it cannot load data from the Stratus-service
    due to a SecurityError.
    So, I cannot run it locally OR on a webserver. Do you have
    some tips what could be the cause?
    Thnx in advance!
    :D

    Hi,
    I am trying the VideoPhoneLabs app, but still do not work.
    Please give some advices.
    I have done the procedure according to ReadMe.txt, then
    reg.cgi copied into my local web server. After that i got some
    error message as following when i accessed to it from another pc.
    [In the debugger window of FP10]
    TypeError: Error #1009: null <ono: sorry for japanese, i
    deleted them>
    at VideoPhoneLabs/onDisconnect()[C:\Users\ono\Documents\Flex
    Builder 3\VideoPhoneLabs\src\VideoPhoneLabs.mxml:548]
    at
    VideoPhoneLabs/idManagerEvent()[C:\Users\ono\Documents\Flex Builder
    3\VideoPhoneLabs\src\VideoPhoneLabs.mxml:484]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at HttpIdManager/httpFault()[C:\Users\ono\Documents\Flex
    Builder 3\VideoPhoneLabs\src\HttpIdManager.as:120]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170
    at mx.rpc.http::HTTPService/
    http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\http\HTTPService.as:852
    at mx.rpc::AbstractInvoker/
    http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:188
    at
    mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
    at
    mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
    at
    DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    [In the apps STATUS window]
    Connecting to rtmfp://stratus.adobe.com
    NetConnection event: NetConnection.Connect.Success
    Connected, my ID:
    c0e8c83410b0dbf0b66644b8e2418abb67a0d3a31ba42d55af961c140db0bf70
    ID event: idManagerError
    Error description: HTTP error:
    (mx.messaging.messages::AcknowledgeMessage)#0
    body = "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2
    Final//EN">
    <html>
    <head>
    <title>Index of /VideoPhoneLabs</title>
    </head>
    <body>
    <h1>Index of /VideoPhoneLabs</h1>
    <table><tr><th><img
    src="/icons/blank.gif" alt="[ICO]"></th><th><a
    href="?C=N;O=D">Name</a></th><th><a
    href="?C=M;O=A">Last
    modified</a></th><th><a
    href="?C=S;O=A">Size</a></th><th><a
    href="?C=D;O=A">Description</a></th></tr><tr><th
    colspan="5"><hr></th></tr>
    <tr><td valign="top"><img
    src="/icons/back.gif" alt="[DIR]"></td><td><a
    href="/">Parent
    Directory</a></td><td> </td><td
    align="right"> - </td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="AC_OETags.js">AC_OETags.js</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">8.4K</td></tr>
    <tr><td valign="top"><img
    src="/icons/text.gif" alt="[TXT]"></td><td><a
    href="VideoPhoneLabs.html">VideoPhoneLabs.html</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">4.2K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="VideoPhoneLabs.swf">VideoPhoneLabs.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">735K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="playerProductInstall.swf">playerProductInstall.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">657 </td></tr>
    <tr><th
    colspan="5"><hr></th></tr>
    </table>
    <address>Apache/2.2.9 (Fedora) Server at 192.168.1.101
    Port 80</address>
    </body></html>
    clientId = "DirectHTTPChannel0"
    correlationId = "D8807C92-CB35-13AA-386C-3B10784B610C"
    destination = ""
    headers = (Object)#1
    DSStatusCode = 200
    messageId = "C3AF012E-AC2B-464D-C982-3B1078DAB158"
    timestamp = 0
    timeToLive = 0
    Disconnecting.
    Hanging up call
    NetConnection event: NetConnection.Connect.Closed
    ID event: idManagerError
    Error description: HTTP error:
    (mx.messaging.messages::AcknowledgeMessage)#0
    body = "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2
    Final//EN">
    <html>
    <head>
    <title>Index of /VideoPhoneLabs</title>
    </head>
    <body>
    <h1>Index of /VideoPhoneLabs</h1>
    <table><tr><th><img
    src="/icons/blank.gif" alt="[ICO]"></th><th><a
    href="?C=N;O=D">Name</a></th><th><a
    href="?C=M;O=A">Last
    modified</a></th><th><a
    href="?C=S;O=A">Size</a></th><th><a
    href="?C=D;O=A">Description</a></th></tr><tr><th
    colspan="5"><hr></th></tr>
    <tr><td valign="top"><img
    src="/icons/back.gif" alt="[DIR]"></td><td><a
    href="/">Parent
    Directory</a></td><td> </td><td
    align="right"> - </td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="AC_OETags.js">AC_OETags.js</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">8.4K</td></tr>
    <tr><td valign="top"><img
    src="/icons/text.gif" alt="[TXT]"></td><td><a
    href="VideoPhoneLabs.html">VideoPhoneLabs.html</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">4.2K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="VideoPhoneLabs.swf">VideoPhoneLabs.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">735K</td></tr>
    <tr><td valign="top"><img
    src="/icons/unknown.gif" alt="[ ]"></td><td><a
    href="playerProductInstall.swf">playerProductInstall.swf</a></td><td
    align="right">24-Mar-2009 17:35 </td><td
    align="right">657 </td></tr>
    <tr><th
    colspan="5"><hr></th></tr>
    </table>
    <address>Apache/2.2.9 (Fedora) Server at 192.168.1.101
    Port 80</address>
    </body></html>
    clientId = "DirectHTTPChannel0"
    correlationId = "7863A499-3906-0CC3-1AED-3B1078EAAFFE"
    destination = ""
    headers = (Object)#1
    DSStatusCode = 200
    messageId = "716811AE-4A81-3468-4DAA-3B107945F936"
    timestamp = 0
    timeToLive = 0
    Disconnecting.
    Hanging up call
    Thank you for any advices.
    Ono Keiji

  • NotifyAll example not working

    Folks,
    I am trying to understand how threading works, and got this example from a book, can you please help me understand why it is not working.
    class Reader extends Thread
       Calculator c;
       public Reader(Calculator calc)
          c = calc;
       public void run()
          synchronized(c)
             try
                System.out.println("Waiting for calculation...");
                c.wait();
                System.out.println("I am just after the wait()");
             catch(InterruptedException e) {}
             System.out.println("Total is: " + c.total);
       public static void main(String[] args)
          Calculator calculator = new Calculator();
          calculator.start();
          new Reader(calculator).start();
          new Reader(calculator).start();
          new Reader(calculator).start();
    class Calculator extends Thread
       int total;
       public void run()
          synchronized(this)
             for(int i=0; i<100; i++)
                total += 1;
             notifyAll();
    }When running it:
    D:\Test>java Reader
    Waiting for calculation...
    Waiting for calculation...
    Waiting for calculation...
    --> it never returns......

    that was good....and fast....
    I modified the code to be:
    class Reader extends Thread
       Calculator c;
       public Reader(Calculator calc)
          c = calc;
       public void run()
          synchronized(c)
             try
                System.out.println("Waiting for calculation...");
                c.wait();
                System.out.println("I am just after the wait()");
             catch(InterruptedException e) {}
             System.out.println("Total is: " + c.total);
       public static void main(String[] args)
          Calculator calculator = new Calculator();
          calculator.start();
          new Reader(calculator).start();
          new Reader(calculator).start();
          new Reader(calculator).start();
    class Calculator extends Thread
       int total;
       public void run()
          synchronized(this)
             try
                for(int i=0; i<100; i++)
                   total += 1;
                   Thread.sleep(50);
                notifyAll();
             catch(InterruptedException e)
                e.printStackTrace();
    }and it worked just fine....thanks much

  • Hello World XML/XSL example not working in IE

    I am trying to get the "Hello World" XML/XSL example to work in IE.
    Could anyone help me out?
    The code follows:
    hello.xml
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="hello.xsl"?>
    <hello-world>
    <greeter>An XSLT Programmer</greeter>
    <greeting>Hello, World!</greeting>
    </hello-world>
    hello.xsl
    <?xml version="1.0"?>
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:template match="/hello-world">
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <H1><xsl:value-of select="greeting"/></H1>
    <xsl:apply-templates select="greeter"/>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match="greeter">
    <DIV>from
    <I><xsl:value-of select="."/></I>
    </DIV>
    </xsl:template>
    </xsl:stylesheet>
    Both files are in the same directory.
    When hello.xml is opened in IE, the output displayed is just, "from".
    What's wrong, and where?
    Please help!
    - Edwin.

    Hi edwinwaz,
    In response to your question, pls refer to this url
    http://www.w3schools.com/xsl/el_template.asp
    and take a look at the "note" in red.
    It says that IE5.X have non-standard behavior on the element <xsl:template>
    In addition, I have tested your code it works fine.
    Just to add something on your code here.
    I noticed that you do this
    <xsl:apply-templates select="greeter"/>
    and then in another template you do this
    <xsl:template match="greeter">
    <!-- code -->
    </xsl:template>
    In this case, it does work because "greeter" is a top-level element but if "greeter" is anything underneath the top-level element. It won't work.
    Actually, I discovered this after taking a look at your example and
    I was surprised that the code above worked and then I did some testing and discovered this.
    I am learning XML too now... So, I am happy to know this :).
    regards

  • SQL*LOADER example not working for REF

    I was working on the Oracle bulk load scripts using SQL*LOADER utility .
    I have encountered an error while using the REF column option to resolve the parent-child referential integrity .
    The example given in the URL http://www.csee.umbc.edu/help/oracle8/server.815/a67792/ch05.htm Example 5-9 Loading Primary Key REF Columns
    does not work . and generates errors : 'SQL*Loader-418: Bad datafile datatype for column DEPT_MGR'
    example :
    Control File
    LOAD DATA
    INFILE `sample.dat'
    INTO TABLE departments_alt
    FIELDS TERMINATED BY `,' OPTIONALLY ENCLOSED BY `"'
    (dept_no CHAR(5),
    dept_name CHAR(30),
    dept_mgr REF(CONSTANT `EMPLOYEES', emp_id),
    emp_id FILLER CHAR(32))
    Data file (sample.dat)
    22345, QuestWorld, 007,
    23423, Geography, 000,
    Could you please suggest any solutions for this ?

    Some of the quotes are wrong
    Try the sample from the 10.2 documentation
    LOAD DATA
    INFILE 'sample.dat'
    INTO TABLE departments_alt
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (dept_no       CHAR(5),
    dept_name      CHAR(30),
    dept_mgr       REF(CONSTANT 'EMPLOYEES', emp_id),
    emp_id         FILLER CHAR(32))

  • AVI Compressor Comparison Example not working with Flame.avi

    Hello,
    I downloaded the NI Vision module for a trial to see what it could do. I will be owrking with black and white files (AVI or other) so I tried the "AVI Compressor Comparison Example.vi" along with the "Flame.avi" from "C:\Program Files\National Instruments\Vision\Examples\Images\AVIs". Basically, the example decompresses "Flame.avi" and then compresses the same file using all of the installed codecs.
    When I run the example and then try to play the avi files, all of them are blank (black) and reflect a much shorter playing time than the 16.6 seconds of the original (before decompression) avi which I can play on VLC and QuickTime but not Windows Media Player. When I look at the original video properties in LV, the file format is RGB even
    though it is B&W. When I look at the video properties in VLC or
    QuickTime, it shows it as Motion JPEG OpenDML, 200 x 340 with millions of colors.
    All of the other avi files in the example folder work fine.  Does anyone have any ideas of what might be going on? Thanks.
    Michael Froehlich
    I am running LabVIEW 8.5 on a Windows 32 bit XP Service Pack 2 PC.  I have DirectX 9.0c installed.

    Hey Michael,
    I am a little confused by your post. However, first things first. You can have an image that is of RGB type and it still appear B&W.  So, that Flame.avi file, though it appears B&W, is actually a color picture. Instead of a single numeric value to represent a grey level, there are three numeric values (RGB) that combine to represent a grey level. Possible reasons for this I am not quite sure. It could be to give a larger avi file to better test the different codecs.  In terms of playing the avi files again. This depends on the codecs being used and whether or not the tool you are using to play them supports that particular codec. You had mentioned that the other avi's work fine, particularly, which avi files are you referring to? 
    Also, if you manually read in the Flame.avi and then write it again using a codec to compress your avi do you see the same problems introduced by the AVI compressor Comparison Example?
    Hope this helps.
    -Ben
    WaterlooLabs

  • HelloWorld Example Not Working

    Hi,
    I am using JCDK 2.2.2.
    Converter and scriptgen run without errors from C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples (which is the existing samples directory):
    converter -classdir "C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples\classes" -exportpath "C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\api_export_files\;C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples\classes\com\sun\javacard\samples\HelloWorld\javacard" -applet  0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.sun.javacard.samples.HelloWorld.HelloWorld com.sun.javacard.samples.HelloWorld 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
    scriptgen -o HelloWorld.scr ./classes/com/sun/javacard/samples/HelloWorld/javacard/HelloWorld.capI run cref from C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\bin:
    cref.exe -o HelloWorld.eepromAnd then in another command prompt from C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\bin:
    apdutool C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples\HelloWorld.scrThe app installs fine. So now I want to test the code. I added a line to the script at the end to selecct the application:
    // Select HelloWorld
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x1 0x7F;Which is not working (6d00 error)
    Any suggestions why this could be happening? Nothing throws errors except the line to select the app. It can't be a problem with the code, because I am running the sample files that came with the JCDK.
    P.S. I tried 'creating Helloworld' using the line
    0x80 0xB8 0x00 0x00 0x0b 0x09 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x1 0x00 0x7F;But this gave a 6443 error.
    Edited by: Candice on Jul 11, 2011 2:14 AM

    P.S. I tried 'creating Helloworld' using the line
    0x80 0xB8 0x00 0x00 0x0b 0x09 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x1 0x00 0x7F;But this gave a 6443 error.Applet not found for installation.
    • Cause: An attempt was made to create an applet instance, but the applet code was not installed on the card.
    • Solution: Verify that the applet package has been downloaded to the card.
    Remeber that after the first time you launch cref, you need to tell it where to load the EEPROM file from the last run with -i <file>. You can use the same file for -i and -o to be able to reuse the mask and store new state.
    Cheers,
    Shane

  • JSP examples not working

    I've recently installed 9iAS release 2 on a windows 2000 machine. It all seems to be working, except for the JSP examples. When I try the standard sun JSPs, I get the following type of message:
    java.io.FileNotFoundException: d:\midtier\apache\apache\htdocs\j2ee\examples\jsp\colors\colrs.jsp (The system cannot find the path specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.(FileInputStream.java:64)
         at oracle.jsp.provider.JspFilesystemResource.fromStream(JspFilesystemResource.java:153)
         at oracle.jsp.provider.JspFilesystemResource.fromReader(JspFilesystemResource.java:169)
         at oracle.jsp.app.JspAppLoader.fromReader(JspAppLoader.java:2013)
         at oracle.jsp.app.JspAppLoader.reloadPage(JspAppLoader.java:1246)
         at oracle.jsp.app.JspAppLoader.loadPage(JspAppLoader.java:1141)
         at oracle.jsp.app.JspAppLoader.getPage(JspAppLoader.java:797)
         at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:368)
         at oracle.jsp.JspServlet.doDispatch(JspServlet.java:265)
         at oracle.jsp.JspServlet.internalService(JspServlet.java:184)
         at oracle.jsp.JspServlet.service(JspServlet.java:154)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:500)
         at org.apache.jserv.JServConnection.run(JServConnection.java:321)
         at java.lang.Thread.run(Thread.java:484)
    Anyone have any idea why this is occurring? Does it have anything to do with installing the November PDK for Portal and uncommenting the line in httpd.conf about jserv.conf?
    Carey

    Yes, you are right. By default, Apache JServ is disabled in ORacle 9iAS Release 2 installation. but since you uncommented the two lines, now jserv is active and will try to serve all JSP request intead of the defualt OC4J. Comment the two line again. (please use the EM to do this and do not comment the lines using a text editor.)
    You may require to restart.
    Shyam Ellur

  • Java Applet HelloWorld "Getting Started With Applets" example not working

    Hi there,
    It's been ages since I ran my Linux CentOS boot of Linux but I am going through the official oracle java applet tutorials, just every time I try and run the "Hello World" applet in Firefox 17.0.3 and I am running the Iced Tea thing for java applets.
    Every time I try and run the example from the following code:
    import javax.swing.JApplet;
    import javax.swing.SwingUtilities;
    import javax.swing.JLabel;
    public class HelloWorld extends JApplet
      // called when the user enters the html page:
      public void init() // keep apps within the init() function very small as per the http://docs.oracle.com/javase/tutorial/deployment/applet/appletMethods.html
        try{
          SwingUtilities.invokeAndWait(new Runnable()
            public void run()
           JLabel myLabel = new JLabel("Hello World");
           add(myLabel);
            } // end running the application
          }); //end of swing invokeand wait
        } catch (Exception error){ // end user running the app in page
           // System.err.println("GUI didn't work on initial run");
    }It keeps bringing up the error "Start: Applet not initialized" I did google that basic error and from what I found I should consult the JavaConsole, I know the console was removed from the Firefox menu quite a while ago. So went to find a way of loading it using the IcedTea one but it keeps bringing up a load of errors in even trying to run that.
    Is there anyway of sorting this out? I mean I have even tried installing the one on the oracle website, the plain JDK but nothing seems to work.
    Is there anyone that can help me get applets working? I was even going to go as far as to reinstall my distro but I want to avoid that as much as possible.
    Thanks and I look forward to any replies,
    Jeremy.

    in the Getting Started with Java DB tutorial they
    tell u how to set ur "DERBY_HOME" (what is that?).
    once i press enter after typing this command:
    set DERBY_HOME=D:\Java\Java
    Phonebook\javadb in my command prompt do i get
    any message or does it just go to the next line?type env or set or whatever in the command line to see what your environment variables are set to
    they also tell u how to set ur "JAVA_HOME" (what is
    that?). The Java installation you want to use
    in their example they give u this: set
    JAVA_HOME=C:\Program Files\Java\j2se1.4.2_05but in my java folder i have jdk1.6.0 and jre1.6.0
    but no j2se1.4.2_05, so which 1 must i choose?It's up to you. I'd go with 1.6
    also once ive done this: set
    DERBY_HOME=D:\Java\Java Phonebook\javadb this
    set JAVA_HOME=D:\Program
    Files\Java\jre1.6.0 and this set
    PATH=%DERBY_HOME%\bin;%PATH% and then type
    sysinfo to verify that the variables were set
    correctly i get these errors: 'D:\Java\Java' is
    not recognized as an internal or external command,
    operable program or batch file and '""'
    is not recognized as an internal or external command,
    operable program or batch file any help would
    really be appreciated because this is really killing
    me!you need to set your path variable - so something like:
    set PATH=C:\Program Files\Java\j2se1.4.2_05\bin

  • Processing Pattern Example not working?

    I am trying to run the Processing Pattern example for the first time. I'm using the .cmd files provided with the example.
    The server starts up without error and its logs show loading some Processing Pattern TaskProcessor classes:
    2010-09-28 14:30:47.616/4.839 Oracle Coherence GE 3.5.2/463 <Info> (thread=Thread-4, member=1): Starting dispatcher Task Dispatcher Class:com.oracle.coherence.patterns.processing.dispatchers.AbstractDispatcher
    2010-09-28 14:30:47.632/4.855 Oracle Coherence GE 3.5.2/463 <Info> (thread=SimpleEventDispatcher:Thread-2, member=1): DefaultTask Processor Definition Manager starting Class:com.oracle.coherence.patterns.processing.internal.task.DefaultTaskProcessorDefinitionManager
    2010-09-28 14:30:47.632/4.855 Oracle Coherence GE 3.5.2/463 <Info> (thread=Thread-4, member=1): Starting dispatcher Local Dispatcher Class:com.oracle.coherence.patterns.processing.dispatchers.AbstractDispatcher
    2010-09-28 14:30:47.632/4.855 Oracle Coherence GE 3.5.2/463 <Info> (thread=ReplicatedCache:ReplicatedServiceForProcessingPattern:EventDispatcher, member=1): Registering TaskProcessorDefinition TPD:{Identifier{GridTaskProcessor},Grid Task Processor,GRID} Class:com.oracle.coherence.patterns.processing.dispatchers.task.DefaultTaskDispatcher$1
    2010-09-28 14:30:47.663/4.886 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedServiceForProcessingPattern:EventDispatcher, member=1): TaskProcessorMediator inserted TPSK:{Identifier{GridTaskProcessor},1} Class:com.oracle.coherence.patterns.processing.dispatchers.task.DefaultTaskDispatcher$2
    2010-09-28 14:30:47.663/4.886 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedServiceForProcessingPattern:EventDispatcher, member=1): TaskProcessorMediator inserted TPSK:{Identifier{SingleTaskProcessor},0} Class:com.oracle.coherence.patterns.processing.dispatchers.task.DefaultTaskDispatcher$2
    2010-09-28 14:30:47.679/4.902 Oracle Coherence GE 3.5.2/463 <Info> (thread=ReplicatedCache:ReplicatedServiceForProcessingPattern:EventDispatcher, member=1): Registering TaskProcessorDefinition TPD:{Identifier{SingleTaskProcessor},Single Task Processor,SINGLE} Class:com.oracle.coherence.patterns.processing.dispatchers.task.DefaultTaskDispatcher$1
    However, when I attempt to run the example I'm getting a runtime error:
    "C:\Java\jdk1.5.0_14"\bin\java -Dtangosol.coherence.clusterport=COH_OPTSCLUSTER_PORT -Dtangosol.coherence.cacheconfig=coherence-processingpattern-cac
    he-config.xml -Dtangosol.pof.config=file:/C:\temp\coherence-incubator-examples-1.1.1.14471\resource\processingpattern\examples-pof-config.xml -Dtangos
    ol.coherence.log=C:\temp\coherence-incubator-examples-1.1.1.14471\bin\..\log\PiCalculationSample-9001.log -Dtangosol.coherence.cacheconfig=C:\temp\coh
    erence-incubator-examples-1.1.1.14471\resource\processingpattern\processing-cache-config.xml -Dtangosol.coherence.distributed.localstorage=false -cp C
    :\temp\coherence-incubator-examples-1.1.1.14471\bin\..\lib\coherence-common-1.6.1.14470.jar;C:\temp\coherence-incubator-examples-1.1.1.14471\bin\..\li
    b\coherence-commandpattern-2.6.1.14471.jar;C:\temp\coherence-incubator-examples-1.1.1.14471\bin\..\lib\coherence-functorpattern-1.3.1.14471.jar;C:\tem
    p\coherence-incubator-examples-1.1.1.14471\bin\..\lib\coherence-messagingpattern-2.6.1.14471.jar;C:\temp\coherence-incubator-examples-1.1.1.14471\bin\
    ..\lib\coherence-pushreplicationpattern-2.6.1.14471.jar;C:\temp\coherence-incubator-examples-1.1.1.14471\bin\..\lib\coherence-processingpattern-1.2.1.
    14471.jar;"C:\tools\Coherence-3.5.2"\lib\coherence.jar;C:\temp\coherence-incubator-examples-1.1.1.14471\bin\..\classes -Xms256m -Xmx256m com.oracle.c
    oherence.examples.incubator.processingpattern.task.PiCalculationSample
    Testing PI calculation
    Using the Incubator Extensible Environment for Coherence Cache Configuration
    Copyright (c) 2010, Oracle Corporation. All Rights Reserved.
    java.lang.RuntimeException: Storage is not configured
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissingStorage(DistributedCache.CDB:9
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.addMapListener(DistributedCache.CDB:59)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.addMapListener(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.addMapListener(SafeNamedCache.CDB:12)
    at com.tangosol.coherence.component.util.SafeNamedCache.addMapListener(SafeNamedCache.CDB:47)
    at com.oracle.coherence.patterns.processing.internal.DefaultProcessingSession.<init>(DefaultProcessingSession.java:218)
    at com.oracle.coherence.examples.incubator.processingpattern.task.PiCalculationSample.executeSample(PiCalculationSample.java:75)
    at com.oracle.coherence.examples.incubator.processingpattern.task.PiCalculationSample.main(PiCalculationSample.java:56)
    The server log shows an error also after I attempt to run the example:
    *2010-09-28 14:32:54.322/131.545 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedServiceForProcessingPattern, member=1): Service DistributedServiceForProcessingPattern joined the cluster with senior service member 1*
    *2010-09-28 14:32:57.740/134.963 Oracle Coherence GE 3.5.2/463 <Info> (thread=ClientLeaseCoordinator:Thread-5, member=1): Restarting NamedCache: coherence.patterns.processing.taskprocessormediator*
    *2010-09-28 14:32:58.614/135.837 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:06.232/143.455 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:13.850/151.073 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:21.452/158.675 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:29.054/166.277 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:36.656/173.879 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:44.258/181.481 Oracle Coherence GE 3.5.2/463 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.*
    *2010-09-28 14:33:51.766/188.989 Oracle Coherence GE 3.5.2/463 <Error> (thread=PacketListenerN, member=1): Stopping cluster due to unhandled exception: com.tangosol.net.messaging.ConnectionException: Unable to refresh sockets: [UnicastUdpSocket{State=STATE_OPEN, address:port=10.100.153.51:8088}, MulticastUdpSocket{State=STATE_OPEN, address:port=224.3.5.2:8087, InterfaceAddress=10.100.153.51, TimeToLive=4}, TcpSocketAccepter{State=STATE_OPEN, ServerSocket=10.100.153.51:8088}]; last failed socket: MulticastUdpSocket{State=STATE_OPEN, address:port=224.3.5.2:8087, InterfaceAddress=10.100.153.51, TimeToLive=4}*
    *     at com.tangosol.coherence.component.net.Cluster$SocketManager.refreshSockets(Cluster.CDB:91)*
    *     at com.tangosol.coherence.component.net.Cluster$SocketManager$MulticastUdpSocket.onInterruptedIOException(Cluster.CDB:9)*
    *     at com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:33)*
    *     at com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:4)*
    *     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:19)*
    *     at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)*
    *     at java.lang.Thread.run(Thread.java:595)*
    Caused by: java.net.SocketTimeoutException: Receive timed out
    *     at java.net.PlainDatagramSocketImpl.receive0(Native Method)*
    *     at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)*
    *     at java.net.DatagramSocket.receive(DatagramSocket.java:712)*
    *     at com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:20)*
    *     at com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:4)*
    *     at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:19)*
    *     at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)*
    *     at java.lang.Thread.run(Thread.java:595)*
    Has anyone had similar experiences? Any advice to help me understand and get this going would be appreciated.
    Thanks !!

    I have same problem.
    Midi trigger patern correctly. When trying idividual souds, it works but running sequencer do not trigger sound.
    HW MacBook Pro (model 2008)
    Soudcard: MOTU 828, M-Audio ozonic, internal speaker
    Midi: Korg nanoPad, Roland Fantom, m-audio Ozonic,
    I invesigate and i found out this:
    1)
    When open MainStage and automaticaly load Concert, pres midi key - no sound
    Then I close just concert not MainStage, open recent concert (same), press midi key - seq playing, soud works
    2)
    Switch of automatic loading last opened Concert, quit and start MainStage, open Concert manualy and no sound.
    Close concert, open again, soud works
    3)
    Switch automatic concert loading on, open MainStage - no sound
    Open preferences, audio / change buffer size, hit applay - sound works
    4)
    Setup previous buffer size, change routing to buffer
    Restart MainStage, no sound, change routing back to output - no sound
    Change audio driver to System Setting - sound works - system setting goes to same soundcard
    Restart MainStage - no sound
    Change system sound output to Internal Speaker - no sound
    Change system sound output to soundcard - sound works
    5)
    Preferences - change audio to System settings, switch off I/O Safety Buffer - below Buffer Size setting
    Restart Mainstage - SOUND WORKS
    Restart MainStage again - SOUD WORKS

Maybe you are looking for