Alex Leung

Greenhorn
+ Follow
since Dec 08, 2003
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 Alex Leung

Yes, I have used the server ip address on the client URL.
This is what I have done:
- I installed tomcat 4.1 and have broadband internet connection (permanent) on the server computer.
- my server ip is fixed to 82.34.xxx.x and I can access my tomcat servlets with server's internet explorer:
http://82.34.xxx.x:8080/index.jsp
- everything is completely fine, but only to the server.
- recently I used another computer (client) to access the tomcat of the server, by using the exact url as above. (of course with xxx.x change back to the real digits) But it always show: the page cannot be displayed.
- I have tried switching the firewall off from the server, but do not work, I ping client from server and received 100%, but pinging server from client will result 100% loss, and I do not know why.
It is like the server do not really exist to another computer. So the main point is, http://82.34.xxx.x:8080/index.jsp only work on the server itself but not to any other computer.
Do you know why? Thank you.
17 years ago
Hi, I am wondering how can you let other computers to access your server's jsp/servlets in Tomcat. I can acess them through my own computer, but still do not know why other computer cannot access it using web browser.
Thank you.
17 years ago
Ok, try this: do not use classpath for the moment, I can tell you I did not have to use classpath variable to get my java code working. I only use path, try to change all the directories you set for classpath to path instead.
hope this helps.
17 years ago
I am not sure what will happen when I posted this message, I might be banned?
I know this is 'Javaranch' site, but C# is very similar to Java, anyone thinking having an extra forum for C# ? just wondering, since I couldn't find good forum for C#, and this site is one of the best Java forum I seen, so...
17 years ago
First, this might sound a little amusing, but are you sure your normal java files compiles? I mean the ones not using servlet packages. If you can compile normal java files, and you have the servlet jar file ready, then it can only mean two things (to me), either:
- you have set up the path to the servlet jar file incorrectly.
- or your servlet code is incorrect.
hope this helps.
17 years ago
Thanks for your reply, I am using Norton personal firewall, I know there is an option for setting trusted computer (IP), but I can't see an option for setting port number. Do u know?
17 years ago
Hi, Can you help me?
How can I set my computer (with firewall) to allow client computer access my tomcat server? without disabling the firewall, but by configurating the firewall.
I know you can set which application the server firewall to allow to 'let it out' but I do not know how to set (permission) outcoming communication to this server.
Thank you.
17 years ago
Hi,
I have not touch JDBC for a while now, but what I know is you have to execute the SQL statement on the database itself from java then retrieve the data into the program, using java.sql
so you need to execute something like this on the database inside java:
SELECT EmpId, COUNT(*) AS some_column
FROM table_name
GROUP BY EmpId
ORDER BY EmpId
hope this helps.
17 years ago
Hi Linda,
Not sure about this, but I think jar file are place inside lib directory inside where you install SDK, and I thought classpath is to only to read .class files, but not .jar.
if you have install the SDK in C:\j2sdk1.4.1_01\
then jar file should be place here: (thats how I did it)
C:\j2sdk1.4.1_01\lib
then set the path: path C:\j2sdk1.4.1_01\lib as well as any other sources your program depend, like the current directory (.), for example:
.;C:\j2sdk1.4.1_01\lib
hope this helps.
17 years ago
I had similar problems when I start using servlets, but not sure if your is the same.
Do correct me if I am wrong, I thought SDK 1.4 do not include servlet packages. For me, to use servlets I downloaded a seperate file 'servlet-2_2' from Sun and put it in the lib directory inside where I installed the SDK. then set path including the lib directory as well, then my servlets compile. Try to test if your servlets packages exist first by writing a simple (empty) class like:
----------------------
import javax.servlet.*;
public class A {}
---------------------
hope this helps.
17 years ago
Thanks for the comments, I will try these ideas. I am using Red Hat 8.1, If I get stuck I will ask again. Cheers.
17 years ago
I have ping the server IP both on the client and the server, and result 100% loss... so can you tell me how to solve the 'lack of connectivity' problem?
Thank you.
17 years ago
Hi, this is not the first time I have done this, but I didn't manage to solve the problem. This is the situation:
-In my computer I have Windows XP installed first,
-Then I install Linux 8.1,
-Everything is fine, since Linux created a boot option for windows xp after installation, so both linux and windows boot option appear if restart the computer.
-Recently I have to reinstall windows due to potential worm or virus exist in my windows. then after the installation of windows, linux boot option disappear, restarting the computer will go straight to windows xp, leaving no trace going into linux that's previous installed.
I wonder how to get back to linux? without reinstalling linux again?
Thank you.
17 years ago
Hi, I have been using Tomcat 4 to test my Servlets and JSP for a while now. But I only been testing it through my own computer, by using the URL:
http://localhost:8080/index.jsp
now I wanted to test access this server computer through an another computer elsewhere, by using the IP of this server:
so if the server IP is: 82.34.xxx.x
I type the following URL on the remote(client) computer web browser:
http://82.34.xxx.x:8080/index.jsp
The problem is: The page cannot be display! even I disable the firewall from the server. and I tried this URL on the server itself, using IP 82.34.xxx.x rather then localhost, it still works.
I know this is a simple case to solve, but rather I go and buy a book, I prefer to get the answer free here. Can you help me?
Thank you.
17 years ago
Hi, I have done some research on which collection looks possible for handling the implemnetation of this assignment, while I do think Vector is capable of doing the job, Hashmap seems to be better because it uses keys, but I could use the Vector index as key implemnetation as well.
Collection.synchronizedMap/Set can be use on Hashmap and set. Other collections like Hashtable and Hashset also provide simliar functionalities too.
Personally I think I perfered Hashmap, but any advices or suggestion?
Thank you