Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

prashant pachouri

Greenhorn
+ Follow
since May 27, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prashant pachouri

Hi Guys
Can anybody please tell me - How to go about xml parsing using some good parser which has decent api.

basically if I need to parse
<oraganization>
<division>
<div1>d1</div1>
<div2>d2</div2>
<division>
</oraganization>
I should be able to use sth like "oraganizaion/division/div"
Kind of xpath - I was doing it already with msxml 3 but I need to upgrade to non ms platforms. I have seen xalan but could not make much of it.
Thanks a lot!
pach.
Hi All
The Result Set object does not implement serializable.
So if I have to send data back to client what should I do!
do I have to fill the data in an object and send it.
Thanks a lot!

pach
Hi All
Has anybody used Drag n Drop api - I want to know the requirements and limitations and good resource/ site.
I have been to sun.com but want to listen from some one who's hadthe exp with it.
Thanks all...
bye
19 years ago
Hi Guys!

I am having a requirement that the applets have to be the JMS clients and the Servlet is the publisher to the topic...
can you suggest me how to achive the subscription from the applet code.
Can you also suggest some good books on JMS...

Thanks a lot
pach.
Thanks Yuri,

Could you give me some I Idea on how to achieve this on unix.
Hi guys!
I am facing a real life trouble here..
from my program I want to initiate some processes which should continue even after my program which started them goes off
In short,
I want to achieve something like this
public class Launcher{
main(){
Runtime.getRuntime().exec("java -cp cpofMyClasspFile MySocketServerClass");
}
}
now when I do a ^c on the command prompt to terminate the Launcher My socket server program also goes off can I achieve it some way.. I thought this has got something to do with daemon threads
Thanks a lot!
pach

------------------
If you are not living on the edge, you are wasting Space.
Hi Friends
I am sending a XML String over a socket connection on the ObjectOutputStream.
At the Socket Server end - at Times I get StreamCorruptedException - HeaderIndexOutofBounds. This occurs unpredictedably. pl give some thought to it.
Thanks and bye
pach.
19 years ago
If u are ready to do some change why not try serialized object communication. Read the file contents into a String. Open a socket connection, contruct an objectoutput stream and write the object to it.

Originally posted by Manimala Kumar:
Hello everybody,
I'm doing a project on mail client system. For remote users i need a ftp of the required file. I am running BRS WebWeaver in my pc and if I try from other pc's with anonymous ftp(i.e. ftp 10.101.1.96 etc.),then it works. But as soon as I try it with my socket initially it flashes a ready message and after that it automatically gets disconnected. So I'm unable to send further commands.
If anybody knows it, please help me. I'm appending my progs here.
Manimala.

//applet code
import java.applet.*;
import java.awt.*;
import java.io.*;
import java.awt.event.*;
import java.util.*;
import java.net.*;
import javax.swing.*;
public class japp extends Applet implements ActionListener
{
String attach = null;
Socket localSocket;
PrintWriter outbnd;
BufferedReader inbnd;
String s;
private Button b;
String line = null;
private TextField t2;
public void init()
{
setLayout(new FlowLayout());
attach = getParameter("c"); //get file name with full path from prev text box
t2 = new TextField(60);
add(t2);
b = new Button("Connect");
b.addActionListener(this);
add(b);
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource() == b) //Create a socket
try
{
t2.setText(attach);
localSocket = new Socket("10.101.1.96",21); //Setup data
inbnd = new BufferedReader(new InputStreamReader (localSocket.getInputStream()));
outbnd= new PrintWriter(localSocket.getOutputStream());
//While we have a connection
//Read Texfield value
// read incoming string from socket
line = inbnd.readLine();
t2.setText(line);
outbnd.println("anonymous");
outbnd.flush();
line = inbnd.readLine();
t2.setText(line);
outbnd.println("mani@lycos.com");
outbnd.flush();
line = inbnd.readLine();
t2.setText(line);
outbnd.println("get "+attach);
outbnd.flush();
line = inbnd.readLine();
t2.setText(line);
outbnd.println("bye ");
outbnd.flush();
outbnd.close();
inbnd.close();
localSocket .close();
}
catch(UnknownHostException unc)
{
System.out.println("Connection why not connected");
}
catch(IOException ioe)
{
System.out.println(ioe.getMessage());
}
}
public static void main( String[] args )//without/with it's ok
{
netappsock applet = new netappsock();
JFrame frame = new JFrame();
frame.setTitle( "Socket Test" );
frame.getContentPane().add( applet , BorderLayout.CENTER );
applet.init();
applet.start();
frame.setSize( 460 , 360 );
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
frame.setLocation( ( d.width - frame.getSize().width ) / 2 ,( d.height - frame.getSize().height ) / 2 );
frame.setVisible( true );
}

}

//html code
<html>
<head></head>
<body>
<applet code=japp.class height=400 width=600>
<param name="c" value="C:\jdk1.3\bin\abcd.txt">
</applet>
</body>
</html>


19 years ago
In ur applet code try this:
this.getAppletContext().showDocument(URL url_of_page);

Originally posted by mohana konakanchi:
Hi
Does any body know how to call a HTML page from an Applet.
Mohana


19 years ago
Are u extending from JApplet?
Make sure u instanciate and construct most of ur UI in the init() method itself.
Delete browser cache. Browser settings will have to be javaenabled.
Also revalidate() should preceed repaint().

Originally posted by Annapurna B:
I have created an applet using java swing components.The applet loads fine but the updation is not proper. When the panels in the applet are supposed to change they are not changing until we do some updation in the applet(like moving the applet manually etc). I think this is some refresh or threading problem.Can anyone help....
Thanks in advance


19 years ago
If u use web based application try to instantiate the dialog/clas which extens frame from an applet and use the applet's codebase to refer to the image/image directory.
Also try "getDefaultToolKit()" or "getToolKit()" method of the frame. The toolkit object thus obtained will contain a method to add/get an image.
Get back for any further clarification.

Originally posted by Kajol Shroff:
Hi,
This is Kajol..
I want to insert an image in my frame ...
I cant use URL codebase as it needs an applet which should be extended ...but my file in which i have to insert an image extends an frame...
PLease help me out...
Kajol


19 years ago
Hi Kapil

Go to tools -> internet options
Select Security tab ->chose internet or intranet zone whatever applicable-> click on custom level button. Then security settings tree will come up.
There you should be able to see java
out of check boxes given there-> select custom settings
another popup will come .
->Select Edit Permissions tab and ->set the options you'd see over to enable.

after this click ok on all the pop ups lined up in the process
->restart your browser.
Things should be working.
Enjoy...