[JBoss Portal] - XML Escaping resourceURLs
by craigsdickson
I am attempting to deploy a very simple portlet onto JBoss Portal 2.7.2 (running on Mac OSX).
There is a requirement for the resulting HTML to be XHTML 1.0 Strict compliant.
Within the portlet I have a snippet of JavaScript that is designed to dynamically submit an asynchronous GET request using a JQuery library.
However, when using the <portlet:resourceURL/> tag to help create the URL to send the request to, I notice that the ampersands in the URL are not encoded properly and so validating the HTML is failing.
I have tried changing the use of the tag to <portlet:resourceURL escapeXml="true"/>.
I have also tried passing the javax.portlet.escapeXml system property on the JBoss command line by adding the following to my run.sh script:
JAVA_OPTS="-Djavax.portlet.escapeXml=true $JAVA_OPTS"
But nothing seems to make any difference.
And the worst part is, it appears that even the ampersands that I have been hand encoding are being converted back to unencoded ampersands. For example, in the JavaScript, I want to dynamically append one more request parameter to the URL that is generated by the <portlet:resourceURL/> tag like this:
var url = "<portlet:resourceURL/>&name=" + name;
However, the encoded ampersand before the name parameter gets simply converted to a single ampersand character when I view the source through Firebug etc. Like this:
var url = "/portal/auth/portal/default/Theme+Test/Quick+Extension+LookupWindow_90?action=b&cacheability=PAGE&name=" + name;
The actual JS code runs fine, but the page is failing the XHTML validation, which is a showstopper.
What am I missing?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239537#4239537
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239537
16 years, 10 months
[Management, JMX/JBoss] - SarDeployerMBean
by jamie.s
Hello,
I am porting an application from JBoss 4.2 AS to 5.1 AS.
My predecessor implemented a plugin system. This system made use of the SARDeployerMBean, adding a notificationlistener, essentially like so:
| public class Plugin extends ServiceMBeanSupport implements NotificationListener
| {
| protected void createService()
| {
| :
| server.addNotificationListener(SARDeployerMBean.OBJECT_NAME, this, null, null);
|
The handleNotification listener is listening for state changes of the attribute 'STATE'.
This does not work in JBoss AS 5.1, as that MBean is not bound.
The closest thing I can find is the ServiceModuleJSR77Deployer bean (not mbean) in the jsr77-deployers-jboss-beans.xml config file.
Am I completely in the wrong direction here?
How can I detect that SAR deployment is complete in JBoss AS 5.1?
Thanks for any insight,
Jamie.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239532#4239532
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239532
16 years, 10 months