Hi.
I am using
Struts 2.2.1 with Tiles. I am encountering the following issue: In my tile with the HTML 'head' section I declare some Javascript to invoke the TinyMCE WYSIWYG editor for HTML 'textareas' (please see below); however, when I run the application the Javascript that should invoke the TinyMCE WYSIWYG does not execute. Consequently, the TinyMCE WYSIWYG is never rendered.
When I
test the application in IE 7, the page renders just fine with textareas, but I do not see the WYSIWYG options of Tiny MCE. A more telling illustration comes for Firefox 3.6. When I view the source of the HTML that is generated, I see the following:
I am able to the click on the 'src' and 'href' elements of the page in the Firefox view source window and actually see the generated 'struts_dojo.js' and my 'ApplicationName.css' file, but when I click on the key element 'src' and value '/ApplicationName/commons/tiny_mce/tiny_mce.js' associated with it, I get a HTML 404 listing.
I have copied the code from the IE and Firefox view source window, and pasted it into an test HTML file. When I launch this HTML file and view the source from Firefox for the key element 'src' and value '/ApplicationName/commons/tiny_mce/tiny_mce.js' I can actually see the Javascript. Also, the Tiny MCE WYSIWYG editor renders fine. I was hoping someone could help me understand why this is the case, and how I can get my Struts 2 application to render the Tiny MCE Javascript code. I include what I believe is the code necessary to understand my setup.
Struts 2:
I am using the 'simple' UI theme as we construct our own CSS / HTML layout. In my 'struts.properties' file I include the following line:
The relevant sections of my 'web.xml' file:
Here is the code from my tile which includes the HTML 'head' element.
Note in the line
, I have also tried
which appends the jsessionid to the end of the generated value for HTML element 'src', and
. Neither of these seem to help, so I ended up trying to add the relative URI to the value of the 'src' element as above.
Does anyone have any suggestions as to why the 'tiny_mce.js' file is not being called? If there are any details I have left out, please let me know.
Thanks.