Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Amit More

Greenhorn
+ Follow
since Oct 16, 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 Amit More

Hi Friends,
I have written a simple applet which looks like:
-----------------------------------------------------------
import java.applet.Applet;
import java.awt.Graphics;
public class FirstApplet extends Applet
{
public FirstApplet()
{
}
public void paint(Graphics g)
{
g.drawString("Hellow World", 25, 50);
}
-----------------------------------------------------------
And to run this applet the required html code is
-----------------------------------------------------------
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<APPLET CODE="FirstApplet.class" width="150" height="150">
</APPLET>
</BODY>
</HTML>
-----------------------------------------------------------
On Local machine when I am trying to open the html file, it loads the applet and works fine.
But now if I am putting all these on server (Apache-Tomcat) and trying to execute it then it gives me the error in java console as:
Java(TM) Plug-in: Version 1.4.0_03
Using JRE version 1.4.0_03 Java HotSpot(TM) Client VM
User home directory = C:\WINNT\Profiles\am007431.MAHINDRABT
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
load: class FirstApplet.class not found.
java.lang.ClassNotFoundException: FirstApplet.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 11 more

------------------------------------------------
I put my class file in '/WEB-INF/classes' folder and instead of html page I am using jsp page which is in '/jsp' folder.
Can any one help me out to solve this problem.
It's urgent !
Thanks in advance..
16 years ago
Hi Aditya,
Can you provide the code for forwarding your request from servlet to jsp.
Because it does matter.
Are u using RequestDispatcher object or something different?
Let me know.
16 years ago
JSP
Hi,
Its working just because of scope of declaration.
16 years ago
Hi Friends,
I want some java/javascript code which will give me the result in following way :
There are two servers
say abc.com and xyz.com
Port opened on abc.com is mapped with xyz.com
In my browser it's showing me abc.com (where as the pages are on xyz server.)
Now I want to hide or masked abc.com from my browser with some other name.
Can any one help me out ?
Its urgent .
16 years ago
Hi Friends,
I want some java/javascript code which will give me the result in following way :
There are two servers
say abc.com and xyz.com
Port opened on abc.com is mapped with xyz.com
In my browser it's showing me abc.com (where as the pages are on xyz server.)
Now I want to hide or masked abc.com from my browser with some other name.
Can any one help me out ?
Its urgent .
Hi,
You can replace that lines with
int List1[] = new int[20];
int List2[] = new int[20];
And your file will get compiled.
16 years ago
Hi Sheikh,
Here are the steps to follow :

Step 1 :
You can set the path for java from command promt as shown below:
set PATH=%PATH%;C:\j2sdk\bin;.
Here I installed java in 'j2sdk' directory. You can specify your own directory name , by default it is like 'j2sdk.version'

Step 2:
Then compile your java code using command
javac filename.java

Step 3:
Then execute your code as :
java filename
16 years ago
Hi Friends,
I am new to this concept....SRP.
Can anyone provide information related to SRP ?
And specifically cookie settings related with SRP.
It's urgent.
Please help me out .
Thanks.
16 years ago
Hi friends,
I am using Apache - Tomcat server
and I have various applications running on four different ports e.g. 8010, 8020, 8030, 8040.
I am accessing those services on http port.
Now I want to move those services on https ports, henceforth I have to use four different secure ports as I dont want to change my configuration of services.
For tomcat default secure port is 843, but since I want four different ports (secure) how will I make the necessary changes and where?
Second problem is that If I am defining secure ports for tomcat other than default one then can we access the secure port applications (which are now hosted on different ports than Tomcat's default secure port i.e. 843.) over the internet?
16 years ago
Hi friends,
I can enable cookies over HTTP,
can any one tell me how to enable them over HTTPS, any specific settings in server.xml or any other info.
Its urgent.
Please help me out.
16 years ago
Hi friends,
For HTTP, I am creating one cookie object and setting the required parameters. The code looks like below:

Cookie cookie = new Cookie("Ispace_Auth", s19);
cookie.setDomain(sCookieDomain);
cookie.setPath("/");
cookie.setMaxAge(14400);
httpservletresponse.addCookie(cookie);
Here no problem with HTTP.
But when for same code I am trying to access files through internet over HTTPS, cookie is not getting created and hence giving me further problem. But if I am using URL rewriting then I can view my site and no problem.
But I dont want to use URL rewriting and hencforth wants to create cookies.
Is there any way to set the cookies for HTTPS server? Or can you provide some help under the cookie setting in Https server?
I am using Apache-Tomcat.
Its urgent. So please help me out.
16 years ago
Hi friends,
For HTTP, I am creating one cookie object and setting the required parameters. The code looks like below:

Cookie cookie = new Cookie("Ispace_Auth", s19);
cookie.setDomain(sCookieDomain);
cookie.setPath("/");
cookie.setMaxAge(14400);
httpservletresponse.addCookie(cookie);
Here no problem with HTTP.
But when for same code I am trying to access files through internet over HTTPS, cookie is not getting created and hence giving me further problem. But if I am using URL rewriting then I can view my site and no problem.
But I dont want to use URL rewriting and hencforth wants to create cookies.
Is there any way to set the cookies for HTTPS server? Or can you provide some help under the cookie setting in Https server?
I am using Apache-Tomcat.
Its urgent. So please help me out.
16 years ago
hi
I want to send SMS using java. can u tell me how to do this using java.
I got the link
http://mobiles.unipro.ru/smlib.html
but they are saying : "SMLib sends and receives messages using a mobile phone connected to the computer with data cable."
My problem is that I am not able to understand the meaning of the above line.
How do I connect the mobile phones to my computer with data cable?
can any one help me out...since I am new to this topic.
16 years ago
hi friends,
I am running an EJB client code in Weblogic server 7, and I have set the classpath and environment appropriately.
The code gets compiled well but while executing it gives me the following error :
Exception in thread "main" java.lang.NoClassDefFoundError: com\ejb\examples\HelloClient
Reply back as earyl as possible.
You can set your classpath as follow:
creat a txt file having :
set classpath=%CLASSPATH%;C:\j2sdk_1.4.0\bin\*;C:\j2sdk_1.4.0\lib\*;
save this file as like StartJava.cmd ( particularly in C folder )
and then before compiling your java code
run this file from command prompt as:
C:>StartJava
It will set your classpath and then you can execute your java codes.
Each time whenever you will lauch a new command prompt you have to execute this StartJava.cmd.
All the best
16 years ago