You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nomen Nomanum <ge...@outlook.com> on 2013/05/30 00:02:35 UTC

Pulling different description for image based on choosen language

Hi! I want to implement for my app processing of different description for my image based on choosen language. So, if user chooses Spanish, only Spanish description for my image should be rendered. Thanks in advance.
 		 	   		  

Re: Pulling different description for image based on choosen language

Posted by Boris Horvat <ho...@gmail.com>.
I am glad to hear that.

btw I would advise to swith to maven it makes your life easier. Maven can
support any type of a project and since this is a tapestry web project I
would advise to start it using

http://tapestry.apache.org/getting-started.html

You can move your code later once you have a proper project setup.

All the best
Boris


On Thu, May 30, 2013 at 9:35 PM, Nomen Nomanum <ge...@outlook.com>wrote:

> Thank you! :) I have solved even this issue. Now, lets get something more
> challenging! :)
>




-- 
Sincerely
*Boris Horvat*

RE: Pulling different description for image based on choosen language

Posted by Nomen Nomanum <ge...@outlook.com>.
Thank you! :) I have solved even this issue. Now, lets get something more challenging! :)
 		 	   		  

RE: Pulling different description for image based on choosen language

Posted by Nomen Nomanum <ge...@outlook.com>.
OK, one more question concerns me. Do I have to put jquery.js in head or in java class, once I get Tapestry-JQuery downloaded in my project?
 		 	   		  

RE: Pulling different description for image based on choosen language

Posted by Nomen Nomanum <ge...@outlook.com>.
I have downloaded and built myself Tap JQuery, and version of Tap is 5.3.6. I have tried to add as pretty much everything it complained about, however now it requires Spring framework. I don't know what jar is using Spring, but that is very strange. Also, I am not using pom, since I deploy jar directly to my app lib folder and my project is of type Java Web project. I am not sure can I use pom file in that kind of project.

30.05.2013 16:43:48 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter app
java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.privateGetPublicMethods(Class.java:2547)
    at java.lang.Class.getMethods(Class.java:1410)
    at org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.<init>(DefaultModuleDefImpl.java:115)
    at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:131)
    at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:159)
    at org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
    at org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
    at org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
    at org.apache.tapestry5.internal.TapestryAppInitializer.<init>(TapestryAppInitializer.java:124)
    at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:531)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1468)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
    ... 56 more


> From: horvat.z.boris@gmail.com
> Date: Thu, 30 May 2013 12:49:11 +0200
> Subject: Re: Pulling different description for image based on choosen language
> To: users@tapestry.apache.org
> 
> See now this is a problem, but how did you expect to get an answer to this
> from your first mail? :S
> 
> Anyway I guess it could be dependency issue. What version of tapestry and
> tapestry-jquery are you using? I would advise 5.3.7 and 3.3.7-SNAPSHOT
> respectively.
> 
> I guess printing dependency tree would be a bad thing to see as well. Also
> you mentioned Tomcat but could you start it on Jetty?
> 
> Cheer
> 
> 
> On Thu, May 30, 2013 at 3:56 AM, Nomen Nomanum <ge...@outlook.com>wrote:
> 
> > Great proposal, Horvat! :) Will do exactly that. However, one more concern
> > is on my mind right now. I have included Tap-JQuery library, and everything
> > is fine, until I load it! My app can't even be deployed, from the Tomcat
> > logs, I can see it keeps complaining about
> >
> > 30.05.2013 14:32:46 org.apache.catalina.core.StandardContext filterStart
> > SEVERE: Exception starting filter app
> > java.lang.RuntimeException: Exception loading module(s) from manifest
> > jar:file:/C:/Users/Daniel_Sabado_Images/Documents/NetBeansProjects/ObligadoProecto
> > /build/web/WEB-INF/lib/tapestry-jquery.jar!/META-INF/MANIFEST.MF: Failure
> > loading Tapestry IoC module class
> > org.got5.tapestry5.jquery.services.JQueryModule: Error invoking service
> > binder method
> > org.got5.tapestry5.jquery.services.JQueryModule.bind(ServiceBinder) (at
> > JQueryModule.java:155): org/apache/tapestry5/upload/services/UploadedFile
> >
> 
> 
> 
> 
> -- 
> Sincerely
> *Boris Horvat*
 		 	   		  

