jos xavier

Greenhorn
+ Follow
since Feb 02, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by jos xavier

Hi everyone,
I badly need help in my rmi application which i have partly developed. I have an application to transfer daily data which is generated in the factory which is 200 miles from the head office where the server is located... I am able to transfer the data locally on my lan network...i.e. inside my head office premises.
However as I said I need to transport my client application to my factory which is 200 miles away from my H.O. How do I run my client there and connect to my server in the H.O. How do I do that? Do I need to use some software ? How do I connect to my factory server ? My Client application will be executed in factory server...?So how will the factory server connect to the H.O. server? I suppose you need modems at both ends and connected through telephone..?? I am not sure about that... Can you help me with this ?? I will be highly obliged....
23 years ago
I have installed apache 1.3.14 and Jrun on my pc. However, the installation instruction specifices something like this :
For Apache 1.3.x, use the following command to dynamically add the JRun library to your Apache server. Note that the '--prefix' entry and other entries may be different. The operative entry is the
'--activate-module' entry:
configure --prefix=/user/local/apache \
--activate-module=src/modules/jrun/libjrun.a

Can anybody tell me exactly what this means and how do I go about doing this task.
23 years ago
Hi everyone,
I badly need help in my rmi application which i have partly developed. I have an application to transfer daily data which is generated in the factory which is 200 miles from the head office where the server is located... I am able to transfer the data locally on my lan network...i.e. inside my head office premises.
However as I said I need to transport my client application to my factory which is 200 miles away from my H.O. How do I run my client there and connect to my server in the H.O. How do I do that? Do I need to use some software ? How do I connect to my factory server ? My Client application will be executed in factory server...?So how will the factory server connect to the H.O. server? I suppose you need modems at both ends and connected through telephone..?? I am not sure about that... Can you help me with this ?? I will be highly obliged....
23 years ago

Originally posted by ram mohan:
U need to keep the copy of that interface + stub with all the client mechine.Pls correct me if I am wrong


what you need to do copy the stub class , the client class and the interface class to the client machine where you want to see it and then start the registry and the server on your machine. Then let the client execute the client program... But see that the request is going to the server ..check the ip address tha thte client is connecting to...
i hope this helps you
jos xavier
23 years ago
Hi indira,
you can use the smtp host of vsnl... which is smtp.vsnl.com
I have been successfully able to use this host for my mailing purpose....
you can use the mail demo programs to check it out.
Thanks
Jos xavier
23 years ago

Originally posted by Kajol Shroff:
Hi Ashwin,
Sorry to say that but it wasnt of much help to me .. can u please help me out..i am really set on deadlines...
Please i need help.
Kajol


hi kajol,
You need to open a DataOutputStream in your applet. Send the data through this outputstream to a servlet who in turn will will collect the data from the request object....
If the data is small then send the data with the url using the urlencode .
i hope you could use this code :
URL url;
URLConnection ucon;
String CustStr= tfCustCode.getText();

try {

url = new URL("http://90.0.0.3:8080/servlet/DataQuestServlet");
CustCode= URLEncoder.encode("Cust")+ "=" + URLEncoder.encode(CustStr) ;
ucon = url.openConnection();
ucon.setDoOutput(true);
ucon.setDoInput(true);
ucon.setUseCaches(false);
ucon.setRequestProperty("Content-type","application/x-www-form-urlencoded");
DataOutputStream outStream = new DataOutputStream(ucon.getOutputStream());
outStream.writeBytes(CustCode);
outStream.flush();
outStream.close();

//if you want to get data from the servlet use this code
InputStreamReader inStream = new InputStreamReader(ucon.getInputStream());
int EOFile = inStream.read();

while (EOFile !=-1) {
MsgDisplay.append(String.valueOf((char)EOFile));
EOFile = inStream.read();

}
inStream.close();

} //-- try

catch (MalformedURLException me) {
System.out.println(me);

} //-- catch


catch (IOException io) {

System.out.println(io);

} //-- catch
The servlet code can be something like this :
// but you have to improvise the code

public void doPost(HttpServletRequest req, HttpServletResponse Res)throws ServletException, IOException {

Res.setContentType("text/html");
PrintWriter out = Res.getWriter();
CustCode = req.getParameter("Cust");
System.out.println("value of custcode" +CustCode);
out.println(CustCode);
}//----doGet


} //----close DataQuestServlet
Hope it helps !!
jose xavier
23 years ago
I am presently workign on Java 2 platform viz. servlets, beans , JSP, Applets and I am using Websphere. My experience on Java Platform is approx. 1.8 years.
I can send you my detailed resume as soon as possible
23 years ago
Thank you very much fro your reply.....
I have got it working..
thanks once again
jos xavier

Originally posted by Nathan Pruett:
jos,

