matsgberglund
Junior Member
Posts: 4
Registered: 4/22/2005
Member Is Offline
|
| posted on 4/22/2005 at 09:57 AM |
|
|
JSP classload error in Tomcat
I'm trying to build dynamic tree menues with servlet/JSP.
I construct the tree_items.js in my servlet and forward the result to the JSP page tree.jsp - I have renamed tree.html.
The tree.jsp has these rows;
<script language="JavaScript">
<jsp:include page="tree.js" />
<%=treeItems >
<jsp:include page="tree_tpl.js" />
</script>
But the icons is missing when I run the menu through the Web browser.
And I can see many errors when I look in the Tomcat consol.
E.g. java.lang.ClassNotFoundException: icons.
So for some reason Tomcat believes that the javascript is Java.
But Tomcat should just bother with JSP syntax and don't care with HTML and javascript.
What have I missed?
I have tried to copy the tree.js and tree_tpl.js files direct into the tree.jsp file - but it doesn't help.
Thankful for some assitance.
/Best regards, Mats
|
|
|
matsgberglund
Junior Member
Posts: 4
Registered: 4/22/2005
Member Is Offline
|
| posted on 4/22/2005 at 06:28 PM |
|
|
One more thing.
It's OK just to JSP include the files.
But not to add this;
<script language="JavaScript">
<!--//
new tree (TREE_ITEMS, TREE_TPL);
//-->
</script>
Tomcat seems to belive this is a Java statement.
And it doesn't help to write like this;
<script language="JavaScript">
<!--//
<%out.println("new tree (TREE_ITEMS, TREE_TPL);");%>
//-->
</script>
/Mats
|
|
|
matsgberglund
Junior Member
Posts: 4
Registered: 4/22/2005
Member Is Offline
|
| posted on 4/23/2005 at 09:51 AM |
|
|
I used Tomcat 5.5.4.
And the problem seems to be related to this version.
Tomcat 5.5.9 works fine.
But I still have problem with the image file path.
See the separate record about this.
/Mats
|
|
|