|
|
|
Непонятка з 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:04 |
|
||
|
Непонятка з 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:39 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:23:09 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
хоть бы stackTrace привел что ли ----------------------------------- The Bat + My Gate Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:28:26 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
поменяй свой StreamResult на локальній, как оно результат на сервер странсформит? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 15:50:54 |
|
||
|
Непонятка з 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:01 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Хорошо. Мне нужно на самом деле результат вивести на етой же JSP странице, как ето сделать не знаю. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 16:56:11 |
|
||
|
Непонятка з JSP
|
|||
|---|---|---|---|
|
#18+
Может поменять, StreamResult sr= new StreamResult(out); а все остальное оставить? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.05.2006, 17:03:13 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=33761250&tid=2149096]: |
0ms |
get settings: |
18ms |
get forum list: |
18ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
42ms |
get topic data: |
17ms |
get forum data: |
5ms |
get page messages: |
80ms |
get tp. blocked users: |
2ms |
| others: | 329ms |
| total: | 521ms |

| 0 / 0 |