Re: Pulling different description for image based on choosen language

Posted by Boris Horvat <ho...@gmail.com>.
See now this is a problem, but how did you expect to get an answer to this
from your first mail? :S

Anyway I guess it could be dependency issue. What version of tapestry and
tapestry-jquery are you using? I would advise 5.3.7 and 3.3.7-SNAPSHOT
respectively.

I guess printing dependency tree would be a bad thing to see as well. Also
you mentioned Tomcat but could you start it on Jetty?

Cheer


On Thu, May 30, 2013 at 3:56 AM, Nomen Nomanum <ge...@outlook.com>wrote:

> Great proposal, Horvat! :) Will do exactly that. However, one more concern
> is on my mind right now. I have included Tap-JQuery library, and everything
> is fine, until I load it! My app can't even be deployed, from the Tomcat
> logs, I can see it keeps complaining about
>
> 30.05.2013 14:32:46 org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter app
> java.lang.RuntimeException: Exception loading module(s) from manifest
> jar:file:/C:/Users/Daniel_Sabado_Images/Documents/NetBeansProjects/ObligadoProecto
> /build/web/WEB-INF/lib/tapestry-jquery.jar!/META-INF/MANIFEST.MF: Failure
> loading Tapestry IoC module class
> org.got5.tapestry5.jquery.services.JQueryModule: Error invoking service
> binder method
> org.got5.tapestry5.jquery.services.JQueryModule.bind(ServiceBinder) (at
> JQueryModule.java:155): org/apache/tapestry5/upload/services/UploadedFile
>




-- 
Sincerely
*Boris Horvat*

RE: Pulling different description for image based on choosen language

Posted by Nomen Nomanum <ge...@outlook.com>.
Great proposal, Horvat! :) Will do exactly that. However, one more concern is on my mind right now. I have included Tap-JQuery library, and everything is fine, until I load it! My app can't even be deployed, from the Tomcat logs, I can see it keeps complaining about 

30.05.2013 14:32:46 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter app
java.lang.RuntimeException: Exception loading module(s) from manifest jar:file:/C:/Users/Daniel_Sabado_Images/Documents/NetBeansProjects/ObligadoProecto
/build/web/WEB-INF/lib/tapestry-jquery.jar!/META-INF/MANIFEST.MF: Failure loading Tapestry IoC module class org.got5.tapestry5.jquery.services.JQueryModule: Error invoking service binder method org.got5.tapestry5.jquery.services.JQueryModule.bind(ServiceBinder) (at JQueryModule.java:155): org/apache/tapestry5/upload/services/UploadedFile 
 		 	   		  

Re: Pulling different description for image based on choosen language

Posted by Lance Java <la...@googlemail.com>.
http://tapestry.apache.org/localization.html

Re: Pulling different description for image based on choosen language

Posted by Boris Horvat <ho...@gmail.com>.
Hi,

Ok, go implement it I dont have any objections :)

What I am trying to say is that you dont really say what is the problem
that you are facing and how does it relate to tapestry...

If you are looking for a general advice for something like that this may
not be the best forum for such question. Still what I would do is put the
descriptions in the db and then created a query that takes the image and
the language and returns the description and finally display that to the
users.

Hope this helps

Cheers,
Boris


On Thu, May 30, 2013 at 12:02 AM, Nomen Nomanum <ge...@outlook.com>wrote:

> Hi! I want to implement for my app processing of different description for
> my image based on choosen language. So, if user chooses Spanish, only
> Spanish description for my image should be rendered. Thanks in advance.
>




-- 
Sincerely
*Boris Horvat*