Re: Servlet and Random Access File

2007-05-30 Thread Teh Noranis Mohd Aris
: The key phrase here is ...that really suits my needs. Could you provide more information? Your question is a rather generic one not all that specific to java servlets. --David Teh Noranis Mohd Aris wrote: Hello All, Does anyone have an example of a servlet program that uses random access

Re: Using servlet and mysql

2007-05-29 Thread Teh Noranis Mohd Aris
new users of connection pooling went through Apache's documents. Please don't waste their effort, take a look at it before you start to attempt anything. HTH, FooShyn Teh Noranis Mohd Aris wrote: Thank you so much for the reply. I've put jdbc:mysql://localhost:8080/teh but I got the error

Re: Using servlet and mysql

2007-05-29 Thread Teh Noranis Mohd Aris
, Is your login name and password correct? It shows 'root' and the password is 'root' in the code you posted there. - I put the database name, teh in directory catalina_home\webapps\ROOT\ hmm i can't really get what you meant here. Thanx. FooShyn Teh Noranis Mohd Aris wrote: Dear All, I already put

Re: Using servlet and mysql

2007-05-29 Thread Teh Noranis Mohd Aris
list, and not Tomcat's. HTH FooShyn Teh Noranis Mohd Aris wrote: Yes, the login name and password are correct. I created the database name, teh, with field username and password, using Microsoft Works Database and saved it in directory catalina_home\webapps\ROOT\. I'm not sure whether

Servlet and Random Access File

2007-05-29 Thread Teh Noranis Mohd Aris
Hello All, Does anyone have an example of a servlet program that uses random access file or any useful links? I tried searching yahoo and google but could not find one that really suits my needs. Thank you. Yours Sincerely, TEH - Get your own

Using servlet and mysql

2007-05-28 Thread Teh Noranis Mohd Aris
Hi, I would like to access mysql database from a servlet but I'm not sure what to initialize for the String connectionURL marked as jdbc:mysql://localhost:/xxx in the program below. I got this program from the internet which I would like to run in my computer. Can anyone please

Re: Using servlet and mysql

2007-05-28 Thread Teh Noranis Mohd Aris
any driver? How can it be done? Please help. Thank you. Yours Sincerely, TEH Foo Shyn [EMAIL PROTECTED] wrote: Hi, would be ur database port, xxx will be ur database name HTH FooShyn Teh Noranis Mohd Aris wrote: Hi, I would like to access mysql database from a servlet

Coverting Program to Servlet

2007-05-23 Thread Teh Noranis Mohd Aris
Dear All, The following program uses socket. How can I convert it to servlet? Please help. Thank you. Yours Sincerely, TEH import java.io.*; import java.net.*; import java.awt.*; import java.awt.event.*; public class Exercise18_3Server { // Declare a random access file

Re: Cannot Access Tomcat Server Using IP Address

2007-05-21 Thread Teh Noranis Mohd Aris
I already solve the problem. I fixed the program and it works! Thank you so much for the replies. Yours Sincerely, TEH Teh Noranis Mohd Aris [EMAIL PROTECTED] wrote: Yes, I can access the login.html interface from a different computer using http://IPaddress:8080/login.html but when I

Cannot Access Tomcat Server Using IP Address

2007-05-20 Thread Teh Noranis Mohd Aris
Dear All, I've tested my applications using http://localhost:8080/login.html in the same computer and it works. However, when I tried to acces my applications using an IP Address in another computer by typing http://ipaddress/login.html, The page cannot be found is displayed. How can I

Re: Cannot Access Tomcat Server Using IP Address

2007-05-20 Thread Teh Noranis Mohd Aris
request -- ie http://ipaddress:8080/login.html --David Teh Noranis Mohd Aris wrote: Dear All, I've tested my applications using http://localhost:8080/login.html in the same computer and it works. However, when I tried to acces my applications using an IP Address in another computer

Re: Cannot Access Tomcat Server Using IP Address

2007-05-20 Thread Teh Noranis Mohd Aris
. SELinux can be an issue, but is usually simple to solve by tweaking a setting. Teh Noranis Mohd Aris wrote: Thank you. It's working now, the application can be accessed but when I type a file name to access a file in the server, I got an error java.security.AccessControlException:access

How to read file content from servlet?

2007-05-13 Thread Teh Noranis Mohd Aris
Dear All, I have an applet that sends data name, score and ScoreFile to a servlet that get these data to be saved in a file. My question is, how can I send these data from the servlet to the applet (reversed) so that I can use only the data name in processing? Please help. Thank you.

Is it possible to have more than one submit button in a JSP file?

2007-03-28 Thread Teh Noranis Mohd Aris
Dear All, I hope all of you can still remember me. I had the problem of writing the file content from an applet to a servlet. Now, I'm using JSP and it works. However, from JSP code examples, I always see only one submit button to the server. I would like my system to have several submit

Re: Is it possible to have more than one submit button in a JSP file?

2007-03-28 Thread Teh Noranis Mohd Aris
PROTECTED] wrote: On 3/28/07, Teh Noranis Mohd Aris wrote: I would like my system to have several submit buttons This is a basic HTML question, nothing to do with JSP. Yes, a form in an HTML document can have multiple submit buttons; reading the appropriate recommendation is, uh, recommended

