当前位置: 代码迷 >> Java Web开发 >> 问个servlet有关问题
  详细解决方案

问个servlet有关问题

热度:80   发布时间:2016-04-17 14:05:00.0
问个servlet问题
和别人做接口,对方说发过来的内容如下:
POST   http://test.com/test   HTTP/1.1
Content-Type:application/xml
content-Length:(...)

<authorization-info>
    <user> test@test.com </user>
</authorization-info>

我怎么从中得到user的内容呢?
谢谢。

------解决方案--------------------
解析XML。
------解决方案--------------------
用dom4j解析
------解决方案--------------------
任职要求:

- Computer science/Engineering degree hold or comparable
- Sound knowledge on OOP/OOD.
- 2+ years Software development experience
- At least 2 years Java development experience, will be advantage with
multithread, database access, and interface cross application experience
- Other programming on C++, .Net will gain extra points
- Knowledge of database, and networking
- Experience in Semiconductor industry will be advantage

Non-IT sill
- Good at team work as well as analyze skill
- Good at communication skill
- Able to communicate in English
- Self motivated

------解决方案--------------------
使用ServletRequest类的下列方法取到reader:
public java.io.BufferedReader getReader() throws java.io.IOException

下面就不用说了吧
  相关解决方案