You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by robinbajaj <ro...@gmail.com> on 2007/05/30 21:25:01 UTC

[s2]hot deploy java and struts.xml changes in tomcat

Hi there, 
I just setup tomcat 5.5 as my web-container for struts2 project. 
But I cann't seem to figure out how to force the hot deploy work with it. 
I noticed (following struts2 bootstrap tutorial) that jetty can hot-deploy
my changes, 
ie whenever I change my .java / struts.xml , it picks up the changes on its
own.
but no such luck with tomcat 5.5. 
is there some more maven magic that i need to do to get this working...
any helpful pointers will be greatly appreciated. 
thanks,
robin
-- 
View this message in context: http://www.nabble.com/-s2-hot-deploy-java-and-struts.xml-changes-in-tomcat-tf3842451.html#a10880830
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multi lingual web site

Posted by Roger Varley <ro...@googlemail.com>.
>
> Using the locale, you should be able to construct a SQL query to load
> the correct data from the table structure I mentioned.
>

Or you could add language choice as a user selectable option on either
your login page (if you use a login) or on your "home" page.

Regards
Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multi lingual web site

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe,

Joe Yuen wrote:
> How does one detect which language and country is selected?

Since you are posting to the Struts mailing list, I would imagine that
you are using Struts. Struts 1.x allows you to grab the user's Locale by
using Action.getLocale(HttpServletRequest).

Using the locale, you should be able to construct a SQL query to load
the correct data from the table structure I mentioned.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXe0H9CaO5/Lv0PARAkXSAJ9ROGo9mYMmTid2e0Oq9Vw2AEzAQwCffleL
cdidIIhks83iWO/OUDGQT3A=
=Ydlm
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Multi lingual web site

Posted by Joe Yuen <jo...@chisq.com>.
Thanks Chris.
 
How does one detect which language and country is selected?

________________________________

From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: Wed 5/30/2007 1:37 PM
To: Struts Users Mailing List
Subject: Re: Multi lingual web site



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe,

Joe Yuen wrote:
> I'm currently using a
> resource file and that all work great except for some select boxes
> the data comes from the database where the data is in English. I was
> wondering how other people handle this situation?

You'll need your tables to accommodate other languages. I usually do
something like this:

CREATE TABLE foo
(
    id INTEGER NOT NULL, -- the PK
    ...
)
;


CREATE TABLE foo_text
(
    foo_id INTEGER NOT NULL,   -- PK(1)
    language CHAR(2) NOT NULL, -- PK(2)
    country CHAR(2) NULL,      -- PK(3)

    -- text fields go here, and are localized
)
;

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXeCB9CaO5/Lv0PARAmWsAKCsAHjVQmfnK8WxWkW65zRcoiZsSwCfaWFg
xZUX4rFBrn5MdvZjNrqYYbw=
=YWFU
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





Re: Multi lingual web site

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe,

Joe Yuen wrote:
> I'm currently using a
> resource file and that all work great except for some select boxes
> the data comes from the database where the data is in English. I was
> wondering how other people handle this situation?

You'll need your tables to accommodate other languages. I usually do
something like this:

CREATE TABLE foo
(
    id INTEGER NOT NULL, -- the PK
    ...
)
;


CREATE TABLE foo_text
(
    foo_id INTEGER NOT NULL,   -- PK(1)
    language CHAR(2) NOT NULL, -- PK(2)
    country CHAR(2) NULL,      -- PK(3)

    -- text fields go here, and are localized
)
;

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXeCB9CaO5/Lv0PARAmWsAKCsAHjVQmfnK8WxWkW65zRcoiZsSwCfaWFg
xZUX4rFBrn5MdvZjNrqYYbw=
=YWFU
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multi lingual web site

Posted by Martin Gainty <mg...@hotmail.com>.
encode as UTF-16
Good Luck,

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "wang huan" <fi...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, May 30, 2007 9:16 PM
Subject: Re: Multi lingual web site


