Flex2 Newbee Help

I have been trying to populate a combo box from a HTTPservice
bound to an .asp file, it works great for a list box, this has
given me a bad beating! I will purchase Flex as soon as this is
resolved. Here is some code starting with the .asp. Thanks in
advance for the help.....
Note: I can make it work with a .xml file!
[email protected]
***ASP File
<%
On Error Resume Next
Set objDO_Prod = CreateObject("myTools.PopArray")
objDO_Prod.Return_Records = True
objDO_Prod.Max_Allowable_Records = 1000
objDO_Prod.Include_Field_Names = False
objDO_Prod.Conn_String = "Driver={SYBASE
SYSTEM11};Srvr=mlndb02;Uid=wu;Pwd=web_user;Database=warehouse"
sql = " SELECT *"
sql = sql & " FROM t_employee"
sql = sql & " ORDER BY f_last"
objDO_Prod.SQL_Statment = sql
SqlArray = objDO_Prod.ExecuteSQL
If objDO_Prod.Status = True Then
'build xml
mxmlStr = "<users>"
For i = 1 to UBound(SqlArray, 2)
mxmlStr = mxmlStr & "<user><userid>" &
SqlArray(1,i) & "</userid><username>" &
SqlArray(3,i) & "</username><emailaddress>" &
SqlArray(23,i) & "</emailaddress></user>" &
vbcrlf
Next
mxmlStr = mxmlStr & "</users>"
Response.Write(mxmlStr)
End If
%>
***MX File
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns="*"
initialize="simpleHTS.send()"
creationComplete="createEmplist()">
<mx:HTTPService
id="simpleHTS"
url="List_Emp6.asp"
useProxy="false"
method="POST"
resultFormat="object">
</mx:HTTPService>
<mx:HBox>
<mx:ComboBox id="country" dataProvider="{emps}"/>
</mx:HBox>
<mx:Script>
<![CDATA[
import mx.utils.ArrayUtil;
import mx.collections.ArrayCollection;
[Bindable]
var emps:ArrayCollection;
function createEmplist()
emps =
ArrayCollection(simpleHTS.lastResult.users.user.userid);
]]>
</mx:Script>
</mx:Application>

<******************** .asp output
10005935Aguilar
[email protected]
10004844Albertson 10004671Aldrup
[email protected]
[email protected] 10003279Anderson
10003487Anderson 10011747Anderson 10005575Anderson 10003520Appling
10043232Augustin
[email protected] 10004718Bailey
10002092Baker 10003121Balderson 10002787Barney 10003684Bartek
[email protected]
[email protected] 10001799Bergmeier
10002818Bietz 10001823Blecha 10001747Bloebaum 10041828Bloomquist
10005553Bogle 10001489Boller 10004619Borgmann 10002757Borgmann
[email protected]
[email protected]
[email protected]
10004731Branting
[email protected]
10001486Brethouwer 10004026Brethouwer 10004252Brethouwer
10004085Bristol 10005522Brooks 10001462Brown 10004702Brown
[email protected]
[email protected] 10004040Buhr
10001905Burbach [email protected]
<******** asp source
<users><user><userid>10005935</userid><username>Aguilar</username><emailaddress>
</emailaddress></user>
<user><userid>10002493</userid><username>Ainslie</username><emailaddress>Wayne.Ainslie@us. schneider-electric.com</emailaddress></user>
<user><userid>10004844</userid><username>Albertson</username><emailaddress>
</emailaddress></user>
<user><userid>10004671</userid><username>Aldrup</username><emailaddress>
</emailaddress></user>
<user><userid>10001691</userid><username>Alles</username><emailaddress>[email protected] neider-electric.com</emailaddress></user>
<user><userid>10002049</userid><username>Alles</username><emailaddress>[email protected] ider-electric.com</emailaddress></user>
<user><userid>10003279</userid><username>Anderson</username><emailaddress>
</emailaddress></user>
<user><userid>10003487</userid><username>Anderson</username><emailaddress>
</emailaddress></user>
<user><userid>10011747</userid><username>Anderson</username><emailaddress>
</emailaddress></user>
</users>

