Salman Faraz

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

Recent posts by Salman Faraz

Dear Jesus Angeles,
The location of CurrentTimeBean.class is as follows:

D:\TOMCAT\WEBAPPS\ROOT\CurrentTimeBean.class

is this the right location or I need to place it some where else, pleae reply as soon as possible.

Regards,
Salman Faraz.
19 years ago
JSP
Respected Friends,
I am facing some problems while working with Java Beans and JSP, I am
writting a very simple JSP page which simply gets the values from a Java Bean and display it on the browser, but when ever I try to run this JSP page than tomcat is unable to recognize the Java Bean and every time it
gives me the error(exception) that CurrentTimeBean(it is the bean) is not found,all other JSP pages are running perfectly and there is also no problem with tomcat, the procedure which I am following is as follows:

1) First I create my Java Bean its name is "CurrentTimeBean.java" than I create my jsp page which is getting values from the bean its name is
"CurrentTimeBean.jsp", I save the these two files on following location :

D:\TOMCAT\WEBAPPS\ROOT\CurrentTimeBean.java
D:\TOMCAT\WEBAPPS\ROOT\CurrentTimeBean.jsp

2) than I compile my bean from command prompt so that its class file can be generated.
3) than I go to the browser and type the following command:

http://localhost:8080/CurrentTimeBean.jsp

but it gives me the error(exception) saying that CurrentTimeBean is not found, .Please tell that what mistake am I making also please note that that tomcat and all other JSP files are running perfectly but I dont know that why tomcat does not identify CurrentTimeBean.java , the source code for CurrentTimeBean.java and CurrentTimeBean.jsp is as follows:



The code for CurrentTimeBean.jsp is as follows:



Please reply as soon as possible.

Regards,
Salman Faraz.
19 years ago
JSP
Respected Friends,
I am facing problems with JSP, I dont know how to run a JSP page using tomcat web server, can any one please tell me how to run the JSP page using tomcat, where to save the JSP page inside tomcat and what command to type in browser to run it. I tryed to run one JSP page using the following procedure but was unable to run it successfully every time I get a 404-File Not Found error , the procedure I am following is as follows :

1) the name of my JSP page is Hello.jsp, I save this JSP page to the following path :

D:\TOMCAT\webapps\my\Hello.jsp

As you might have guessed that inside webapps I create a folder namely "my" and inside that folder I save my JSP page.
2) After saving the JSP page I enter the following command in the browser :

http://localhost:8080/my/Hello.jsp

But I get the 404-File not found error, can any one please tell what mistake I am making and also please check the source code present below.

//////////////////////////////////////////////////////////

<html>
<body>
Hello<%=new String("world!") %>
</body>
</html>

////////////////////////////////////////////////////////////

Please tell me that what mistake I am making,also please tell that is there any problem with the source code,please reply as soon as possible,this is really urgent for me.

Thanking You,
Salman Faraz.
19 years ago
J2ME running on the front end and Servlets running on the back end web server which could be Apache Tomcat or some other web server,I think Tomcat would be a good choice,this servlet would than be connected to some Database server which could be mySQL,SQL Server etc,the request would be send from J2ME application to servlet using the HTTP protocol.
19 years ago
Respected Group Members,
I have written a function in C language and now I want to call it from my Servlet application,is it possible to call functions written in other languages from Servlets,do we have to use JNI for this purpose and can JNI be used with Servlets,how can we use JNI with servlets and what API will I need to start working on JNI.

Thanking You,
Salman Faraz.
19 years ago
Respected Friends,
I am trying to write a very simple JDBC application with MS-Access at the back end as a database.This application takes two arguments from the command line while running and than insert these arguments in two different columns of the database.The name of the database is db10 and it contains two columns namely "id"(its data type is Integer) and "name"(its data type is Text).The problem which I am facing is that while running this program I get exceptions which shows that nither of the two arguments at run time are accepted by MS-Access.The source code is as follows:

////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////

Can you please tell what mistake I am making.

Thanking You,
Salman Faraz.

[edited to add code tags]
[ August 16, 2005: Message edited by: Jeanne Boyarsky ]
Respected Mr Stuart Goss,
Thanks a lot for your previous reply,can you also please tell that how to connect to a virtual serial port of the emulator.I would be waiting for your precious reply.

Thanking You,
Salman Faraz.
19 years ago
Respected Friends,
I am using J2ME Wireless toolkit to develop a simple application which can establish connection with serial port of the PC, the code which I have written is producing nither any type of exceptions nor any type of compile time errors(while building),but it is giving two strange messages which are as follows:

1) Warning: To avoid potential deadlock, operations that may block, such as networking, should be performed in a different thread than the
commandAction() handler.
The above message is displayed on the command line of wireless tool kit.
2) Serial Test wants to connect to a computer,this may require a data cable.
The second message is displayed in the emulator.

