Returning multiple parameters as response from a servlet

Hii Javaites
I want a servlet to return multiple parameters as response.
In my functionality , i am callling the servlet from a swing client .
I need to get two xml strings as response from the servlet.
Right now i am using
PrintWriter pw=response.getWriter();
pw.write(xmlString);
for writing xml string . but wht if i want to send another String (xmlString2) as resposne from the servlet to the swing application ?

You have several possibilities. If you control the XML formats you could unify the data into one XML message. You could modify your Swing app to make two requests. If it needs two separate pieces of info it is more logical to do it as two separate requests. If you really must do it this way, you could use the Zip classes (built in to Java) to put the two XML files together into a Zip file and then send that.

Similar Messages

  • I want to send a response from the servlet and then call another servlet.

    Hi,
    I want to send a response from the servlet and then call another servlet. can this happen. Here is my scenario.
    1. Capture all the information from a form including an Email address and submit it to a servlet.
    2. Now send a message to the browser that the request will be processed and mailed.
    3. Now execute the request and give a mail to the mentioned Email.
    Can this be done in any way even by calling another servlet from within a servlet or any other way.
    Can any one Please help me out.
    Thanks,
    Ramesh

    Maybe that will help you (This is registration sample):
    1.You have Registration.html;
    2.You have Registration servlet;
    3.You have CheckUser servlet;
    4.And last you have Dispatcher between all.
    See the code:
    Registration.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
      <HEAD>
        <TITLE>Hello registration</TITLE>
      </HEAD>
      <BODY>
      <H1>Entry</H1>
    <FORM ACTION="helloservlet" METHOD="POST">
    <LEFT>
    User: <INPUT TYPE="TEXT" NAME="login" SIZE=10><BR>
    Password: <INPUT TYPE="PASSWORD" NAME="password" SIZE=10><BR>
    <P>
    <TABLE CELLSPACING=1>
    <TR>
    <TH><SMALL>
    <INPUT TYPE="SUBMIT" NAME="logon" VALUE="Entry">
    </SMALL>
    <TH><SMALL>
    <INPUT TYPE="SUBMIT" NAME="registration" VALUE="Registration">
    </SMALL>
    </TABLE>
    </LEFT>
    </FORM>
    <BR>
      </BODY>
    </HTML>
    Dispatcher.java
    package mybeans;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletException;
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Dispatcher extends HttpServlet {
        protected void forward(String address, HttpServletRequest request,
                               HttpServletResponse response)
                               throws ServletException, IOException {
                                   RequestDispatcher dispatcher = getServletContext().
                                   getRequestDispatcher(address);
                                   dispatcher.forward(request, response);
    Registration.java
    package mybeans;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Registration extends Dispatcher {
        public String getServletInfo() {
            return "Registration servlet";
        public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            ServletContext ctx = getServletContext();
            if(request.getParameter("logon") != null) {          
                this.forward("/CheckUser", request, response);
            else if (request.getParameter("registration") != null)  {         
                this.forward("/registration.html", request, response);
    CheckUser.java
    package mybeans;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class CheckUser extends Dispatcher {
        Connection conn;
        Statement stat;
        ResultSet rs;
          String cur_UserName;
        public static String cur_UserSurname;;
        String cur_UserOtchestvo;
        public String getServletInfo() {
            return "Registration servlet";
        public void service(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            try{
                ServletContext ctx = getServletContext();
                Class.forName("oracle.jdbc.driver.OracleDriver");
                conn = DriverManager.getConnection("jdbc:oracle:oci:@eugenz","SYSTEM", "manager");
                stat = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
               String queryDB = "SELECT ID, Login, Password FROM TLogon WHERE Login = ? AND Password = ?";
                PreparedStatement ps = conn.prepareStatement(queryDB); 
               User user = new User();
            user.setLogin(request.getParameter("login"));
            String cur_Login = user.getLogin();
            ps.setString(1, cur_Login);
            user.setPassword(request.getParameter("password"));
            String cur_Password = user.getPassword();
            ps.setString(2, cur_Password);
         Password = admin");
            rs = ps.executeQuery();
                 String sn = "Zatoka";
            String n = "Eugen";
            String queryPeople = "SELECT ID, Surname FROM People WHERE ID = ?";
           PreparedStatement psPeople = conn.prepareStatement(queryPeople);
                      if(rs.next()) {
                int logonID = rs.getInt("ID");
                psPeople.setInt(1, logonID);
                rs = psPeople.executeQuery();
                rs.next();
                       user.setSurname(rs.getString("Surname"));
              FROM TLogon, People WHERE TLogon.ID = People.ID";
                       ctx.setAttribute("user", user);
                this.forward("/successLogin.jsp", request, response);
            this.forward("/registration.html", request, response);
            catch(Exception exception) {
    }CheckUser.java maybe incorrect, but it's not serious, because see the principe (conception).
    Main is Dispatcher.java. This class is dispatcher between all servlets.

  • How to send response from a servlet to a page in CQ??

    hi.. i have this servlet from where i need to send a string array or list array to the CQ webpage?? and this need's to be populated into a dropdown list on that page??..

    Hi,
    Unless if there is a specific need to use a servlet, you can implement the same logic(to generate dropdown list) inside a java bean. Use a getter that returns dropdown list and use the bean inside jsp and call the getter to populate dropdown list. In case, if you have to use servlet, you can use HttpClient inside bean getter to obtain response from the servlet and return the list or array.
    Regards,
    Sravan.

  • Returning multiple values at once from listOfValues region

    Friends,
    I've created a region (listOfValues) which has 4 fields/columns
    ResponsibilityName, ResponsibilityId, ApplicationName, ApplicationId
    I assigned ResponsibilityName of the listOfValues to a field Responsibility in a page.
    It works fine when I select a value from this LOV. It returns a value to 'Responsibility' field of the page.
    Is it possible to return other 3 fields as well while selecting ResponsibilityName from LOV. for example while selecting a value for field 'Responsibility' , can the LOV return ResponsibilityId from LOV to field 'ResponsibilityId' in the page, at the same time?
    Can 1 selection returns more than 1 values to fields?

    Nadir,
    I would suggest you have a look of the chapter on LOVs in the dev guide. Just to give you an idea, you map an item in the LOV table to an item on the base page. If you select one value from the LOV table, corresponding values are redirected to the accordingly mapped items on the base page.

  • Help: No Parameters, HTML Output from Java Servlet

    I have a Java Servlet that reads parameters passed from an HTML form and displays them to another HTML page. I know the servlet is being invoked; however, I am not seeing any HTML output. Sending the output to a file reveals the parameters are coming in as NULL as well.
    I attempted a simple sample app with the same results. Here is what I am running:
    The HTML Form:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Collecting Three Parameters</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1 ALIGN="CENTER">Collecting Three Parameters</H1>
    <FORM ACTION="ThreeParams">
    First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
    Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR>
    Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR>
    <CENTER><INPUT TYPE="SUBMIT"></CENTER>
    </FORM>
    </BODY>
    </HTML>
    The Java Code:
    public class ThreeParams extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Reading Three Request Parameters";
    out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
         "Transitional//EN\">\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>\n" +
    "<UL>\n" +
    " <LI><B>param1</B>: "
    + request.getParameter("param1") + "\n" +
    " <LI><B>param2</B>: "
    + request.getParameter("param2") + "\n" +
    " <LI><B>param3</B>: "
    + request.getParameter("param3") + "\n" +
    "</UL>\n" +
    "</BODY></HTML>");
    What happens when I "submit" from the form is the same form reloads with the query string in the URL: "http://localhost:8080/ThreeParams/?param1=1&param2=2&param3=3"
    Any assistance with either (or both) would be thoroughly appreciated:
    a) why the parameters are not being passed correctly to the servlet
    b) why the HTML output page is not displayed
    Thanks in advance!
    - Steve

    I have found the answer to my problem listed in another thread.
    Thank you.

  • How to get response from a servlet which depends on cookies?

    guys,
    i have a servlet which behaves differently based on the presence of a cookie or not. If cookie A is present in the machine it shows the the home page and if not it shows the login page.
    now i want to get the home page HTML content from a program without using the browser. i am aware this can be done by using java.net.URL but how do i simulate the cookie given that i know that's the cookie name and value it expects?
    Unfortunately i cannot paste the servlet code as it is a servlet of a product and i don't have the source code for it.
    Thanks
    S

    I believe you use URLConnection.setRequestProperty(), with the key being "Cookie".

  • RFC lookup to return multiple parameters

    Hi,
    I have a File to Idoc scenario involving RFC lookups.
    The RFC in this case has 2 input parameters and returns 5 output parameters in runtime. Can anybody help me with the UDF that can be used to send 2 parameters as input to the RFC and receive the 5 output parameters in the mapping and post it to the target Idoc structure.
    Your help would be much appreciated !
    Thanks & Regards,
    Sherin Jose P

    Hi,
           Please find the below UDF that i used when i got the same requirement.
    MySource structure is :
        MT_Source
                SSN
    My Target Structure is :
            ZIdoc
                   Empame
                   indClientSite
                   doj....etc
    My mapping program is like this....
               ssn---->findEmpInfo->findEmpName----EmpName
               findClientSite---->clientsite
    UDFCode:
    public String findEmpInfo(String ssn, Container container) throws StreamTransformationException{
    String inputString ="<?xml version=\"1.0\" encoding=\"UTF-8\"?> <ns0:RFC_GETEMPLOYEEDETAIL xmlns:ns0=\"urn:sap-               com:document:sap:rfc:functions\"> <SSN>"ssn"</SSN> </ns0:RFC_GETEMPLOYEEDETAIL>"ssn"</SocialSecurityNo>       </ns0:MT_EmpSSN>";
    String targetValue = "";
    AbstractTrace trace = container.getTrace();
    RfcAccessor rAcc = null;
    ByteArrayOutputStream out = null;
    try{
         Channel ch = LookupService.getChannel("BS_CLNT", "CC_Receiver_RFCLookup");          //DetermineChannel
         rAcc = LookupService.getRfcAccessor(ch);                      //Get RfcAccessor
         InputStream     iStream = new ByteArrayInputStream(inputString.getBytes());     
         XmlPayload   payload = LookupService.getXmlPayload(iStream);     //get xml payload form of the input
         Payload result = rAcc.call(payload);     //make a lookup call
         InputStream in = result.getContent();
         byte[]  bArray     =     new byte[512];
         out = new ByteArrayOutputStream(512);
         for(int i=in.read(bArray);i>0;i = in.read(bArray)){                                   out.write(bArray,0,i);
         targetValue = out.toString();
    catch(LookupException ex){
         trace.addDebugMessage("LookupException"+ex.getMessage());
    catch(IOException ex){
         trace.addDebugMessage("IOException"+ex.getMessage());
    finally{
                  if(out !=null){
              try{
                   out.close();
              catch(IOException ex){
                                                             trace.addDebugMessage("ErrorDuring Closing buffer"+ex.getMessage());
         if(rAcc !=null){
                 try{                                                        rAcc.close();
              catch(LookupException ex){
                   trace.addDebugMessage("Error while closing RFCAccessor"+ex.getMessage());
    GlobalContainer gContainer = container.getGlobalContainer();
    gContainer.setParameter("RFCResponse",targetValue);
    return targetValue;
    public String findEmpName(String str, Container container) throws StreamTransformationException{
         GlobalContainer gContainer = container.getGlobalContainer();
        Object obj =  gContainer.getParameter("RFCResponse");
        String str ="";
        str = obj.toString();
        String st = "\"";     
        str = str.replaceAll("&lt;", "<");
        str = str.replaceAll("&quot;", st);
        str = str.replaceAll("&gt;", ">");
        String clntSite = "";
        AbstractTrace trace = container.getTrace();
        ByteArrayInputStream in;
        in = new ByteArrayInputStream(str.getBytes());
        try{
                                                      DocumentBuilderFactory dbFact = DocumentBuilderFactory.newInstance();
                                                      DocumentBuilder dBuild = dbFact.newDocumentBuilder();
                                                      Document doc = dBuild.parse(in);
         NodeList nList1 = doc.getElementsByTagName("CLNTSITE");
                                                       for(int i=0;i<nList1.getLength();i++){
              Node nFname = nList1.item(0);
              clntSite = nFname.getChildNodes().item(0).getNodeValue();
              trace.addWarning("Client Site : "+nFname.getChildNodes().item(0).getNodeValue());
           catch(Exception ex){
                                                 trace.addWarning("Exception Occurred :"+ex);
           return clntSite;
    Hop this will help you......
    Thanks&Regards
    Priyanka

  • Xhtml call to servlet not returning response, not calling servlet

    I have xhtml in a web app making a call to a servlet but the response from the servlet is not displaying. The original xhtml displays after the submit button is pressed. I tried different alternatives for the servlet response, but I get the same result each time. I added logging to the servlet, but it looks like the servlet is not being called at all.
    xhtml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:ejstreegrid="https://unfccc.int/nais/ejstreegrid"
    xmlns:grid="http://java.sun.com/jsf/composite/gridcomp"
    xmlns:nais="http://java.sun.com/jsf/composite/naiscomp">
    <body>
    <ui:composition template="/templateForm.xhtml">
    <ui:define name="title">Some title</ui:define>
    <ui:param name="currentPage" value="somepage.xhtml" />
    <ui:define name="body">
    name to be added<br/><br/>
    <form action="someServlet" method="post">
    <input type="text" name="someName" />
    <input type="submit" />
    </form>
    </ui:define>
    </ui:composition>
    </body>
    </html>servlet in web app being called:
    package netgui.servlet;
    import java.io.IOException;
    import java.util.Enumeration;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class someServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;
    public someServlet() {
    super();
    protected void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException   {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request,
    HttpServletResponse response) throws ServletException, IOException {
    processRequest(request, response);
    private void processRequest(HttpServletRequest request,
    HttpServletResponse response) throws IOException {
    try {
    response.getWriter().write("some response");
    } catch (Exception e) {
    logger.error(e.getMessage());
    e.printStackTrace();
    response.getWriter().println("Error: " + e.getMessage());
    I also have a menu.xhtml that is calling the xhtml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <body>
    <script type="text/javascript">
    $(document).ready(function() {
    $("#btn").click(function() {
    $("#upload").click();
    return false;
    </script>  
    <ui:composition>
    <div id="navigation_bar">
    <ul id="topbarleft">
    <c:choose>                 
    <c:when test="${currentPage=='somepage.xhtml'}">
    <li><b>Some Page display</b></li>
    </c:when>
    <c:otherwise>
    <li><h:outputLink value="somepage.jsf">
    <h:outputText value="some page" />
    </h:outputLink></li>
    </c:otherwise>
    </c:choose>
    </ul>
    </div>
    </ui:composition>
    </body>
    </html>Is there some special format for submitting a form to a servlet from xhtml? Any ideas what could be wrong?
    Edited by: Atlas77 on Apr 16, 2012 6:53 AM
    Edited by: Atlas77 on Apr 16, 2012 6:54 AM
    Edited by: Atlas77 on Apr 16, 2012 6:56 AM
    Edited by: Atlas77 on Apr 16, 2012 7:27 AM

    You have a template. That template doesn't have for example a h:form of its own in which the body content is placed right? Nested forms don't work.
    Also for the next time, use \ tags to post code; that makes it actually readable. As you can see, the forum is now trying to interpret some special characters for formatting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Filtering response from an external servlet

    Hello J2EE gurus,
    I have a scenario where a JSP or servlet (A) running on our server needs to call another servlet(B) running on an external server. I do not want to send the response from B back to the client but instead block it in A. From my investigations, I understand filtering is a solution to block response from a servlet running in the same container.
    My questions are:
    1. Is it possible to implement a filter for JSPs? I understand we can for a servlet.
    2. More importantly, how can I block the response from B in A?
    Thanks in advance.

    Filters can be used to intercept calls requests to servlets, JSPs and static HTML files. They can also handle responses before they are sent back to a client.
    My questions are:
    1. Is it possible to implement a filter for JSPs? I understand we can for a servlet.
    Yes you can specify a filter for a JSP, see the filter and filter-mapping elments in the web.xml deployment descriptor.
    2. More importantly, how can I block the response from B in A?
    I may be missing something here but you could just open an HTTP URL from within servlet A and request the data from servlet B. You could then parse the response from servlet B to gather the information you need and add it to servlet A's response.

  • Stored Procedure Returning Multiple Rows

    Hello. Where can I find sample code from a class that calls a stored procedure that returns multiple rows?
    I have a servlet that calls the DB directly from the servlet & loops through the result set. I want to put that code into a stored procedure, but I'm not sure how to loop through the results.
    Your help is greatly appreciated!

    Surely you would call the stored procedure and loop
    through the resultset as usual.
    all that is different is the method by which you obtain the resultSet .
    assuming CallableStatement, Connection have been
    instantiated.
    cstmt=con.prepareCall("{call sp_NewOfficeSurgery (?,?)}");
    cstmt.setString(1,"first");
    cstmt.setString(2,"second");
    rs = cstmt.executeQuery();
    while (rs.next())
    String nme = rs.getString(1)
    etc,etc
    Hope this helps , Sorry If I have misinterpreted this
    please let me know if my thinking is floored or you need
    further clarification ect.
    [email protected]

  • Error trying to publish (real time) to delivery: No response from remote execute trying to save assettype [error was -103].

    Hi all,
    I'm trying to publish for first time to a new environment (delivery).
    The light of target destination is green.
    When i click on "inicialize" i get these errors and in the docs i cannot find why or what i have to do.
    Trying to publish asset types during inicialization it returns this error:
    No response from remote execute trying to save assettype [error was -103].
    Looking for the meaning for this i found: No table. What does it mean? Why the tool has not created the table?
    And then, the next error message is shown (all of them are shown in the same screenshot) trying to mirroring. It might have to do with the previos error message... but i have no idea!
    -12011. No response from remote execute trying to save assettype [error was -103]
    sites.log in delivery environment says as follows
    [2014-01-24 12:13:52,496 CET] [ERROR] [.kernel.Default (self-tuning)'] [fatwire.logging.cs.db] SQLException loading table definition for SiteCatalog with state HY000: [FMWGEN][SQLServer JDBC Driver]Object has been closed.
    java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Object has been closed.
    [2014-01-24 12:13:52,527 CET] [ERROR] [.kernel.Default (self-tuning)'] [com.fatwire.logging.cs] ContentServer exception running CS recursively
    COM.FutureTense.Common.ContentServerException: pagename not supplied  Error code:BAD PARAMETER
    [2014-01-24 12:13:52,543 CET] [ERROR] [.kernel.Default (self-tuning)'] [logging.cs.satellite.request] Error accessing the external page with pmd: page: ?Browser=Unknown  Browser&SystemAssetsRoot=/dlv/futuretense_cs/&errdetail=0&errno=0&null= &pagename=fatwire/wem/sso/casInfo
    [2014-01-24 12:13:52,543 CET] [ERROR] [.kernel.Default (self-tuning)'] [fatwire.logging.cs.request] COM.FutureTense.Common.ContentServerException: ContentServerException: (Reading page page: ?Browser=Unknown  Browser&SystemAssetsRoot=/dlv/futuretense_cs/&errdetail=0&errno=0&null= &pagename=fatwire/wem/sso/casInfo from co-resident Content Server failed (errno=0).) Error code:GENERIC SERVER ERROR
    [2014-01-24 12:14:06,021 CET] [ERROR] [.kernel.Default (self-tuning)'] [fatwire.logging.cs.db] SQLException loading table definition for SystemInfo with state HY000: [FMWGEN][SQLServer JDBC Driver]Object has been closed.
    java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver]Object has been closed.
    Does anybody know how to help here?
    Thank you very much.
    Gala

    What SQL server driver are you using, Microsoft's or the jTDS driver (see jTDS JDBC Driver)? It may be worth trying the other.
    Also, can you enable
    com.fatwire.logging.cs=DEBUG
    in log4j.properties and retest, then post the entire resulting sites.log and application server log somewhere for us to see? e.g somewhere like pastebin.com
    Phil

  • How can I return multiple values using Oracle 9i Web Services ?

    Hi, Is it possible to return multiple parameters using WebServices in general ? And if yes, how do we do it using Oracle 9i WebServices ?
    At my client usually I call
    return_value = SoapClient.MehtodName(param1, param2, param3)
    If i need more than one return_value...how do we handle that ?
    Thanks,
    -Krishna

    Anyone has any ideas about this ?
    And also if i want a collection in one of the input parameters...how to do that ?
    Does Oracle WS have any such support ? Or we have devise our own way like sending it by separators or something like that ?
    Thanks,
    Krishna

  • Executing an executable from a servlet or a JSP

    Is it possible to call an executable from a servlet. Say I have a client server application and I want to start the client application from a servlet. What is the best way to do that?
    I know normal Java applications can use the Runtime to run an executable. Can a servlet do the same? What are the security implications, considering that the servlet will be accessed from a browser?
    Thanks for your help.

    A servlet is executed on the server, not the client. The client receives a response from the servlet which is usually plain text formatted as HTML and/or javascript.
    So can a servlet use the Runtime class? Sure, but on the SERVER, not on the client. Hence, the executable will need to be on the webserver, not on the client machine and it will execute on the webserver, not on the client.
    Maybe, your HTML formatted response can include an <applet> tag to trigger the browser to download an applet that may have access to call an executable. Maybe a trusted applet?

  • Return multiple current view selection to a list

    Hi all
    Does anybody know of a smart way to return multiple randomly selected members from the current view into a list in a cell?
    Cheers
    Byron

    Hi,
    We cannot select multiple members from the current view. There is an alternate to this. Click on any empty cell. Right click and then select "Select Member" and then select the dimension. This will pop up a window with all the members of the dimension. Select the members you want and then click on the button for "copy to clipboard". This will open another window. You can select, whether you want to display these members across the row or column. After this, click on some empty cell and ctrl + v. This will paste all the selected members.
    Hope this helps.

  • Return data from Java servlet in form of JSON encoded parameters in Javascr

    How to return data from Java servlet in form of JSON encoded parameters in Javascript handler function call?
    The same is implemented in php as the following
    echo "sT.handleAjaxResponse(";
    echo json_encode($response);
    echo ");";
    How to do the same in Java servlet?
    Thanks.

    With the rising popularity of JSON (especially with Ajax), support for it has started to appear in the Java community. I am not aware of any standardized approach yet, but expect it is likely we'll see that eventually. For now, you probably want to look at a third-party library such as the [JSON in Java Library|http://www.json.org/java/], Jettison, or [Java Tools for the JSON Format|http://jsontools.berlios.de/].

Maybe you are looking for