-
1. Re: Strange problem
jhallavnet Mar 22, 2004 11:13 AM (in response to cosmin_wondrous)It sounds like either your .js/.css files are not being included in your war file or the access paths are incorrect in your code where you reference them.
-
2. Re: Strange problem
cosmin_wondrous Mar 22, 2004 9:45 PM (in response to cosmin_wondrous)Thanks for an early reply.
But I have made sure that JS and CSS are packaged in the war file, since I am able to see those in the <SERVER_HOME>\server\default\tmp\deploy\<APP_CONTENT_FOLDER>
And as for the relative path reference, there is no problem in referencing them since the localhost_access.log file displays the correct path of the file reference.
The problem persists with all resources - images, external CSS and JS files. The size of these resources is not a problem since same is not working with my sample application which are a few KB of external resources.
I an using JBoss 3.2.3 -
3. Re: Strange problem
captrespect Mar 22, 2004 10:12 PM (in response to cosmin_wondrous)It has to be your path, although you could check the web.xml in the tomcat app (deploy/jbossweb-tomcat41.sar/web.xml) to be sure the file types are listed.
Show us an example of your link and exactly where your files are in your war. -
4. Re: Strange problem
cosmin_wondrous Mar 23, 2004 12:14 AM (in response to cosmin_wondrous)Hi all,
The directory structure is like
jbossApp
ejb
META-INF
sample
sampleEJB
<ejb class files>
META-INF
application.xml
web
sample
html
<css file>
js
<js file>
jsp
<jsp file refencing to js and css in above subfolders>
WEB-INF
classes
sample
sampleClass
<class files>
lib
This structure is made into a jbossApp-ejb.jar, jbossApp.war, jbossApp.ear file from the web, ejb, root respectively.
The application.xml in META-INF looks like -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<display-name>jbossApp Application</display-name>
jbossApp Application description
jbossApp-ejb.jar
<web-uri>jbossApp.war</web-uri><context-root>jbossApp</context-root>
I will provide u sample snippet of the code of the jsp which references the js and css.
New Document
This is the part of localhost_access.log showing the request to the css and js
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "POST /web-console/Invoker HTTP/1.1" 200 73
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/jsp/samplePage.jsp HTTP/1.1" 200 565
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/js/sampleJS.js HTTP/1.1" 200 -
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/html/sample.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Mar/2004:10:46:28 +0530] "POST /web-console/Invoker HTTP/1.1" 200 73
Regards. -
5. Re: Strange problem
cosmin_wondrous Mar 23, 2004 12:16 AM (in response to cosmin_wondrous)Hi all,
The directory structure is like
jbossApp
ejb
META-INF
sample
sampleEJB
<ejb class files>
META-INF
application.xml
web
sample
html
<css file>
js
<js file>
jsp
<jsp file refencing to js and css in above subfolders>
WEB-INF
classes
sample
sampleClass
<class files>
lib
This structure is made into a jbossApp-ejb.jar, jbossApp.war, jbossApp.ear file from the web, ejb, root respectively.
The application.xml in META-INF looks like -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<display-name>jbossApp Application</display-name>
jbossApp Application description
jbossApp-ejb.jar
<web-uri>jbossApp.war</web-uri><context-root>jbossApp</context-root>
I will provide u sample snippet of the code of the jsp which references the js and css.
New Document
This is the part of localhost_access.log showing the request to the css and js
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "POST /web-console/Invoker HTTP/1.1" 200 73
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/jsp/samplePage.jsp HTTP/1.1" 200 565
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/js/sampleJS.js HTTP/1.1" 200 -
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/html/sample.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Mar/2004:10:46:28 +0530] "POST /web-console/Invoker HTTP/1.1" 200 73
I have checked the web.xml file, it has all the entries for the file types.
The servlet reference path is working fine.
Regards. -
6. Re: Strange problem
cosmin_wondrous Mar 23, 2004 12:46 AM (in response to cosmin_wondrous)Hi all,
The directory structure is like
jbossApp
ejb
META-INF
sample
sampleEJB
<ejb class files>
META-INF
application.xml
web
sample
html
<css file>
js
<js file>
jsp
<jsp file refencing to js and css in above subfolders>
WEB-INF
classes
sample
sampleClass
<class files>
lib
This structure is made into a jbossApp-ejb.jar, jbossApp.war, jbossApp.ear file from the web, ejb, root respectively.
The application.xml in META-INF looks like -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<display-name>jbossApp Application</display-name>
jbossApp Application description
jbossApp-ejb.jar
<web-uri>jbossApp.war</web-uri><context-root>jbossApp</context-root>
I will provide u sample snippet of the code of the jsp which references the js and css.
New Document
This is the part of localhost_access.log showing the request to the css and js
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "POST /web-console/Invoker HTTP/1.1" 200 73
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/jsp/samplePage.jsp HTTP/1.1" 200 565
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/js/sampleJS.js HTTP/1.1" 200 -
127.0.0.1 - - [22/Mar/2004:10:46:23 +0530] "GET /jbossApp/sample/html/sample.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Mar/2004:10:46:28 +0530] "POST /web-console/Invoker HTTP/1.1" 200 73
I have checked the web.xml also which contains the reference to all file types. -
7. Re: Strange problem
ahardy66 Mar 23, 2004 7:59 AM (in response to cosmin_wondrous)Cosmin, when posting html snippets, check that it shows up properly first! You can use the 'preview' button.
Test in your browser whether you can call up your css & js files. As you access log shows, you are calling them. Doing it directly will show you some sort of error in the browser. Or you will succeed and can look at the javascriopt which may be in error. -
8. Re: Strange problem
cosmin_wondrous Mar 24, 2004 10:48 PM (in response to cosmin_wondrous)Thanks folks for the support.
I have checked all the possible replies to solve this problem.
The only last thing I could do is start with a fresh installation of JBoss. I was able to deploy the application and its picking up the relative path references now.
Regards