Hi,

Please help me in this problem..

My Application is:: I am taking data from DataBase and putting in the Vector
by using jsp.    I want to pass this vector to Applet's JTABLE to display
the data in to applet..

I don't how to communicate this vector to applet. I am using


<jsp:plugin type="applet" code="TickerApplet.class"
codebase="/examples/jsp/plugin/applet" jreversion="1.2" width="800"
height="700" >


<jsp:params>
  <jsp:param name="tickerData" value="v"/>
</jsp:params>

    <jsp:fallback>
        Plugin tag OBJECT or EMBED not supported by browser.
    </jsp:fallback>
</jsp:plugin>

jsp:plugin in my jsp page.. but I don't know How can I pass this Vector data
to Applet..
In the Jsp plugin I am passing my vector in params parametrs.. like

<jsp:param name="tickerData" value="v"/>

But In my java applet I am using

parm = getParameter("tickerData"); but the get peremeter will get the data
in the form of string..




Please help me inthis regard.. I will thankfull to u.

Please reply to this mail asap.

My phone number is 908 707 2423..

Please give me your phone number, so I will call u after some time..


Please do needful.

Thanks & Regards,
Malla Reddy Choodi
[EMAIL PROTECTED]



Thank you in advance.
Pls send me one copy to [EMAIL PROTECTED]
And also pls advice me the problem which raised in my project. I am getting
Vector data from JSP to Applet.
when i run from appletviewer the vector data is displaying on JTable.
But when i run on web page the error is Applet not intialized. when i run
the application without considering data from jsp JTable on webBrowser
IE-4.0 it
was running fine.When i try to get data from database through JSP then it is
not running on Browser.But the data is coming from jsp to applet.Pls send me
posible code to.

[EMAIL PROTECTED]

pls help me
its urgent
Thanking u keeping efforts for solving this problem. The Applet class is
-------------------
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import java.applet.*;

import java.net.*;

public class TestTableApplet extends JApplet {
JTable tableView;
String[] names;
Object[][] data;
public void init() {
Container container = null;
container = this.getContentPane();

Vector[] jspVector = null;
Vector columns = null;
int cols = 0;
int rows = 0;
try
{
URL ActiveDBjsp = new URL
("http://localhost:8080/TestUnixVec.jsp");
URLConnection jspConnection =
ActiveDBjsp.openConnection();
// Don't used a cached version of URL connection. jspConnection.setUseCaches
(false);
jspConnection.setDefaultUseCaches(false);
// Read the input from the Jsp. //
// The servlet will return a serialized vector containing//
ObjectInputStream inputFromJsp;
inputFromJsp = new ObjectInputStream
(jspConnection.getInputStream());
jspVector = (Vector[]) inputFromJsp.readObject();
columns = (Vector) inputFromJsp.readObject();
cols = columns.size();
rows = jspVector[0].size();
}
catch(Exception e)
{
System.out.println("The error is at
URL:"+e.getMessage());
}
names = new String[cols];
for( int i = 0; i < cols ; i++)
names[i] = columns.elementAt(i).toString();
data = new Object[rows][cols];
for (int j = 0 ; j < cols ; j++)
for(int i = 0 ; i < rows ; i++)
data[i][j] = jspVector[j].elementAt
(i).toString();
tableView = new JTable(data,names);
JScrollPane scrollpane = new JScrollPane(tableView);
scrollpane.setPreferredSize(new Dimension(700, 300));
container.add(scrollpane);
}
}
The HTML file is
----------------
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title></title>
</head>
<body>
<h1>Testing </h1>
<!--"CONVERTED_APPLET"-->
<!-- CONVERTER VERSION 1.3 -->
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 695
HEIGHT = 525
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-
win32.cab#Version=1,3,0,0">
<PARAM NAME = CODE VALUE = TestTableApplet >
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME = ARCHIVE VALUE = "Active.jar" >
<PARAM NAME="type" VALUE="application/x-java- applet;version=1.0">
<PARAM NAME="scriptable" VALUE="false">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.0" CODE =
TestTableApplet CODEBASE = "." ARCHIVE = "Active.jar" WIDTH =
695 HEIGHT = 525 scriptable=false
pluginspage="http://java.sun.com/products/plugin/1.3/plugin-
install.html"><NOEMBED></COMMENT>
</NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET CODE = TestTableApplet CODEBASE = "." ARCHIVE =
"Active.jar" WIDTH = 695 HEIGHT = 525>
</APPLET>
-->
<!--"END_CONVERTED_APPLET"-->
</body>
</html>


_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to