|
|
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Эсть два кода TransformerFactory tfactory = TransformerFactory.newInstance(); _______________в простом приложении try { StreamSource ss=new StreamSource(new File("1.xml")); StreamResult sr=new StreamResult(new File("1.html")); Transformer transformer = tfactory.newTransformer(new StreamSource(new File("1.xsl"))); transformer.transform(ss,sr); } catch (TransformerConfigurationException tce) { tce.printStackTrace(); } catch (TransformerException te) { te.printStackTrace(); } все работает идеально ______________в JSP вставке try { StreamSource ss=new StreamSource("http://localhost:8083/mytest/1.xsl"); StreamResult sr=new StreamResult("http://localhost:8083/mytest/1.html"); Transformer transformer = tfactory.newTransformer(new StreamSource("http://localhost:8083/mytest/1.xml")); transformer.transform(ss,sr); } catch (TransformerConfigurationException tce) { tce.printStackTrace(); } catch (TransformerException te) { te.printStackTrace(); } не работает transformer.transform(ss,sr); видает ошибку. Почему? С уважением. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 13:09 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
______________в JSP вставке try { StreamSource ss=new StreamSource("http://localhost:8083/mytest/1.xml"); StreamResult sr=new StreamResult("http://localhost:8083/mytest/1.html"); Transformer transformer = tfactory.newTransformer(new StreamSource("http://localhost:8083/mytest/1.xsl")); transformer.transform(ss,sr); } catch (TransformerConfigurationException tce) { tce.printStackTrace(); } catch (TransformerException te) { te.printStackTrace(); } извините напутал с виставлением кода вот так должно быть. Почему выдает ошибку. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 13:20 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:23 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
хоть бы stackTrace привел что ли ----------------------------------- The Bat + My Gate Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:28 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
поменяй свой StreamResult на локальній, как оно результат на сервер странсформит? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:50 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
javax.xml.transform.TransformerException: java.net.ProtocolException: cannot write to a URLConnection if doOutput=false - call setDoOutput(true) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:53 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Хорошо. Мне нужно на самом деле результат вивести на етой же JSP странице, как ето сделать не знаю. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 16:56 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Может поменять, StreamResult sr= new StreamResult(out); а все остальное оставить? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 17:03 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=33760986&tid=2149096]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
180ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
52ms |
get tp. blocked users: |
1ms |
| others: | 249ms |
| total: | 525ms |

| 0 / 0 |
