Help translating a servlet code to bean

hi all
i'd like to translate a servlet code to bean code
the servlet, called from the <img src""> tag in my web page retrieves an images from a database and, setting the response content-type to "image" returns the image.
i'd like to do it through the common getXxx/setXxx methods of a bean
how to do it?
that's the servlet's code:
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, java.io.IOException {
        response.setContentType("text/html");
        ServletOutputStream out = response.getOutputStream();
        try
            Connection connection=(Connection)getServletContext().getAttribute("connection");
            Statement s=connection.createStatement();
            response.setContentType("image/jpeg");           
            ResultSet rs=s.executeQuery("select "+request.getParameter("col")+" from products where id="+request.getParameter("id"));           
            while(rs.next())
                out.write(rs.getBytes(request.getParameter("col")));
        catch(SQLException s)
            response.setContentType("text/html");           
        catch(NullPointerException n)
        out.close();
    } thanx in advance
sandro

try this:
<%
response.setContentType("text/html");
try {
Connection connection=(Connection)application.getAttribute"connection");
   Statement s=connection.createStatement();
   response.setContentType("image/jpeg");
   ResultSet rs=s.executeQuery("select "+
              request.getParameter("col")+
             " from products where id="+
              request.getParameter("id"));
   while(rs.next()) {
%>
      <%= rs.getBytes(request.getParameter"col"))) %>
