Applet can get arbitrary objects as a param tag?

I wonder if I can get an ViewObject(which is in Info table ) as a value of value
attribute in applet tag. I mean an object in the infotable of jsp containing the
applet can be a value of value attribute in applet tag.
I have this question, since I should give a viewobject to applet when I push
submit button in jsp containing the applet.
Help! please~

Hi Sam,
Instead of point 1, can you try poin 2 to see.
1.
<jsp:include page="test2.jsp" flush="true">
     <jsp:param name="fname" value="FirstName"/>
     <jsp:param name="lname" value="LastName"/>
     <jsp:param name="age" value="11"/>     
</jsp:include>
2.
<jsp:include page="test2.jsp?fname=FirstName&lname=LastName&age=11" flush="true"/>
3. test2.jsp
<%=request.getParameter("fname")%>
<%=request.getParameter("lname")%>
<%=request.getParameter("age")%>
-- Paul

Similar Messages

  • Can an arbitrary object be marshalled with JAXB?

    Is it possible to marshall an arbitrary Java object with JAXB?
    I would think this is possible if
    (i) marshalling works on non-public fields
    (ii) xml can handle all Java primitive types, including byte[]
    And, it it is possible, how would you unmarshall it?
    bw

    I don't believe it is possible for JAXB to marshal and un-marshal an arbitrary object. Your object would need to implement the MarshallableObject. Usually with JAXB you wouldn't actually create the MarshallableObject yourself, you would just create it from your binding schema and DTD.

  • How can i get session object based on session id?

    I have tried searching in forum but i can't find any solution that i can get session object based on session id and i also would like to know how to check whether the session is still active? My company currently using weblogic 5.1. I really hope that some one or anyone can help. I am new in using Servlet. I hope that i can find some answer here. Thank you.

    I have a need to get a Session object from a session id, so I don't think that the above should be deprecated. Here is my use case:
    0. I am displaying files in a file list
    1. I am downloading files.
    2. I am downloading files through a Servlet
    3. I am displaying the files as images in an applet
    4. The applet is ImageJ, and it apparently uses a full URL to download the file.
    5. I use request.getRequestURL() in the applet .jsp to get the full URL (the hostname and port)
    6. My app server is OC4J and it's behind an apache server and is host aliased.
    7. Thus the hostname is different between my applet .jsp and the Servlet URLs
    8. Thus I have 2 different sessions
    9. Thus I need to pass the session id (or some other unique identifier).
    10. I could stored the unique identifier in the application object, but then I would need to clean it up
    11. I cannot pass the the full path to the image due to security problems (what if someone downloads my password file?)
    12. I would like this to work in a clustered environment
    13. I think that WebDAV would solve my problems, since I could pass a full URL of webDAV to ImageJ for download. However, I am unsure how the security of WebDAV would work with ImageJ/URLConnection. I will have to research this feature in ImageJ.

  • Getting ServeltContext object in different ways

    If we can get ServletContext object in our servlet using getServletContext() then what is the need for getting it using the ServletConfig object i.e by
    using config.getServletContext() where config refers to the ServletConfig object.
    Are these methods there just for convinience ?

    Just read the API documentation: http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/GenericServlet.html#getServletContext()

  • Can i get the content of a HTML tag?

    I would like knowing if it is possible,
    instead of getting all the document where the searched string is found,
    i can get only the content of a tag
    in other words, I have defined the following index:
    CTX_DDL.CREATE_SECTION_GROUP('htmlgroup', 'HTML_SECTION_GROUP');
    CTX_DDL.ADD_ZONE_SECTION('htmlgroup', 'titulo', 'TITLE');
    CREATE INDEX index_string ON table(field_to_indexing)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP htmlgroup');
    SELECT field FROM table WHERE CONTAINS('searching string' WITHIN titulo) > 0;
    The index works just fine and makes the searching correctly, but it returns back the whole document,
    and I wanted it to return just the content of the TITLE tag. I would like to know if this is possible.

    It is possible if you are using the XMLType operators available in 9i. A short article describe this approach http://otn.oracle.com/products/oracle9i/daily/nov30.html
    Now, if you are not using 9i you can still do it but at the application level. You need to get a "chunk" of the document and then perform
    substring searching to extract the content of the title tag.
    I would like knowing if it is possible,
    instead of getting all the document where the searched string is found,
    i can get only the content of a tag
    in other words, I have defined the following index:
    CTX_DDL.CREATE_SECTION_GROUP('htmlgroup', 'HTML_SECTION_GROUP');
    CTX_DDL.ADD_ZONE_SECTION('htmlgroup', 'titulo', 'TITLE');
    CREATE INDEX index_string ON table(field_to_indexing)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SECTION GROUP htmlgroup');
    SELECT field FROM table WHERE CONTAINS('searching string' WITHIN titulo) > 0;
    The index works just fine and makes the searching correctly, but it returns back the whole document,
    and I wanted it to return just the content of the TITLE tag. I would like to know if this is possible.

  • Is there inbuild Handler in weblogic using which i can get the MessageContext object

    HI,
    I need MessageContext object in my application but i dont want to use the Handler,As
    there is AxisEngine in axis soap engine,is there any similar implementation in
    weblogic.
    AxisEngine.getCurrentMessageContext() we can get the MessageContext what about
    in weblogic..any body any idea???
    Regards,
    Akhil Nagpal

    HI,
    yeah i had to make use of Handler to get the MessageContext object and play with
    that.
    Thanks & Regards
    Akhil Nagpal
    "manoj cheenath" <[email protected]> wrote:
    You can get to MessageContext from a handler. Check out an example of
    handler
    to see how you can get Message out of MessageContext.
    -manoj
    "Akhil Nagpal" <[email protected]> wrote in message
    news:[email protected]..
    HI manoj,
    Thanks for your reply.otherwise i thought that i wont get any morehelp
    on this
    forum :-) ...
    anyway its good that we will have such thing in next version,duringthe
    development
    i feel that more functioanlity should be in build in appserver. Likeone
    more
    thing i could not find out is how we can get the "message" object inweblogic
    like we can in axis using its MessageContext class's static method.if it
    is there
    can you please let me knwo about that.
    The other problem i had to make use of handler and my appl is workingas of
    now :-)
    Regards
    Akhil Nagpal
    "manoj cheenath" <[email protected]> wrote:
    You can not do this in WLS 7.0. The next major release (WLS 8.1) will
    fix
    this problem.
    -manoj
    "Akhil Nagpal" <[email protected]> wrote in message
    news:[email protected]..
    HI,
    I need MessageContext object in my application but i dont want
    to
    use
    the Handler,As
    there is AxisEngine in axis soap engine,is there any similarimplementation in
    weblogic.
    AxisEngine.getCurrentMessageContext() we can get the MessageContextwhat
    about
    in weblogic..any body any idea???
    Regards,
    Akhil Nagpal

  • How can I use applet to get the desktop image of client

    hi,I have a question to ask u.
    How can I use applet to get the desktop image of client? Now I develop a web application and want user in the client to get his current image of the screen.And then save as a picture of jpeg format ,then upload it to the server?
    I have done an application to get the screen image and do upload file to server in a servlet with the http protocal.

    Since the desktop image is on the client's local hard drive, you'll need to look at trusted applets first.

  • How can I get schema object in entityImpl class?

    Hi everybody,
    I want to get schema object name (name of DB table behind of entity) in my entityImpl class from ADF API. I tried this But I can't.
    please help me.
    with my best regards.

    try String s = this.getEntityDef().getSource();Timo

  • Re: Applet can't get an InitialContext in sp8 5.1

    Here's the latest on this issue...
    CASE_ID_NUM: 212375
    I had a talk with one of our engineer here, he said the patch that was given
    earlier, works for un secure protocols(http,t3). For secure protocols
    already two cases are field(CR42423,CR42598). I will let you know once i had
    feedback from engg team.
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    Well, we thought the patch on the service pack fixed things, and it sort of
    does, but not completely. I sent the following to BEA support a week and a
    half ago, but so far I've gotten no response on this. Anyone else encounter
    this?
    Please reopen case 212375. The patch provided (CR041497) fixes the initial
    problem we and others saw. However, the way the fix is implemented does not
    seem to be completely correct. When we try with other configurations, such
    as SSL, things don't completely work. Someone looked at a decompiled
    version of the patched Handler.class and it seems to be catching the
    exception as expected, but the catch is "outside" the code that still
    needs to be executed in order for everything to work as desired.
    We think that our prior workaround (reverting back to the version of the
    Handler.class that exists in the original 5.1 install and not using the one
    in sp8 or this patch) will continue to work for us, but that is not a
    solution that we should go to production with. Please correct the patch.
    "Joe Herbers" <[email protected]> wrote in message
    news:<[email protected]>...
    FYI: This was a weblogic bug (case 212375) in sp8 that is fixed by patch
    CR041497.
    "Sudheendra Galgali" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I have a simple applet that tries to create a context to the WL server. I am
    currently trying out WL 5.1, service pack 8 on Windows NT 4.0/service pack 5
    using JDK 1.3 and the 1.3.0.01 plugin on the client. I am attaching the
    applet source code and the weblogic.policy file with this post.
    When I try to create the context from the applet, I get the following
    exception. I have tried playing with the weblogic.policy file but to no
    avail. Can anybody help? The same code works when the server is run with WL
    4.5.1 or 4.5.2.
    java.lang.ExceptionInInitializerError: java.security.AccessControlException:
    access denied (java.util.PropertyPermission * read,write)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
    at java.lang.System.getProperties(Unknown Source)
    at weblogic.net.http.Handler.init(Handler.java:43)
    at
    weblogic.socket.JVMSocketHTTPClient.<clinit>(JVMSocketHTTPClient.java:26)
    at weblogic.socket.JVMSocketManager.create(JVMSocketManager.java:308)
    at
    weblogic.rjvm.ConnectionManager.findOrCreateSocket(ConnectionManager.java:93
    5)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:339)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:306)
    at
    weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:252)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:223)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:186)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:195)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:148)
    at
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
    ory.java:123)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at Applet1.getInitialContext(Applet1.java:80)
    at Applet1.init(Applet1.java:50)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Any help would be appreciated. Thanks in advance.

    A further update on this: this patch fixes https for applets in sp8/9.
    However, it doesn't work with proxy servers with https (which used to work -
    http with proxy servers does still work). We've reported this to BEA and
    they are investigating...
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    There is now also a patch for this that makes SSL work:
    cr042423_rel510sp81.jar Not sure if this patch works with sp9. The
    original problem is fixed in sp9, but I don't think the SSL part is.
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    Here's the latest on this issue...
    CASE_ID_NUM: 212375
    I had a talk with one of our engineer here, he said the patch that was given
    earlier, works for un secure protocols(http,t3). For secure protocols
    already two cases are field(CR42423,CR42598). I will let you know once i had
    feedback from engg team.
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    Well, we thought the patch on the service pack fixed things, and it sort of
    does, but not completely. I sent the following to BEA support a week and a
    half ago, but so far I've gotten no response on this. Anyone else encounter
    this?
    Please reopen case 212375. The patch provided (CR041497) fixes the initial
    problem we and others saw. However, the way the fix is implemented does not
    seem to be completely correct. When we try with other configurations, such
    as SSL, things don't completely work. Someone looked at a decompiled
    version of the patched Handler.class and it seems to be catching the
    exception as expected, but the catch is "outside" the code that still
    needs to be executed in order for everything to work as desired.
    We think that our prior workaround (reverting back to the version of the
    Handler.class that exists in the original 5.1 install and not using the one
    in sp8 or this patch) will continue to work for us, but that is not a
    solution that we should go to production with. Please correct the patch.
    "Joe Herbers" <[email protected]> wrote in message
    news:<[email protected]>...
    FYI: This was a weblogic bug (case 212375) in sp8 that is fixed by patch
    CR041497.
    "Sudheendra Galgali" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I have a simple applet that tries to create a context to the WL server. I am
    currently trying out WL 5.1, service pack 8 on Windows NT 4.0/service pack 5
    using JDK 1.3 and the 1.3.0.01 plugin on the client. I am attaching the
    applet source code and the weblogic.policy file with this post.
    When I try to create the context from the applet, I get the following
    exception. I have tried playing with the weblogic.policy file but to no
    avail. Can anybody help? The same code works when the server is run with WL
    4.5.1 or 4.5.2.
    java.lang.ExceptionInInitializerError: java.security.AccessControlException:
    access denied (java.util.PropertyPermission * read,write)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
    at java.lang.System.getProperties(Unknown Source)
    at weblogic.net.http.Handler.init(Handler.java:43)
    at
    weblogic.socket.JVMSocketHTTPClient.<clinit>(JVMSocketHTTPClient.java:26)
    at weblogic.socket.JVMSocketManager.create(JVMSocketManager.java:308)
    at
    weblogic.rjvm.ConnectionManager.findOrCreateSocket(ConnectionManager.java:93
    5)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:339)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:306)
    at
    weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:252)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:223)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:186)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:195)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:148)
    at
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
    ory.java:123)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at Applet1.getInitialContext(Applet1.java:80)
    at Applet1.init(Applet1.java:50)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Any help would be appreciated. Thanks in advance.

  • Applet can't get an InitialContext in sp8 5.1

    Well, we thought the patch on the service pack fixed things, and it sort of
    does, but not completely. I sent the following to BEA support a week and a
    half ago, but so far I've gotten no response on this. Anyone else encounter
    this?
    Please reopen case 212375. The patch provided (CR041497) fixes the initial
    problem we and others saw. However, the way the fix is implemented does not
    seem to be completely correct. When we try with other configurations, such
    as SSL, things don't completely work. Someone looked at a decompiled
    version of the patched Handler.class and it seems to be catching the
    exception as expected, but the catch is "outside" the code that still
    needs to be executed in order for everything to work as desired.
    We think that our prior workaround (reverting back to the version of the
    Handler.class that exists in the original 5.1 install and not using the one
    in sp8 or this patch) will continue to work for us, but that is not a
    solution that we should go to production with. Please correct the patch.
    "Joe Herbers" <[email protected]> wrote in message
    news:<[email protected]>...
    FYI: This was a weblogic bug (case 212375) in sp8 that is fixed by patch
    CR041497.
    "Sudheendra Galgali" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I have a simple applet that tries to create a context to the WL server. I am
    currently trying out WL 5.1, service pack 8 on Windows NT 4.0/service pack 5
    using JDK 1.3 and the 1.3.0.01 plugin on the client. I am attaching the
    applet source code and the weblogic.policy file with this post.
    When I try to create the context from the applet, I get the following
    exception. I have tried playing with the weblogic.policy file but to no
    avail. Can anybody help? The same code works when the server is run with WL
    4.5.1 or 4.5.2.
    java.lang.ExceptionInInitializerError: java.security.AccessControlException:
    access denied (java.util.PropertyPermission * read,write)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
    at java.lang.System.getProperties(Unknown Source)
    at weblogic.net.http.Handler.init(Handler.java:43)
    at
    weblogic.socket.JVMSocketHTTPClient.<clinit>(JVMSocketHTTPClient.java:26)
    at weblogic.socket.JVMSocketManager.create(JVMSocketManager.java:308)
    at
    weblogic.rjvm.ConnectionManager.findOrCreateSocket(ConnectionManager.java:93
    5)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:339)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:306)
    at
    weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:252)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:223)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:186)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:195)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:148)
    at
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
    ory.java:123)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at Applet1.getInitialContext(Applet1.java:80)
    at Applet1.init(Applet1.java:50)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Any help would be appreciated. Thanks in advance.

    Well, we thought the patch on the service pack fixed things, and it sort of
    does, but not completely. I sent the following to BEA support a week and a
    half ago, but so far I've gotten no response on this. Anyone else encounter
    this?
    Please reopen case 212375. The patch provided (CR041497) fixes the initial
    problem we and others saw. However, the way the fix is implemented does not
    seem to be completely correct. When we try with other configurations, such
    as SSL, things don't completely work. Someone looked at a decompiled
    version of the patched Handler.class and it seems to be catching the
    exception as expected, but the catch is "outside" the code that still
    needs to be executed in order for everything to work as desired.
    We think that our prior workaround (reverting back to the version of the
    Handler.class that exists in the original 5.1 install and not using the one
    in sp8 or this patch) will continue to work for us, but that is not a
    solution that we should go to production with. Please correct the patch.
    "Joe Herbers" <[email protected]> wrote in message
    news:<[email protected]>...
    FYI: This was a weblogic bug (case 212375) in sp8 that is fixed by patch
    CR041497.
    "Sudheendra Galgali" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I have a simple applet that tries to create a context to the WL server. I am
    currently trying out WL 5.1, service pack 8 on Windows NT 4.0/service pack 5
    using JDK 1.3 and the 1.3.0.01 plugin on the client. I am attaching the
    applet source code and the weblogic.policy file with this post.
    When I try to create the context from the applet, I get the following
    exception. I have tried playing with the weblogic.policy file but to no
    avail. Can anybody help? The same code works when the server is run with WL
    4.5.1 or 4.5.2.
    java.lang.ExceptionInInitializerError: java.security.AccessControlException:
    access denied (java.util.PropertyPermission * read,write)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
    at java.lang.System.getProperties(Unknown Source)
    at weblogic.net.http.Handler.init(Handler.java:43)
    at
    weblogic.socket.JVMSocketHTTPClient.<clinit>(JVMSocketHTTPClient.java:26)
    at weblogic.socket.JVMSocketManager.create(JVMSocketManager.java:308)
    at
    weblogic.rjvm.ConnectionManager.findOrCreateSocket(ConnectionManager.java:93
    5)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:339)
    at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:306)
    at
    weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:252)
    at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:223)
    at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:186)
    at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
    at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:195)
    at
    weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
    textFactoryDelegate.java:148)
    at
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
    ory.java:123)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at Applet1.getInitialContext(Applet1.java:80)
    at Applet1.init(Applet1.java:50)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Any help would be appreciated. Thanks in advance.

  • Why can't get the object "out" in this way?

    We use "PrintWriter out=response.getWriter()"to get a "out" object in Servlet and output text to webbrowser with it.But I think the PrintWriter is a class and Why can't I get the object "out" use this way:"PrintWriter out=new PrintWriter()"?I think the later is easier to understand.Anyone can help me?

    I check the Servlet API.The PrintWriter has a constructor with a abstract object Writer as it's parameter.I couldn't create the Writer object so I can't create the out object.Why it's constructor is protected by java?

  • Can a JPanel object replace an applet?

    I know that I can insert an applet in an HTML page, and JavaScript can communicate with the applet. However, is it possible to do the same whith a JPanel object?
    Excuse the basic question.

    A panel is a light weight component, meaning it needs a top level container to hold it. An applet or frame is a top level (heavy weight) component, meaning it is it's own container. An applet can be nothing more than a thin wrapper around a panel which holds all of the other components. That's actually a good way to design it, since it lets you switch from applet to frame relatively easily, etc.

  • I like to play cards on Yahoo. I can get into the program, but the room page, applet won't load.

    I can get into Yahoo, and the 'gin' site, but when I try to go to a room to play, the page won't load. It's just blank. I've tried all the things, like emptying cache, and it doesn't help.

    I suspect the software was originally designed for PPC based Macs and is simply not designed to run on 10.6.7. I would recommend contacting the manufacturer and asking the correct way to uninstall they're application.
    After uninstalling I would run Repair Disk Permissions in Disk Utility and if necessary do a SMC reset using the following instructions:
    SMC RESET
    • Shut down the computer.
    • Unplug the computer's power cord and all peripherals.
    • Press and hold the power button for 5 seconds.
    • Release the power button.
    • Attach the computers power cable.
    • Press the power button to turn on the computer.
    PRAM RESET
    • Shut down the computer.
    • Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    • Turn on the computer.
    • Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Roger

  • Does anyone know how to set policy file, so applet can connect other host?

    I have an signed applet, it may connect to other host.
    The applet should display a HTML pages, which may contains image tag points to a picture stored anywhere. I use a JTextPane to display this HTML page, but when it is loaded. a error occurs.
    java.lang.SecurityException
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkConnect(Unknown Source)
    at sun.awt.image.URLImageSource.checkSecurity(Unknown Source)
    at sun.awt.image.ImageRepresentation.imageComplete(Unknown Source)
    at sun.awt.image.InputStreamImageSource.errorConsumer(Unknown Source)
    at sun.awt.image.InputStreamImageSource.setDecoder(Unknown Source)
    at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source)
    at sun.awt.image.ImageFetcher.fetchloop(Unknown Source)
    at sun.awt.image.ImageFetcher.run(Unknown Source)
    I have those kind of error (connection refused) before I signed my applet and write policy file to granr socketpermission to the codebase of my class files. But this error still occurs. I suppose it is because the sun.awt.image.* is Java standard class, so my policy file has no effect on them. But how can I make it works?

    you need to install the jre, and place the win32.dll at JavaSoft\JRE\1.3.1_06\bin, that properties file place at JavaSoft\JRE\1.3.1_06\lib, comm.jar at JavaSoft\JRE\1.3.1_06\lib\ext\
    and in ur code try to use it to open ur com port
    public String test() {
    String drivername = "com.sun.comm.Win32Driver";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance(); driver.initialize();
    catch (Throwable th)
    {* Discard it */}
    drivername = "javax.comm.*";
    try
    CommDriver driver = (CommDriver) Class.forName(drivername).newInstance(); driver.initialize();
    catch (Throwable th)
    {* Discard it */}
    portList = CommPortIdentifier.getPortIdentifiers();
    while (portList.hasMoreElements()) {
    portId = (CommPortIdentifier) portList.nextElement();
    if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    if (portId.getName().equals("COM2")) {
    //if (portId.getName().equals("/dev/term/a")) {
    try {
    serialPort = (SerialPort)
    portId.open("SimpleWriteApp", 2000);
    } catch (PortInUseException e) {}
    try {
    outputStream = serialPort.getOutputStream();
    } catch (IOException e) {}
    try {
    serialPort.setSerialPortParams(9600,
    SerialPort.DATABITS_8,
    SerialPort.STOPBITS_1,
    SerialPort.PARITY_NONE);
    } catch (UnsupportedCommOperationException e) {}
    int i=0;
    while(true)
    try {
    messageString="hi";
    System.out.println(i++);
    outputStream.write(messageString.getBytes());
    } catch (IOException e)
    System.out.println(e);
    messageString=String.valueOf(e);
    return messageString;
    and yet u need to signed the applet
    1. Compile the applet
    2. Create a JAR file
    3. Generate Keys
    4. Sign the JAR file
    5. Export the Public Key Certificate
    6. Import the Certificate as a Trusted Certificate
    7. Create the policy file
    8. Run the applet
    Susan
    Susan bundles the applet executable in a JAR file, signs the JAR file, and exports the public key certificate.
    1. Compile the Applet
    In her working directory, Susan uses the javac command to compile the SignedAppletDemo.java class. The output from the javac command is the SignedAppletDemo.class.
    javac SignedAppletDemo.java
    2. Make a JAR File
    Susan then makes the compiled SignedAppletDemo.class file into a JAR file. The -cvf option to the jar command creates a new archive (c), using verbose mode (v), and specifies the archive file name (f). The archive file name is SignedApplet.jar.
    jar cvf SignedApplet.jar SignedAppletDemo.class
    3. Generate Keys
    Susan creates a keystore database named susanstore that has an entry for a newly generated public and private key pair with the public key in a certificate. A JAR file is signed with the private key of the creator of the JAR file and the signature is verified by the recipient of the JAR file with the public key in the pair. The certificate is a statement from the owner of the private key that the public key in the pair has a particular value so the person using the public key can be assured the public key is authentic. Public and private keys must already exist in the keystore database before jarsigner can be used to sign or verify the signature on a JAR file.
    In her working directory, Susan creates a keystore database and generates the keys:
    keytool -genkey -alias signFiles -keystore susanstore -keypass kpi135 -dname "cn=jones" -storepass ab987c
    This keytool -genkey command invocation generates a key pair that is identified by the alias signFiles. Subsequent keytool command invocations use this alias and the key password (-keypass kpi135) to access the private key in the generated pair.
    The generated key pair is stored in a keystore database called susanstore (-keystore susanstore) in the current directory, and accessed with the susanstore password (-storepass ab987c).
    The -dname "cn=jones" option specifies an X.500 Distinguished Name with a commonName (cn) value. X.500 Distinguished Names identify entities for X.509 certificates.
    You can view all keytool options and parameters by typing:
    keytool -help
    4. Sign the JAR File
    JAR Signer is a command line tool for signing and verifying the signature on JAR files. In her working directory, Susan uses jarsigner to make a signed copy of the SignedApplet.jar file.
    jarsigner -keystore susanstore -storepass ab987c -keypass kpi135 -signedjar SSignedApplet.jar SignedApplet.jar signFiles
    The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
    5. Export the Public Key Certificate
    The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
    The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
    5: Export the Public Key Certificate
    The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
    In her working directory, Susan uses keytool to copy the certificate from susanstore to a file named SusanJones.cer as follows:
    keytool -export -keystore susanstore -storepass ab987c -alias signFiles -file SusanJones.cer
    Ray
    Ray receives the JAR file from Susan, imports the certificate, creates a policy file granting the applet access, and runs the applet.
    6. Import Certificate as a Trusted Certificate
    Ray has received SSignedApplet.jar and SusanJones.cer from Susan. He puts them in his home directory. Ray must now create a keystore database (raystore) and import the certificate into it. Ray uses keytool in his home directory /home/ray to import the certificate:
    keytool -import -alias susan -file SusanJones.cer -keystore raystore -storepass abcdefgh
    7. Create the Policy File
    The policy file grants the SSignedApplet.jar file signed by the alias susan permission to create newfile (and no other file) in the user's home directory.
    Ray creates the policy file in his home directory using either policytool or an ASCII editor.
    keystore "/home/ray/raystore";
    // A sample policy file that lets a JavaTM program
    // create newfile in user's home directory
    // Satya N Dodda
    grant SignedBy "susan"
    permission java.security.AllPermission;
    8. Run the Applet in Applet Viewer
    Applet Viewer connects to the HTML documents and resources specified in the call to appletviewer, and displays the applet in its own window. To run the example, Ray copies the signed JAR file and HTML file to /home/aURL/public_html and invokes Applet viewer from his home directory as follows:
    Html code :
    </body>
    </html>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="600" height="400" align="middle"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1,2">
    <PARAM NAME="code" VALUE="SignedAppletDemo.class">
    <PARAM NAME="archive" VALUE="SSignedApplet.jar">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    </OBJECT>
    </body>
    </html>
    appletviewer -J-Djava.security.policy=Write.jp
    http://aURL.com/SignedApplet.html
    Note: Type everything on one line and put a space after Write.jp
    The -J-Djava.security.policy=Write.jp option tells Applet Viewer to run the applet referenced in the SignedApplet.html file with the Write.jp policy file.
    Note: The Policy file can be stored on a server and specified in the appletviewer invocation as a URL.
    9. Run the Applet in Browser
    Download JRE 1.3 from Javasoft
    good luck! [email protected]
    i already give u many tips, i use 2 weeks to try this to success, hopw that u understand that, a result of success is not important, the process of how to get things done is most usefull!

  • Applet's Param Tag

    What are uses of Param tag?
    Can I get some demo programmes which uses param tag?

    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="500" height="350" align="baseline"
         codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">
    <PARAM NAME="code" VALUE="psw.applets.um.UserManager.class">
    <PARAM NAME="archive" VALUE="CriJacsUm.jar">
    <PARAM NAME="codebase" VALUE=".">
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2.2">
    <PARAM NAME="ServerIP" VALUE="<%=ComDef.ServerIP%>">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.2.2"
    width="500" height="350" align="baseline"
    code="UserManager.class" archive="CriJacsUm.jar" codebase="."
         pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html">
    <NOEMBED>
    </COMMENT></NOEMBED>
    </EMBED>
    </OBJECT>

Maybe you are looking for

  • Problem with Exception Worksheet using Data from Supply Plan Data Table

    I added a series for a flag that indicates whether product is sourced from multiple manufacturing sites for a given customer and item. The flag is on the supply plan data table because it depends on the scenario. I created an exception worksheet for

  • Getting a DC broken on importing the track into DTR

    Hi, I am getting an DC broken on importing and creating a DC-dp_logstatus .I am currently using NWDS CE7.1 EHP1 and NWDI as 7.0 SP16 for deployment on PI 7.1 EHP1.Please see build log is as below and suggest. Build Plugin 'WebdynproPlugin', Version 7

  • Purchase Price Per Quantity

    Hi. I am wondering if B1 allows for multiple entries to be made in a purchase price list that breaks on quantity?  Example, say an item has a cost of $1 if purchased in quanties up to 100, $.75 if in quantities of 101-300, $.50 if in quantities of 30

  • Tracking Report using Function Modules

    Hi Experts, My scenario is to track a workflow report. What i did was: I found a function module which gives the work item details of all task available in user business workplace. What i need was : When i click on any one of the work item id it shou

  • Public variables in javascript

    how i can use public variables in javascript along with ADF. I am declaring a variable at the top of list but when an event is generated by ADF and i tries to access that variable, it gives me an error of undefined. Kindly help me