OK.
I have discovered the error.
I must use an absolute path from the application directory.
E.g. /WebTemplate/icons/imagename.gif.
And then everything works perfect.
And I'm happy!
/Mats
I'm building the tree menu file tree_items.js in a servlet/JSP.
One thing that doesn't work is the icons in the menu structure.
They are specified with image.src(filepath).
The JSP files are located under the application map in Tomcat and the icons are in a map called icons in the application...
If I use JSP include it works almost fine.
And Tocat version 5.5.9 works fine also.
But one thing that doesn't work is the icons in the menu structure.
They are specified with image.src(filepath).
The JSP files are located under the application map in Tomcat and the icons are in a map called...
I used Tomcat 5.5.4 and when I changed 5.0.25 so has the consol errors disappered.
But nothing happens in the browser.
But when I display the source code and copy it to a HTML file everything works fine.
I don't really understand this - shouldn't just Tomcat translate things and send it back to...
I tried another thing;
I printed the HTML direct from my servlet.
But it was the same thing!
I thought that I was printing direct towards the socket when I
printed to the PrintWriter.
But Tomcat seems to be analyze these code too.
Strange!!!!!!!!!!
/Mats
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">...
Yes.
The filename is tree.jsp and the tags are in the head.
It's OK if I write
<% out.println("<language='JavaScript' src='tree_tpl.js'></script>"); %>
So it seems that it's the word "script" that bother Tomcat.
I'm running a Servlet that makes a forward to this JSP.
/Mats
I changed and tried with out.println for the Javascript statements.
But I still get Tomcat errors. Strange?
And it doesn't happens anything in my browser.
But if I copy the browser source code to a html file and run this html file - everything works fine.
Shouldn't the browser treat a html file...
I include these 3 files in a JSP page;
<script language="JavaScript" src="tree.js"></script>
<script language="JavaScript" src="tree_items.js"></script>
<script language="JavaScript" src="tree_tpl.js"></script>
But then I got the following error in the Tomcat consol...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.