<%
} catch(SQLException s) {
   response.setContentType("text/html");
} catch(NullPointerException n) {
%>

Similar Messages

  • How to translate this statement to java servlet code

    INSERT INTO table_name (column1, column2,...)
    VALUES (value1, value2,....)

    You wouldn't translate that statement to servlet code. The idea doesn't make any sense. However you might include it in a servlet; read the tutorial that zadok linked to.

  • Closing  a browser with the help of servlet code

    Is it possible to close a browser by using servlet code?
    If so please help me with code.
    Thanks

    This is really a javascript question, but it's:
    window.close()

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • Can servlet access Serializable Bean ?

    This is my bean below.. My jsp pages can access this bean but my servlet cannot... Do I need to make remove the Serializable interface that I am implementing right now so servlet can access ? Can serlvet access beans ?
    import java.io.*;
    import java.sql.*;
    import javax.sql.*;
    import java.util.*;
    * Re-usable database connection class
    public class ConnectDB implements Serializable{
    // setup connection values to the database
    static final String DB_DRIVER = "";
    static final String myURL = "";
    static final String USERNAME = "";
    static final String PASSWORD = "";
    static Connection con = null;
         public ConnectDB(){}
         /* Returns a connection the file that calls the method*/
         public static Connection getConnection()
              try
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   con = DriverManager.getConnection("......");
              catch (Exception e)
                   e.printStackTrace();
              finally
              return con;
         /*Closes Connections*/     
         public static void closeConnection(Connection con)
              try
                   if (con != null)
                   con.commit();     
                   con.close();
              catch (Exception e)
                   e.printStackTrace();
    }

    A Servlet is just a Java class and so can access beans. Also, a JSP is translated to a servlet before execution so you already have a servlet accessing the bean.
    Can you post relevant code and error message?

  • Help needed: clarifying the use of beans to pass data from database to JSP

    Hi everyone,
    I am sure you all get fed up with being asked this question as I can see it is asked a lot when googled, but the answers given have not cleared things up for me.
    Anyway, I have a JSP page that contains a text box, submit button and a select box of size 10. The user enters a search string and the form submits the data and reloads the same page. From the code you can see the Name property of the bean is set.
    <jsp:useBean id="vtm" class="FinalYearProject.Types.VtmType" scope="page" />
    <jsp:setProperty name="vtm" property="NM" value="${param.NM}" />I then need to be able to use that name to query a postgresql database. I have a JDBCConnector class with the method:
        public ResultSet searchTable(String NM ) throws SQLException {
            String[] names = NM.split(" ");
            NM = "";
            for(int i = 0; i < names.length; i++) {
                NM = names[i] + "%";
            return stat.executeQuery("SELECT * FROM vtm WHERE nm ILIKE '" + NM + "';");
        }This method however can be changed.
    My question really is what is the best way for me to take the name, get the resultset and pass back the VtmType objects to the jsp so that I can populate my select box, and where should each part be handled i.e. the JSP page, the VtmType, the JDBCConnector.
    I may be going about it completely the wrong way and using beans incorrectly, but I just cant seem to get my head around the problem.
    Any help would be much appreciated,
    Thanks.

    Hi,
    Thanks for the help, I actually found some literature about the JSP Model 2 and realised that was what I needed to do. I have now re-written everything and it has made my life a lot eaiser, typically this was before I checked back on this post though!
    Anyway, I now have JSP pages requesting Servlets which create beans and call classes that access the database. The servlet then forwards the beans and where necessary a small of html to another JSP. Like you have suggested.
    One problem I have now however, is that the user needs to be logged in to access some of the pages. An error page with the correct message is displayed to the user when it is processed via the servlet.
    //Servlet detects an error
    request.setAttribute("errorMsg", "1");
    gotoPage("/loginError.jsp", request, response);
    //JSP detects which errorMsg to display
    <c:set var="errorMsg" value="${requestScope.errorMsg}" />However, when the user does not sign in and clicks a link which is blocked the JSP forwards directly to the error JSP.
    //Tests to see if user is logged in
    <c:if test="${empty user.username}">
        <jsp:forward page="/loginError.jsp">
            <jsp:param name="errorMsg" value="3" />
        </jsp:forward>
    </c:if>The problem with this is that the only way I can see of checking the errorMsg type is with:
    //JSP checks which errorMsg to display
    <c:set var="errorMsg" value="${param.errorMsg}" />Which is different to how I determine the errorMsg from the Servlet. Is there a way of getting the errorMsg type that is the same for both actions?
    Thanks.

  • Servlet as java bean

    i have written my jdbc connectivity code in a servlet..n want to use it as a bean can i use it as a bean plz help me out.

    I have a feeling you're going to be out of luck there. They are somewhat different beasts.
    If you mean a bean for access from a JSP? Write one, and (dare I say it) copy/paste your db access "codes". Or use the standard taglib JSTL, it has data access stuff for you.
    Later, of course, you'll come back and say to me "the performance of this bean in my jsp sucks"...
    ...so my real recommendation is: read the documentation and be clear about the difference between a servlet and a bean... (which I would imagine, of course, is just the advice you don't want to hear).
    /k1

  • Problem while calling servlet from java bean

    I am trying to call a servlet from java bean in cep.
    My java bean:
    package com.bea.wlevs.example.algotrading;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.example.algotrading.event.MarketEvent;
    import javax.xml.bind.JAXBContext;
    import javax.xml.bind.Unmarshaller;
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLConnection;
    public class MarketEventBean implements StreamSink {
         String s=null;
         public void onInsertEvent(Object event) {
              if (event instanceof MarketEvent) {
                   MarketEvent marketEvent = (MarketEvent) event;
                   try {
                        JAXBContext cxt = JAXBContext.newInstance(MarketEvent.class);
                        Unmarshaller unmarsh = cxt.createUnmarshaller();
                        StringReader strReader = new StringReader(marketEvent.getString_1());
                        MarketEvent obj = (MarketEvent) unmarsh.unmarshal(strReader);
                        s=obj.getSymbol();
                        System.out.println("data: " + s);
                   } catch(Exception e) {
                        e.printStackTrace();
                   try {
                        System.out.println("test1");
         URL url = new URL("http://172.18.21.94:7001/AppServletrecv-Model-context-root/ReceiveServlet");
         URLConnection conn = url.openConnection();
              System.out.println("test2");
         conn.setDoOutput(true);
              System.out.println("test3");
         BufferedWriter out =
         new BufferedWriter( new OutputStreamWriter( conn.getOutputStream() ) );
         out.write("symbol="+s);
              System.out.println("test4");
         out.flush();
         System.out.println("test5");
         out.close();
         System.out.println("test6");
         BufferedReader in =
         new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
              System.out.println("test7");
         String response;
         while ( (response = in.readLine()) != null ) {
         System.out.println( response );
         in.close();
         catch ( MalformedURLException ex ) {
         // a real program would need to handle this exception
         catch ( IOException ex ) {
         // a real program would need to handle this exception
    My servlet code:
    package model;
    import javax.servlet.http.HttpServlet;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ReceiveServlet extends HttpServlet {
    private final static String _SYMBOL = "symbol";
    public void doPost(HttpServletRequest request, HttpServletResponse response) {
    * Get the value of form parameter
    // private final static String USERNAME = "username";
    String symbol = request.getParameter( _SYMBOL );
    * Set the content type(MIME Type) of the response.
    response.setContentType("text/html");
    * Write the HTML to the response
    try {
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title> A very simple servlet example</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello " + symbol +"</h1>");
    out.println("</body>");
    out.println("</html>");
    out.close();
    } catch (IOException e) {
    Web.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5" xmlns="http://java.sun.com/xml/ns/javaee">
    <servlet>
    <servlet-name>ReceiveServlet</servlet-name>
    <servlet-class>model.ReceiveServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ReceiveServlet</servlet-name>
    <url-pattern>/ReceiveServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    My servlet is running in weblogic server.
    But when I am running this program in weblogic server side there is no log.
    Edited by: 856272 on Jun 23, 2011 6:43 AM

    I would run both sides in a debugger and see what code is getting invoked

  • Servlet cannot find Bean

    I am trying to access a java bean through a servlet..
    the bean is defined in the package com.mycomp
    when i use this bean using test.jsp it works fine it finds the package com.mycomp.. but when i am using the Servlet it cannot find the package...when i am trying to compile the servlet it says it cannot resolve the symbol class ConnectionBean
    it cannot find the package com.mycomp
    your help will be appreciatied....
    here is the structure of files:
    tomcat
    webapps
    myapp
    jsp
    -test.jsp
    WEB-INF
    classes
    -PropertyServlet.java
    -PropertyServlet.class
    -ConnectionBean.java
    com
    mycomp
    -ConnectionBean.class
    I have tried importing in the servlet import com.mycomp.*; but i still get an error com.mycomp not found...
    I have also tried importing the class itself by import com.mycomp.ConnectionBean;
    I still get the package com.mycomp not found;
    is there any xml file or anything that i need to edit so servlets can read the packages located in classes folder?

    me also same problem...
    this class path is included in server itself..
    or we can set during compiling time...
    then this is my compile.bat file please check
    set classpath=%CLASSPATH%; ./WEB-INF/classes;
    @echo off
    javac -d ./WEB-INF/classes/ ./dev/beans/*.java
    javac -d ./WEB-INF/classes/ ./dev/ContentManagement/beans/*.java
    javac -d ./WEB-INF/classes/ ./dev/servlets/*.java
    and my servlet file like this below..
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import com.deploy.servlet.*;
    public class ControlServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("Testing");
    /*          if (request.getParameter("pageName")=="CEOSpeak")
                   CEOBean CB = new CEOBean();
                   if (request.getParameter("actionType")=="add")
                   else if (request.getParameter("actionType")=="edit")
                   else if (request.getParameter("actionType")=="delete")
                        if(CB.deleteCEO(request.getParameter("CEOId")))
                             response.sendRedirect("CEO_Speaks.jsp");

  • Need urgent help on Applet-Servlet communication

    Hi,
    I have a applet having two button A and B. A passes querystring "Select name from test where letter = A" when button A is pressed while B passes querystring "Select name from test where letter = B" when button B is pressed. The applet passes the string to a servlet which in turn queries a database to get the output name back to the applet. Both compiles fine but while running I am getting the following error:
    java.io.IOException:
    Any help is appreciated in advance. Thanks. Regards
    THE APPLET CODE:
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    public class ReinApplet1 extends Applet implements ActionListener
    TextField text;
    Button button1;
    Button button2;
    TextArea taResults;
    String qryString1;
    public void init()
    button1 = new Button("A");
    button1.addActionListener(this);
    add(button1);
    button2 = new Button("B");
    button2.addActionListener(this);
    add(button2);
    taResults = new TextArea(2,30);
    add(taResults);
    // text = new TextField(20);
    // add(text);
    public void actionPerformed(ActionEvent e)
    Object obj = e.getSource();
    if(obj == button1)
    String qryString = "select name from test where letter = A";
    executeQuery (qryString);
    if(obj == button2)
    String qryString = "select name from test where letter = B";
    executeQuery (qryString);
    public void executeQuery (String query)
    String qryString1 = query;
    try
    URL url=new URL("http://localhost:8080/examples/servlet/ReinServlet1");
    String qry=URLEncoder.encode("qry") + "=" +
    URLEncoder.encode(qryString1);
    URLConnection uc=url.openConnection();
    uc.setDoOutput(true);
    uc.setDoInput(true);
    uc.setUseCaches(false);
    uc.setRequestProperty("Content-type",
    "application/x-www-form-urlencoded");
    DataOutputStream dos=new DataOutputStream(uc.getOutputStream());
    dos.writeBytes(qry);
    dos.flush();
    dos.close();
    InputStreamReader in=new InputStreamReader(uc.getInputStream());
    int chr=in.read();
    while(chr != -1)
    taResults.append(String.valueOf((char) chr));
    chr = in.read();
    in.close();
    // br.close();
    catch(MalformedURLException e)
    taResults.setText(e.toString());
    catch(IOException e)
    taResults.setText(e.toString());
    THE SERVLET CODE:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    public class ReinServlet1 extends HttpServlet
    Connection dbCon;
    public void init() throws ServletException
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    dbCon=DriverManager.getConnection("jdbc:odbc:Sales");
    catch(Exception e)
    System.out.println("Database Connection failed");
    System.out.println(e.toString());
    return;
    public void handleHttpRequest(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    PrintWriter out = res.getWriter();
    res.setContentType("text/html");
    String qery=req.getParameter("qry");
    try
    Statement st=dbCon.createStatement();
    ResultSet rs= st.executeQuery(qery);
    while(rs.next())
    out.println(rs.getString(1));
    catch(SQLException e)
    System.out.println(e.toString());
    return;
    out.println();
    out.close();
    THE HTML CODE
    <html>
    <applet code = ReinApplet1.class width=500 height=300>
    </applet>
    </html>

    Since you are just using Strings, it's easier to use an ObjectOutput/InputStream. See http://forum.java.sun.com/thread.jsp?forum=33&thread=205887 for a detailed example.
    Cheers,
    Anthony

  • Compiling servlet code

    I m new to servlets.
    I just copied a servlet code from servlet Help.Then tried to compile with it JDK1.3.But it showing error.It is not compiling package Javax .What may be the possible error.

    Right, the javax.servlet packages are not part of J2SE.
    You'll need a servlet engine to run your servlets/JSPs. It'll have the servlet.jar containing the javax.servlet packages. You'll have to add that to your CLASSPATH when you compile.
    I'd recommend Tomcat as your servlet engine. It's capable and free:
    http://jakrata.apache.org/tomcat
    %

  • Samples Code --- BI BEANS without Oracle OLAP

    We can not download Samples Code --- BI BEANS without Oracle OLAP from Oracle Ftp site.
    Thanks for help:)
    Who can send me the sample code.
    [email protected]

    The file has been reposted

  • Running a servlet code over Tomcat 4.1

    MY HTML CODE THAT CALLS THE SERVLET:
    <html>
    <body>
    <form method="post"action="http://localhost:1234/examples/servlets/program">
    Name : <input type=text name="text1">
    <input type="submit">
    </form>
    </body>
    </html>
    MY SERVLET CODE THAT I HAVE ALREADY SUCCESSFULY EXECUTED ON TOMCAT 3.2.1:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class program extends HttpServlet
    public void service(HttpServletRequest
    req,HttpServletResponse res)throws
    IOException,ServletException
    PrintWriter out= res.getWriter();
    out.println("Hello World!");
    String str= req.getParameter("text1");
    out.println("WElcome:"+str);
    out.close();
    1.==>Any body please tell what all classpaths I have to set here?
    2.==>Do I need to write any xml file for running this code ..if yes then please tell what to write in the xml code and where to save it.
    3.==>Please tell me where to save my servlet code and html code in Tomcat 4.1
    4.==> Do I need any batch file during its execution and lastly how to execute it in Tomcat 4.1...
    I have already successfully executed the program in Tomcat 3.2.1
    5==> Please check if my codes are OK to run over Tomcat 4.1

    You should get in the habit of creating war files ( Web Archive file ).
    You can deploy a war file to any servlet container like tomcat.
    Maven2 is a nice tool that helps you build war files.
    Here is an article on how to get started.
    http://www.javaworld.com/javaworld/jw-12-2005/jw-1205-maven.html

  • Please, HELP me. Servlet/JSP

    Hi,
    I have a servlet that builds an URl to extract the .XLS file fromt he repository. Becoz MS EXCEL is unable to open if there are more than 65000 records, I split the files which are holding over 60,000 records in to two parts. naming them like filenamePart1.XLS and Filenamepart2.XLS.
    Now my problem is. How can i check whether my file has more than 60,000 records is there any direct method. I wrote the following program, but is not working fine.
    One more problem is ,How can i display these split files?.Again Remember, I used to build the URL and open it using Request dispatcher and forwarding the request. But now I have two files. How can I go about it. Any suggestion or code would be appriciated. Thank you.

    Infact I have the same file in .TXT format in the same
    folder, So I am checking this from txt file(
    filename.txt). It still doesn't work.I belive the
    following servlet code explains better.1��. Try to call the method countLines with the full path of your file.(e.g. "C:\\reports\\filename.txt"). Should work.
    If you want to count the records of your xls file
    take a look at http://jakarta.apache.org/poi/hssf/index.html. Can help you manipulate Excel files from java.
    2��. To display the 2 files in your browser (if that's what you want...)
    you can respond from your servlet with an html like the following:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
         function openFiles() {
              window.open('url-of-filenamePart1.XLS ','file1','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=640,height=480');
              window.open('url-of-filenamePart2.XLS ','file2','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,width=640,height=480');
    </SCRIPT>
    <BODY onLoad="openFiles();">
    </BODY>
    </HTML>
    2 windows for the 2 excel files will be popped up. url-of-filenamePart1.xls and url-of-filenamePart2.xls are the values of the String variables urlPdf1 and urlPdf2 in your code.
    Regards
    BG

  • Need help with applet servlet communication .. not able to get OutputStream

    i am facing problem with applet and servlet communication. i need to send few image files from my applet to the servlet to save those images in DB.
    i need help with sending image data to my servlet.
    below is my sample program which i am trying.
    java source code which i am using in my applet ..
    public class Test {
        public static void main(String argv[]) {
            try {
                    URL serverURL = new URL("http://localhost:8084/uploadApp/TestServlet");
                    URLConnection connection = serverURL.openConnection();
                    Intermediate value=new Intermediate();
                    value.setUserId("user123");
                    connection.setDoInput(true);
                    connection.setDoOutput(true);
                    connection.setUseCaches(false);
                    connection.setDefaultUseCaches(false);
                    // Specify the content type that we will send binary data
                    connection.setRequestProperty ("Content-Type", "application/octet-stream");
                    ObjectOutputStream outputStream = new ObjectOutputStream(connection.getOutputStream());
                    outputStream.writeObject(value);
                    outputStream.flush();
                    outputStream.close();
                } catch (MalformedURLException ex) {
                    System.out.println(ex.getMessage());
                }  catch (IOException ex) {
                        System.out.println(ex.getMessage());
    }servlet code here ..
    public class TestServlet extends HttpServlet {
         * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
         * @throws ServletException if a servlet-specific error occurs
         * @throws IOException if an I/O error occurs
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
             System.out.println(" in servlet -----------");
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            ObjectInputStream inputFromApplet = null;
            Intermediate aStudent = null;
            BufferedReader inTest = null;
            try {         
                // get an input stream from the applet
                inputFromApplet = new ObjectInputStream(request.getInputStream());
                // read the serialized object data from applet
                data = (Intermediate) inputFromApplet.readObject();
                System.out.println("userid in servlet -----------"+ data.getUserId());
                inputFromApplet.close();
            } catch (Exception e) {
                e.printStackTrace();
                System.err.println("WARNING! filename.path JNDI not found");
            } finally {
                out.close();
        @Override
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            System.out.println(" in foGet -----------");
            processRequest(request, response);
         * Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
         * @throws ServletException if a servlet-specific error occurs
         * @throws IOException if an I/O error occurs
        @Override
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            System.out.println(" in doPost -----------");
            processRequest(request, response);
         * Returns a short description of the servlet.
         * @return a String containing servlet description
        @Override
        public String getServletInfo() {
            return "Short description";
        }// </editor-fold>
    }the Intermediate class ..
    import java.io.Serializable;
    public class Intermediate implements Serializable{
    String userId;
        public String getUserId() {
            return userId;
        public void setUserId(String userId) {
            this.userId = userId;
    }

    Hi,
    well i am not able to get any value from connection.getOutputStream() and i doubt my applet is not able to hit the servlet. could you review my code and tell me if it has some bug somewhere. and more over i want to know how to send multiple file data from applet to servlet . i want some sample or example if possible.
    do share if you have any experience of this sort..
    Thanks.

Maybe you are looking for

  • SC Current Status Table

    Hi All; We are using SRM 7.0 I am developing a report to show the status of the SC. However, I could not find the table which gives me the current status of the SC. In BBP_PD, ican see the following status but I don't know what is the current status

  • What can I actually to with database connections?

    This may sound like an odd question, but once I define a MySQL connection in Dreamweaver, what can I actually do with it? Let me clarify what I'm doing: I've only just found out that we can define MySQL connections when a PHP/MySQL site is defined. I

  • E51 - contacts not visible

    Hi there I have an E51 and am not sure what has happened but one minute all my contacts were visible and now they are not. If a person whose details I have stored in my phone memory calls me I can see their details however I cannot retrieve contact i

  • I am not able to load castle age all the way on facebook. I have tried clearing and uninstalling and reinstalling. It worked before...

    When I go the the page not all of the tabs will show up so I can not play it on Firefox. I have disabled all of the new add ons I put on it. I have a 64 bit windows does that have anything to do with it?

  • Interface StreamConnexion not find

    Hi all, In order to communicate with a bluetooth device, I've installed on my PC (OS : Ubuntu 8.04) the WTK 2.5. I would like to create a SPP Server. I find a lot of example on the web which use the StreamConnection interface of the mdi api. But I ca