Another perfect example for using CardLayout...
Look here for another post mentioning this... ( http://www.javaranch.com/ubb/Forum2/HTML/000907.html )
If you need any further help with CardLayout, just ask...
HTH,
-Nate


23 years ago
Thanks Matt for your reply...
My applet is as follows :
import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class Cust extends Applet implements ActionListener{
Label Msg= new Label("");
TextField tf = new TextField("hi",10);
Panel PanMain,pNorth,pCenter;
BorderLayout blMain;
Button bAdd,bEdit,bDel,bView,EditChk,AddChk;

public void init() {
PanMain = new Panel();
blMain = new BorderLayout();
PanMain.setLayout(blMain);
String PanMainCol= "#17518b";
add(PanMain);
pNorth = new Panel();
PanMain.add(pNorth,blMain.NORTH);
pNorth.setBackground(new Color("#fccffc".hashCode()));
bAdd = new Button("ADD");
bEdit = new Button("EDIT");
bDel = new Button("DELETE");
bView = new Button("VIEW");
pNorth.add(bAdd);
pNorth.add(bEdit);
pNorth.add(bDel);
pNorth.add(bView);
pNorth.add(tf);
bAdd.addActionListener(this);
bEdit.addActionListener(this);
bDel.addActionListener(this);
bView.addActionListener(this);
tf.addActionListener(this);
addPanel("789789789");
}

public void actionPerformed (ActionEvent ae) {
if (ae.getSource()==bAdd) {
tf.setText("Adding Records");
pCenter.removeAll();
addPanel("567567567");
pCenter.validate();
}

if (ae.getSource()==bEdit) {
tf.setText("Editing Records");
pCenter.removeAll();
addPanel("123123123");
pCenter.validate();
}
}

public void addPanel(String ColorVal) {
pCenter= new Panel();
PanMain.add(pCenter,blMain.SOUTH);
pCenter.setBackground(new Color(ColorVal.hashCode()));
pCenter.add(new Button(ColorVal));
}
}

Originally posted by Matthew Gaunt:
Do you mean change that each button changes a certain region of the border layout (ie-North South East West Center).
It is a little difficult to understand what section of the panel is supposed to change when you press the buttons. And where are the buttons positioned?
Best Regards
Matt


[This message has been edited by Stephanie Grasson (edited March 13, 2001).]
[This message has been edited by Stephanie Grasson (edited March 13, 2001).]
23 years ago

Originally posted by vishnu murthy:
Hi Friends,
can u please tell me how to communicate with applet to servlet.
for ex. say want to display the current stock market details on to the applet.
or i want to display the question from the database to the Applet.
thanks
vishnu


Hi Vishnu,
You can connect to the servlet on click of the button using the actionPerformed(ActionEvent ae)
URL url = new URL("<servletName>");
URLCOnnection urlCon = url.openConnectoin();
ObjectInputStream ois = new ObjectInputStream(urlCon.getInputStream());
you can get the object by doing the necessary casting ad getting the data .
For this you can create a class which stores the data. The data is stored in this class by the servlet anf when a call is made to the servlet, this class is sent from the ObjectOutputStream of the servlet. The applet can read data from this class by casting it.
try it and let me know
bye
joseph
23 years ago
Hi,
My problem is that I am creating an applet which should be able to change panels. E.g. i have an add, delete, edit and view buttons. Each button should change the panel. I am using border layout and I want to change the panels for each button...
Can anyone tell me how to do it...
23 years ago
hi Vaibhav,
Can you try using the onSubmit in the form tag.?
<form name="xx" method="post" action="xxx" obSubmit="return checkforblanks(document.xx)">{
and in the javascript call mention
funtion checkforblanks(FormObj){
}
try this out and check the results...
bye
Joseph
23 years ago
Hi Mahalaxmi,
Thanks for your reply....and i have re-registered in the name of Jos Xavier....Again I went through a book on oracle (Oracle 8i complete reference) to modify multiple coloumns of a table. I experienced the same problem while using db2 . Is it a speciality of oracle to allow modification of multiple coloumns in a single statement.. I am quoting the exact statement that is mentioned in the book...
"alter table TROUBLE add (
Condition VARCHAR2(9) NOT NULL,
Wind NUMBER(3)
);"
I would be highly obliged if you could reply to my doubt..
Thanks once again
bye
best regards
joseph

Originally posted by maha anna:
[B]josxavier,'
You can refer to ALTER TABLE mySql sytax here.
http://www.mysql.com/doc/A/L/ALTER_TABLE.html
It looks like, we can't modify multiple cols with one 'modify' clause, but we can use multiple 'modify ...' in one 'ALTER TABLE...' statement.
ALso please re-register with first and last names. Thank you.
regds
maha anna
[/B]


23 years ago
Hi Mahalaxmi,
Thanks for your reply....and i have re-registered in the name of Jos Xavier....Again I went through a book on oracle (Oracle 8i complete reference) to modify multiple coloumns of a table. I experienced the same problem while using db2 . Is it a speciality of oracle to allow modification of multiple coloumns in a single statement.. I am quoting the exact statement that is mentioned in the book...
"alter table TROUBLE add (
Condition VARCHAR2(9) NOT NULL,
Wind NUMBER(3)
);"
I would be highly obliged if you could reply to my doubt..
Thanks once again
bye
best regards
joseph

Originally posted by maha anna:
[B]josxavier,'
You can refer to ALTER TABLE mySql sytax here.
http://www.mysql.com/doc/A/L/ALTER_TABLE.html
It looks like, we can't modify multiple cols with one 'modify' clause, but we can use multiple 'modify ...' in one 'ALTER TABLE...' statement.
ALso please re-register with first and last names. Thank you.
regds
maha anna
[/B]


23 years ago