> We usually have several resource files, and output fields with  tag
> <bean:message key="key_in_resource_file" />.  Instead of storing values, 
> we
> store those keys in DB.
>
> for instance:
> <html:select property="attributeStyle">
>              <html:option value="pagecontent.date"><bean:message key="
> pagecontent.date"/></html:option>
>              <html:option value="pagecontent.string"><bean:message key="
> pagecontent.string"/></html:option>
>              <html:option value="pagecontent.integer"><bean:message key="
> pagecontent.integer"/></html:option>
>             </html:select>
>
>
> -- 
> 北半球的狗几月份掉毛?
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multi lingual web site

Posted by wang huan <fi...@gmail.com>.
We usually have several resource files, and output fields with  tag
<bean:message key="key_in_resource_file" />.  Instead of storing values, we
store those keys in DB.

for instance:
<html:select property="attributeStyle">
              <html:option value="pagecontent.date"><bean:message key="
pagecontent.date"/></html:option>
              <html:option value="pagecontent.string"><bean:message key="
pagecontent.string"/></html:option>
              <html:option value="pagecontent.integer"><bean:message key="
pagecontent.integer"/></html:option>
             </html:select>


-- 
北半球的狗几月份掉毛?

RE: Multi lingual web site

Posted by Jon Cruz <Jo...@ncen.com>.
Hello,

There are a few ways I've gotten around this:

1. Store the other languages in the same table that populates the
"select" control.  In the future, if you add more languages to your
site, you just add to that table.  (Which would be similar to adding
another resource file for that new language.)

2. If the "select" controls have a few "options" associated with them,
you could use a Map to populate the "select" control.  This Map could be
generated within your Action, and could be populated using the
appropriate resource, (according to the language/Locale that the user
requires).  Again, it all depends on how many "options" your "select"
has.  I use it for those "selects" that have no more than 10 "options".


Jon 

-----Original Message-----
From: Joe Yuen [mailto:joe.yuen@chisq.com] 
Sent: Wednesday, May 30, 2007 1:16 PM
To: Struts Users Mailing List
Subject: Multi lingual web site

I am trying to build a mutilingual website. I'm currently using a
resource file and that all work great except for some select boxes the
data comes from the database where the data is in english. I was
wondering how other people handle this situation? Should I have the same
table also store the same words in spanish for example? Any
ideas?Suggestions?
 
 
Thanks,
-Joe


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Multi lingual web site

Posted by Joe Yuen <jo...@chisq.com>.
I am trying to build a mutilingual website. I'm currently using a resource file and that all work great except for some select boxes the data comes from the database where the data is in english. I was wondering how other people handle this situation? Should I have the same table also store the same words in spanish for example? Any ideas?Suggestions?
 
 
Thanks,
-Joe


Re: [s2]hot deploy java and struts.xml changes in tomcat

Posted by robinbajaj <ro...@gmail.com>.
thanks , that's a helpful link. 

I like the idea of using manager app do the reload for you..
for eg:  http://localhost:8080/manager/reload?path=/examples 

Is there a way to make mvn tomcat plugin to use tomcat v6 in this case,
instead of tomcat 5.5.
Since I would rather like to work in tomcat 6 than tomcat 5.5

And i notice the mvn script downloads tomcat's related jars (just like any
other dependency in pom.xml)
in C:\Documents and Settings\<user-name>\.m2\repository\tomcat  (on windows
box).

a) how can I make it download tomcat 6 stuff instead of tomcat 5.5

b) secondly, I noticed, at this link that explains how to set up manager
application access
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Configuring%20Manager%20Application%20Access

its asking for Catalina_base and Catalina_home variables etc. Where in the
above path (m2 repository)
would be my catalina_base and Catalina_home.

c) is there some way that I can make the maven build script put the stuff in
my locally installed 
tomcat v6 server (say c:\tomcat6\webapps) . In that case, I can easily setup
the hot deploy stuff 
using the link provided by yitzle.

thanks a lot in advance for all the helpful pointers provided so far, 
robin



yitzle wrote:
> 
> Did you look at
> http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server
> ?
> 
> Also view:
> http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Reload%20An%20Existing%20Application
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2-hot-deploy-java-and-struts.xml-changes-in-tomcat-tf3842451.html#a10882353
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2]hot deploy java and struts.xml changes in tomcat

Posted by yitzle <yi...@users.sourceforge.net>.
Did you look at
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server
?

Also view:
http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Reload%20An%20Existing%20Application

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org