Similar Messages

  • Newbee help needed

    Please help a newbee to get things going. I've just installed 10g Xe on my home pc with windows XP. I can start and stop the database but cannot locate the environment files. Also new to oracle installation on windows, therefore not familiar with the file structure. Is there a location with this info? Also cannot locate the user scott on the db. Has the schema been removed from 10g?

    Scott's fired. The schema you can use is HR but you probably need to unlock it first. What environment files are you talking about?
    MHE

  • Newbee help iterator ????

    Hi
    I have an assignement I have to make in java. My problem is that I cannot understand why the following code won't compile, the compiler sais that iterator method is wrong???? I use the iterator package from the libraries...i have a homogenous list of items, only String...I really can't figure it out...anybody can help me??? :-|
    public void searchName(String searchname)
            boolean gotit = false;
            Iterator it = varer.iterator();
            while (it.hasNext()) {
                Varer searchname = (Varer) it.next();
                if (searchname.equals(searchvare.getName())) {
                    System.out.println("Vare: " + searchvare.getName());
                    gotit = true;
            }

    Gosh...I am so stupid, of course...now it will compile, I repaced "varer" with another instance....I used so much time on this!! :-o
    Thanks a lot!!!!
    :D

  • Newbee help: applet sends itself to sock server!!!

    hi all,
    im a c# developer 'n new to java applets,
    my client have a server and a web java applet that connects to server using socket
    i've got a task to create a c# windows application to do same as the applet.
    im just confused, when i saw the applet code, it connects to server, and sends itself to the server!!!
    here's the code, can anyone plz help me what's actually happening...
                   try
                        to_server = new Socket(getCodeBase().getHost(), port_of_server);
                        _OOS = new ObjectOutputStream(to_server.getOutputStream());
                        is = new DataInputStream(new BufferedInputStream(to_server.getInputStream()));
                        os = new PrintStream(new BufferedOutputStream(to_server.getOutputStream(), 1024), false);
                        txtAreaMessages.setText("");
                        txtMessage.setEnabled(true);
                        txtMessage.setText("");
                    catch(Exception exception)
                        _logout();
                        txtAreaMessages.appendText("Could not Connect...");
                        return;
                    // THIS IS THE CODE WHERE IM CONFUSED!!!
                    _OOS.writeObject(this);
                    _OOS.flush();
                    os.print(1);
                    os.flush();
                    ClientNew clientnew = new ClientNew(is, os, txtAreaMessages);
                    clientnew.start();
                    btnLogin.setEnabled(false);
                    txtLoginName.setEnabled(false);
                    btnSend.setEnabled(true);
                    btnMobMessage.setEnabled(true);
                    ch_thread = new Thread(this, "abc");
                    ch_thread.start();alll is well, but what's with ObjectOutputStream, and why its sending (this) to server??
    im asking this question here because i wanna learn it as well :D
    it'll be really great help if someone can tell me same to do in c#
    // chall3ng3r //

    the decompiled source code should tell you what you need to rewrite the client-server communications, which you will unfortunately have to do.
    is it some kind of trick to allow only connection from the applet not from c# or vb??no, its an easy, java-specific method of communication.
    if it is, how to do same in c#, (just gimme a hint, not the full solution)yes, you would have to do work to allow any other language to emulate this.
    no, its not impossible to do.
    i know nothing about c#

  • Newbee - help!!

    i am new to java, this is the first time I upload my web application using jsp tech. Can anyone help me solve this problem:
    develop environment: mysql 4, tomcat 4, jconnector 5.0.3 driver
    Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: Broken pipe
    STACKTRACE:
    java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
         at org.apache.jsp.products$jsp._jspService(products$jsp.java:216)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
         at java.lang.Thread.run(Thread.java:534)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 1 ms ago.
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
         at org.apache.jsp.products$jsp._jspService(products$jsp.java:441)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
         at java.lang.Thread.run(Thread.java:534)
    root cause
    com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:
    ** BEGIN NESTED EXCEPTION **
    java.net.SocketException
    MESSAGE: Broken pipe
    STACKTRACE:
    java.net.SocketException: Broken pipe
         at java.net.SocketOutputStream.socketWrite0(Native Method)
         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
         at org.apache.jsp.products$jsp._jspService(products$jsp.java:216)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
         at java.lang.Thread.run(Thread.java:534)
    ** END NESTED EXCEPTION **
    Last packet sent to the server was 1 ms ago.
         at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2652)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
         at org.apache.jsp.products$jsp._jspService(products$jsp.java:216)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
         at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
         at java.lang.Thread.run(Thread.java:534)

    I have used this connecting code:
    String host          = "localhost";
    String db          = "mydb";
    String username      = "myname";
    String password     = "admin";     
    MYBean.ConnectionPool pool = (MYBean.ConnectionPool)application.getAttribute("mycons");     
         if(pool==null) {
                   try{
                                            Class.forName("org.gjt.mm.mysql.Driver").newInstance();
                   } catch(Exception ex){
                        out.println("<br>- Problem with Driver -<br>");
                        out.println(ex.getMessage());
              pool = new MYBean.ConnectionPool(host,db,username,password);
              application.setAttribute("mycons",pool);
    I wrote this code in common.jsp file, then in any jsp page If I want to get data from DB, i use :
    <%@ include file="common.jsp"%>
    <%
    java.sql.Connection con           = null;
    java.sql.PreparedStatement ps      = null;
    java.sql.ResultSet rs               = null;
    con = pool.getCon();
    rs = con.createStatement().executeQuery("...")
    pool.releaseCon(con);
    Following is my simple ConnectionPool.java
    package MYBean;
    import java.sql.*;
    import java.util.*;
    public class ConnectionPool {
         protected Stack CONS; // store connectionS
         protected String host;
         protected String db;
         protected String username;
         protected String password;
         public ConnectionPool(String host, String db, String username, String password) {
              this.host     = host;
              this.db          = db;
              this.username = username;
              this.password = password;
              CONS          = new Stack();     
         public int total() throws Exception {          
              return CONS.size();
         public synchronized Connection getCon() throws Exception{
              if (!CONS.empty())
                   return (java.sql.Connection)CONS.pop();
              else {
                   String st = "jdbc:mysql://"+host+"/"+db+"?user="+username+"&password="+password;
                   return DriverManager.getConnection(st);
         public synchronized void releaseCon(java.sql.Connection con) throws Exception {     
              // max store = 20
              if (CONS.size()<20)     
                   CONS.push(con);
    %>

  • Newbee help for dicom image window center/width manipultation

    We have a flash based dicom viewer and i have the folowing code in action script which i want to replace with pixel bender code. is it possible ?
    var img_bmp:BitmapData = new BitmapData(Cols, Rows,false,0);
    for (var y:Number = 0; y <Rows; y++) {
    for (var x:Number = 0; x <Cols; x++) {
    gray =  byteArray.readUnsignedShort()*Slope + Intercept;
    gray = 255 * gray/WindowWidth  -  Min * 255 / WindowWidth;
    gray = uint(gray);
    var r:int = gray;
    var g:int = gray;
    var blue:int = gray;
    var c:uint = (r << 16) | (g << 8) | blue;
        img_bmp.setPixel(x, y, c);
    Where byteArray is a unsignedshort  sequnce. Slope, intercept, WindowWidth and Min are constants.
    From the little i understood of the kernel programming the expected input channel cannot be 2 channel or single channel input.
    can any one suggest how i can proceed or give me pointers or for this kind of image manipulation pixel bender is not suitable.
    Thanks in advance
    Sastradhar

    i wrote the below kernel code and compiled using pbutil and it did compile i am having trouble determining the shader width and height.  can some one help me out.
    <languageVersion: 1.0;>
    kernel pixel
    <   namespace : "TMP";
         vendor : "TMP";
         version : 1;
    >
             input image1 src;
             output pixel3 dst;
             parameter float Intercept;
             parameter float Slope;
             parameter float WindowWidth;
             parameter float Min;
              void
               evaluatePixel()
            float gray = sample(src, outCoord())*Slope + Intercept ;
                  gray =  255.0 * gray/WindowWidth  -  Min * 255.0 / WindowWidth;
                  dst = pixel3(gray,gray,gray);
    can some one tell me how to get the shader width and height so so that pixel bender can only act on 16 bits or did i get the whole thing wrong.
    shader.data.src.input = byteArray;
      shader.data.Slope = Slope;
      shader.data.Intercept = Intercept;
      shader.data.Min = Min;
      shader.data.WindowWidth = WindowWidth;
      shader.data.src.width = Cols >> 1;
      shader.data.src.height = Rows ;
      var myJob:ShaderJob = new ShaderJob(shader, img_bmp,Cols, Rows);
      myJob.addEventListener(ShaderEvent.COMPLETE, pixelComplete);
      myJob.start();
    Thanks in advance

  • Newbee help, how to make a outlook styled bar.

    Hi all,
    I'm a beginner in Java and i want to make a toolbar that's like the outlook bar feature in the left hand corner of the screen, where you have a series of buttons ( or button like components). By clicking on any of these buttons, the screen is split up and displays a menu of components according to the button that was clicked. The position of the buttons also changes when it is clicked.
    What i want to do is to open a frame (or something) when you click on one of the components in the menu.
    I want to implement such a functionality in java. Can some one out there give an idea as to which swing components could be used to implement the above, because i realy don't know how to do this. Or if any one has done a similar thing, your code sample would be of much use.
    Thanks in advance,
    fifnux.

    some one out there give an idea as to which swing
    components could be used to implement the above,
    because i realy don't know how to do this. Or if any
    one has done a similar thing, your code sample would
    be of much use.Use a JMenuBar or a JToolBar for the outlook style buttons. Use a JSplitPane for your divisions in your UI. Search the tutorials (see left) for details and app notes on each.

  • Simple transitions help for an FCP newbee

    Am moving from iMovie6 to Final Cut Pro 5 as I didn't like iMovie8 and there's been a lot of talk on the iMovie board about how FCP will probably work better for people like me...
    I'm a real newbee to FCP so I'm going to embarrass myself here and ask a really simple question that I can't for the life of me get an answer to.
    How do you add a simple fade up to the start of a clip? It would seem that the Fade in-Fade out Dissolves in Effects is designed to join two different clips. I have a clip that cuts to black and the next clip I want to start on a fade up from black.
    How do I do this?
    Also, how do I do a really simple fade to black???
    Forgive me for asking such a dumb question but I just can't find the answer in the Help file (guess the question is way too simple!).
    Thanks!

    I just tried ramping the clips opacity and I got my fade in just fine, but in order to get the clip fading in from black, I had to go back to the rushes, reselect the clip I wanted and then when the cursor was at the start of the clip, open the opacity and adjust it to go from 0 to 100 in 12 frames. Then I added this clip to my timeline via overwrite, thereby overwriting the same (old) clip that didn't have the fade in. However, I'm not quite ready to mark this question as answered as how do I now add a fade in on a clip that is already in my timeline? Do I have to make the transition decision before I add the clip to the time line or is there some clever way of adjusting the opacity of the clip once it is in the time line and therefore in the edit?
    Thanks!

  • Newbee in j2me needs some starter help

    Hi,
    I am a newbee in j2me and need a starter help.
    My aim is work on mobile applications/services and for that what stuff I need. I have already downloaded wireless kit. Does I require some additions softwares and what?
    Can I find tutorials and starter help and from where?
    Thanks in anticipation.
    Regards,
    Navin.

    You can refer to article 'Think small with J2ME at' -
    http://www-106.ibm.com/developerworks/wireless/library/wi-j2me/
    It shows by example deployment of a sample application using wireless toolkit.
    Manish.

  • This is my first post. I would like to thank you all for all of the information you have posted on this forum. It has been most helpful to a Newbee. I have a MBP17 w/trackpad and click bar from '08. I need a bigger HD, how big can I go? THX

    This is my first post, but I have been following this forum for a while and you have all been very helpful in my MacEducation. I have a MBP17 10.6.8 w/6GB ram from '08. I need to upgrade my HD from 200GB. I would like to go as big as I can and would appreciate any experiance you've had. Could I go 750GB or 500 GB @ 7200 rpm.  Should I upgrade to Lion before I swap the drive out?  Thanks, Johnny

    Hi Johnny,
    Yes you can do the 750 or 500, 5400 or 7200. Just make sure it is 2.5" SATA and 12.5mm high or less (there is at least one HD out there that is 15mm high and will not work).
    Lion: I don't know that it matters much either way, just don't do them at the same time. That way, if there are issues, you have a much better chance of troubleshooting one major change instead of two.

  • HELP - Dial Up Download Question from a Mac Mini Tiger OS X 10.4.6 Newbee??

    There are hugh download files (133 Mb for 10.4.7 for example) that appeared when I ran Software update the first day I got my Mini. This would require 10 to 12 hours download on my Juno account. One solution I saw in these forums was to have a neighbor with High Speed connection download and burn a disc. My NEWBEE question is... Can you go to the Apple OS X download page and successfully download the 10.4.7 update (and others) using a Windows machine with Windows software?? Then have that Windows PC burn a disc that can transfer the update to my Mini?? I'm breaking new ground in my neighborhood and appear to be the only one with a Mac. These forums are great - Thanks Addie
    mac mini   Mac OS X (10.4.6)   first time user

    Thanks to you and Sig for the response. We have NO APPLE STORE/OUTLET within a four hour drive, therefore your input that a PC can burn the disc is the best alternative I have. BUT what do you mean by a "hybrid" data CD? I'm a NEWBEE, so could you give me a little more specifics, i.e., what package/brand & model should I buy? I was thinking any CD-ROM would work! Thanks & sorry for my lack of experience, Addie

  • Flex2 and SEO help

    Hi
    I'm rather new to Flex2 and I had a general question about
    search engine words like what you'd find within the meta tags of a
    static HTML page. Seeing is it that the output is a giant .swf file
    for clients, how does one address the issue of their site being
    available for search engines, or is it even possible?
    Thanks

    First I want to say Shame on you Adobe for not addressing
    this subject outright.
    I am a java gone flash some 5 years ago and now am making the
    switch to flex/flash.
    What I say now is only what data I have been able to collect
    the past two weeks on this subject and should only be used as a
    reference.
    If you build an entire website out of flash a search engine
    cannot crawl a .swf file. Are there ways around it, yes there are.
    http://labs.blitzagency.com/?p=171
    but the time and effort is tremendous for a small team or one
    person.
    Flex does answer the back button issue with historyManager
    class. but to fully exploit it you need to program a bit more
    depending on how complicated a site you build.
    From what I gather you are building a site entirley in flash
    which is OK but you need to grow beyond this to whats known as a
    MVC architecture which basically means separate out your content
    from your view and store it either in flat files or in a database.
    This opens up the opportunity to point the search engines to
    this data.
    see
    http://www.onflex.org/ted/2007/08/flex-directory-seo-and-flex.php
    http://blog.deconcept.com/2006/03/13/modern-approach-flash-seo/
    This is a complicated subject and one not taken on lightly.
    Is it possible, absolutely. However you need to think before
    you build. separate out your content. point the incoming requests
    to what there looking for...read and understand the mvc
    architecture. If you have worked in flex you already know that in
    the eclipse environment you are producing mxml documents.
    perhaps these will be indexable as well??
    im still working on the problem myself and am curious where
    this goes.
    Hope this helps

  • Newbee needs help

    Hi. I'm having problems with my i-pod shuffle not showing up on my itunes. I've tried re-installing and trouble shooting to no avail. Both times I've reinstalled everything goes smoothly until I open itunes and I get a error message in my toolbar saying that part of the program was lost or could not be installed. Something about "ipod-control". I'm guessing this is why I don't get the ipod options button on my itunes source list.
    Here's the skinny.
    No highspeed usb port on my comp.
    Comp. does recognize ipod as "mass storage device" and as ipod(H).
    ipod is charged but it just sits there and blinks orange all of the time.
    PLEASE HELP!! I'm ready to give up on this ipod thing.

    I would try downlading the latest Itunes http://www.apple.com/itunes/download/3.html and Ipod updater online

  • Please-Help with SQL NewBee

    Hello please help me with an sql, I have a table with 2 fields, I want to check if one of the field is blank, mining that it dosn't contain anything.
    if table called Test has 2 fields name ,age.
    how do I check in sql if age is blank.
    thanks

    Are you trying to do this through mSQL in Lite?
    - Junius

  • Newbee Needs Help. BT Home Hub Wireless connectio...

    Dear Forum,
    As a newbee I thought I would ask the masses. I have a black home hub 2. It is hard wired to a number of PC's in the house, plus it also provides a wireless connection reliably most of the time. Occationally, every day/other day it refuses to provide a reliable IP address. My wireless is set as follows:-
    Channel 11, WEP, 64 Bit.
    Current firmware
    Version 8.1.H.J (Type A)
    Last updated
    08/12/09
    I can attach fine normally, but then it fails to connect (on a know working machine) after a reboot. I get the error "Limited or no Connection". This occurs with Pc's running VISTA, and Macs?
    The only resolution I have found is to RESET the hub. Then all devices attach fine. If I disable wireless on my portable and re-enable it, it also fails. Once in a failed state its only resolution is to RESET.
    Can advice?
    Many thanks
    Mike

    you might want to change the wireless settings of the hub to 802.11 b/g to see if this makes a difference, also can try change the wireless channel as well to see if that makes a difference

Maybe you are looking for

  • Profit Center Planning Error

    Dear All, We have activated New GL Doc Splitting. When I try to enter the plan values against the Profit Center,the system gives the following message : Plan period 002 2011 not allowed Message no. GLPL722 System Response The selected plan period is

  • Upgrade oracle RAC 10.2.0.1 to 10.2.0.4 software only without database

    I want to upgrade oracle RAC 10.2.0.1 to 10.2.0.4 software only without database. In this environment i am using OCFS file system not asm . please send me step to configure.

  • Cenvat G/L

    Hi Experts, Currently we are using only 1 G/L  Cenvat on hold  assign in Excise assignment table.  Now user wants two more G/L of cenvat on hold ECESS & cenvat on hold -SH. ECESS. can you please tll me where i assign these g/l accounts. please help.

  • Variable output on ELVIS board

    Hi, I need a little help from anyone experienced with ELVIS board. I'm new to LabView, and specially to DAQ tools. I have vi that is designed to drive small DC motor using ELVIS board and Variable output. it's capable of driving small DC and changing

  • How to analyze performance of Mac Air

    I have a 2010 Macbook Air.   just recently performance has become aweful.   long wait times as if there is a lot of swapping going on.   I'm not sure if there is a tool that i can use to evaluate this.   What other steps are recommended to perform to