Gopal krushna Das

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

Recent posts by Gopal krushna Das

Hi,
Can anyone help me to call "userguide.chm" in my java swing program.

here is my code for help button.
----------------------------------
btnHelp.setText("Help");
btnHelp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
btnHelp_actionPerformed(e);
System.out.println("Help");
}

});
16 years ago
Hi,
How can i call a .hnd file(help) file in my swing program.When i will click in help button in my swing program it will call this help file.
Here is my coading


btnHelp.setText("Help");
btnHelp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e)
{
btnHelp_actionPerformed(e);
System.out.println("Help");
}

});


Please guide me.
16 years ago
Hi,
I want to make the password hardcoode in this program. Please help me..


//Gopal Das


import com.jscape.inet.ftp.*;
import java.io.*;
import java.util.Enumeration;

public class FtpMuploadExample extends FtpAdapter {
private String hostname;
private String username;
private String password;

// perform multiple file upload
public void doUpload(String hostname, String username, String password) throws FtpException {
Ftp ftp = new Ftp(hostname,username,password);

//capture Ftp related events
ftp.addFtpListener(this);
ftp.connect();
ftp.setBinary();
ftp.mupload(".*\\MUT*.*");
ftp.disconnect();
}

// captures upload event
public void upload(FtpUploadEvent evt) {
System.out.println("Uploaded file: " + evt.getFilename());
}

// captures connect event
public void connected(FtpConnectedEvent evt) {
System.out.println("Connected to server: " + evt.getHostname());
}

// captures disconnect event
public void disconnected(FtpDisconnectedEvent evt) {
System.out.println("Disconnected from server: " + evt.getHostname());
}


public static void main(String[] args) {
String hostname ;
String username;
String password;
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter Ftp hostname : ");
hostname = reader.readLine().trim();
System.out.print("Enter username : ");
username = reader.readLine().trim();
System.out.print("Enter password : ");
password = reader.readLine().trim();
System.out.println("Using upload filter .*\\MUT*.*");
FtpMuploadExample example = new FtpMuploadExample();
example.doUpload(hostname,username,password);
}
catch(Exception e) {
e.printStackTrace();
}
}
}
16 years ago
Hi,
But i need to put password.One thing when i am entering the password this password is clearly visible for anyone. But i need when i enter password it should not be show and it will show ******** like that.Please change in my code.
//Gopal Das


import com.jscape.inet.ftp.*;
import java.io.*;
import java.util.Enumeration;

public class FtpMuploadExample extends FtpAdapter {
private String hostname;
private String username;
private String password;

// perform multiple file upload
public void doUpload(String hostname, String username, String password) throws FtpException {
Ftp ftp = new Ftp(hostname,username,password);

//capture Ftp related events
ftp.addFtpListener(this);
ftp.connect();
ftp.setBinary();
ftp.mupload(".*\\MUT*.*");
ftp.disconnect();
}

// captures upload event
public void upload(FtpUploadEvent evt) {
System.out.println("Uploaded file: " + evt.getFilename());
}

// captures connect event
public void connected(FtpConnectedEvent evt) {
System.out.println("Connected to server: " + evt.getHostname());
}

// captures disconnect event
public void disconnected(FtpDisconnectedEvent evt) {
System.out.println("Disconnected from server: " + evt.getHostname());
}


public static void main(String[] args) {
String hostname ;
String username;
String password;
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter Ftp hostname : ");
hostname = reader.readLine().trim();
System.out.print("Enter username : ");
username = reader.readLine().trim();
System.out.print("Enter password : ");
password = reader.readLine().trim();
System.out.println("Using upload filter .*\\MUT*.*");
FtpMuploadExample example = new FtpMuploadExample();
example.doUpload(hostname,username,password);
}
catch(Exception e) {
e.printStackTrace();
}
}
}
16 years ago
Hi,
I want to make the password hardcoode in this program. Please help me..


//Gopal Das


import com.jscape.inet.ftp.*;
import java.io.*;
import java.util.Enumeration;

public class FtpMuploadExample extends FtpAdapter {
private String hostname;
private String username;
private String password;

// perform multiple file upload
public void doUpload(String hostname, String username, String password) throws FtpException {
Ftp ftp = new Ftp(hostname,username,password);

//capture Ftp related events
ftp.addFtpListener(this);
ftp.connect();
ftp.setBinary();
ftp.mupload(".*\\MUT*.*");
ftp.disconnect();
}

// captures upload event
public void upload(FtpUploadEvent evt) {
System.out.println("Uploaded file: " + evt.getFilename());
}

// captures connect event
public void connected(FtpConnectedEvent evt) {
System.out.println("Connected to server: " + evt.getHostname());
}

// captures disconnect event
public void disconnected(FtpDisconnectedEvent evt) {
System.out.println("Disconnected from server: " + evt.getHostname());
}


public static void main(String[] args) {
String hostname ;
String username;
String password;
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter Ftp hostname : ");
hostname = reader.readLine().trim();
System.out.print("Enter username : ");
username = reader.readLine().trim();
System.out.print("Enter password : ");
password = reader.readLine().trim();
System.out.println("Using upload filter .*\\MUT*.*");
FtpMuploadExample example = new FtpMuploadExample();
example.doUpload(hostname,username,password);
}
catch(Exception e) {
e.printStackTrace();
}
}
}
16 years ago
Hello,
I want to hardcode to the password field. Please help me for that.
I am enclosing my code here.


//Gopal Das


[edit]Add code tags. CR[/edit]
[ July 31, 2008: Message edited by: Campbell Ritchie ]
16 years ago
Thanks buddy.
16 years ago
JSP
Yap it's possible.First of all ypu just do a .csv file and store it.
Then write your code
response.setContentType("text/csv");
response.setHeader("Content-Disposition","filename=\"test.csv\"");
like this in your jsp page....

If you are using any javascript then in onClick function you can write your code like this
jsp page with a button, the javascript onClick() for this button is:
if(flag=="CSV")
{
var fileName = "/eriapps/frameset.do?action=CsvErricsson";
var win1 = window.open(fileName,"_blank",'resizable=no,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no'); } fileName points to a servlet, SO the servlet class has the following code: theResponse.setContentType("text/csv"); theResponse.setHeader("Content-Disposition","filename=\"test.csv\""); It is a sample example.You can cahnge it as your required file name and all. Thanks Gopal Das
16 years ago
JSP
Hi all,
This is Gopal from Mumbai,I want to add Live share market data in my website dynamically? Can anyone help me for this.My site is completely made in JSP and JAVA technology.Please wite the procedure how to call the live data from BSE and NSE dynamically and it will update in my site dynamically. I am waiting for your reply.
Thanks
16 years ago
JSP