R Mutum

Greenhorn
+ Follow
since Sep 07, 2000
Merit badge: grant badges
For More
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 R Mutum

avn:
Place a copy of servlet.jar in c:\jdk...\jre\lib\ext folder. The jar file is in lib folder of your server installation (tomcat, etc.). This should fix it.
RM
23 years ago
Raj:
You will get the server date as long as the code runs on the server. You can put the following code in a jsp page or a servlet:
java.util.Date today = new java.util.Date();
out.println("Today is :" + today);
If you want the client date, you have to use JavaScript or VBscript that runs on the client.
Thanks.
RM

23 years ago
pk:
If the DOS window closes, it means the server is not running. The console (DOS window) should stay open.

Originally posted by pk:
How do u know whether the script ran successfully and server is running. In my case it opens a new dos window and close it immedialtely. I cannot see what is happening in new window.


Generally, it happens if the classpaths are not OK and TOMCAT & JAVA HOME variables are not setup properly. If you have installed the server in C:\tomcat, see c:\tomcat\doc\uguide\tomcat_ug.html. Then, you can move on to setting the context paths in server.xml. Consult Chapter 10 of JSP API doc for setting up applications. You can download the API doc from java.sun.com.
Good luck!
RM


[This message has been edited by R Mutum (edited September 07, 2000).]
23 years ago
Patricia:
Try getRemoteUser() and getRemoteHost() methods of the
request object.
e.g.,
out.println("User :" + req.getRemoteUser());
where req is the request object.
Thanks.
RM
----------------------

Originally posted by Patricia Fisher:
I am new to this servlet thing, so be nice, okay?
I need to know how to access user environment variables from the server side. Namely the user_name and computer_name.
If anyone has any idea it would be deeply appreciated.


23 years ago