How to use ServletContext#log() in TC5.5?
From Tomcat 5.5 context conf entries, Logger entry has disappeared. How could we continue using servlet ServletContext#log() or JSP application.log() on the 5.5? In other words, what is the equivalent for Logger entry and the log file specified by it in TC 5.5? Thanks in advance. -- 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]
How to specify Tomcat error encoding?
Our environment is LANG=ja_JP.UTF-8 on Linux Fedora Core 3. --below are copies from browser screen-- Tomcat error output for JSP page is garbled for Japanese: [Tomcat(5.0.19) with javac]--compiler error mesg part quoted: /usr/jakarta-tomcat-5.0.19/work/Catalina/localhost/testapp/org/apache/jsp/index_jsp.java:45: ?? : sendRedirect(java.lang.String) ??: javax.servlet.http.HttpServletRequest ? ??? request.sendRedirect(/testapp/redir.html); ^ while Resin(3.0.14) displays correct Japanese for compiler error mesg: [Resin with javac] jsp.java:45: シンボルを見つけられません。 シンボル: メソッド sendRedirect(java.lang.String) 場所: javax.servlet.http.HttpServletRequest の インタフェース request.sendRedirect(/testapp/redir.html); ^ [Resin with jikes]--jikis doesn't emit Japanese error mesg, that's OK. /index.jsp:6: Semantic Error: No accessible method with signature sendRedirect(java.lang.String) was found in type javax.servlet.http.HttpServletRequest. My question is: how could we have Tomcat display correct Japanese error message when JSP java code has errors for java compiler et al? Thanks in advance. -- 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]
Re: serving japanese file problem
Your tomcat isn't running with UTF-8 and/or your platform doesn't use UTF-8 for file name. On my Linux Fedora Core 3: echo $LANG == ja_JP.UTF-8 means text file(including .java) and file name on OS file system are created with UTF8 encoding. on our servlet: String contType = text/html;charset=UTF-8; request.setCharacterEncoding(UTF8); response.setContentType(contType); //or, response.setCharacterEncoding(UTF8); out.println(IMG SRC=\/ + text + .jpg\); //text is a UTF8 String Arun Prasad R wrote: i have a ウェブ.jpg (japanese filename) in images directory. while requesting that file url encode to %E3%82%A6%E3%82%A7%E3%83%96.jpg but tomcat doesn't serve ウェブ.jpg instead it says file not found. my question is how to make tomcat to decode %E3%82%A6%E3%82%A7%E3%83%96.jpg as ウェブ.jpg -- 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]
Re: serving japanese file problem
Check whether EVERYTHING is UTF8 including file names on your OS file system, JSP/servlet sourcfile encoding, request and response. Arun Prasad R wrote: thanks Hiroshi, I set -Dfile.encoding=UTF-8 while starting tomcat and my platform support UTF-8 creation. servlet is same as what u have specifed but i get broken image(ie file not found) arun On 8/12/05, Hiroshi Iwatani [EMAIL PROTECTED] wrote: Your tomcat isn't running with UTF-8 and/or your platform doesn't use UTF-8 for file name. On my Linux Fedora Core 3: echo $LANG == ja_JP.UTF-8 means text file(including .java) and file name on OS file system are created with UTF8 encoding. on our servlet: String contType = text/html;charset=UTF-8; request.setCharacterEncoding(UTF8); response.setContentType(contType); //or, response.setCharacterEncoding(UTF8); out.println(IMG SRC=\/ + text + .jpg\); //text is a UTF8 String Arun Prasad R wrote: i have a ウェブ.jpg (japanese filename) in images directory. while requesting that file url encode to %E3%82%A6%E3%82%A7%E3%83%96.jpg but tomcat doesn't serve ウェブ.jpg instead it says file not found. my question is how to make tomcat to decode %E3%82%A6%E3%82%A7%E3%83%96.jpg as ウェブ.jpg -- 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] -- 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]
Re: JDBC
Write tomcat-users element in the tomcat-users.xml file. deepak suldhal wrote: Hi, I followed the JDBC document posted on Tomcat site. and it works fine. I am able to access the database and see the results. My question is. I have different users who will be using my application and I need to validate these users before I provide them acesss to database. How would I do this ?. Since tomcat has the user name and password already in the context, How would know which user is accessing. Thanks D __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: NullPointerException loading JavaServer Faces web application
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:1045) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:83 6) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3823) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 128) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase .java:755) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73 9) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja va:587) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j ava:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470 ) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1076) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java :310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl eSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1011) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1003) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:420 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 50) at org.apache.catalina.core.StandardServer.start(StandardServer.java:196 7) at org.apache.catalina.startup.Catalina.start(Catalina.java:541) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache. webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.bal ancer.rules.RequestParameterRule: Target param name: paramName / Target param va lue: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balanc er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Sep 14, 2004 2:59:08 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Sep 14, 2004 2:59:09 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Sep 14, 2004 2:59:09 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Sep 14, 2004 2:59:09 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Sep 14, 2004 2:59:09 PM org.apache.jk.common.ChannelSocket init INFO: JK2: ajp13 listening on /0.0.0.0:8009 Sep 14, 2004 2:59:09 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/30 config=C:\jakarta-tomcat-5.5.1\conf\jk2.propert ies Sep 14, 2004 2:59:09 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1882 ms Any ideas? Garret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: JSP WhiteSpace
Read JSP 1.2 spec 2.3.7 'White Space'. A wrote: In the compiled JSP page - I dont want to remove white space from the code for the sake of readability --- Schalk Neethling [EMAIL PROTECTED] wrote: Are you talking about about white spaces in the code or the rendered page itself? Parsons Technical Services wrote: Then they are using a very odd or out dated browser. Thus a very small percentage of the users will have problems. Doug Parsons www.parsonstechnical.com - Original Message - From: A [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, August 21, 2004 12:22 PM Subject: Re: JSP WhiteSpace Well what happens if your users cannot accept zipped content - your pretty much screwed then if you choose this method. I woul dprefer a way of doing this without compressing the output. Any ideas? --- Tim Funk [EMAIL PROTECTED] wrote: Use mod_gzip. (If using apache, or tomcat 5 also supports compressing on the HTTP connector) The whitespace becomes a non-issue and your *really* save bandwidth. -Tim Jack Kada wrote: Developers, I have completed a JSP project but when i view the source of the HTML pages there are loads of whitespace in between tables rows. I am using Tomcat 5 and in the mailing list read that there is a parameter called trimSpaces(). I tried this but it had no effect on the webpage. If i could remove whitespace without touching JSP code i would save a lot of bandwidth. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush - 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] -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: [OT] Re: Have you implemented a Java server faces site?
Sorry for being late for replying. Parts of our project which use JSF use only its safa and proven features like value-binding and method-binding for components. We don't think we need customize renderers, components, and/or view technology for our simple and mundane app structure. JSF is quite convenient for not-so-advanced project like ours. V D wrote: Thank you for the reply. I happened to read that article too. I also have the book the guy wrote. I'll look into the rendering part using XML. It would be better if it's supported out of the box though. Hopefully the next version will address this. I did write a simple struts app before, and JSP seems to be better architecturally, and simpler to use though. The problem I have with it is that you can not programmatically display the view easily. What I mean is that in the JSP page, there is not much way to put your code there. For example, one of my requirement is that depending on a situation, 1 or more tables must be shown. You can see from the article that mixing tag lib and JSF is prohibited in a loop. Also, in a purist sense, data preparation for the display should also stay in the JSP file, not the back bean. This means it has to support programming in there. I can just create another class/bean to do this, but it becomes so many files just do something, and isn't JSP supposed to be the view part? I think it's perfectly ok to put any type of java programming in the view as long as that code only is used for the view, not application logic. Anyway, I will investigate if I can some how satisfy all my requirements with this technology. I was very commited to JSF, until I read the first link you sent me. The fact that it's very recent (august 10) causes me unease with this technology. Since it seems that you did implemented a full app successfully, if you don't mind, could you share your experience and how did your project go? Thanks. Hiroshi Iwatani wrote: Oh yes. But ... V D wrote: Thank you very much for the link. I also did some work on JSF too, and see its strength and weakness. Unfortunately, the guy doing the evaluation in the link below did not dig deep enough or use any GUI IDE See links linked from the theserverside page, that is, from the readers responses. Especially, Geary's blog page. The orgiginator guy is rather light and superficial one. such as the Java Creator or IBM's tool. Some of his points are valid though. I see other problems myself. One of them is the ability to create customized view, component, or renderer. They all involves java objects (which is not easily changable), and very elaborate. To have a render, you have to have a tag file, a tag class, a configuration, and the renderer class. Unbelievable! Tags are only for JSP presentation. You could use a better presentation technology if you want. See this article: http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html Personally, I feel JSF has saved my life in the Web development sea. It's simple, easy to use, and more effective than Struts et al. Hiroshi Iwatani wrote: Yes. See http://www.theserverside.com/news/thread.tss?thread_id=27962 V D wrote: If so, what is your experience? Is it mature enough for a serious web programming? Thanks. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: Have you implemented a Java server faces site?
Oh yes. But ... V D wrote: Thank you very much for the link. I also did some work on JSF too, and see its strength and weakness. Unfortunately, the guy doing the evaluation in the link below did not dig deep enough or use any GUI IDE See links linked from the theserverside page, that is, from the readers responses. Especially, Geary's blog page. The orgiginator guy is rather light and superficial one. such as the Java Creator or IBM's tool. Some of his points are valid though. I see other problems myself. One of them is the ability to create customized view, component, or renderer. They all involves java objects (which is not easily changable), and very elaborate. To have a render, you have to have a tag file, a tag class, a configuration, and the renderer class. Unbelievable! Tags are only for JSP presentation. You could use a better presentation technology if you want. See this article: http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html Personally, I feel JSF has saved my life in the Web development sea. It's simple, easy to use, and more effective than Struts et al. Hiroshi Iwatani wrote: Yes. See http://www.theserverside.com/news/thread.tss?thread_id=27962 V D wrote: If so, what is your experience? Is it mature enough for a serious web programming? Thanks. - 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] -- 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]
Re: Have you implemented a Java server faces site?
Yes. See http://www.theserverside.com/news/thread.tss?thread_id=27962 V D wrote: If so, what is your experience? Is it mature enough for a serious web programming? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: Invoking a servlet from the browser
Julian wrote: Hi, I'm new to tomcat and jsp. Tomcat 5 seems to be working and I can sucessfully invoke jsp files. No problems there. I want to invoke a servlet by typing the url into a browser and I can't seem to manage it. Firstly, where do I put my servlets? Do I put them in [install_dir]/webapps/ROOT/WEB-INF/classes Yes. And enable invoker servlet in the [install_dir]/webapps/ROOT/WEB-INF/web.xml file by uncommenting the relevant entry. If you done this, URL is http://localhost:8080/servlet/YourServlet Or, make servlet and servlet-mapping entries for your servlet in [install_dir]/webapps/ROOT/WEB-INF/web.xml file. URL should be http://localhost:8080/YourMappedUrl or somewhere else? Many thanks Julian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: TC5.0.27 and JSF, again
) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) - Root Cause - javax.faces.FacesException: javax.faces.context.FacesContextFactory at javax.faces.FactoryFinder.getImplementationName(FactoryFinder.java:400) at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:203) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:114) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:687) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:968) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:284) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:422) 2004-07-29 07:54:27 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2004-07-29 07:54:27 StandardContext[/servlets-examples]SessionListener: contextInitialized() Betto McRose G, Dpto. Informático TECNOMYL S.R.L. -- 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]
Re: Tomcat 5.0.27 / JavaServer Faces
] For additional commands, e-mail: [EMAIL PROTECTED] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: JSF Newbie
:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: JSF Newbie
) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Tag handler can't evaluate EL
Tomcat 5.0.19 can run the following tag, but can't assgin or evaluate values to/from EL variable. So, Tomcat output is: ${a1} ${a1} ${a1} while expected output is: a b c Resin and JRun can do the expected behavior. ---tag handler package mytag; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; import java.io.*; import javax.servlet.http.*; import java.util.*; public class foreach extends BodyTagSupport{ private Iterator iterator; private String group; public void setGroup(String group){ this.group = group; } public String getGroup(){ return group; } public int doStartTag() throws JspException{ try{ String[] intarray = new String[] {a,b,c}; ArrayList ar = new ArrayList(Arrays.asList(intarray)); iterator = ar.iterator(); if (iterator.hasNext()){ String o = (String)iterator.next(); pageContext.setAttribute(a1, o); return EVAL_BODY_BUFFERED; } else{ return SKIP_BODY; } } catch (Exception e){ System.err.println(e); } return SKIP_BODY; } public int doAfterBody() throws JspException{ try{ if (iterator == null){ return SKIP_BODY; } if (iterator.hasNext()) { String o = (String)iterator.next(); pageContext.setAttribute(a1, o); return EVAL_BODY_AGAIN; } else{ return SKIP_BODY; } } catch (Exception e){ System.err.println(e); } return SKIP_BODY; } public int doEndTag() throws JspException { try { pageContext.getOut().print(bodyContent.getString()); } catch(Exception ioe) { System.out.println(ioe); } return EVAL_PAGE; } } --test.jsp--- %@ page contentType=text/html % %@ taglib prefix=jrun uri=/WEB-INF/mytag.tld % htmlbody bgcolor=lightgreen hr [Tag Test]br jrun:foreach group=itemsql ${a1}br /jrun:foreach hr This is another testbr jrun:foreach group=itemsql ${a1}br /jrun:foreach hr This bad boy!br jrun:foreach group=itemsql ${a1}br /jrun:foreach hr/body/html --TLD ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd; taglib tlib-version1.0/tlib-version jsp-version1.2/jsp-version tag nameforeach/name tag-classmytag.foreach/tag-class body-contentJSP/body-content attribute namegroup/name requiredtrue/required rtexprvaluetrue/rtexprvalue /attribute /tag /taglib - -- 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]
Re: Tomcat 5 vs. Resin?
Hi Reynir I'm not affiliated to the vendor but Resin 3.x doc is much improved over it's 2.x era. See them at www.caucho.com. Reynir Þór Hübner wrote: Hi, I've tested resin around alot. In my oppinion the docs for resin are bad, but the product seems to be good, and performes well. The resin website is very badly arranged and that again comes down on the docs. Maybe if you buy a version of resin you get something better, but I haven't seen that. hope it helps -reynir Hiroshi Iwatani wrote: And, Resin is open-source, kind of ... Josh Rehman wrote: Has anyone compared Tomcat 5 and Resin? Resin has a huge drawback of being closed-source, but it has a great reputation for being small, fast, and easy to configure. Tomcat is working for us, but has been something of a bear WRT learning curves and gotchas, so I'm interested in learning more about the alternatives. Thanks. - 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] -- 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]
Re: Tomcat 5 vs. Resin?
Yes. Lately, Tomcat is unnecessarily complex. Resin is much simpler, easy to use, easy to configure, has good performance, smarter code generation for JSP than Tomcat, chief developer Scott is a very nice guy with deep knowledge, etc., etc. Best thing for me is, in Resin, you don't have to recompile the source when you updated your servlet. Both recompile and reload is done automatically. When you use jikes, recompile is very fast. For test development and for learning, you don't have to write any web.xml nor any conf. Very easy! Josh Rehman wrote: Has anyone compared Tomcat 5 and Resin? Resin has a huge drawback of being closed-source, but it has a great reputation for being small, fast, and easy to configure. Tomcat is working for us, but has been something of a bear WRT learning curves and gotchas, so I'm interested in learning more about the alternatives. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
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]
Re: Tomcat 5 vs. Resin?
And, Resin is open-source, kind of ... Josh Rehman wrote: Has anyone compared Tomcat 5 and Resin? Resin has a huge drawback of being closed-source, but it has a great reputation for being small, fast, and easy to configure. Tomcat is working for us, but has been something of a bear WRT learning curves and gotchas, so I'm interested in learning more about the alternatives. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: JSP Include and URL encoding
(1)Set page directive attributes right (Maybe, pageEncoding = your platform encoding and charset = UTF-8) (2)Use a Servlet/JSP container other than Tomcat. For example, Resin from caucho.com. quote Scott Ferguson wrote: Actually, the underlying problem is a difficult one. Unfortunately, URLs don't have an official character encoding. It looks like we're drifting toward UTF-8 as a default, but that's not specified in the HTTP specifications. Because the HTTP request does not specify the URL encoding, the web server needs to guess. It's somewhat of an ugly problem. Today's JSPs have page directive, its contentType and pageEncoding attributes. A server doesn't need to bring rabbit out of a hat. Simply put in other words, Tomcat behavior is just substandard negligence. I have noticed that servlet generated from JSP by Resin has correct setCharacterEncoding() call even when the original JSP doesn't have the call. Resin may be called 'superstandard.' :) That somewhat translates into the Servlet/JSP forward/include issue. Resin's approach is to realize that the Java string for the URL/QueryString is 16-bits, so there's no need to do any encoding until there's a sendRedirect or something similar. -- Scott /quote Dennis Thrysøe wrote: Hi, I'm having problems including a JSP page from another JSP page using parameters with special characters. I looked through the archives, but couldn't find anything about this issue. I can encode a string, and the result is correct URLEncoder.encode(blåbærgrød, ISO-8859-1) But if I make an include with the same value jsp:include page=bar.jsp flush=true jsp:param name=word value=blåbærgrød / /jsp:include The special characters are replaced with question marks '?' (%3F). So the query string seen from bar.jsp becomes word=bl%3Fb%3Frgr%3Fd In fact the generated java code for the main jsp file contains this string also. So the problem is already during parsing or servlet generation. The requests character encoding is null. The page directive's pageEncoding attribute is ISO-8859-1 (or not present - doesn't make a difference. The user properties user.country and user.language are 'US' and 'en' respectively. Might that be the cause? The problem is on Tomcat 4.1.29 on Linux. By the way: I still haven't figured out whether Tomcat 4.1.30 is supposed to be able to run on JDK 1.3.1. Any help appreciated, -dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
Re: JSP Include and URL encoding
Dennis Thrysøe wrote: Hiroshi Iwatani wrote: (1)Set page directive attributes right (Maybe, pageEncoding = your platform encoding and charset = UTF-8) They are correct. The generated servlet already contains the wrong value '%3F'. (2)Use a Servlet/JSP container other than Tomcat. For example, Resin from caucho.com. Oh no! (1)+ (2) is a SET. Not separate issues. Tomcat JSP translator doesn't use these page directive entries. So I called it substandard negligence. Anyway, thanks for an enjoyable reply! BTW, bugzilla 23929 OP is wrong. I guess that could be an option, but this Tomcat instance is running at our service provider, so they would have to think so too. The problem has now been fixed by setting the language and country properties to 'da' and 'DK' respectively. This was apparently necesarry for the JSP parser to read the file correctly. quote Scott Ferguson wrote: Actually, the underlying problem is a difficult one. Unfortunately, URLs don't have an official character encoding. It looks like we're drifting toward UTF-8 as a default, but that's not specified in the HTTP specifications. Because the HTTP request does not specify the URL encoding, the web server needs to guess. It's somewhat of an ugly problem. For JSP includes this doesn't seem to be the problem. It is because of characters being replaced with '?' when reading the JSP. Thanks anyway, -dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 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]
JSP forward request parameter and encoding
In the following JSP page, parameter value is a three Japanese character string: (B (B--- aJsp.jsp (B... (B... (B% (BString destination = "/aServlet"; (B% (Bjsp:forward page="%= destination %" (B jsp:param name="para" value="$B0&2&$h(B" / (B/jsp:forward (B... (B-- (B (B--- aServlet.java (B... (Bpublic void doGet( .. ){ (B ... (B ... (B String s = request.getParameter("para"); (B (B--- (B (BIn the above scenario, Tomcat(5.x) returns "???"(%3f%3f%3f) in String s, (Bwhereas Resin(2.1.12) returns correct String. Tomcat behaves right only (Bwhen the parameter value is an English ASCII string. (B (BWhat should I do for Tomcat to return correct Japanese string? (B (BInit parameter javaEncoding does no effect. (B (B (BTIA (B (B-- (BHiroshi Iwatani (B (B*stop cruelty* Annual number of institutionally euthanized cats and dogs (Bincluding kittens and puppies: US 5 million, JP 500 thousand. How about your (Bcountry? *for our better karma* (B- (B (B (B- (BTo unsubscribe, e-mail: [EMAIL PROTECTED] (BFor additional commands, e-mail: [EMAIL PROTECTED]