How to run a Client in a Jsp

I would like to run Client.java thanks to a JSP
i have got a .jar that i put in WEB-INF/lib
but that the class Client is not found

try putting your application's web-inf/lib directory in your classpath. this is typical in development environments. you wouldn't have to do it for production.
hope this helps.
cem.

Similar Messages

  • How to run the client program in weblogic 8.1 server

    Hi
    I am new to EJB 2.0. I am deployed sucessfully a session ejb program.
    While running an ejb client program it throws an exception. In my session ejb program i created two jar file. one is sessionejb.jar and another one is sessionejbclient.jar. In sessionejb.jar contains home ,remote ,session bean class and deployment descriptor.In sessionejbclient.jar contains home,remote and client program. Both jar files are included in class path of environment variable( i am using Standalone server).
    Plese guide me how to run an session ejb client correctly.
    Regards
    Jaiganesh

    Both jar files are
    included in class path of environment variable( i am
    using Standalone server).did u include both these jars in the "weblogic's class path" ?
    in that case, it obviously wont work.
    what u need is an understanding of the following topics (i have described them briefly, but for details u can always check the documentation of weblogic):
    1. Class loaders in weblogic: there are various levels of class loaders. at the top is the weblogic's class loader. below it are various EARs' class-loaders. and so on....
    2. Packaging. You must ensure that in the same class loader, there are not two classes from 2 different jars.
    hope that helps

  • How to run application client of an EJB application?

    Hi,
    My EJB application is deployed on websphere. I have written a small java client program to interact with an EJB which is working fine if I compile and run it in websphere studio environment.
    However I am getting runtime exception when I tried to run it at command line.
    RemoteConn.java
    import java.util.Hashtable;
    import com.deque.HelloJavaHome;
    import com.deque.HelloJava;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.ejb.EJBHome;
    import javax.ejb.EJBObject;
    public class RemoteConn {
    public static void main(String[] ar) throws Exception{
    String name="Paruchuri!!";
    String greeting = "";
    try{
    Hashtable env = new Hashtable();
    //env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ws.naming.util.WsnInitCtxFactory");
    env.put(Context.PROVIDER_URL, "iiop://localhost:2809");
    InitialContext initContext = new InitialContext(env);
    Object obj = initContext.lookup("ejb/HelloJavaHome");
    HelloJavaHome home = (HelloJavaHome) javax.rmi.PortableRemoteObject.narrow(obj, HelloJavaHome.class);
    HelloJava remote = home.create();
    greeting = remote.getGreeting(name);
    catch(Exception e){
    e.printStackTrace();
    System.out.println("Greeting::"+ greeting);
    I have set the application ejb client jar in the class path of client program.
    The exception I am getting at runtime is
    Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.CORBA.iiop.GlobalORBFactory
    at com.ibm.ejs.oa.EJSORBImpl.class$(EJSORBImpl.java:44)
    at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:195)
    at com.ibm.ejs.oa.EJSClientORBImpl.(EJSClientORBImpl.java:93)
    at com.ibm.ejs.oa.EJSClientORBImpl.(EJSClientORBImpl.java:65)
    at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:385)
    at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:284)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:369)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:112)
    at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:422)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:143)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at RemoteConn.main(RemoteConn.java:38)
    Initially I thought I shuold set some jar file of websphere in the classpath of client. But I did not find such a jar containing the above class in websphere studio.
    Basically the error is generated at the below statement at runtime.
    Object obj = initContext.lookup("ejb/HelloJavaHome");
    The only difference I discovered was that the client application has a descriptor file (application-client.xml ) available to it when it ran in websphere studio,. I guess the same META-INF should be provided to client when it runs at command line.
    Right now I am not using any client descriptor file to run the client program. If the above error is due to not supplying META-INF to the client application, how should I make this folder available to client at runtime?
    I greatly appreciate if I could get help ASAP.
    Thanks

    Hey got what is going on. In order to invoke EJB, deployed on WebSpehre App Server, from application client we need to install either WebSphere Application Pluggable Client or WebSphere Thin client on the workstation. Pluggable client is a wrapper to SUN JRE where as Thin Client uses IBM JRE.

  • How to run the recursive function in jsp

    hi, can any body tell me how to run
    rrays.sort(files);
    for (int i = 0, n = files.length; i < n; i++) {
    for (int indent = 0; indent < indentLevel; indent++) {
    System.out.print(" ");
    if (files.toString().endsWith(".jsp"))
    System.out.println(files[i].toString());
    if (files[i].isDirectory()) {
    listPath(files[i]);
    indentLevel--;
    this code in jsp
    thanks in advance

    Why are you writing scriptlets and functions in JSPs?
    Functions are supposed to be written in the Java Application layer.
    JSPs are best suited only to display information.
    Also why are you using Scriptlets insted of JSTL ?
    Anyway, if you want to write in JSPs only , here's how to write a function in them: http://forum.java.sun.com/thread.jspa?threadID=496577&messageID=2341986 you can figure out the rest.

  • How to run a client?

    A want a client progrma to connect to the server by pressing a button.
    But the method to run a client is by typing:
    "java HelloClient"
    before run the program.
    How can I call the client connection when I already run the program(an applet)?
    Thanks~~

    There are two concepts of being a client, the first one is to be a "storage disabled node" in the cluster which means that you are a full member of the cluster but no data is stored on your node.
    To disable storage on a node, pass the following attribute on the java command line:
    -Dtangosol.coherence.distributed.localstorage=falseThe second concept of a client is to use Coherence*Extend to connect to a cluster over TCP.
    More details on [how to configure Coherence*Extend over here|http://wiki.tangosol.com/display/COH35UG/Configuring+and+Using+Coherence+Extend]

  • How to close JDBC client connections in JSP (9IDS Jdeveloper)

    Can anyone tell me how to close JDBC connections neatly through JSP in Oracle 9IDS Jdeveloper.
    I have a developer who has deployed a WAR file (comprising JSP page) to the Tomcat webserver.
    The page works fine except that it always leaves a JDBC client connection after the user closes the internet explorer window.
    I've tried using dead connection detection without success.
    At the operating system level, I have a script that can kill these sessions but I would prefer if theres some way the connection can be closed neatly through the JSP application.

    Hi:
    At database level you can:
    See CONNECT_TIME and IDLE_TIME options to CREATE/ALTER PROFILE
    Joao

  • How to run a client program in Session bean using weblogic 8.1

    Hi
    I am new to weblogic server 8.1. I sucessfully deployed session ejb Session Bean. I created sessionbean jar file and put it it classpath also.
    and also i created sessiobeanclient jar file, it included in class path.
    While running client program it throws exception like noclass def found exception
    plz tell me the right way to run the session ejb program.
    bye

    Hi,
    You have to follow the given steps before you are going to run the client program that invokes the session bean .
    1)set the Weblogic Environment using the tool setWLSEnv
    2)place the Session bean jar file in classpath
    3)run the client program
    Note:If the client has to execute on remote machine we need to copy client class,remote interface, home interface and other classes which are used as
    parameters and return types.
    Regards
    Anilkumar kari

  • How to run ejb client on a separate host using Oracle example

    The example I used was under $ORACLE_HOME/javavm/demo/examples/ejb/basic/jdbcimpl
    If I used the Makefile provided to run the client and server, it worked ok. Now I tried to move the client to an NT machine and it did not work. (BTW, the server was on a Linux machine.)
    What I did was to copy the compiled class and jar files to NT (Client.class, employee/*.class aurora_client.jar, vbjapp.jar, and vbjorb.jar). After I ran it, I got an error in javax.naming.InitialContext.lookup.
    I compiled and ran the code using jdk1.1.8. If I recompiled the code on NT using jdk1.3, I got a CORBA.OBJECT_NOT_EXIST error.
    Any clue?

    Copy the following files to the CT's machines. Copy the server_generated.jar also to the CT's machine. In your case the file will be there in the $ORACLE_HOME/javavm/demo/examples/ejb/basic/jdbcimpl directory.
    C:\ORA816\lib\aurora_client.jar;
    C:\ORA816\jdbc\lib\classes111.zip; // Replace this with classes12.zip if you are using JDK 1.2.2
    C:\ORA816\sqlj\lib\translator.zip; // If you are using SQLJ in the CT's code
    C:\ORA816\lib\vbjorb.jar;
    C:\ORA816\lib\vbjapp.jar;
    server_generated.jar
    Set you classpath to include the all the above files.
    Oracle 8.1.6 can work with JDK 1.2.2 and JDK 1.1.8. Please try with the JDK 1.2.2 and let us know the results.
    null

  • How to run a client in j2ee

    Hi Guys,
    I have successfully created a bean and deployed it in J2EE server. My next step according to the head first ejb is to create a client. I compiled AdviceClient successfully (Thanks to grava). However when I try to run the compiled class I get the following error:
    C:\projects\advice>java AdviceClient
    javax.naming.CommunicationException: Can't find SerialContextProvider
    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
    a:63)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at AdviceClient.go(AdviceClient.java:16)
    at AdviceClient.main(AdviceClient.java:10)
    Could you please tell me what is going on?
    The following is the class ActiveClient:
    import javax.naming.*;
    import java.rmi.*;
    import headfirst.*;
    import javax.rmi.*;
    import javax.ejb.*;
    public class AdviceClient{
    public static void main (String[] args){
    new AdviceClient().go();
    public void go(){
    try{
    Context ic=new InitialContext();
    Object o=ic.lookup("Advisor");
    AdviceHome home=(AdviceHome) PortableRemoteObject.narrow(o, AdviceHome.class);
    Advice advisor=home.create();
    System.out.println(advisor.getAdvice());
    }catch (Exception ex){
    ex.printStackTrace();
    Kind regards,
    Al

    Hi,
    When running client, in my previous attempts, the j2ee server was not running. However when I run the server the following error messages appear:
    C:\projects\advice>java AdviceClient
    javax.naming.CommunicationException: java.rmi.MarshalException: CORBA MARSHAL 13
    98079699 Maybe; nested exception is:
    org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Custom marshaling of RMI:java.lang.Throwable:F8678B4F4D2EB705 5C635273977B8CB not
    compatible with local class (local class not custom marshal capable) minor code
    : 1398079699 completed: Maybe
    org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Custom mars
    haling of RMI:java.lang.Throwable:F8678B4F4D2EB705 5C635273977B8CB not compatible with local class (local class not custom marshal capable) minor code: 139807
    9699 completed: Maybe
    at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(CDRInput
    Stream_1_0.java:1083)
    at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(CDRInputStre
    am.java:296)
    at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lo
    okup(Unknown Source)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at AdviceClient.go(AdviceClient.java:16)
    at AdviceClient.main(AdviceClient.java:10)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:138
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at AdviceClient.go(AdviceClient.java:16)
    at AdviceClient.main(AdviceClient.java:10)
    I appreciate any attempts to solve this problem.
    Kind regards,
    Al

  • How to run different client ?

    Hi,
    I have downloaded and installed Oracle8i Enterprise edition Release 8.1.7.0.0.
    Now I have to connect to the above server either using Oracle client version 8.1.6.3.1 or 8.1.6.2. My question is -
    - is it possible to download the above version Oracle
    Client ?
    - how can I connect from above such client to the above
    server ?
    Please let me know.
    Thanks,
    Harish

    I don't know of any site where you can still download the 8.1.6 Oracle client or database. Oracle Support may know of an FTP site for desupported products.
    In general, connecting from any version of the Oracle client to an Oracle server is pretty much the same.
    - You want to create a new TNS name on your client machine. This is most easily accomplished by using the Net Config Assistant (the name changes slightly between releases)
    - You then connect (assuming SQL*Plus) as
    connect user/password@tnsname
    Justin

  • How to run the client from server

    HI FRIENDS,
    I HAVE A SMALL PROBLEM WITH MY PROGRAM.I WANTED TO START THE CLIENT FROM SERVER I.E THE CLIENT SHOULD BE EXECUTED AS SOON AS THE SERVER STARTS EXECUTION.SOME OF THEM SAID THAT THIS CAN BE DONE BY USING 'EXEC' COMMAND.BUT I COULDNT.SO PLEASE ANYONE HELP ME IN DOING THIS.
    BYE
    KP

    HI FRIENDS,
    I HAVE A SMALL PROBLEM WITH MY
    MALL PROBLEM WITH MY PROGRAM.I WANTED TO START THE
    CLIENT FROM SERVER I.E THE CLIENT SHOULD BE EXECUTEDCan't be done, unless the server and the client are on the same machine, or you have some other COM object or service set up to allow someone to do this remotely

  • How to run App server applications in Client systems

    Hi all,
    I m new to Oracle Devsuite 10g and App server. I configured the app server and i m able to run in my local machine (server) but i m not able to run in some others machines. even though i have given same path.
    its displaying page cannot be dispalyed
    My path is http://vagee/forms/frmservlet?config=TEST_APPS
    please tell me how to run in client systems?
    Regards,
    Kalyan

    hi
    thanks for your reply. i found the problem. In server machine Firewall was in On Mode. So that it was not allow to access. then i have switched off the firewall. now its running well in client systems also.
    thank you.

  • How to run Session ejb client program?

    Hi
    I am using weblogic server8.1 . I was running an ejb session client program it throws exception like below. Can any one tell me how to run a client in weblogic server. give the syntax for running ejb client.
    D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB\stateful>jav
    a -cp .;c:\j2ee\j2ee.jar;c:\weblogic\classes;D:\Weblogicserver\weblogic81\server
    \lib\weblogic.jar PortfolioClient
    Exception in thread "main" java.lang.NoClassDefFoundError: PortfolioClient (wron
    g name: stateful/PortfolioClient)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    bye

    If stateful is the package for the client application, you should be executing from
    D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB
    on the command line. The command should look like -
    java -classpath <whatever should be here> stateful.MyClient

  • How to do a corba call in jsp ?

    hello sir,
    i m developing distributed application. JacORB is java orb used as middleware,
    jsp and tomcat used as web interface.
    i hava a difficulty how to call corba client method from jsp ?

    Dear Hardikhvc,
    This is the community forum for SJS Web Server, not tomcat. If you have a tomcat question, you should try to ask in the tomcat forums, you might have better luck there.
    In the other hand, consider using the SJS Web Server, which is a full fledged, production quality, highly secure, industry leading web server, with a fully integrated and high performant web container. It is also free for developing purposes. More details can be found here.
    http://www.sun.com/webserver

  • Running OWB Client from Unix

    Hi
    I am trying to remember how to run OWB client (10gr1) from a unix command. Can anyone please help with what command you run from unix?
    Thanks
    GB

    Hi,
    To start Warehouse Builder using UNIX:
    1.Start a shell.
    2.Navigate (cd) to <OWB ORACLE HOME>/owb/bin/unix
    3. Invoke owbclient.sh
    Thanks,
    Sutirtha

Maybe you are looking for

  • Toggling between 2 hard drives running different OS's

    I recently added an internal 500GB SATA drive to my G4 (partitioned 100GB for apps and remainder for storage). The old HD is running OS X 10.2.8, and I initialized the new HD with a fresh version of OS X 10.3. Silly question: Is there a more efficien

  • How to find and use my bluetooth in Toshiba A100-811

    I have bought a Toshiba A100-811 while using I cant find my Bluetooth in my Laptop usually I easily see the bluetooth on some other laptop brands. There is also one thing I have notice there is this exhaust fan in the left side and every time I open

  • (error = 9006) really annoying

    I am attempting to download the show Heroes, episode Hiros. It gets to 460.0 MB of 466.2 MB and then something mysterious happens with the connection and I get the lovely error 9006. When I press the resume download button the download does not resum

  • Cannot unlock phone

    I cannot get my phone to unlock after downloading an update.  The computer said there was an error and had to restore my phone but when it did is asking for my old id and password which I don't remember and when I go to reset it I am not getting the

  • Siri does not uses location services

    even if the location services for siri is on, sire can not do based-location reminders