由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - 愣是笨到家----整不明白applet的path
相关主题
One question about Java ProgrammingRe: access host file in applet
Servlet开发初步 [fwd]Local file access issue with Applet
in eclipse EE , how to build a tomcat/web application?求救!! HTML Embeded Java Applet File I/O
Re: How to write to a file on server in an applet?How to find cached jar file?
a question regarding appletservlet读取directory的基本问题
赶快帮帮我!jboss hot deployment in eclipse
再问个java的蠢问题,别骂我what wrong with jboss?
为什么我这个html找不到applet class?Web application deployment 的问题
相关话题的讨论汇总
话题: jar话题: applet话题: directory话题: lib话题: files
进入Java版参与讨论
1 (共1页)
m******o
发帖数: 774
1
写了个并不复杂的applet,自己的jar file一个(digital.jar),需要其它两个lib jar
(dpotapi.jar, dpotjni.jar)。我靠,中文写这个实在不行。
Everything worked perfectly, however, I hate the fact that I must place the
same jar files at two places to make it work. It is deployed under JBoss as
a WAR file, however, I must store the same 3 jar files in both the myapp.war
directory and the myapp.war/WEB-INF/lib directory to make the applet work.
I have tried more than 3 hours with all possible combination I can think of
with the applet tag:
T*****e
发帖数: 361
2
I guess you don't have to put the jar files in your WEB-INF/lib directory if
you don't use them on the server side. For the purpose of applets, you may
create a directory called "lib" or "applets" in your context root (or any
other place) and use relative path to access them.
For example:
..../ (project root)
..../applets/MyApplet.jar
..../html/MyPage.html
Then in MyPage.html:

Well, I guess you may have tried this already :)
Good luck.
m******o
发帖数: 774
3
Thanks a lot ThatOne.
I think I figured it out with your input.
I do need to use some of the library classes in my server side code, so it
makes perfect sense that the whole process won't finish when I take the lib
files out of WEB-INF/lib.
I've tried use only the jar files in WEB-INF/lib but it always failed to
load. Now with your input, I tried put the jar files in a directory named '
WEBINF/lib' and it worked! So I suspected that the '-' part in the directory
name is the trouble maker. Guess

【在 T*****e 的大作中提到】
: I guess you don't have to put the jar files in your WEB-INF/lib directory if
: you don't use them on the server side. For the purpose of applets, you may
: create a directory called "lib" or "applets" in your context root (or any
: other place) and use relative path to access them.
: For example:
: ..../ (project root)
: ..../applets/MyApplet.jar
: ..../html/MyPage.html
: Then in MyPage.html:
:
m******o
发帖数: 774
4
Found out this page that contains some good info. I won't be able to find it
without thinking of WEB-INF is treated differently.
http://www.jguru.com/faq/view.jsp?EID=499425
1 (共1页)
进入Java版参与讨论
相关主题
Web application deployment 的问题a question regarding applet
HTTP Status 404 The requested resource (/abc/index.jsp) is not available.赶快帮帮我!
SOAP over JMS with CXF frame?再问个java的蠢问题,别骂我
倒霉的Openshift重启后出现Exception为什么我这个html找不到applet class?
One question about Java ProgrammingRe: access host file in applet
Servlet开发初步 [fwd]Local file access issue with Applet
in eclipse EE , how to build a tomcat/web application?求救!! HTML Embeded Java Applet File I/O
Re: How to write to a file on server in an applet?How to find cached jar file?
相关话题的讨论汇总
话题: jar话题: applet话题: directory话题: lib话题: files