Re: File Content Not Saved To Server

2007-03-14 Thread Teh Noranis Mohd Aris
] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Teh, Teh Noranis Mohd Aris wrote: Now, a file name that was input by the user was created BUT the problem is that, when I open the file, the word null was written to the file NOT the file content. You probably have a null content variable

Re: File Content Not Saved To Server

2007-03-03 Thread Teh Noranis Mohd Aris
you so much. Yours Sincerely, TEH NORANIS Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Teh, Teh Noranis Mohd Aris wrote: I want to save a file name and its content to the computer server at directory C:/temp/. I've passed the file name

Re: File Content Not Saved To Server

2007-03-03 Thread Teh Noranis Mohd Aris
MESSAGE- Hash: SHA1 Teh, Teh Noranis Mohd Aris wrote: In my program, I want the servlet to load an applet where I can input the file name in a given text field and the file content in a given text area. Just out of curiosity, why do you want an applet to do this when you can just use a file

File Content Not Saved To Server

2007-03-01 Thread Teh Noranis Mohd Aris
Dear All, I want to save a file name and its content to the computer server at directory C:/temp/. I've passed the file name and file content parameter from the applet to the servlet. The problem now is that the file name is created in the computer server directory but a 'null' is

Cannot save file to Apache Tomcat server

2007-02-15 Thread Teh Noranis Mohd Aris
Dear all, I really hope that someone can help me out. I have an error-free applet and servlet. When I type http://localhost:8080/examples/servlet/ServletIdea, an applet is loaded. From the applet, I type the file name in a text field and the file content in a text area. I want the file

Applet to JSP communication

2007-02-12 Thread Teh Noranis Mohd Aris
Dear all, How can my applet communicate with JSP using POST and GET? I have an applet with a Save button to save data in a file at Apache Tomcat server. The applet also contain JTextField to input the file name and JTextArea to input the text to be saved. How can the applet and JSP

Servlet/JSP source code to save data in a file

2007-02-10 Thread Teh Noranis Mohd Aris
Dear all, Does anyone have the Servlet/JSP source code to save data in a file that will be located in the server? I need the source code very urgently. I have my own version but it is not working. Please help me! Thank you. Yours Sincerely, TEH NORANIS

Why applets cannot link to next page in a servlet?

2007-01-19 Thread Teh Noranis Mohd Aris
Dear All, I put my applet and servlet in a directory (using package statement in the java file) which I defined. When I called the servlet in a web browser, the first page of the applet was displayed. But when I login a valid user name and password, the applet cannot link to the next page which

Re: Applet does not send request to servlet

2007-01-17 Thread Teh Noranis Mohd Aris
attachments are disabled... On 1/17/07, Teh Noranis Mohd Aris wrote: Hi, I already solve the problem of loading my applet in the web browser. Thank you to all. Now, I'm having the problem to send request from the applet to the servlet. Attached is the AppletLogin.java (the servlet which I put

Re: Applet does not send request to servlet

2007-01-17 Thread Teh Noranis Mohd Aris
of writing the codeBase variable the correct way. Can anyone please give me any suggestions? Please Help Me! Hoping for a reply. Thank you. TEH NORANIS --- Teh Noranis Mohd Aris [EMAIL PROTECTED] wrote: Hi, I'm sorry, I didn't realize about the attachment capability for this mailing

