• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

[SOLVED] Problem with LocaleAction + DynaActionForm

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Im getting the error: "no bean specified" trying to use the built in LocaleAction that comes in struts-extras.jar (since struts 1.2 i guess). Here is my code:

Links in JSP:

Form Beans in struts-config.xml:

Action mappings in struts-config.xml:

Also having the corresponding ApplicationResources_en_US.properties and ApplicationResources_es_ES.properties configured.

I had the old method to change locale (implementing a custom Action subclass and calling setLocale(request, locale); It worked fine.

What's wrong ?

Notes:
- .homeLayout is a Tile definition.
- using struts 1.3.8 w/MyEclipse
 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
to get to know the exact issue. it would be always best to paste the stack error from logs.

now i can guess based upon the information provided by you.



change it to




 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That won't solve the bean name issue. The forward values are likely Tiles definitions, as it's a typical naming convention.
 
Ed McMillan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where it is supposed to logs be stored ?

in D:\MyWorkspace\.metadata\.me_tcat\logs\ there are no logs
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're running under Eclipse the log output will appear in the console tab.
 
Ed McMillan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats the problem, my console tab does not shows any related error regarding this problem, here you have last run:

25-may-2009 20:47:43 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;D:\_Databank\Development\Java\Eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_7.1.0.zmyeclipse7102009030516\tomcat\bin
25-may-2009 20:47:43 org.apache.coyote.http11.Http11Protocol init
INFO: Inicializando Coyote HTTP/1.1 en puerto http-8080
25-may-2009 20:47:43 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 447 ms
25-may-2009 20:47:43 org.apache.catalina.core.StandardService start
INFO: Arrancando servicio Catalina
25-may-2009 20:47:43 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
25-may-2009 20:47:47 org.apache.coyote.http11.Http11Protocol start
INFO: Arrancando Coyote HTTP/1.1 en puerto http-8080
25-may-2009 20:47:48 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
25-may-2009 20:47:48 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
25-may-2009 20:47:48 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4700 ms



When I click on the links to change language, nothing happens, except that it goes to .homeLayout (I've tried to go to another e.g. loginLayout and works)
It simply ignores locale changing.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you increased the logging levels?
 
Ed McMillan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to do that ?
 
Ed McMillan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem solved, in the DynaActionForm declaration, is mandatory to put java.lang.String instead of just String:

<form-bean name="LoginForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="email" type="java.lang.String" initial="Enter your email" />
<form-property name="password" type="java.lang.String" />
</form-bean>
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic