This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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 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.
Joined: Mar 12, 2011
Here is what I introduced in my Java code as per your suggestion:
Here is what was generated by the browsers:
Do you think the issue is that as a consequence of my Java code, the browser, app. server, or whatever cannot find the 'tiny_mce.js' file? Is it because the browser cannot resolve the link: ''.
When I copy and paste the code from the browser view source window into a test HTML file, and I run that file, the Tiny MCE WYSIWYG editor appears no problem. Also, when I view the source of my test HTML file, the link that points to the 'tiny_mce.js' file generates the file no problem. But when I run that page as part of my Web application on WebLogic, it does not resolve the link that should be point to the file 'tiny_mce.js'; and it does not render the Tiny MCE WYSIWYG editor. Any thoughts?
sam jsem wrote:I am certain that the file directory path is: '%APPLICATION_CONTEXT_ROOT/commons/tiny_mce/tiny_mce.js'.
The thing is that you should be able to open a browser and confirm the location. If you cannot access it via the browser then you're going to get the 404 in the code.
I'm using tiles like you ... the relevant part of the code that you want to see is:
In my particular case my application context is / so when the html renders it renders as:
I put the code I gave you earlier in /js/snares.js
Joined: Mar 12, 2011
Thanks again for your timely assistance.
Since we have a similar implementation, I thought I might share with the fruits of my two days of excruciating labour: Struts 2 jQuery Plugin Showcase. It appears as though there is a plugin for Tiny MCE. I was able to success deploy it into my application; furthermore, there are also lots of other goodies.