Re: Cannot load applet on web browser

2007-01-16 Thread Teh Noranis Mohd Aris
Thank you for the reply. I already created the LoginApplet.html and embed the LoginApplet.class. Where should I put the files in the tomcat directory? Where should I put the JSP files? How about the WEB-INF file? Please help me! I'm really short of time! Thank you so much. Yours

Re: Cannot load applet on web browser

2007-01-16 Thread Teh Noranis Mohd Aris
to retreive the applet. Consider composing the code and codebase attribute as: out.println( code=\LoginApplet.class\ ) ; out.println( codebase=\ + req.getContextPath() + /applets ) ; --David Teh Noranis Mohd Aris wrote: Thank you for the reply. I already created the LoginApplet.html and embed

Applet does not send request to servlet

2007-01-16 Thread Teh Noranis Mohd Aris
Hi, I already solve the problem of loading my applet in the web browser. Thank you to all. Now, I'm having the problem to send request from the applet to the servlet. Attached is the AppletLogin.java (the servlet which I put in package myapp) and LoginApplet.java (the applet which I put

Cannot load applet on web browser

2007-01-15 Thread Teh Noranis Mohd Aris
Hi, I have created programs under the following directory: servlet program: jakarta-tomcat-4.1.31/webapps/myapp/WEB-INF/classes/AppletLogin.class applet program: jakarta-tomcat-4.1.31/webapps/myapp/applets/LoginApplet.class deployment descriptor: myapp/WEB-INF/web.xml

Problem with Applet-to-Servlet Programs

2007-01-14 Thread Teh Noranis Mohd Aris
Hi, I'm doing applet-to-servlet programs. I've put the applet in directory c:\jakarta-tomcat-4.1.31\webapps\ROOT\application\LoginApplet. I've put the servlet in directory c:\jakarta-tomcat-4.1.31\webapps\application\WEB-INF\classes\AppletLogin. When I run it in the web browser using

Please Help!Tomcat Not Running on Linux Fedora

2006-10-31 Thread Teh Noranis Mohd Aris
Dear All, I'm very new to Linux Fedora and not quite familiar to the commands. I'm using Fedora Core 2.6.9-1.667. I've already installed j2sdk1.4.2_10 and jakarta-tomcat-4.1.31 on my computer. Unfortunately, when I tried to execute Tomcat in the bin directory by typing ./startup.sh the

Re: Please Help! Error in using Packages

2005-12-28 Thread Teh Noranis Mohd Aris
, it's helpful to post what the solution was, even if it was something silly, it could possibly help someone else. K --- Teh Noranis Mohd Aris [EMAIL PROTECTED] wrote: Dear all, I've already solve the problem. Thanks to all who had contributed. TEH --- Prasad [EMAIL

Re: Please Help! Error in using Packages

2005-12-20 Thread Teh Noranis Mohd Aris
The web.xml looks like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/j2ee/dtds/web-app_2_3.dtd; web-app servlet servlet-nameMyFirstServlet/servlet-name

Please Help! Error in using Packages

2005-12-19 Thread Teh Noranis Mohd Aris
Hi, I'm learning to use packages from a book example to create my own servlet instead of putting the code in the examples webapp. However the following error occurs: HTTP Status 404 - /ch03/servlet/com.wrox.projsp.ch03.myfirstwebapp.MyFirstServlet type

Please Help Me

2005-12-02 Thread Teh Noranis Mohd Aris
Dear All, I've installed tomcat version 4.1.31 and tried to start tomcat but the Tomcat window displays error messages: Catalina.stop: java.net.ConnectException: Connection refused: connect java.net.ConnectException . . . How can I fix this problem? Please help me. Thank you.

Please Help Me

2005-12-02 Thread Teh Noranis Mohd Aris
Dear All, I've installed tomcat version 4.1.31 and tried to start tomcat but the Tomcat window displays error messages: Catalina.stop: java.net.ConnectException: Connection refused: connect java.net.ConnectException . . . How can I fix this problem? Please help me. Thank you.

Problem Solved

2005-12-02 Thread Teh Noranis Mohd Aris
Dear All, For those who replied, thank you so much. I've already solved the problem. I think that I've downloaded the wrong file. I've uninstalled tomcat and installed it again and it works. Thank you again. Regards, Teh __ Start your day with