setting codebase for applet inside jsp file
Hi all,
in my webapps named Cons i have an applet file named AppDem
i have a folder called dynamic under Cons
In dynamic i have a jsp file called afterlog.jsp , inside which i am calling applet AppDem using applet tag.
As the applet file AppDem.java and the jsp aftelog.jsp are not in the same folder i need to give path for Applet in codebase attribute in ht
Can anybody suggest how to give relative path for applet
My Webapp name is Cons
AppDem.java is the applet file present under /webapp/Cons/AppDem.java
afterlog.jsp is present in /webapp/cons/dyanmic/afterlog.jsp
I need AppDem.java to be in the same location. Because i am calling a servlet file from applet by forming a url like
m_urlAcceptor = new URL(docBase.getCodeBase() ,"/servlets/pTimer");
docBase.getCodeBase() returns the value "http://My IP...:8080/Cons" together with the string "/servlets/pTimer" gives the full URL
"http://My IP...:8080/Cons/servlets/pTimer".
So if i change the applet file location, this wont work.
now i am runnig the application by giving the value in codebase attribute as "c:\tomcat5.0\webapps\Cons" .
Just for testing purpose only i gave like this...
Now i need to give dynamic and relative path for applet AppDem in codebase attribute of applet tag in aftelog.jsp file...
even i finished developing the complete web app, i am not able to proceed only because of this
Looking forward for your earliest reply..
Thanks in advance
|