[JBoss Seam] - After adding SeamServletFilte, request.getInputStream() retu
by chicochen
<filter>
| <filter-name>Seam Servlet Filter</filter-name>
| <filter-class>
| org.jboss.seam.servlet.SeamServletFilter
| </filter-class>
| </filter>
| <filter-mapping>
| <filter-name>Seam Servlet Filter</filter-name>
| <url-pattern>*.serv</url-pattern>
| </filter-mapping>
<servlet>
| <servlet-name>testServlet</servlet-name>
| <servlet-class>
| com.eastidea.menglishweb.action.TestServlet
| </servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>testServlet</servlet-name>
| <url-pattern>/testServlet.serv</url-pattern>
| </servlet-mapping>
public void doPost(HttpServletRequest request, HttpServletResponse response)
| throws ServletException, IOException {
|
| response.setContentType("text/html");
| response.setCharacterEncoding("utf-8");
|
| ServletInputStream servletInputStream = request.getInputStream(); File file = new File("d:/out.txt");
| int readCount;
| byte[] readByte = new byte[1024];
| FileOutputStream fileOutputStream;
| try {
| fileOutputStream = new FileOutputStream(file);
| readCount = servletInputStream.readLine(readByte, 0,
| readByte.length);
|
| while (readCount != -1) {
| fileOutputStream.write(readByte, 0, readCount);
| readCount = servletInputStream.readLine(readByte, 0, 1024);
| }
| fileOutputStream.flush();
|
| } catch (IOException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099704#4099704
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099704
18Â years, 6Â months
[JBoss Seam] - Re: Nested ui:repeat fails
by susnet
I found out the problem why it did not work using tomahawk dataList for me. The problem was that i use JBoss 4.2 in my new seam project and then you also have to include the commons-el.jar to your webapp lib.
Here is a complete tutorial on how to use tomahawk dataList in a Seam project on JBoss 4.2:
1. Add tomahawk.jar to your webapp lib.
2. Add commons-el.jar to your webapp lib.
3. Take the following code and put it into a file and name it tomahawk.taglib.xml and put this file directly under your WEB-INF directory.
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE facelet-taglib PUBLIC
| "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
| "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
|
| <facelet-taglib>
| <namespace>http://myfaces.apache.org/tomahawk</namespace>
|
| <tag>
| <tag-name>dataList</tag-name>
| <component>
| <component-type>org.apache.myfaces.HtmlDataList</component-type>
| <renderer-type>org.apache.myfaces.List</renderer-type>
| </component>
| </tag>
| </facelet-taglib>
|
4. Put the following code in your web.xml
| <context-param>
| <param-name>facelets.LIBRARIES</param-name>
| <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
| </context-param>
|
5. In those xhtml files you want to use tomahawk dataList add
xmlns:t="http://myfaces.apache.org/tomahawk"
and then just use the dataList for example like this:
| <t:dataList value="#{allCategories.resultList}" var="cat">
| <p>#{cat.name}</p>
| </t:dataList>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099696#4099696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099696
18Â years, 6Â months
[JBoss Seam] - Re: Nested ui:repeat fails
by susnet
When I read the nabble forum for facelets there seems to still be bugs in this, but I didn't really get which version it concerns, only that there are open bugs.
If the bug in ui:repeat is solved i want to use it but if it is not i have read in serveral places that you should use tomahawk datalist instead.
I have tried that and managed to get it to work in one of my seam projects but now I have problem another seam project which uses JBPM. I'm using Seam 1.2.1. Is this suppose to work?
My question is - Is the tomahawk datalist (and because i have to install the whole tomahawk jar to just use this datalist component) fully compatible with seam? Which version of tomahawk do you recommend use together with seam 1.2.1 and 2.0.0?
Or even better, do you have some other replacement for ui:repeat in some seam library or other library you have tested and knows works, since i run my applications in production it is nice if they work. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099693#4099693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099693
18Â years, 6Â months