The code which I have written is as follows :

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;
public class SerialTest extends MIDlet implements CommandListener
{
Display display1;
Command command1;
TextBox textBox1;
Connection connection1;
boolean boolean1;
public void startApp()
{
display1 = Display.getDisplay(this);
command1 = new Command("OK", Command.OK, 1);
textBox1 = new TextBox("Serial Port", "Click OK for establishing connection", 40, 0);
textBox1 .addCommand(command1);
textBox1 .setCommandListener(this);
display1 .setCurrent(textBox1 );
}
public void pauseApp()
{
}
public void destroyApp(boolean unconditional)
{
}
public void commandAction(Command choice, Displayable displayable)
{
if (choice == command1)
{
/*Establishing connection with Serial port*/
try
{
connection1= Connector.open("comm:com1;baudrate=9600");
/*If a successfull connection is established than true will be printed on the command line*/
boolean1=true;
System.out.println(boolean1);
}
catch(Exception e)
{
System.out.println("unable to establish connection with serial port");
}
}
}
}

Can any one please tell whats the mistake in the above code and whats the solution to this problem.I would be waiting for your precious replies.

Thanking You,
Salman Faraz.
19 years ago
Respected Friends,
I want to make an application in J2ME for Sony Ericson K700i mobile phone which is connected to the serial port of the PC,this application would be running inside the cellular mobile phone,when I will run this application all the files in the "File Manager" folder of mobile with .txt extensions would be copied to the PC to some paticular folder passing through the serial port to which the mobile is connected,I am facing some problems while devloping this application,my questions are as follows:

1) Is it possible to transfer a file on the serial port,off course we can transfer interger type data to the serail port but integer is a primitive data type and while transferring files we will actually pass the object related to that file to the serial port of the PC,is this really possible?
2) Sony Ericson K700i does'nt implements JSR 75(PDA Optional Packages for the J2METM Platform,which is used to access PIM data and file systems) which means that we can not access the file system of this mobile so is it really possible to access the files stored in this mobile through my application?
3) Once the file is transferred to the serial port than will its contents of the file ramains in its original state or will be transferred to some kind of bianry data and we have to bring it in the original state.On the PC end will I need to write some other application which continiously monitores the serial port and will receive this file.

I would be waiting for your precious replies.

Thanking You,
Salman Faraz.
19 years ago
I installed the J2ME Wireless toolkit version 2.2 along with jdk 1.4.2,the installation completed successfully and the toolkit is also running all right but after the installation when I tryed to build my programmes using wireless toolkit 2.2 the toolkit gave an error message saying that jdk1.4.2 was not installed on my PC and that wireless toolkit 2.2 required jdk 1.4.2, jdk1.4.2 is installed on my PC and running 100% perfectly,I have tested several small programmes using jdk1.4.2 and they worked fine,can you please tell why toolkit2.2 is giving such strange errors,should I have to set some type of path for jdk1.4.2 in any file of wireless toolkit.I am using Windows 98, please reply soon.

Thanking You,
Salman faraz.
19 years ago
Respected Sir,
I did the same way as yu suggested but I am getting "null" and nothing else.I am using J2ME wireless toolkit version1.0,on what version are you working.

Thanking You,
Salman Faraz.
19 years ago
Respected Friends,
I want to make an application in J2ME for Sony Ericson K700i mobile phone which is connected to the serial port of the PC,this application would be running inside the cellular mobile phone,when I will run this application all the files in the "File Manager" folder of mobile with .txt extensions would be copied to the PC to some paticular folder passing through the serial port to which the mobile is connected,I am facing some problems while devloping this application,my questions are as follows:

1) Is it possible to transfer a file on the serial port,off course we can transfer interger type data to the serail port but integer is a primitive data type and while transferring files we will actually pass the object related to that file to the serial port of the PC,is this really possible?
2) Sony Ericson K700i does'nt implements JSR 75(PDA Optional Packages for the J2METM Platform,which is used to access PIM data and file systems) which means that we can not access the file system of this mobile so is it really possible to access the files stored in this mobile through my application?
3) Once the file is transferred to the serial port than will its contents of the file ramains in its original state or will be transferred to some kind of bianry data and we have to bring it in the original state.On the PC end will I need to write some other application which continiously monitores the serial port and will receive this file.

I would be waiting for your precious replies.

Thanking You,
Salman Faraz.
19 years ago
Respected Friends,
I am developing a VoIP software in Java and I have to use the following protocols.
1) RTP(Real Time Protocol)
2) H.323

Can any one tell me that does java supports the two above protocols and can I use these protocols in Java.

Thanking You,
Salman Faraz.
Respected Mr Ransika deSilva,
I am sorry but Sir I was unable to understand your last reply(since I am not very genius or intellegent).If convinient for you than can you please make changes(which you are suggesting) in the code which I posted.I know that it will take a lot of your precious time but I would be thankful to you from the depth of my heart.

Thanking You,
Salman Faraz.
19 years ago
Respected Friend,
If I change the address to www.javaranch.com or www.yahoo.com than also the same exception is thrown,which means that either the toolkit fails to establish a connection or if it establishes a connection it fails to read the contents of the web page,can you please tell me thereason behind this?if there is some error in the code than please corrent it and inform me.

Thanking You,
Salman Faraz.
19 years ago