Eric, Thanks for the follow-up.
Actually i just came across the http://wicket.sourceforge.net/apidocs/wicket/markup/html/include/Include.html Include component in Wicket which i believe does the same as you suggested to implement...i.e. opens up a new http-connection to the server/url from where the contents are to be embedded...Isn't it ? Secondly since this would mean a separate request would be opened for contents to be included, and hence wouldn't be carrying the request parameters, cookies etc. Which i would have to figure out a way to pass-on/embed manually. Farhan. quote author="Erik van Oosten"> Farhan, You can not mix and match content from different servlet contexts within the same server. The only way is to request content from another server and indeed, this is what the c:import tag does. Wicket has no equivalent component but you could write one without too much problems. Something like: public class HttpImport extends WebMarkupContainer { private String url; public HttpImport(String id, String url) { super(id); this.url = url; } @Override protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, getContent(url)); } private String getContent(String url) { ... code to get data from url ... } } I'll leave the code in getContent as an exercise :) The component above behaves like a Label, it will replace the content of the HTML element it is attached to. Regards, Erik. mfs wrote: > I have had a look at the blog > http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/ > http://herebebeasties.com/2007-03-01/jsp-and-wicket-sitting-in-a-tree/ > which pretty much is based on the same idea, but the only hitch is that it > is assuming the external/non-wicket page (i.e. jsp) to be contained in the > same context/app as wicket. I am looking for a way to include the dynamic > contents from a different context/application, since > RequestDispatcher.include doesn't allow the same. A functionality similar > to > the c:import tag library that is.. > > -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] -- View this message in context: http://www.nabble.com/Embedding-html-from-an-external-application-tp21593700p21612055.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
