Thanks Vineet, I managed to change WebResource to ByteArrayResource. 

But I am stuck with a problem in the url for json constructed. 

CharSequence dataPath = RequestCycle.get().urlFor(OpenFlashChart.this,
IResourceListener.INTERFACE);
String url =  RequestUtils.toAbsolutePath(dataPath.toString());

When i deploy to my server and access it using the ip address, the json data
url was still referring to 
http://127.0.0.1:8080/erp/app/home/wicket:interface.....

so the js to embed did not work 
swfobject.embedSWF('resources/com.company.charts.ForceChartResource/ofc/resr/open-flash-chart.swf','chart8',
'100%', '200', '9.0.0', 'expressInstall.swf',
{'data-file':'http://127.0.0.1:8080/erp/app/home/wicket:interface/:3:dashboard:layout:lcontent-list:3:lcss-cntr:lcontent:dsb-content:chart::IResourceListener::'},
{} );


RequestUtils.toAbsolutePath is not working as expected ? Any clue ?


DEBUG MESSAGES FROM LOG
-----------------------------------
data path >>
home/wicket:interface/:3:dashboard:layout:lcontent-list:3:lcss-cntr:lcontent:dsb-content:chart::IResourceListener::
req.getRequestURI /erp/app/home
req.getRequestURL http://127.0.0.1:8080/erp/app/home
req.getContextPath /erp
req.getPathInfo /home
req.getPathTranslated
/home/ec2-user/server/apache-tomcat-7.0.8/webapps/erp/home
req.getServletPath /app
req.getRemoteHost 127.0.0.1
req.getRemotePort 33230
req.getLocalName() localhost

----





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/WebResource-in-Wicket-1-5-tp4106181p4122979.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to