Call servlet through stateless sessionbean

can any body help me about.....
code to call(run) servlet through stateless session bean,
how can develop it using URL class..
please help me............

Hi
it can be possible if your session bean  can call servlet through an protocol.
  means you can create an URL or URL connection class and call it through http protocol.
i .e we can create URLConnetion ( HttpURLConnection ) object to that servlet  from a session bean.
I hope this will help you some extent to solve your probs.
Thanks
Mrutyunjaya Tripathy

Similar Messages

  • Run  servlet through stateless session bean

    can any body help me about.........
    how to run(execute or call) servlet through state less session bean.
    i have developed servlet program, now i want to run that servlet from stateless session bean ,can any body help ,how to write the code for above one

    Hi
    it can be possible if your session bean  can call servlet through an protocol.
      means you can create an URL or URL connection class and call it through http protocol.
    i .e we can create URLConnetion ( HttpURLConnection ) object to that servlet  from a session bean.
    I hope this will help you some extent to solve your probs.
    Thanks
    Mrutyunjaya Tripathy

  • RuntimeException through Stateless SessionBeans causes JNDI lookup crash

    Hello,
    It seems there is a big problem with the RuntimeException thrown through two Stateless SessionBeans. Here is the code (without the interfaces, that are straight forward) :
    public class ProcessorBean { public String process() { throw new RuntimeException("error"); } } /* This is a sub-bean that throws a simple RuntimeException */
    public class OtherBean  { public String hello() { return "processed by OtherBean"; } } /* Another sub-bean to test the catch-call (optional) */
    public class TestBean
        @EJB
        private ProcessorLocal processor;
        @EJB
        private OtherLocal other;
        public String process()
              String result = null;
              try
                  result = processor.process(); //will throws a RuntimeException
              catch(Exception e)
                  result = other.hello(); //CRASH !!!! --> afther that processor.process() trhows a RuntimeException, all injections @EJB are down ! There will be a ejb.some_unmapped_exception written in the console.
              return result;
    }You will find a little Enterprise project here to see the problem (just use the WebService tester in asadmin)
    Note that there is no problem if an Exception that DOES NOT inherit from RuntimeException is thrown.
    Maybe someone have an idea how to solve simply that problem ?
    Regards,
    Cedric

    What is your exception exactly?
    I deploeyd you jar package in JBoss 5.0, and called your facade bean with this code:
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import ch.capi.test.RemoteFacadeRemote;
    public class MainRemoteEJBCaller {
         public static void main(String[] args) throws Exception {
              Properties env = new Properties();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
              env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
              env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
              InitialContext jndiContext = new InitialContext(env);
              Object ref = jndiContext.lookup("RemoteFacadeBean/remote");
              RemoteFacadeRemote facadeBean = (RemoteFacadeRemote)PortableRemoteObject.narrow(ref,RemoteFacadeRemote.class);
              System.out.println( facadeBean.test("Test") );
              System.out.println( facadeBean.testException("Test") );
    }And got not errors. The output is this:
    Your input : [Test] / You're saved !
    You're saved !- Roy

  • Calling servlet through HttpURLConnection

    hi guyz ....
    I am trying to call a servlet, hosted on Tomcat/4.0.3. It is accepting two parameters. I am using the following program to call it, but it is continuously throwing exception Exception in thread "main" java.io.FileNotFoundException: http://202.141.230.246:8080/examples/servlet/AServlet. When I paste the above same url in browser, it works fine, also other servlets at the same location are working fine from my program and browser. For your convenience, the effective part of the code is given below:
          URL url = new URL("http://202.141.230.246:8080/examples/servlet/JndiServlet");
          URLConnection connection = (URLConnection) url.openConnection();
          //connection.setRequestMethod("POST");
          connection.setDoOutput(true);
          PrintWriter out = new PrintWriter(connection.getOutputStream());
          // encode the message
          String name = "s="+URLEncoder.encode("Qusay Mahmoud");
          String email = "name="+URLEncoder.encode("[email protected]");
          // send the encoded message
          out.println(name+"&"+email);
          out.close();
          BufferedReader in =
                    new BufferedReader(new InputStreamReader(connection.getInputStream()));
          String line;
          while ((line = in.readLine()) != null)
             System.out.println(line);
          in.close();Exception is thrown on the line where i am creating an instance of BufferedReader class.
    Any help will be of great value.
    Raheel.

    hi again .... a slight change in code fragment.
    plz help !!!!
    URL url = new URL("http://202.141.230.246:8080/examples/servlet/AServlet");     
       HttpURLConnection connection = (HttpURLConnection) url.openConnection();     
       connection.setRequestMethod("POST");     
       connection.setDoOutput(true);     
       PrintWriter out = new PrintWriter(connection.getOutputStream());     
       // encode the message     
       String name = "id="+URLEncoder.encode("Qusay Mahmoud");     
       String email = "name="+URLEncoder.encode("[email protected]");     
       // send the encoded message     
       out.println(name+"&"+email);     
       out.close();     
       BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));     
       String line;     
       while ((line = in.readLine()) != null)     
            System.out.println(line);     
       in.close();

  • Error while calling servlet in WebLogic

    Hi,
    We are trying to call servlet in WebLogic by using http://scrmskr.apac.nsroot.net:7801/forms/HelloWorldServlet URL and getting
    below error.
    ========================================================================
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    ========================================================================
    Here we are calling HelloWorldServlet servlet which is kept in below path
    /rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes
    Entries for HelloWorldServlet in web.xml:
    ========================================================================
    <servlet>
    <servlet-name>HelloWorldServlet</servlet-name>
    <servlet-class>HelloWorldServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>frmservlet</servlet-name>
    <url-pattern>/frmservlet/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>HelloWorldServlet</servlet-name>
    <url-pattern>/HelloWorldServlet*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>lservlet</servlet-name>
    <url-pattern>/lservlet/*</url-pattern>
    </servlet-mapping>
    ========================================================================
    HelloWorldServlet.java:
    ===============================================================================
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class HelloWorldServlet extends HttpServlet {
    public void service(HttpServletRequest req,
    HttpServletResponse res)
    throws IOException
    // Must set the content type first
    res.setContentType("text/html");
    // Now obtain a PrintWriter to insert HTML into
    PrintWriter out = res.getWriter();
    out.println("<html><head><title>" +
    "Hello World!</title></head>");
    out.println("<body><h1>Hello World!</h1></body></html>");
    ===============================================================================
    Please share your inputs as to what needs to be done for the same.
    Thanks & Regards,
    Harish

    Hi Jay,
    Please also find forms.conf_ entries
    ========================================================================
    # Name
    # forms.conf - Forms component Apache directives configuration file.
    # Purpose
    # It should include the weblogic managed server (routing) directives for
    # the servers where Forms applications are deployed and other miscellaneous
    # Forms component OHS directives.
    # Remarks
    # This file is included with the OHS configuration under
    # $OI/config/OHS/<OHS Node Name>/moduleconf sub-directory.
    # virtual mapping for the /forms/html mapping.
    RewriteEngine on
    RewriteRule ^/forms/html/(..*) /workaroundhtml/$1 [PT]
    RewriteRule ^/rcrms/html/(..*) /workaroundhtml/$1 [PT]
    AliasMatch ^/workaroundhtml/(..*) "/rcrmap2/weblogic/bea/rcrms/config/FormsComponent/forms/html/$1"
    AliasMatch ^/forms/frmjscript/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/frmjscript/$1"
    AliasMatch ^/rcrms/icons/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms/java/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
    # Virtual path mapping for testcrms (codebase)
    AliasMatch ^/rcrms/java/(..*) "/rcrmap2/weblogic/bea/ORA_PFRD/forms/java/$1"
    AliasMatch ^/forms/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes/$1"
    AliasMatch ^/rcrms/(..*) "/rcrmap2/weblogic/bea/user_projects/domains/frmrep_rcrms/servers/WLS_FORMS/tmp/_WL_user/formsapp_11.1.1/e18uoi/war/WEB-INF/classes/$1"
    AliasMatch ^/rcrms/WebCLAuth/* rcrms
    <Location /forms>
    SetHandler weblogic-handler
    WebLogicHost kauh0079
    WebLogicPort 8001
    </Location>
    ========================================================================
    Thanks & Regards,
    Harish

  • Calling servlets in tomcat 4 (path-problem)

    Hi,
    I have copied the IsItWorking-Servlet in webapps/examples/Web-Inf/classes.
    To call the servlet through a browser I have to write:
    http://server-name:8080/examples/servlet/IsItWorking .
    This works fine. But ..unfortunately I have to call the servlets in the following way:
    http://server-name:8080/examples/IsItWorking.
    Which xml-File defines the parameter "servlet" ??

    Hi,
    edit the web.xml under the \examples\web-inf.
    add the following
    <servlet>
    <servlet-name>
    IsItWorking
    </servlet-name>
    <servlet-class>
    IsItWorkingServlet
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    IsItWorking
    </servlet-name>
    <url-pattern>
    /IsItWorking
    </url-pattern>
    </servlet-mapping>

  • How can I fix my phone's ringer? The call comes through but it won't ring.

    I've had my iPhone for over 6 months now with no issues. I have not had it reserviced, its not refurbished, and I bought it new from an AT&T store.
    This week my phone stopped ringing. The incoming call comes through on the screen, but it doesn't ring out loud so I know I'm getting a call and I can't sit and stare at my iPhone's screen all day long to see if I'm getting an incoming call. It vibrates when a call comes in maybe 20% of the time.
    Today I went into settings and reset my settings but it still didn't bring my ringer back. It plays the ringers when you are looking through the list of ringers, it plays it when you alter the volume setting, but when a call is actually coming in or when I'm receiving a text message or something, no sound.
    What can I do to get my ringer back?

    Check the mute switch on the side above the volume rocker. If the red dot shows, the phone is muted. You'll still be able to play the ringtones to select one.
    I find that the switch can be thrown to "mute" by accident when I put my iPhone in my belt holster.

  • How to use Transaction in Stateless SessionBean?

    I want to use a transaction in a stateless sessionbean.Here is the code I am using:
    public void createQuestion(QuestionModel questionModel,Collection outcomeList) throws Exception{
    UserTransaction ut=getUserTransaction();
    try{
    QuestionHome qHome=EJBUtil.getQuestionHome();
    QuestionOutcomeHome qoHome=EJBUtil.getQuestionOutcomeHome();
    ut.begin();
    QuestionRemote qr=qHome.create(questionModel.getName(),questionModel.getContent(),questionModel.getCreatorId());
    Long id=qr.getQuestionModel().getId();
    Iterator outcomes=outcomeList.iterator();
    while(outcomes.hasNext()){
    QuestionOutcomeModel qom=(QuestionOutcomeModel)outcomes.next();
    QuestionOutcomeRemote qor=qoHome.create(id,qom.getValue(),qom.getFeedBack());
    ut.commit();
    }catch(Exception e){
    ut.rollback();
    throw new Exception(e);
    private UserTransaction getUserTransaction() throws NamingException{
    UserTransaction ut=null;
    try{
    InitialContext ic = new InitialContext();
    ut = (UserTransaction) ic.lookup("UserTransaction");
    } catch (NamingException ne) {
    throw new EJBException(ne);
    return ut;
    And In the entity bean,I define a XADatasource:
    private Connection getXADBConnection() throws SQLException {
    Connection connection;
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource)
    ic.lookup("java:/MSSQLXaDS");
    connection = ds.getConnection();
    } catch (NamingException ne) {
    throw new EJBException(ne);
    } catch (SQLException se) {
    throw new EJBException(se);
    return connection;
    When I run the code, it throws the following Exception:
    java.lang.Exception: java.lang.reflect.UndeclaredThrowableException
         at com.dynasty.testing.testcontent.control.TestContentSB.createQuestion(TestContentSB.java:239)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
         at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
         at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
         at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
         at org.jboss.ejb.Container.invoke(Container.java:712)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
         at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:536)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
         at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
         at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:138)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
         at $Proxy1.createQuestion(Unknown Source)
         at com.dynasty.testing.test.TestContentSBTestClient1.main(TestContentSBTestClient1.java:466)
    Caused by: java.lang.reflect.UndeclaredThrowableException
         at $Proxy196.create(Unknown Source)
         at com.dynasty.testing.testcontent.control.TestContentSB.createQuestion(TestContentSB.java:229)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:660)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
         at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
         at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
         at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
         at org.jboss.ejb.Container.invoke(Container.java:712)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
         at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
         at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
         at sun.rmi.transport.Transport$1.run(Transport.java:148)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:536)
    Caused by: javax.resource.ResourceException: associateConnection not supported
         at org.jboss.resource.adapter.jdbc.BaseManagedConnection.associateConnection(BaseManagedConnection.java:91)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnect(BaseConnectionManager2.java:594)
         at org.jboss.resource.connectionmanager.CachedConnectionManager.reconnect(CachedConnectionManager.java:344)
         at org.jboss.resource.connectionmanager.CachedConnectionManager.pushMetaAwareObject(CachedConnectionManager.java:140)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:183)
         at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:90)
         at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
         at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
         at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:59)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
         at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
         at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
         at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
         at org.jboss.ejb.Container.invoke(Container.java:730)
         at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
         at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
         ... 28 more
    What's wrong with my code?Can anyone hlep me?Thanks

    Susan,
    I am replying because I think we are in the same class at Wake Tech (Saturday morning with Jeff Griemann), trying to get past the same problem. After many frustrating hours, I have the answer. Reinstall Tomcat in a directory with NO SPACES in the directory name. That it!
    Dennis

  • Error while executing servlet through a HyperLink.

    Hi
    When i am trying to execute a servlet through the HyperLink using this statement
    where CallStatusDetailsAssign is my servlet.then i am getting this error :
    The Following is the Alert Message.
    1. Microsoft InterNet Explorer
    http://localhost:8080/examples/servlets/CallStatusDetails?Call_ID=1&EMP_NO=1
    ** Download of the specified Resource has failed.
    & also getting this error:
    2. IE Cannot open the Internet Site
         ** Operation has been Cancelled.
    If i refresh the screen by clicking on refresh button in the Internet Explorer.the Page is getting displayed properly.
    Is there any problem with my servlet code ??or some other Problem.
    Can Anyone Please help me on this & give me the Solution for my Problem.
    Rashmi

    I'm not sure if this is cause of your problem but the anchor tag should look like this:
    some text</ a>
    ... in the code the quotes are missing
    spieler

  • Call RFC through EJB

    Hi,
    I have senerio in which i need to call RFC through EJB.
    Thanks.
    Abhilasha
    Edited by: Abhilasha Dahare on Oct 3, 2008 1:29 PM

    Hi,
    Go through the following links:
    Extract R/3 data via EJB
    http://help.sap.com/saphelp_nw04/helpdata/en/35/42e13d82fcfb34e10000000a114084/frameset.htm
    Siddharth

  • How to call servlets in sunone webserver

    hi,
    I am using sunone web server , I deployed but how to call servlets in sunone webserver any one tell me
    bye

    Typical URL structure is like this:
    http://<myServer>:<myPort>/servlet/<fully qualified class name of my servlet>Unless you have configured a different servlet mapping ...

  • Call Transaction Through RFC

    Hi ,
    I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) . 
    Call  transaction does gets executed without any error but it does not update any data.But when I run it through my user id it works absolutely fine .
    I am not sure what is causing the issue
    Security authorization?
    RFC through Non Dialog user ?
    Paramters missing in RFC  ?
    Paramatertes missing in call transaction option?
    If anyone of you has faced a similiar issue then please let me know the path forward.
    Thanks
    Vikas

    Hi Vikas,
        The problem is in Authorization? And check the mode of Process Synchoronus or asynchoronous? Both the RFC and CALL transaction should be Same /
    Thanks
    MAnju

  • Pass query to servlet through midlet

    Hi, I have a problem here. I would like to control the SQL Statement to be executed by the servlet using the mobile midlet. Like this one:
    midlet -> will call servlet with parameter statement -> servlet will execute the statement parameter passed by the midlet and will return a data result in XML -> midlet will read the XML file and retrieve the data.
    Another thing I would like to ask is how will I make the servlet to output an XML file that can be read by the midlet. If there's some tutorial on how please give me the link.
    I hope you get my point.

    I have made to retrieve data on my midlet from my servlet. The bad thing is the data sent on the midlet has html tags. How will I make the midlet to just output the data result without the tags?If you are in charge of the servlet, then have it output plain text. If you need to parse the MIDlet input first, then having the content of XML/HTML elements will allow you to print them out.
    Is this servlet used from HTML browser as well? If so, try having a separate one for mobile devices. There are plenty options to do it.
    Daniel

  • Calling servlet from a backing bean

    hi guys i need to call a servlet from a backing bean in JSF. how do i do that ?
    The scenario is i have to call servlet on a different machine from my backing bean . I also need to pass an object to the servlet .
    This object contains data which must be manipulated and inserted in the database by the calling servlet.
    I also want that after insertion in the db the control must be passed to the backing bean .
    Is this all possible???
    Please help

    You may want to investigate the built in java.net.URL class. For advanced needs, Apache has a Java HTTP client library.

  • Calling servlet from a java program

    Hi
    I need to call a servlet's doPost() method from a java program. I have a specific situation, where I need to call servlet from a java program. DUring this call I need to pass a file and two string to the servlet. Servelt after receiving the file and string uploads the file to the server at a specified location. I am stuck up as how to call servlet from a java program instead of a HTML or JSP.
    Can anyone help me to start with this.
    any suggestion is welcome.

    You have to establish a URLConnection with servlet from your java program.
    URL servletURL = new URL("http://localhost:8080/Myservlet?str1=abc&str2=def");
    URLConnection servletConnection = servletURL.openConnection();you can get the objectOutputStream
    ObjectOutputStream oos = new ObjectOutputStream (servletConnection.getOutputStream());
    oos.writeObject(your file object);-------------------------------------------------
    In the servlet u can get the strings using request.getParameter("str1");
    In the servlet u can get the strings using request.getParameter("str2");
    file = new ObjectInputStream (request.getInputStream()).readObject()a lot of resources are available on this ...
    hope this helps :)

Maybe you are looking for

  • Urgent: Error in uploading data in cube after adding new Key figure

    Hi Guys, I have added 1 key figure (DEC) to my existing cube. and proceeded as below: 1. Deleted all data from cube 2. activated the cube 3. set Constant 1 for this key figure 4. activated the transformation 5. reated a new DTP But when i execute it,

  • How to Import Database user in oracle which have character set AL32UTF8?

    Hello All, I want export one database user which have character set in WE8MSWIN1252 and I want to Import that Database user in oracle which have character set AL32UTF8 without changing character set. is there any argument in import command?? thanks

  • How to design  databse for binary tree

    kindly help in desiging databse for binary tree and also to retrive data from database.

  • Safari 4.1.3 crashes

    will be greatfullMy safari Crashes..Below is de report..What can i do to fix it? Please help !! Date/Time:      2011-06-09 00:55:10.120 +0200 OS Version:     10.4.11 (Build 8S2167) Report Version: 4 Command: Safari Path:    /Applications/Safari.app/C

  • Blackberry storm os 2012

    need to know what is the latest os for blackberry storm 9500 as of now FOR MAC .