How to return a httpservletresponse for generic servlets II

I have a servlet that do a call service to another machine( the service
          can be so different), and I would like to know if there is possible to
          return the "servletresult" in the "httpservletresult" or somethiing
          similar,because
          I don´t know which are the parameters to return , and i would like to
          manipule these parameters in the client. So, i want don´t use
          "getParameterValues" of "servletresult".
          I would like to return a object java. It is like to say that the result of
          the service call ("servletresult") is passed directly to the
          "httpservletresponse" and not pass every parameter (read by name ) between
          "servletresult" and "httpservletresponse".
          Thanks
          

I am not sure if I am answering your question fully but here goes:
          I have a pack of utilities that I use for handling servlet requests.
          One of them helps to transform an HTTPRequest object into a HashMap.
          The objective was to make the processing as web-independent as
          possible. So what you get is a generic java object which has all the
          data of the HTTP Request. You can use it any way you want. I am
          attaching the code below. It does the basic job but pls remember that
          it was designed for a slightly different purpose:
          * Converts an HTTPServletRequest object to an equivalent HashMap
          public boolean mapRequest(HttpServletRequest req, Map input)
          try
          Enumeration reqEnum = req.getParameterNames();
          String keystr;
          String valstr;
          while(reqEnum.hasMoreElements())
          keystr = (String)reqEnum.nextElement();
          valstr = req.getParameter(keystr);
          input.put(keystr, valstr);
          return true;
          catch(Exception e)
          return false;
          oscar alarcon wrote:
          >
          > I have a servlet that do a call service to another machine( the service
          > can be so different), and I would like to know if there is possible to
          > return the "servletresult" in the "httpservletresult" or somethiing
          > similar,because
          > I don´t know which are the parameters to return , and i would like to
          > manipule these parameters in the client. So, i want don´t use
          > "getParameterValues" of "servletresult".
          > I would like to return a object java. It is like to say that the result of
          > the service call ("servletresult") is passed directly to the
          > "httpservletresponse" and not pass every parameter (read by name ) between
          > "servletresult" and "httpservletresponse".
          >
          > Thanks
          

