RE: FW: jsp:include tag does not preserve encoding of the text
Agreed! Hey, one way I can think of to solve your problem is to use a jsp file instead of html page. That way you can set the pageEncoding to be utf-8. That should take care of it. Also I read it somewhere that it's always better to use jsp pages, not sure why though. Something to do with how the container handles different types. -Yan -Original Message- From: Hiroshi Iwatani [mailto:[EMAIL PROTECTED] Sent: Saturday, April 03, 2004 3:40 AM To: Tomcat Users List Subject: Re: FW: jsp:include tag does not preserve encoding of the text In your deployment, html is handled by Apache and not processed by JSP/Servlet engine. Included JSP inherit main-page setting. If you run Tomcat stand-alone without other HTTP server, you will find its html handling characteristics. I don't expect much from Tomcat, though ;-) eMantra Information wrote: hi I am using Apache web server and Tomcat 4.1. I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8 text is displayed as garbage characters. I have included following in the JSP %@ page contentType=text/html; charset=UTF-8 % I have included following in the info.html meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets displayed correctly. I suppose, the JSP engine does not interprete the content of the html file correctly according to its encoding. Where as if it is a .jsp, then it is int erpreting it appropriately? Can anybody throw some lite on this? regards haresh sample files... test1.jsp.. %@ page contentType=text/html; charset=UTF-8 % % response.setContentType(text/html; charset=UTF-8); % HTML HEAD meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 /HEAD BODY jsp:include page=data1.html flush=true/ /BODY /HTML data1.html. meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 br . br -- Hiroshi Iwatani *stop cruelty* Annual number of institutionally euthanized cats and dogs including kittens and puppies: US 5 million, JP 500 thousand. How about your country? *for our better karma* - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: jsp:include tag does not preserve encoding of the text
In your deployment, html is handled by Apache and not processed by JSP/Servlet engine. Included JSP inherit main-page setting. If you run Tomcat stand-alone without other HTTP server, you will find its html handling characteristics. I don't expect much from Tomcat, though ;-) eMantra Information wrote: hi I am using Apache web server and Tomcat 4.1. I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8 text is displayed as garbage characters. I have included following in the JSP %@ page contentType=text/html; charset=UTF-8 % I have included following in the info.html meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets displayed correctly. I suppose, the JSP engine does not interprete the content of the html file correctly according to its encoding. Where as if it is a .jsp, then it is int erpreting it appropriately? Can anybody throw some lite on this? regards haresh sample files... test1.jsp.. %@ page contentType=text/html; charset=UTF-8 % % response.setContentType(text/html; charset=UTF-8); % HTML HEAD meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 /HEAD BODY jsp:include page=data1.html flush=true/ /BODY /HTML data1.html. meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 br . br -- Hiroshi Iwatani *stop cruelty* Annual number of institutionally euthanized cats and dogs including kittens and puppies: US 5 million, JP 500 thousand. How about your country? *for our better karma* - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: jsp:include tag does not preserve encoding of the text
hi I am using Apache web server and Tomcat 4.1. I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8 text is displayed as garbage characters. I have included following in the JSP %@ page contentType=text/html; charset=UTF-8 % I have included following in the info.html meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets displayed correctly. I suppose, the JSP engine does not interprete the content of the html file correctly according to its encoding. Where as if it is a .jsp, then it is int erpreting it appropriately? Can anybody throw some lite on this? regards haresh sample files... test1.jsp.. %@ page contentType=text/html; charset=UTF-8 % % response.setContentType(text/html; charset=UTF-8); % HTML HEAD meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 /HEAD BODY jsp:include page=data1.html flush=true/ /BODY /HTML data1.html. meta HTTP-EQUIV=content-type CONTENT=text/html; charset=UTF-8 br . br
RE: Advanced Question about jsp:include / tag
Howdy, Is reloadable=true for your context in server.xml? Tomcat doesn't check pages every second. So you might have to wait a few seconds before your folder updates are visible. Yoav Shapira Millennium ChemInformatics -Original Message- From: Joe Krause [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15, 2003 6:50 PM To: '[EMAIL PROTECTED]' Subject: Advanced Question about jsp:include / tag I have a complicated menu structure that is dynamically generated per client on login of the webapp. Each client has a different set of folders which don't change often but require a bit of processing to produce - so I decided to create an include file and cache it on the server. I include that cached HTML/Javascript menu structure with the following command: jsp:include page=%= clientSession.menuPath % flush=true / This works great! However, a problem occurs when I need to update one of these cached files because the client added or deleted a folder. Sometimes, the pages that are returned contain the state prior to any change. If I then refresh or go to another page, the folder structure is immediately changed. Sometime this happens, sometimes it works right. It seems like Tomcat is caching the contents of the file that %= clientSession.menuPath % is poiting to. I know for a fact that the browser is not caching the page (I've included all the appropriate HTML header tags to stop browser caching, plus there is data on the page that is changing with each page refresh). Also, I am not using any threads, and my updating of the page is happening prior to the including of the page. Has anyone had this problem before? Is ther a way to tell tomcat to always go and get the page every time? Joe Krause This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Advanced Question about jsp:include / tag
I have a complicated menu structure that is dynamically generated per client on login of the webapp. Each client has a different set of folders which don't change often but require a bit of processing to produce - so I decided to create an include file and cache it on the server. I include that cached HTML/Javascript menu structure with the following command: jsp:include page=%= clientSession.menuPath % flush=true / This works great! However, a problem occurs when I need to update one of these cached files because the client added or deleted a folder. Sometimes, the pages that are returned contain the state prior to any change. If I then refresh or go to another page, the folder structure is immediately changed. Sometime this happens, sometimes it works right. It seems like Tomcat is caching the contents of the file that %= clientSession.menuPath % is poiting to. I know for a fact that the browser is not caching the page (I've included all the appropriate HTML header tags to stop browser caching, plus there is data on the page that is changing with each page refresh). Also, I am not using any threads, and my updating of the page is happening prior to the including of the page. Has anyone had this problem before? Is ther a way to tell tomcat to always go and get the page every time? Joe Krause
tomcat 4.1.10 jsp:include tag
Hello, I've caught an exception with tomcat 4.1.10 and the tag jsp:include page= this is the code: --- % boolean disabled=false; ...% jsp:include page=simple-icon.jsp jsp:param name=icon value=blocca/ jsp:param name=disabled value=%= disabled %/ /jsp:include --- and this is the error message: --- An error occurred at line: 567 in the jsp file: /frame-grid.jsp Generated servlet error: D:\Programmi\Tomcat 4.1\work\Standalone\localhost\webmodel\frame_0002dgrid_jsp.java:412: cannot resolve symbol symbol : method encode (boolean) location: class java.net.URLEncoder JspRuntimeLibrary.include(request, response, simple-icon.jsp + ? + icon= + blocca + + disabled= + java.net.URLEncoder.encode( disabled ), out, false); --- Note that with Tomcat 4.04 this worked fine. I'm using Tomcat 4.1.10 LE-jdk14 with jdk 1.4.0 Thanx for any suggests, luca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat 4.1.10 jsp:include tag
luca wrote: Hello, I've caught an exception with tomcat 4.1.10 and the tag jsp:include page= this is the code: --- % boolean disabled=false; ...% jsp:include page=simple-icon.jsp jsp:param name=icon value=blocca/ jsp:param name=disabled value=%= disabled %/ /jsp:include --- and this is the error message: --- An error occurred at line: 567 in the jsp file: /frame-grid.jsp Generated servlet error: D:\Programmi\Tomcat 4.1\work\Standalone\localhost\webmodel\frame_0002dgrid_jsp.java:412: cannot resolve symbol symbol : method encode (boolean) location: class java.net.URLEncoder JspRuntimeLibrary.include(request, response, simple-icon.jsp + ? + icon= + blocca + + disabled= + java.net.URLEncoder.encode( disabled ), out, false); --- Note that with Tomcat 4.04 this worked fine. I'm using Tomcat 4.1.10 LE-jdk14 with jdk 1.4.0 Yes, this is a known issue. It will be fixed in the next release. Remy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
index.jsp: Invalid jsp:include tag...
hello community, could someone tell me why i've got this error under jbuilder, when trying to run a jsp file ? index.jsp: Invalid jsp:include tag... thanks jean fotovat
problem with jsp:include tag...
hi, i am having a problem with jsp:include tag. i am trying to include an html page using jsp:include page="file.html" flush="true" / .. but i get an error like: [26/Jul/2001:12:34:54] config ( 7990): for hostx.x.x.x trying to POST file.html, internal-redirect reports: no way to service request for file.html [26/Jul/2001:12:34:54] warning ( 7990): RequestDispatcher: include call failed i am using iPlanet webserver 4.1 on Solaris 8. can anyone help regarding the problem... thanks and regards, rahul
'jsp:include' tag
Hello all, Does anyone have problems with the 'jsp:include' tag with tomcat. I always get the following error when I try to use it: Internal Servlet Error: org.apache.jasper.compiler.CompileException: Welcome.jsp(15,0) Invalid jsp:include tag at org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95) at org.apache.jasper.compiler.JspParseEventListener.handleInclude(JspParseEvent Listener.java:877) at org.apache.jasper.compiler.DelegatingListener.handleInclude(DelegatingListen er.java:185) at org.apache.jasper.compiler.Parser$Include.accept(Parser.java:299) at org.apache.jasper.compiler.Parser.parse(Parser.java:1070) at org.apache.jasper.compiler.Parser.parse(Parser.java:1035) at org.apache.jasper.compiler.Parser.parse(Parser.java:1031) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:453) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:424) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:382) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387) at org.apache.tomcat.core.Handler.service(Handler.java:263) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Here is the code in the jsp: jsp:include page="/includes/afile.jsp" / Anyone know what the dealis? Thanks in advance! Leon Palermo
RE: 'jsp:include' tag
check the ralative paths. -Original Message- From: Leon Palermo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 11, 2001 11:08 AM To: [EMAIL PROTECTED] Subject: 'jsp:include' tag Hello all, Does anyone have problems with the 'jsp:include' tag with tomcat. I always get the following error when I try to use it: Internal Servlet Error: org.apache.jasper.compiler.CompileException: Welcome.jsp(15,0) Invalid jsp:include tag at org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95) at org.apache.jasper.compiler.JspParseEventListener.handleInclude(JspParseEvent Listener.java:877) at org.apache.jasper.compiler.DelegatingListener.handleInclude(DelegatingListen er.java:185) at org.apache.jasper.compiler.Parser$Include.accept(Parser.java:299) at org.apache.jasper.compiler.Parser.parse(Parser.java:1070) at org.apache.jasper.compiler.Parser.parse(Parser.java:1035) at org.apache.jasper.compiler.Parser.parse(Parser.java:1031) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:453) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:424) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:382) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387) at org.apache.tomcat.core.Handler.service(Handler.java:263) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Here is the code in the jsp: jsp:include page="/includes/afile.jsp" / Anyone know what the dealis? Thanks in advance! Leon Palermo
Re: 'jsp:include' tag
Yes, Once I had that problem and I worked it out by adding the flush="true" attribute. I mean: jsp:include page="/includes/afile.jsp" flush ="true"/ I think it was a reported bug. HTH. Martin Hello all, Does anyone have problems with the 'jsp:include' tag with tomcat. I always get the following error when I try to use it: Internal Servlet Error: org.apache.jasper.compiler.CompileException: Welcome.jsp(15,0) Invalid jsp:include tag at org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95) at org.apache.jasper.compiler.JspParseEventListener.handleInclude(JspParseEvent Listener.java:877) at org.apache.jasper.compiler.DelegatingListener.handleInclude(DelegatingListen er.java:185) at org.apache.jasper.compiler.Parser$Include.accept(Parser.java:299) at org.apache.jasper.compiler.Parser.parse(Parser.java:1070) at org.apache.jasper.compiler.Parser.parse(Parser.java:1035) at org.apache.jasper.compiler.Parser.parse(Parser.java:1031) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:453) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:424) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:382) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387) at org.apache.tomcat.core.Handler.service(Handler.java:263) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Here is the code in the jsp: jsp:include page="/includes/afile.jsp" / Anyone know what the dealis? Thanks in advance! Leon Palermo
Re: 'jsp:include' tag
try to add flush="true" it should be optional in next releases. Dmitry R., [EMAIL PROTECTED] Chief Architect, MetricStream.COM Santa Clara, CA -Original Message- From:Leon Palermo [EMAIL PROTECTED] Sent:Wed, 11 Apr 2001 12:08:15 -0400 To: [EMAIL PROTECTED] Subject: 'jsp:include' tag Hello all, Does anyone have problems with the 'jsp:include' tag with tomcat. I always get the following error when I try to use it: Internal Servlet Error: org.apache.jasper.compiler.CompileException: Welcome.jsp(15,0) Invalid jsp:include tag at org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95) at org.apache.jasper.compiler.JspParseEventListener.handleInclude(JspParseEvent Listener.java:877) at org.apache.jasper.compiler.DelegatingListener.handleInclude(DelegatingListen er.java:185) at org.apache.jasper.compiler.Parser$Include.accept(Parser.java:299) at org.apache.jasper.compiler.Parser.parse(Parser.java:1070) at org.apache.jasper.compiler.Parser.parse(Parser.java:1035) at org.apache.jasper.compiler.Parser.parse(Parser.java:1031) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:453) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:424) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:309) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:382) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:387) at org.apache.tomcat.core.Handler.service(Handler.java:263) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:371) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:78 6) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:732) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:166) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:407) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) Here is the code in the jsp: jsp:include page="/includes/afile.jsp" / Anyone know what the dealis? Thanks in advance! Leon Palermo ___ Visit http://www.visto.com/info, your free web-based communications center. Visto.com. Life on the Dot.