#2 first. Try using instead. You'll have to add a global forward to your struts config file, like: ... And then use it in a page like: You don't need to use the "id" attribute unless you really want to store the included response in a variable. Try that first and see if #1 is still a problem (although I seem to remember there might actually be a bug with encoding). Another alternative would be to try JSTL (JSP 1.2): <%@ taglib prefix="c uri="http://java.sun.com/jstl/core" %> ... The tag also supports a "charEncoding" attribute that you can try if it doesn't work without it. Quoting Fred Bloggs : > Dear All, > > I'm relatively new to Struts and have come across two > problems that have completely confused me. > > I am using Struts 1.1, Tomcat 4.1.27. > > Problem 1: > > I have an action that produces the most recent “news” > and displays it on separate page. However I want to > include those news as well on some of my other pages. > I use the template tags to get and put the various > pages together (I haven't tried Tiles yet, I want to > keep it simple). > > So my topical.jsp contains a table with the following > row: > > ... > > > page="/getmostrecentnews.do"/> > filter="false"/> > > > ... > > All my pages use the UTF-8 charset thus I use the > following at the start of every jsp page: > > <%@ page contentType="text/html; charset=UTF-8" %> > <%@ taglib uri="/WEB-INF/struts-bean.tld" > prefix="bean"%> > ... plus other taglib definitions. > > When I invoke the /getmostrecentnews.do directly using > a browser, everything is diasplayed correctly. The > correct charset is used. > > Now when I do the shown above), the page is included in the main page, > but the charset is incorrect and thus some characters > are incorrectly displayed. > > I do not use the locale setting since the content and > thus charset is locale independent. > > I use templates to do my header, footer, sidebar etc. > The above table is in the main “content” of my > template. > > I tried changing my template to have another “news” > section and did a put (with a matching get) as > follows: > > content='/getmostrecentnews.do' /> > > I get a “javax.servlet.ServletException: Cannot > forward after response has been committed”. > > I also tried using Struts User Guide” > http://jakarta.apache.org/struts/userGuide/building_view.html, > but I just get an exception > “javax.servlet.ServletException: Cannot forward after > response has been committed”. > > I have not yet ported my application to Tiles so I > don't know if using Tiles instead of Templates will > solve my problem. > > I would be grateful for any pointers. > > Problem 2: > > My site is behind a firewall that does NAT. The site > works, except for the jsp pages where I do: > > > > page="/getmostrecentnews.do"/> > filter="false"/> > > > > It appears that the /getmostrecentnews.do to an absolute URL. However, > since I am behind a NAT firewall (doing port > forwarding) I get an exception saying that “Exception > opening resource” since the absolute URL contains the > external IP and not the NATed IP address of the tomcat > server. > > I tried in all the jsp pages, but that > does not seem to help. > > Is there anyway to tell the an absolute address but a relative address to the > application or context? > > I would be grateful for any help or pointers. > > Thank you in advance. -- Kris Schneider D.O.Tech --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org