Similar Messages

  • How to return a "HttpServletResponse" for generic servlets (please Help me)

    I have a servlet that do a call service to another machine( the service
              can be so different), and I would like to know if there is possible to
              return to the client the "servletresult" in the "httpservletresult" or
              something
              similar("servletresult" is a class of "bea.jolt". and I utilizes for
              conectivity with TUXEDO).
              I am doing the call to the servlet in an application java(via URL and
              parameteres), not in browser.
              I don´t know which are the parameters to return , and i would like to
              manipule these parameters in the client. So, i want don´t use
              "getParameterValues" of "servletresult".
              I would like to return a object java. It is like to say that the result of
              the service call ("servletresult") is passed directly to the
              "httpservletresponse" and not pass every parameter (read by name ) between
              "servletresult" and "httpservletresponse".
              Thanks
              

    I have a servlet that do a call service to another machine( the service
              can be so different), and I would like to know if there is possible to
              return to the client the "servletresult" in the "httpservletresult" or
              something
              similar("servletresult" is a class of "bea.jolt". and I utilizes for
              conectivity with TUXEDO).
              I am doing the call to the servlet in an application java(via URL and
              parameteres), not in browser.
              I don´t know which are the parameters to return , and i would like to
              manipule these parameters in the client. So, i want don´t use
              "getParameterValues" of "servletresult".
              I would like to return a object java. It is like to say that the result of
              the service call ("servletresult") is passed directly to the
              "httpservletresponse" and not pass every parameter (read by name ) between
              "servletresult" and "httpservletresponse".
              Thanks
              

  • How to return a list of generic type

    I can create a method that takes a Class as parameter and return the same type:
    public <T> T getSomthing(Class<T> c) throws Exception {
            return c.newInstance();
    }My question is, can I modify this method to return a List of the same type as input class c? If so, how?

    Hi,
    import java.util.ArrayList;
    import java.util.List;
    public class ReturnList {
        @SuppressWarnings("unchecked")
        public <T> List<T> getList() {
         return new ArrayList();
    }Piet

  • How to return a game for a refund

    This game had a 5star rating..users raved..but I can't figure it out.  Minimal Help.  I'm not stupid, but this game is WAY out of my reach.  I didn't pay much, but in this economy I hate to waste any.

    Is this for an iOS game?
    http://www.labnol.org/software/itunes-app-store-refunds/13838/
    Is this for a Mac game?
    http://www.apple.com/support/mac/app-store/

  • How to return binary data from a servlet?

    This is my problem:
    I have a table (generated from a database), and I would like the user to be able to select a one of the items in the table. When the user clicks the link I would like to transfer a piece of binary data stored in my database.
    I am quite new to Creator and web apps, so I don't really know the best solution to implement this. I have one requirement: I must log the file transfer in the database (the web-servers log is not good enough...)
    Any help would really be appreciated...
    Trond

    Hi Trond,
    Please have a look at the following thread.
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=46410
    It discusses how to display an image stored in the database table. This discussion may provide you with useful information.
    Hope this helps
    Cheers
    Giri :-)
    Creator Team

  • How to return blank value for a column

    Hi All
    We would like to create a short version of the BI report for the scorecards that has the same number and order of the columns, but far less rows. This will improve the size and performance of the Overhead, Services scorecard.
    For some columns, we need blank values , which means the content should be blank , but the column should appear in the report.
    I have tried checking some options in "column format" tab under column properties and played with "column header interaction" and "value interaction" , however i couldnt get the desired results.
    Can we achieve this?
    Please suggest me on the same.
    Regds
    Mano

    Mano wrote:
    For some columns, we need blank values , which means the content should be blank , but the column should appear in the report.Can you not just add any colulmn from the subject area and change its formula to '' ? You can rename the column name, and it will show blank values for all the records.
    Assign points if helpful.
    Regards,
    -Amith.

  • Create Pricing Profile for Generic Articles

    Hi
    How to create pricing profile for generic articles, this need to be assign in article master basic data view.
    also is it possible to give price for generic article using sales price calculation (VKP1 and VKP5)
    regards
    satish

    satish c wrote:>
    > Hi
    >
    > How to create pricing profile for generic articles, this need to be assign in article master basic data view.
    Pricing Profile can not be created, It is default in SAP...this can be assigned in Basic view of Article master data
    This profile is useful for fixing price for variant article...three way you can define variant price
    If you select
                    0. Variants will have different price
         1. Variants can maintain different price
         2. Variants have same price as Generic material
    > also is it possible to give price for generic article using sales price calculation (VKP1 and VKP5)
    It is same like single article...you can maintain price in VKP1, VKP5
    Regards
    Vijai Jain

  • How to return URL of servlet path ?

    Hello,
    I want to return the URL of current servlet path (such as "http://www.mydomain.com:888/servlet"). How can I do that ?
    thanks in advance...

    Hi danisment,
    Checkout the API for javax.servlet.http.HttpServletRequest Interface in which you have the methods to get path information.
    Use
    request.getServletPath();Returns the part of this request's URL that calls the servlet. This includes either the servlet name or a path to the servlet, but does not include any extra path information or a query string.
    If you want the entire URL,
    use request.getRequestURL(); returns the StringBuffer
    The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters
    Hope this will throw some light for you problem.
    Thanks,
    Sanath Kumar

  • How to maitain Deltas for generic master data source

    Hi Friends,
    I created a view using MARA and MARC table. This view fields maitained by attributes of ZWMAT_PLT Characteristic.
    Now i faced the problem with deltas.
    How i need to maitain delta for above view.
    please give me solution for above problem.
    Thanks & Regards,
    Guna.

    Hi,
    If you have timestamp field in the view it is better use the Timestamp for the generic delta. Else try to include a timestamp field in the view.
    Also check this forum.
    How to set the delta for existing generic data source
    Delta Updating a Master Data Infoobject
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
    Assign points if this is helpful
    Rgs,
    I.R.K

  • How to return Collection from from entity bean to servlet?

    hi
    is it possible to return Collection from entity bean (Which is returns form CMR field ) to servlet ?
    thanks

    SERVLET
    public class test extends HttpServlet {
       @EJB
       private LocalBean lookupBean;
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
      for(Item i : lookupBean.getMyCollection() )
              out.println(i.getItemName());
            out.close();
    }BEAN INTERFACE
    public interface BeanLocal {
        Collection<Item> getMyCollection();  
    }BEAN IMPLEMENTATION
    @Stateless()
    public class Bean implements BeanLocal {
        @PersistenceContext()  
        private EntityManager em;      
         public Collection<Item> getMyCollection() {
            return em.createQuery("SELECT i from ITEM i").getResultList();
        }    and if you create an instance of your servlet you'll have to reinitialize LocalBean
    @EJB(name="myejbref", beanInterface=BeanLocal.class)
    private BeanLocal lookupBean;
    private BeanLocal getLookupBean() {
    if(lookupBean == null) {
    try {
    InitialContext ic = new InitialContext();
    lookupBean = (BeanLocal) ic.lookup("java:comp/env/myejbref");
    catch(Exception e){
    System.out.println(e.getMessage());
    return lookupBean;
    }

  • I bought my iphone5 last Mar 1, 2013. However, it was stolen/lost last friday Jun 14.How can I locked it for them not to use or resell it?I'm not registered at ICLOUD. I am not expecting it to be returned. I just want it not to be used anymore by others..

    I bought my iphone5 last Mar 1, 2013. However, it was stolen/lost last friday Jun 14.How can I locked it for them not to use or resell it?I'm not registered at ICLOUD. I am not expecting it to be returned. I just want the unit to become useless already so that stolen/lost  Iphone or any kind of apple brand gadget will no longer be of interest by others to buy it from any thief or any person who will resell it in just a small amount.

    Sorry, but if you did not set up Find My iPhone, then unless your iPhone is set up with a company Microsoft Exchange server or other mobile device management system, there is no way to wipe the iPhone of its data, though if you had a screen lock in it, the thieves/finder will probably restore it and wipe the data anyway. There is no way to lock the iPhone permanently to prevent someone from using your iPhone, though you can report the loss to your cell carrier and they may be able to blacklist it from connecting to their network.
    Regards.

  • HT4009 How long does it take for apple to return with the needed code for in app purchases.  We have a developer working through elance that states he submitted a finalized version last friday to apple and is still waiting to get the code back from Apple?

    We are being told by our elance developer that he is just waiting on apple to return the code for in app purchases with our app.  he says he had to submit a complete version before they would give it to him and that he did that last friday.  Needless to say i don;t beleive him.  Can anyone validate for me the process of getting the code installed into our app and how long it should really take.

    I'd say an average of one week, depending on backlog. Expect two if you are outside the US.
    The outage has caused some lingering effects that seem to be delaying things for some, however.
    Patience is key in all things when it comes to being a developer

  • How to install eclipse and MyEclipse and use it for jsp-servlet-web service

    hi ,
    please help me to install eclipse 3.1 and How to integrate MyEclipse to do jsp-servlet programming and web services.
    please also help me to include application server like tomcat and axis and use that environment in MyEclipse ide.
    please help me.....

    At the time of installation , you can't change SID XE.
    After installation, you can add another service name
    Check following thread for more details
    Re: How to create service on Oracle 10g XE
    - Virag Sharma
    http://virag.sharma.googlepages.com
    http://viragsharma.blogspot.com

  • How to set  Non Cumulative Init flag for Generic datasource

    Hi all,
       I need to create a generic datasource which can be used to initialize the Non Cumulative Cube. Eg. setting the opening balance.
       The STOCKUPD field in the ROOSOURCE should be set to X so that the infopackage will have the "Generate Initial Status" option. But there is no interface available in R/3 pluggin to do this.
    How can this be done? Or is it not allowed for generic datasources as it is only valid of 2LIS_03_BX datasource
    for stock updation.
      Will there be other issues if I change the table entry for STOCKUPD in roosource table for my datasource?
    regs
    Anoop

    Hello,
      any idea on this?
    regs
    Anoop

  • How set  UserName and Password for HTTP Basic Authentication for a servlet

    Hi..
    How set UserName and Password for HTTP Basic Authentication for a servlet in JBoss server?
    Using Tomcat i can do it .(By setting roles in web.xml, and user credintails in tomcat-user.xml).
    But i dont know how do it in JBOSS..
    I am using Netbeans and Eclipse IDEs.. Can we do it by using them also!?
    Thank u

    Hi Raj,
    You can do this by creating a Login screen for the users and check the authentication of each user in PAI i.e. PROCESS AFTER INPUT.
    Store the user information in a database table and check the username and password when the user enters it.
    You can display password as *** also. For this double click on input box designed for password and goto Display tab. Select Invisible in the list and check it.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN <fcode for submit>.
          SELECT SINGLE uname pwd
           FROM <DB table>
           INTO (user, pass)
           WHERE username = user AND
                   password = passwd.
          IF sy-subrc = 0.
    <Go to next screen for further processing>
          ELSE.
    <Display Error message and exit>
          ENDIF.
      ENDCASE.
    Regards,
    Amit
    Message was edited by:
            Amit Kumar

Maybe you are looking for

  • Issue with Resubmission in WS12300111

    Hi Experts,                   In my leave workflow when a request is rejected by the employee I am getting a workitem in my portal "Process Leave Request by Employee", when I resubmit the request system is triggering a new request instead of provcess

  • Website buttons not working in chrome

    Has anyone else experienced issues with websites in chrome, on windows 7, through bootcamp? I've verified that website buttons work in internet explorer on the same system. Also, I've verified that they work on both imac OSX, chrome and Safari - as w

  • IPhoto 6.0.6 text not printed on cards and book

    I bought via iPhoto cards and entered texts. The text was not printed when I received it. A few days later ordered a hardcopy book : same problem. All texts are missing except the text on the cover of the book. What can it be ? Message was edited by:

  • How to have lossless music on the PC and MP3 on the ipod

    I have an ipod for the first time - and am hoping there is a way to do what I want - can anyone help? I have all my music ripped to my PC harddrive through itunes into Apple Lossess format. The itunes music libabry folder is then accessed by my Sonos

  • COPA-Assessment cycle KEU5

    We have run cost center -assessment cycle for a cost center group and all the cost of the profit centers are distributed to respective costcenters.And now we goto COPA-Assessment cycle KEU5 and run the cycle for the cycle with same cost center group