You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeff Conrad <jc...@yahoo.com> on 2004/03/31 00:01:52 UTC

Re: XSP error (Feedback to Torsten)

Here is the link that I had, I could not typecase to
HTTPURLConnection.  I was able to get the same
(unencoded) java to work in JSP however:

http://article.gmane.org/gmane.text.xml.cocoon.user/33489

Torsten Curdt <tcurdt <at> vafer.org> writes:

> 
> Jeff Conrad wrote:
> 
> > Your problem looks similar to an issue I brought
up
> > but was not addressed by anyone.  It seems that
the
> > XSP compiler was not able to handle typecasting
> > 
> > String s = (String) x;
> > 
> > Was failing.
> 
> What? Please point me to that thread.
> This is more than just unlikely.
> 
> cheers
> --
> Torsten
> 



=====
Jeff Conrad
jconradmn@yahoo.com
dmitri2060 on ebay / half.com

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XSP error (Feedback to Torsten)

Posted by Torsten Curdt <tc...@vafer.org>.
> Here is the link that I had, I could not typecase to
> HTTPURLConnection.  I was able to get the same
> (unencoded) java to work in JSP however:
> 
> http://article.gmane.org/gmane.text.xml.cocoon.user/33489

Thanks for the pointer, Jeff

Not sure if you will like it ...but all that
was missing was the root tag for the output
tree ;) See below...

<xsp:page language="java"
           xmlns:xsp="http://apache.org/xsp">
<xsp:structure>
	<xsp:include>java.net.URL</xsp:include>
	<xsp:include>java.net.HttpURLConnection</xsp:include>
	<xsp:include>java.io.OutputStreamWriter</xsp:include>
	<xsp:include>java.io.BufferedReader</xsp:include>
	<xsp:include>java.io.InputStreamReader</xsp:include>
</xsp:structure>
<root>
<xsp:logic>
	StringBuffer results = new StringBuffer();
	String specURL = "SOMESERVERURL";
	String specStr = "&lt;SOMEXML /&gt;";
	URL url = new URL(specURL);
	HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
...

cheers
--
Torsten



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org